diff options
author | Shigeki Ohtsu <ohtsu@ohtsu.org> | 2017-11-03 00:22:35 +0900 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2017-11-03 12:22:29 -0500 |
commit | e7fff9c4435f9f5ef8069217d2a0093c81a8c78b (patch) | |
tree | 45fbbf4aae64902b831501231d16b7a0af2aeb53 /deps/openssl/openssl/apps/ca.c | |
parent | 3d4d5e0c60f00693947c940b09249f3952bb0cdc (diff) | |
download | android-node-v8-e7fff9c4435f9f5ef8069217d2a0093c81a8c78b.tar.gz android-node-v8-e7fff9c4435f9f5ef8069217d2a0093c81a8c78b.tar.bz2 android-node-v8-e7fff9c4435f9f5ef8069217d2a0093c81a8c78b.zip |
deps: upgrade openssl sources to 1.0.2m
This replaces all sources of openssl-1.0.2m.tar.gz into
deps/openssl/openssl
PR-URL: https://github.com/nodejs/node/pull/16691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/openssl/openssl/apps/ca.c')
-rw-r--r-- | deps/openssl/openssl/apps/ca.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/deps/openssl/openssl/apps/ca.c b/deps/openssl/openssl/apps/ca.c index f90f033bae..9a839969a2 100644 --- a/deps/openssl/openssl/apps/ca.c +++ b/deps/openssl/openssl/apps/ca.c @@ -1985,10 +1985,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, /* Lets add the extensions, if there are any */ if (ext_sect) { X509V3_CTX ctx; - if (ci->version == NULL) - if ((ci->version = ASN1_INTEGER_new()) == NULL) - goto err; - ASN1_INTEGER_set(ci->version, 2); /* version 3 certificate */ /* * Free the current entries if any, there should not be any I believe @@ -2051,6 +2047,15 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, goto err; } + { + STACK_OF(X509_EXTENSION) *exts = ci->extensions; + + if (exts != NULL && sk_X509_EXTENSION_num(exts) > 0) + /* Make it an X509 v3 certificate. */ + if (!X509_set_version(ret, 2)) + goto err; + } + /* Set the right value for the noemailDN option */ if (email_dn == 0) { if (!X509_set_subject_name(ret, dn_subject)) |