diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_prn.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_prn.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c index 9fbf177ba4..36bb4ddc4b 100644 --- a/src/lib/libcrypto/asn1/tasn_prn.c +++ b/src/lib/libcrypto/asn1/tasn_prn.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tasn_prn.c,v 1.18 2019/03/23 18:48:14 beck Exp $ */ | 1 | /* $OpenBSD: tasn_prn.c,v 1.19 2019/04/01 15:48:04 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -500,13 +500,18 @@ asn1_primitive_print(BIO *out, ASN1_VALUE **fld, const ASN1_ITEM *it, | |||
500 | ASN1_STRING *str; | 500 | ASN1_STRING *str; |
501 | int ret = 1, needlf = 1; | 501 | int ret = 1, needlf = 1; |
502 | const char *pname; | 502 | const char *pname; |
503 | const ASN1_PRIMITIVE_FUNCS *pf; | ||
504 | 503 | ||
505 | pf = it->funcs; | ||
506 | if (!asn1_print_fsname(out, indent, fname, sname, pctx)) | 504 | if (!asn1_print_fsname(out, indent, fname, sname, pctx)) |
507 | return 0; | 505 | return 0; |
508 | if (pf && pf->prim_print) | 506 | |
507 | if (it != NULL && it->funcs != NULL) { | ||
508 | const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; | ||
509 | |||
510 | if (pf->prim_print == NULL) | ||
511 | return 0; | ||
512 | |||
509 | return pf->prim_print(out, fld, it, indent, pctx); | 513 | return pf->prim_print(out, fld, it, indent, pctx); |
514 | } | ||
510 | 515 | ||
511 | str = (ASN1_STRING *)*fld; | 516 | str = (ASN1_STRING *)*fld; |
512 | 517 | ||