diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2020-01-29 15:22:29 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2020-01-30 12:26:02 +0300 |
commit | 927bb943ce5e2938cce365d1f14cdbb3ba308990 (patch) | |
tree | 0d79b7eaa24db3e6ef9fef62f9548a05a4f5bbc6 /egg | |
parent | 73894a05a27c1f57245f4ff6a2541c5d83b07128 (diff) | |
download | gcr-927bb943ce5e2938cce365d1f14cdbb3ba308990.tar.gz |
egg-dn: correctly handle BMPStrings in DN
If the node is BMPString, it should be handled separately, rather than
just being used as Printable/UTF8String.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Diffstat (limited to 'egg')
-rw-r--r-- | egg/egg-dn.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/egg/egg-dn.c b/egg/egg-dn.c index 601dccc..8a32b59 100644 --- a/egg/egg-dn.c +++ b/egg/egg-dn.c @@ -80,6 +80,15 @@ dn_print_oid_value_parsed (GQuark oid, else node = asn1; + if (egg_asn1x_type (node) == EGG_ASN1X_BMP_STRING) { + result = egg_asn1x_get_bmpstring_as_utf8 (node); + if (result) { + egg_asn1x_destroy (asn1); + + return result; + } + } + value = egg_asn1x_get_value_raw (node); data = g_bytes_get_data (value, &size); |