[openssl-commits] [openssl] master update

Dr. Stephen Henson steve at openssl.org
Wed May 4 19:09:33 UTC 2016


The branch master has been updated
       via  9d103dbb6f44dbe5d430356e5560c84984ada049 (commit)
      from  c7e6ae6a810d9b65fa604f5ca3a003c5164f3c5f (commit)


- Log -----------------------------------------------------------------
commit 9d103dbb6f44dbe5d430356e5560c84984ada049
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Wed May 4 14:50:14 2016 +0100

    support embed in ASN.1 print
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/asn1/tasn_prn.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c
index f6bd218..7a96aca 100644
--- a/crypto/asn1/tasn_prn.c
+++ b/crypto/asn1/tasn_prn.c
@@ -314,6 +314,7 @@ int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
 {
     int i, flags;
     const char *sname, *fname;
+    ASN1_VALUE *tfld;
     flags = tt->flags;
     if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME)
         sname = ASN1_ITEM_ptr(tt->item)->sname;
@@ -323,6 +324,16 @@ int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
         fname = NULL;
     else
         fname = tt->field_name;
+
+    /*
+     * If field is embedded then fld needs fixing so it is a pointer to
+     * a pointer to a field.
+     */
+    if (flags & ASN1_TFLG_EMBED) {
+        tfld = (ASN1_VALUE *)fld;
+        fld = &tfld;
+    }
+
     if (flags & ASN1_TFLG_SK_MASK) {
         char *tname;
         ASN1_VALUE *skitem;


More information about the openssl-commits mailing list