diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-02-17 12:29:39 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-02-18 16:50:12 +0100 |
commit | c1be4d617cf9435e8326ebba643aa4d7cbcb3645 (patch) | |
tree | 19c7fb4fbca59427990d69b3fc3a14610bb9658d | |
parent | daf1300b80443b6bf0dec19085056ec407925d89 (diff) |
Rename internal X509_add_cert_new() to ossl_x509_add_cert_new()
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14039)
-rw-r--r-- | crypto/cmp/cmp_protect.c | 2 | ||||
-rw-r--r-- | crypto/cms/cms_lib.c | 4 | ||||
-rw-r--r-- | crypto/cms/cms_sd.c | 6 | ||||
-rw-r--r-- | crypto/ocsp/ocsp_cl.c | 2 | ||||
-rw-r--r-- | crypto/ocsp/ocsp_local.h | 2 | ||||
-rw-r--r-- | crypto/ocsp/ocsp_srv.c | 2 | ||||
-rw-r--r-- | crypto/pkcs12/p12_kiss.c | 4 | ||||
-rw-r--r-- | crypto/pkcs7/pk7_lib.c | 2 | ||||
-rw-r--r-- | crypto/x509/x509_cmp.c | 4 | ||||
-rw-r--r-- | crypto/x509/x509_vfy.c | 2 | ||||
-rw-r--r-- | include/crypto/x509.h | 2 |
11 files changed, 16 insertions, 16 deletions
diff --git a/crypto/cmp/cmp_protect.c b/crypto/cmp/cmp_protect.c index aa51bbaa77..dcc0232e01 100644 --- a/crypto/cmp/cmp_protect.c +++ b/crypto/cmp/cmp_protect.c @@ -162,7 +162,7 @@ int ossl_cmp_msg_add_extraCerts(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg) return 0; } else { /* make sure that at least our own signer cert is included first */ - if (!X509_add_cert_new(&msg->extraCerts, ctx->cert, prepend)) + if (!ossl_x509_add_cert_new(&msg->extraCerts, ctx->cert, prepend)) return 0; ossl_cmp_debug(ctx, "fallback: adding just own CMP signer cert"); } diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c index 8c4f252ee8..3e2907fc16 100644 --- a/crypto/cms/cms_lib.c +++ b/crypto/cms/cms_lib.c @@ -627,8 +627,8 @@ STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms) for (i = 0; i < sk_CMS_CertificateChoices_num(*pcerts); i++) { cch = sk_CMS_CertificateChoices_value(*pcerts, i); if (cch->type == 0) { - if (!X509_add_cert_new(&certs, cch->d.certificate, - X509_ADD_FLAG_UP_REF)) { + if (!ossl_x509_add_cert_new(&certs, cch->d.certificate, + X509_ADD_FLAG_UP_REF)) { sk_X509_pop_free(certs, X509_free); return NULL; } diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index 57dd85d561..b0519f3894 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -20,7 +20,7 @@ #include "crypto/evp.h" #include "crypto/cms.h" #include "crypto/ess.h" -#include "crypto/x509.h" /* for X509_add_cert_new() */ +#include "crypto/x509.h" /* for ossl_x509_add_cert_new() */ /* CMS SignedData Utilities */ @@ -509,8 +509,8 @@ STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms) for (i = 0; i < sk_CMS_SignerInfo_num(sinfos); i++) { si = sk_CMS_SignerInfo_value(sinfos, i); if (si->signer != NULL) { - if (!X509_add_cert_new(&signers, si->signer, - X509_ADD_FLAG_DEFAULT)) { + if (!ossl_x509_add_cert_new(&signers, si->signer, + X509_ADD_FLAG_DEFAULT)) { sk_X509_free(signers); return NULL; } diff --git a/crypto/ocsp/ocsp_cl.c b/crypto/ocsp/ocsp_cl.c index 2d4bd036ad..40d26fb871 100644 --- a/crypto/ocsp/ocsp_cl.c +++ b/crypto/ocsp/ocsp_cl.c @@ -77,7 +77,7 @@ int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert) return 0; if (cert == NULL) return 1; - return X509_add_cert_new(&sig->certs, cert, X509_ADD_FLAG_UP_REF); + return ossl_x509_add_cert_new(&sig->certs, cert, X509_ADD_FLAG_UP_REF); } /* diff --git a/crypto/ocsp/ocsp_local.h b/crypto/ocsp/ocsp_local.h index 1e7de1384f..a7e6e86685 100644 --- a/crypto/ocsp/ocsp_local.h +++ b/crypto/ocsp/ocsp_local.h @@ -7,7 +7,7 @@ * https://www.openssl.org/source/license.html */ -#include "crypto/x509.h" /* for X509_add_cert_new() */ +#include "crypto/x509.h" /* for ossl_x509_add_cert_new() */ /*- CertID ::= SEQUENCE { * hashAlgorithm AlgorithmIdentifier, diff --git a/crypto/ocsp/ocsp_srv.c b/crypto/ocsp/ocsp_srv.c index 2c8b38f723..4a864f2d79 100644 --- a/crypto/ocsp/ocsp_srv.c +++ b/crypto/ocsp/ocsp_srv.c @@ -158,7 +158,7 @@ OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp, int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert) { - return X509_add_cert_new(&resp->certs, cert, X509_ADD_FLAG_UP_REF); + return ossl_x509_add_cert_new(&resp->certs, cert, X509_ADD_FLAG_UP_REF); } /* diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c index 9b2e8a55c5..140a690cbb 100644 --- a/crypto/pkcs12/p12_kiss.c +++ b/crypto/pkcs12/p12_kiss.c @@ -10,7 +10,7 @@ #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/pkcs12.h> -#include "crypto/x509.h" /* for X509_add_cert_new() */ +#include "crypto/x509.h" /* for ossl_x509_add_cert_new() */ /* Simplified PKCS#12 routines */ @@ -104,7 +104,7 @@ int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, } if (ca != NULL) { - if (!X509_add_cert_new(ca, x, X509_ADD_FLAG_DEFAULT)) + if (!ossl_x509_add_cert_new(ca, x, X509_ADD_FLAG_DEFAULT)) goto err; continue; } diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c index baecff28fa..95aab3368a 100644 --- a/crypto/pkcs7/pk7_lib.c +++ b/crypto/pkcs7/pk7_lib.c @@ -257,7 +257,7 @@ int PKCS7_add_certificate(PKCS7 *p7, X509 *x509) return 0; } - return X509_add_cert_new(sk, x509, X509_ADD_FLAG_UP_REF); + return ossl_x509_add_cert_new(sk, x509, X509_ADD_FLAG_UP_REF); } int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl) diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index 9cf02be0cb..c29fe3cc5f 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -175,7 +175,7 @@ int X509_cmp(const X509 *a, const X509 *b) return rv < 0 ? -1 : rv > 0; } -int X509_add_cert_new(STACK_OF(X509) **p_sk, X509 *cert, int flags) +int ossl_x509_add_cert_new(STACK_OF(X509) **p_sk, X509 *cert, int flags) { if (*p_sk == NULL && (*p_sk = sk_X509_new_null()) == NULL) { @@ -236,7 +236,7 @@ int ossl_x509_add_certs_new(STACK_OF(X509) **p_sk, STACK_OF(X509) *certs, int j = (flags & X509_ADD_FLAG_PREPEND) == 0 ? i : n - 1 - i; /* if prepend, add certs in reverse order to keep original order */ - if (!X509_add_cert_new(p_sk, sk_X509_value(certs, j), flags)) + if (!ossl_x509_add_cert_new(p_sk, sk_X509_value(certs, j), flags)) return 0; } return 1; diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 83dddeeb3d..f4f78eec9d 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -281,7 +281,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx) return -1; } - if (!X509_add_cert_new(&ctx->chain, ctx->cert, X509_ADD_FLAG_UP_REF)) { + if (!ossl_x509_add_cert_new(&ctx->chain, ctx->cert, X509_ADD_FLAG_UP_REF)) { ctx->error = X509_V_ERR_OUT_OF_MEM; return -1; } diff --git a/include/crypto/x509.h b/include/crypto/x509.h index 4898eeed61..809f6e328e 100644 --- a/include/crypto/x509.h +++ b/include/crypto/x509.h @@ -318,7 +318,7 @@ int x509_init_sig_info(X509 *x); int asn1_item_digest_ex(const ASN1_ITEM *it, const EVP_MD *type, void *data, unsigned char *md, unsigned int *len, OSSL_LIB_CTX *libctx, const char *propq); -int X509_add_cert_new(STACK_OF(X509) **sk, X509 *cert, int flags); +int ossl_x509_add_cert_new(STACK_OF(X509) **sk, X509 *cert, int flags); int ossl_x509_add_certs_new(STACK_OF(X509) **p_sk, STACK_OF(X509) *certs, int flags); |