diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-01-08 23:18:19 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-01-20 15:59:22 +0100 |
commit | d8ab30be9cc4d4e77008d4037e696bc41ce293f8 (patch) | |
tree | 3aaccc433ec24bb746793901bbbdf1ae50983f4d /crypto/ct/ct_sct_ctx.c | |
parent | 05458fdb73dcca30edace5ad727a15d6d919e215 (diff) |
X509v3_get_ext_by_NID.pod: Add warning on counter-intuitive behavior of X509v3_delete_ext() etc.
Also simplify two uses of these functions.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13711)
Diffstat (limited to 'crypto/ct/ct_sct_ctx.c')
-rw-r--r-- | crypto/ct/ct_sct_ctx.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/ct/ct_sct_ctx.c b/crypto/ct/ct_sct_ctx.c index a84c476caf..353b5a7f0e 100644 --- a/crypto/ct/ct_sct_ctx.c +++ b/crypto/ct/ct_sct_ctx.c @@ -168,15 +168,12 @@ int SCT_CTX_set1_cert(SCT_CTX *sctx, X509 *cert, X509 *presigner) * SCT. */ if (idx >= 0) { - X509_EXTENSION *ext; - /* Take a copy of certificate so we don't modify passed version */ pretmp = X509_dup(cert); if (pretmp == NULL) goto err; - ext = X509_delete_ext(pretmp, idx); - X509_EXTENSION_free(ext); + X509_EXTENSION_free(X509_delete_ext(pretmp, idx)); if (!ct_x509_cert_fixup(pretmp, presigner)) goto err; |