[gcr: 1/5] egg-dn: correctly handle BMPStrings in DN
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr: 1/5] egg-dn: correctly handle BMPStrings in DN
- Date: Thu, 30 Jan 2020 11:02:49 +0000 (UTC)
commit 927bb943ce5e2938cce365d1f14cdbb3ba308990
Author: Dmitry Baryshkov <dbaryshkov gmail com>
Date: Wed Jan 29 15:22:29 2020 +0300
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>
egg/egg-dn.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]