[gcr: 3/5] gcr: use new egg_asn1x_decode_any_as_string()
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr: 3/5] gcr: use new egg_asn1x_decode_any_as_string()
- Date: Thu, 30 Jan 2020 09:03:09 +0000 (UTC)
commit 3845a1793a6c9afe726a7a4a37b53d9a4ebbe754
Author: Dmitry Baryshkov <dbaryshkov gmail com>
Date: Wed Jan 29 13:41:41 2020 +0300
gcr: use new egg_asn1x_decode_any_as_string()
Signed-off-by: Dmitry Baryshkov <dbaryshkov gmail com>
gcr/gcr-certificate-extensions.c | 4 ++--
gcr/gcr-parser.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gcr/gcr-certificate-extensions.c b/gcr/gcr-certificate-extensions.c
index 92dec7c..ab62be6 100644
--- a/gcr/gcr-certificate-extensions.c
+++ b/gcr/gcr-certificate-extensions.c
@@ -185,11 +185,11 @@ general_name_parse_other (GNode *node, GcrGeneralName *general)
if (oid == GCR_OID_ALT_NAME_XMPP_ADDR) {
general->description = _("XMPP Addr");
- decode = egg_asn1x_get_any_as (any, pkix_asn1_tab, "UTF8String");
+ decode = egg_asn1x_get_any_as_string (any, EGG_ASN1X_UTF8_STRING);
general->display = egg_asn1x_get_string_as_utf8 (decode, g_realloc);
} else if (oid == GCR_OID_ALT_NAME_DNS_SRV) {
general->description = _("DNS SRV");
- decode = egg_asn1x_get_any_as (any, pkix_asn1_tab, "IA5String");
+ decode = egg_asn1x_get_any_as_string (any, EGG_ASN1X_IA5_STRING);
general->display = egg_asn1x_get_string_as_utf8 (decode, g_realloc);
}
diff --git a/gcr/gcr-parser.c b/gcr/gcr-parser.c
index 3d307db..8fa36a1 100644
--- a/gcr/gcr-parser.c
+++ b/gcr/gcr-parser.c
@@ -1262,7 +1262,7 @@ parse_pkcs12_bag_friendly_name (GNode *asn)
if (oid == GCR_OID_PKCS9_ATTRIBUTE_FRIENDLY) {
node = egg_asn1x_node (asn, i, "values", 1, NULL);
if (node != NULL) {
- asn_str = egg_asn1x_get_any_as (node, pkix_asn1_tab, "BMPString");
+ asn_str = egg_asn1x_get_any_as_string (node, EGG_ASN1X_BMP_STRING);
if (asn_str) {
result = egg_asn1x_get_bmpstring_as_utf8 (asn_str);
egg_asn1x_destroy (asn_str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]