diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-02-25 00:08:54 +0100 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-03-18 08:52:37 +0100 |
commit | 9500c8234d8e99396717b9e43f10cc518e8bf668 (patch) | |
tree | 51975e210b7900643c21d2ad67b3a65a902fc591 /providers | |
parent | Fix external symbols for crypto_* (diff) | |
download | openssl-9500c8234d8e99396717b9e43f10cc518e8bf668.tar.xz openssl-9500c8234d8e99396717b9e43f10cc518e8bf668.zip |
Fix misc external ossl_ symbols.
Partial fix for #12964
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14473)
Diffstat (limited to 'providers')
19 files changed, 32 insertions, 32 deletions
diff --git a/providers/baseprov.c b/providers/baseprov.c index c63f1fb257..249d12cb63 100644 --- a/providers/baseprov.c +++ b/providers/baseprov.c @@ -162,7 +162,7 @@ int ossl_base_provider_init(const OSSL_CORE_HANDLE *handle, * create their own library context. */ if ((*provctx = ossl_prov_ctx_new()) == NULL - || (corebiometh = bio_prov_init_bio_method()) == NULL) { + || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) { ossl_prov_ctx_free(*provctx); *provctx = NULL; return 0; diff --git a/providers/common/bio_prov.c b/providers/common/bio_prov.c index 4db224ba05..baf923c7b3 100644 --- a/providers/common/bio_prov.c +++ b/providers/common/bio_prov.c @@ -203,7 +203,7 @@ static int bio_core_free(BIO *bio) return 1; } -BIO_METHOD *bio_prov_init_bio_method(void) +BIO_METHOD *ossl_bio_prov_init_bio_method(void) { BIO_METHOD *corebiometh = NULL; @@ -223,7 +223,7 @@ BIO_METHOD *bio_prov_init_bio_method(void) return corebiometh; } -BIO *bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio) +BIO *ossl_bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio) { BIO *outbio; BIO_METHOD *corebiometh = ossl_prov_ctx_get0_core_bio_method(provctx); diff --git a/providers/common/include/prov/bio.h b/providers/common/include/prov/bio.h index 18c0f9a752..da7e7e87f5 100644 --- a/providers/common/include/prov/bio.h +++ b/providers/common/include/prov/bio.h @@ -28,5 +28,5 @@ int ossl_prov_bio_free(OSSL_CORE_BIO *bio); int ossl_prov_bio_vprintf(OSSL_CORE_BIO *bio, const char *format, va_list ap); int ossl_prov_bio_printf(OSSL_CORE_BIO *bio, const char *format, ...); -BIO_METHOD *bio_prov_init_bio_method(void); -BIO *bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio); +BIO_METHOD *ossl_bio_prov_init_bio_method(void); +BIO *ossl_bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio); diff --git a/providers/defltprov.c b/providers/defltprov.c index 2649972c82..01e3f9ced4 100644 --- a/providers/defltprov.c +++ b/providers/defltprov.c @@ -558,7 +558,7 @@ int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle, * create their own library context. */ if ((*provctx = ossl_prov_ctx_new()) == NULL - || (corebiometh = bio_prov_init_bio_method()) == NULL) { + || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) { ossl_prov_ctx_free(*provctx); *provctx = NULL; return 0; diff --git a/providers/implementations/encode_decode/decode_der2key.c b/providers/implementations/encode_decode/decode_der2key.c index c8a467fb5b..459c672875 100644 --- a/providers/implementations/encode_decode/decode_der2key.c +++ b/providers/implementations/encode_decode/decode_der2key.c @@ -59,7 +59,7 @@ static int read_der(PROV_CTX *provctx, OSSL_CORE_BIO *cin, unsigned char **data, long *len) { BUF_MEM *mem = NULL; - BIO *in = bio_new_from_core_bio(provctx, cin); + BIO *in = ossl_bio_new_from_core_bio(provctx, cin); int ok = (asn1_d2i_read_bio(in, &mem) >= 0); if (ok) { diff --git a/providers/implementations/encode_decode/decode_ms2key.c b/providers/implementations/encode_decode/decode_ms2key.c index 5635a70960..f38717cbb3 100644 --- a/providers/implementations/encode_decode/decode_ms2key.c +++ b/providers/implementations/encode_decode/decode_ms2key.c @@ -30,7 +30,7 @@ static EVP_PKEY *read_msblob(PROV_CTX *provctx, OSSL_CORE_BIO *cin, int *ispub) { - BIO *in = bio_new_from_core_bio(provctx, cin); + BIO *in = ossl_bio_new_from_core_bio(provctx, cin); EVP_PKEY *pkey = ossl_b2i_bio(in, ispub); BIO_free(in); @@ -48,7 +48,7 @@ static EVP_PKEY *read_pvk(PROV_CTX *provctx, OSSL_CORE_BIO *cin, if (!ossl_pw_set_ossl_passphrase_cb(&pwdata, pw_cb, pw_cbarg)) return NULL; - in = bio_new_from_core_bio(provctx, cin); + in = ossl_bio_new_from_core_bio(provctx, cin); pkey = b2i_PVK_bio(in, ossl_pw_pem_password, &pwdata); BIO_free(in); diff --git a/providers/implementations/encode_decode/decode_pem2der.c b/providers/implementations/encode_decode/decode_pem2der.c index 895015a56b..fe6839965d 100644 --- a/providers/implementations/encode_decode/decode_pem2der.c +++ b/providers/implementations/encode_decode/decode_pem2der.c @@ -32,7 +32,7 @@ static int read_pem(PROV_CTX *provctx, OSSL_CORE_BIO *cin, char **pem_name, char **pem_header, unsigned char **data, long *len) { - BIO *in = bio_new_from_core_bio(provctx, cin); + BIO *in = ossl_bio_new_from_core_bio(provctx, cin); int ok = (PEM_read_bio(in, pem_name, pem_header, data, len) > 0); BIO_free(in); diff --git a/providers/implementations/encode_decode/encode_key2any.c b/providers/implementations/encode_decode/encode_key2any.c index 32d99837b2..1647b9fdb5 100644 --- a/providers/implementations/encode_decode/encode_key2any.c +++ b/providers/implementations/encode_decode/encode_key2any.c @@ -1014,7 +1014,7 @@ static int key2any_encode(struct key2any_ctx_st *ctx, OSSL_CORE_BIO *cout, ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_NULL_PARAMETER); } else if (writer != NULL && (checker == NULL || checker(key, type))) { - BIO *out = bio_new_from_core_bio(ctx->provctx, cout); + BIO *out = ossl_bio_new_from_core_bio(ctx->provctx, cout); if (out != NULL && (pwcb == NULL diff --git a/providers/implementations/encode_decode/encode_key2blob.c b/providers/implementations/encode_decode/encode_key2blob.c index 2e5e581391..c58940b0a6 100644 --- a/providers/implementations/encode_decode/encode_key2blob.c +++ b/providers/implementations/encode_decode/encode_key2blob.c @@ -29,7 +29,7 @@ static int write_blob(void *provctx, OSSL_CORE_BIO *cout, void *data, int len) { - BIO *out = bio_new_from_core_bio(provctx, cout); + BIO *out = ossl_bio_new_from_core_bio(provctx, cout); int ret = BIO_write(out, data, len); BIO_free(out); diff --git a/providers/implementations/encode_decode/encode_key2ms.c b/providers/implementations/encode_decode/encode_key2ms.c index c2b08981a7..cbd629dfe4 100644 --- a/providers/implementations/encode_decode/encode_key2ms.c +++ b/providers/implementations/encode_decode/encode_key2ms.c @@ -38,7 +38,7 @@ struct key2ms_ctx_st { static int write_msblob(struct key2ms_ctx_st *ctx, OSSL_CORE_BIO *cout, EVP_PKEY *pkey, int ispub) { - BIO *out = bio_new_from_core_bio(ctx->provctx, cout); + BIO *out = ossl_bio_new_from_core_bio(ctx->provctx, cout); int ret = ispub ? i2b_PublicKey_bio(out, pkey) : i2b_PrivateKey_bio(out, pkey); @@ -53,7 +53,7 @@ static int write_pvk(struct key2ms_ctx_st *ctx, OSSL_CORE_BIO *cout, BIO *out = NULL; int ret = 0; - out = bio_new_from_core_bio(ctx->provctx, cout); + out = ossl_bio_new_from_core_bio(ctx->provctx, cout); ret = i2b_PVK_bio(out, pkey, ctx->pvk_encr_level, ossl_pw_pem_password, &ctx->pwdata); BIO_free(out); diff --git a/providers/implementations/encode_decode/encode_key2text.c b/providers/implementations/encode_decode/encode_key2text.c index 2c6c5d70db..f913a9bb14 100644 --- a/providers/implementations/encode_decode/encode_key2text.c +++ b/providers/implementations/encode_decode/encode_key2text.c @@ -833,7 +833,7 @@ static int key2text_encode(void *vctx, const void *key, int selection, int selection), OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - BIO *out = bio_new_from_core_bio(vctx, cout); + BIO *out = ossl_bio_new_from_core_bio(vctx, cout); int ret; if (out == NULL) diff --git a/providers/implementations/exchange/kdf_exch.c b/providers/implementations/exchange/kdf_exch.c index d61c04354c..38631b45d1 100644 --- a/providers/implementations/exchange/kdf_exch.c +++ b/providers/implementations/exchange/kdf_exch.c @@ -81,7 +81,7 @@ static int kdf_init(void *vpkdfctx, void *vkdf, const OSSL_PARAM params[]) if (!ossl_prov_is_running() || pkdfctx == NULL || vkdf == NULL - || !kdf_data_up_ref(vkdf)) + || !ossl_kdf_data_up_ref(vkdf)) return 0; pkdfctx->kdfdata = vkdf; @@ -109,7 +109,7 @@ static void kdf_freectx(void *vpkdfctx) PROV_KDF_CTX *pkdfctx = (PROV_KDF_CTX *)vpkdfctx; EVP_KDF_CTX_free(pkdfctx->kdfctx); - kdf_data_free(pkdfctx->kdfdata); + ossl_kdf_data_free(pkdfctx->kdfdata); OPENSSL_free(pkdfctx); } @@ -133,7 +133,7 @@ static void *kdf_dupctx(void *vpkdfctx) OPENSSL_free(dstctx); return NULL; } - if (!kdf_data_up_ref(dstctx->kdfdata)) { + if (!ossl_kdf_data_up_ref(dstctx->kdfdata)) { EVP_KDF_CTX_free(dstctx->kdfctx); OPENSSL_free(dstctx); return NULL; diff --git a/providers/implementations/include/prov/kdfexchange.h b/providers/implementations/include/prov/kdfexchange.h index 3770487bff..b7cd4cbafd 100644 --- a/providers/implementations/include/prov/kdfexchange.h +++ b/providers/implementations/include/prov/kdfexchange.h @@ -19,6 +19,6 @@ struct kdf_data_st { typedef struct kdf_data_st KDF_DATA; -KDF_DATA *kdf_data_new(void *provctx); -void kdf_data_free(KDF_DATA *kdfdata); -int kdf_data_up_ref(KDF_DATA *kdfdata); +KDF_DATA *ossl_kdf_data_new(void *provctx); +void ossl_kdf_data_free(KDF_DATA *kdfdata); +int ossl_kdf_data_up_ref(KDF_DATA *kdfdata); diff --git a/providers/implementations/kdfs/pbkdf2.c b/providers/implementations/kdfs/pbkdf2.c index eb7b15de59..14c78b518c 100644 --- a/providers/implementations/kdfs/pbkdf2.c +++ b/providers/implementations/kdfs/pbkdf2.c @@ -119,7 +119,7 @@ static void kdf_pbkdf2_init(KDF_PBKDF2 *ctx) /* This is an error, but there is no way to indicate such directly */ ossl_prov_digest_reset(&ctx->digest); ctx->iter = PKCS5_DEFAULT_ITER; - ctx->lower_bound_checks = kdf_pbkdf2_default_checks; + ctx->lower_bound_checks = ossl_kdf_pbkdf2_default_checks; } static int pbkdf2_set_membuf(unsigned char **buffer, size_t *buflen, diff --git a/providers/implementations/kdfs/pbkdf2.h b/providers/implementations/kdfs/pbkdf2.h index c8c2e5b8a7..c0848e26fc 100644 --- a/providers/implementations/kdfs/pbkdf2.h +++ b/providers/implementations/kdfs/pbkdf2.h @@ -11,4 +11,4 @@ * Available in pbkdfe_fips.c, and compiled with different values depending * on we're in the FIPS module or not. */ -extern const int kdf_pbkdf2_default_checks; +extern const int ossl_kdf_pbkdf2_default_checks; diff --git a/providers/implementations/kdfs/pbkdf2_fips.c b/providers/implementations/kdfs/pbkdf2_fips.c index be60be1fa0..916d9ef078 100644 --- a/providers/implementations/kdfs/pbkdf2_fips.c +++ b/providers/implementations/kdfs/pbkdf2_fips.c @@ -14,7 +14,7 @@ * Extra checks are done by default in fips mode only. */ #ifdef FIPS_MODULE -const int kdf_pbkdf2_default_checks = 1; +const int ossl_kdf_pbkdf2_default_checks = 1; #else -const int kdf_pbkdf2_default_checks = 0; +const int ossl_kdf_pbkdf2_default_checks = 0; #endif /* FIPS_MODULE */ diff --git a/providers/implementations/keymgmt/kdf_legacy_kmgmt.c b/providers/implementations/keymgmt/kdf_legacy_kmgmt.c index 16d5f971cc..698107927b 100644 --- a/providers/implementations/keymgmt/kdf_legacy_kmgmt.c +++ b/providers/implementations/keymgmt/kdf_legacy_kmgmt.c @@ -26,7 +26,7 @@ static OSSL_FUNC_keymgmt_new_fn kdf_newdata; static OSSL_FUNC_keymgmt_free_fn kdf_freedata; static OSSL_FUNC_keymgmt_has_fn kdf_has; -KDF_DATA *kdf_data_new(void *provctx) +KDF_DATA *ossl_kdf_data_new(void *provctx) { KDF_DATA *kdfdata; @@ -48,7 +48,7 @@ KDF_DATA *kdf_data_new(void *provctx) return kdfdata; } -void kdf_data_free(KDF_DATA *kdfdata) +void ossl_kdf_data_free(KDF_DATA *kdfdata) { int ref = 0; @@ -63,7 +63,7 @@ void kdf_data_free(KDF_DATA *kdfdata) OPENSSL_free(kdfdata); } -int kdf_data_up_ref(KDF_DATA *kdfdata) +int ossl_kdf_data_up_ref(KDF_DATA *kdfdata) { int ref = 0; @@ -83,12 +83,12 @@ int kdf_data_up_ref(KDF_DATA *kdfdata) static void *kdf_newdata(void *provctx) { - return kdf_data_new(provctx); + return ossl_kdf_data_new(provctx); } static void kdf_freedata(void *kdfdata) { - kdf_data_free(kdfdata); + ossl_kdf_data_free(kdfdata); } static int kdf_has(const void *keydata, int selection) diff --git a/providers/implementations/storemgmt/file_store.c b/providers/implementations/storemgmt/file_store.c index f4ac6e0c83..e121052545 100644 --- a/providers/implementations/storemgmt/file_store.c +++ b/providers/implementations/storemgmt/file_store.c @@ -294,7 +294,7 @@ static void *file_open(void *provctx, const char *uri) void *file_attach(void *provctx, OSSL_CORE_BIO *cin) { struct file_ctx_st *ctx; - BIO *new_bio = bio_new_from_core_bio(provctx, cin); + BIO *new_bio = ossl_bio_new_from_core_bio(provctx, cin); if (new_bio == NULL) return NULL; diff --git a/providers/implementations/storemgmt/file_store_der2obj.c b/providers/implementations/storemgmt/file_store_der2obj.c index 854a720f60..74fa40df9f 100644 --- a/providers/implementations/storemgmt/file_store_der2obj.c +++ b/providers/implementations/storemgmt/file_store_der2obj.c @@ -85,7 +85,7 @@ static int der2obj_decode(void *provctx, OSSL_CORE_BIO *cin, int selection, * We're called from file_store.c, so we know that OSSL_CORE_BIO is a * BIO in this case. */ - BIO *in = bio_new_from_core_bio(provctx, cin); + BIO *in = ossl_bio_new_from_core_bio(provctx, cin); BUF_MEM *mem = NULL; int err, ok; |