diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-04-26 18:30:45 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-12 13:54:37 +0200 |
commit | eeccc237239d6f2b6fbc557be7062bfe2ab836be (patch) | |
tree | 888f18ed5067404a0703b62f94a263317109f5be /crypto/ocsp/ocsp_cl.c | |
parent | e3efe7a53299dff3cd2222542b6a999b1360d626 (diff) |
Introduce X509_add_cert[s] simplifying various additions to cert lists
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12615)
Diffstat (limited to 'crypto/ocsp/ocsp_cl.c')
-rw-r--r-- | crypto/ocsp/ocsp_cl.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/crypto/ocsp/ocsp_cl.c b/crypto/ocsp/ocsp_cl.c index 95b16dce55..f45bf1d6dc 100644 --- a/crypto/ocsp/ocsp_cl.c +++ b/crypto/ocsp/ocsp_cl.c @@ -81,14 +81,7 @@ int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert) return 0; if (cert == NULL) return 1; - if (sig->certs == NULL - && (sig->certs = sk_X509_new_null()) == NULL) - return 0; - - if (!sk_X509_push(sig->certs, cert)) - return 0; - X509_up_ref(cert); - return 1; + return X509_add_cert_new(&sig->certs, cert, X509_ADD_FLAG_UP_REF); } /* |