diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-12-04 11:01:08 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-12-10 15:19:55 +0100 |
commit | d858e743a9efa9d6282fdb84f3160b485bafc866 (patch) | |
tree | 4059e9d83119ad7b8787e429d4f690b4a3fafae2 /apps/ca.c | |
parent | e9701a0141313d2c7008c6ee6d821ba80b3a14d9 (diff) |
apps/{req,x509,ca}.c: Clean up code setting X.509 cert version v3
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13614)
Diffstat (limited to 'apps/ca.c')
-rwxr-xr-x | apps/ca.c | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -1650,12 +1650,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, if ((ret = X509_new_ex(app_get0_libctx(), app_get0_propq())) == NULL) goto end; -#ifdef X509_V3 - /* Make it an X509 v3 certificate. */ - if (!X509_set_version(ret, 2)) - goto end; -#endif - if (BN_to_ASN1_INTEGER(serial, X509_get_serialNumber(ret)) == NULL) goto end; if (selfsign) { @@ -1739,15 +1733,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, goto end; } - { - const STACK_OF(X509_EXTENSION) *exts = X509_get0_extensions(ret); - - if (exts != NULL && sk_X509_EXTENSION_num(exts) > 0) - /* Make it an X509 v3 certificate. */ - if (!X509_set_version(ret, 2)) - goto end; - } - if (verbose) BIO_printf(bio_err, "The subject name appears to be ok, checking data base for clashes\n"); |