summaryrefslogtreecommitdiff
path: root/src/crypto/x509v3
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-08-11 13:26:41 -0400
committerDavid Benjamin <davidben@google.com>2016-08-12 14:08:45 +0000
commitc895d6b1c580258e72e1ed3fcc86d38970ded9e1 (patch)
treeb26f7d725faedd082287409e1c3a96fe4c73f32f /src/crypto/x509v3
parent30c1479e31192003d5f27ea9e3db7551892774d2 (diff)
downloadboringssl-c895d6b1c580258e72e1ed3fcc86d38970ded9e1.tar.gz
external/boringssl: Sync to aa2485.
This includes the following changes: https://boringssl.googlesource.com/boringssl/+log/171b5403ee767fa0f3aecd377867db6533c3eb8f..aa24851515d6280aa1d6a8b1548fe74691df3136 Bug: 29744850 Change-Id: Id4e4a9e7a19c2f0badbaead2c39a51037ba182ed
Diffstat (limited to 'src/crypto/x509v3')
-rw-r--r--src/crypto/x509v3/pcy_tree.c3
-rw-r--r--src/crypto/x509v3/v3_conf.c4
-rw-r--r--src/crypto/x509v3/v3_prn.c3
3 files changed, 5 insertions, 5 deletions
diff --git a/src/crypto/x509v3/pcy_tree.c b/src/crypto/x509v3/pcy_tree.c
index e7484e52..a13a4fa3 100644
--- a/src/crypto/x509v3/pcy_tree.c
+++ b/src/crypto/x509v3/pcy_tree.c
@@ -255,7 +255,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
level++;
x = sk_X509_value(certs, i);
cache = policy_cache_set(x);
- level->cert = X509_up_ref(x);
+ X509_up_ref(x);
+ level->cert = x;
if (!cache->anyPolicy)
level->flags |= X509_V_FLAG_INHIBIT_ANY;
diff --git a/src/crypto/x509v3/v3_conf.c b/src/crypto/x509v3/v3_conf.c
index 66abca4e..ff2eae14 100644
--- a/src/crypto/x509v3/v3_conf.c
+++ b/src/crypto/x509v3/v3_conf.c
@@ -138,10 +138,12 @@ static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid,
nval = NCONF_get_section(conf, value + 1);
else
nval = X509V3_parse_list(value);
- if (sk_CONF_VALUE_num(nval) <= 0) {
+ if (nval == NULL || sk_CONF_VALUE_num(nval) <= 0) {
OPENSSL_PUT_ERROR(X509V3, X509V3_R_INVALID_EXTENSION_STRING);
ERR_add_error_data(4, "name=", OBJ_nid2sn(ext_nid), ",section=",
value);
+ if (*value != '@')
+ sk_CONF_VALUE_pop_free(nval, X509V3_conf_free);
return NULL;
}
ext_struc = method->v2i(method, ctx, nval);
diff --git a/src/crypto/x509v3/v3_prn.c b/src/crypto/x509v3/v3_prn.c
index 5015efcc..2f5efcff 100644
--- a/src/crypto/x509v3/v3_prn.c
+++ b/src/crypto/x509v3/v3_prn.c
@@ -207,9 +207,6 @@ static int unknown_ext_print(BIO *out, X509_EXTENSION *ext,
return 1;
case X509V3_EXT_PARSE_UNKNOWN:
- return ASN1_parse_dump(out,
- ext->value->data, ext->value->length, indent,
- -1);
case X509V3_EXT_DUMP_UNKNOWN:
return BIO_hexdump(out, ext->value->data, ext->value->length, indent);