[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Dr. Stephen Henson
steve at openssl.org
Tue Jul 19 01:33:58 UTC 2016
The branch OpenSSL_1_0_2-stable has been updated
via 59eefa115a008bacc6750b8ab1684835c3607a85 (commit)
from 1a2e1334a200d62d3e7841b08583a7859795148b (commit)
- Log -----------------------------------------------------------------
commit 59eefa115a008bacc6750b8ab1684835c3607a85
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Mon Jul 18 23:59:39 2016 +0100
Check and print out boolean type properly.
If underlying type is boolean don't check field is NULL.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(cherry picked from commit ad72d9fdf7709ddb97a58d7d45d755e6e0504b96)
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/tasn_prn.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c
index 5e7d53e..1dae46b 100644
--- a/crypto/asn1/tasn_prn.c
+++ b/crypto/asn1/tasn_prn.c
@@ -204,7 +204,8 @@ static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
} else
asn1_cb = 0;
- if (*fld == NULL) {
+ if (((it->itype != ASN1_ITYPE_PRIMITIVE)
+ || (it->utype != V_ASN1_BOOLEAN)) && *fld == NULL) {
if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_ABSENT) {
if (!nohdr && !asn1_print_fsname(out, indent, fname, sname, pctx))
return 0;
@@ -496,11 +497,16 @@ static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld,
return 0;
if (pf && pf->prim_print)
return pf->prim_print(out, fld, it, indent, pctx);
- str = (ASN1_STRING *)*fld;
- if (it->itype == ASN1_ITYPE_MSTRING)
+ if (it->itype == ASN1_ITYPE_MSTRING) {
+ str = (ASN1_STRING *)*fld;
utype = str->type & ~V_ASN1_NEG;
- else
+ } else {
utype = it->utype;
+ if (utype == V_ASN1_BOOLEAN)
+ str = NULL;
+ else
+ str = (ASN1_STRING *)*fld;
+ }
if (utype == V_ASN1_ANY) {
ASN1_TYPE *atype = (ASN1_TYPE *)*fld;
utype = atype->type;
More information about the openssl-commits
mailing list