aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-02-25 09:08:54 +1000
committerShane Lontis <shane.lontis@oracle.com>2021-03-18 17:52:37 +1000
commit9500c8234d8e99396717b9e43f10cc518e8bf668 (patch)
tree51975e210b7900643c21d2ad67b3a65a902fc591
parente4bec869104cf4ba51cbb1effb0f5437e327ecd8 (diff)
downloadopenssl-9500c8234d8e99396717b9e43f10cc518e8bf668.tar.gz
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)
-rw-r--r--crypto/dh/dh_key.c2
-rw-r--r--crypto/err/err_prn.c3
-rw-r--r--crypto/http/http_client.c35
-rw-r--r--crypto/http/http_lib.c8
-rw-r--r--crypto/http/http_local.h28
-rw-r--r--crypto/o_str.c10
-rw-r--r--crypto/rsa/rsa_lib.c4
-rw-r--r--crypto/rsa/rsa_sp800_56b_gen.c3
-rw-r--r--crypto/x509/v3_ncons.c4
-rw-r--r--crypto/x509/v3_san.c4
-rw-r--r--crypto/x509/v3_utl.c2
-rw-r--r--crypto/x509/x509_vpm.c2
-rw-r--r--include/crypto/security_bits.h2
-rw-r--r--include/internal/cryptlib.h8
-rw-r--r--providers/baseprov.c2
-rw-r--r--providers/common/bio_prov.c4
-rw-r--r--providers/common/include/prov/bio.h4
-rw-r--r--providers/defltprov.c2
-rw-r--r--providers/implementations/encode_decode/decode_der2key.c2
-rw-r--r--providers/implementations/encode_decode/decode_ms2key.c4
-rw-r--r--providers/implementations/encode_decode/decode_pem2der.c2
-rw-r--r--providers/implementations/encode_decode/encode_key2any.c2
-rw-r--r--providers/implementations/encode_decode/encode_key2blob.c2
-rw-r--r--providers/implementations/encode_decode/encode_key2ms.c4
-rw-r--r--providers/implementations/encode_decode/encode_key2text.c2
-rw-r--r--providers/implementations/exchange/kdf_exch.c6
-rw-r--r--providers/implementations/include/prov/kdfexchange.h6
-rw-r--r--providers/implementations/kdfs/pbkdf2.c2
-rw-r--r--providers/implementations/kdfs/pbkdf2.h2
-rw-r--r--providers/implementations/kdfs/pbkdf2_fips.c4
-rw-r--r--providers/implementations/keymgmt/kdf_legacy_kmgmt.c10
-rw-r--r--providers/implementations/storemgmt/file_store.c2
-rw-r--r--providers/implementations/storemgmt/file_store_der2obj.c2
-rw-r--r--test/hexstr_test.c4
34 files changed, 93 insertions, 90 deletions
diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c
index f282a12b4c..3617e61e23 100644
--- a/crypto/dh/dh_key.c
+++ b/crypto/dh/dh_key.c
@@ -290,7 +290,7 @@ static int generate_key(DH *dh)
/* Is it an approved safe prime ?*/
if (DH_get_nid(dh) != NID_undef) {
int max_strength =
- ifc_ffc_compute_security_bits(BN_num_bits(dh->params.p));
+ ossl_ifc_ffc_compute_security_bits(BN_num_bits(dh->params.p));
if (dh->params.q == NULL
|| dh->length > BN_num_bits(dh->params.q))
diff --git a/crypto/err/err_prn.c b/crypto/err/err_prn.c
index 4a82a8880b..3ba86b3d9b 100644
--- a/crypto/err/err_prn.c
+++ b/crypto/err/err_prn.c
@@ -34,8 +34,7 @@ void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),
if ((flags & ERR_TXT_STRING) == 0)
data = "";
- hex = openssl_buf2hexstr_sep((const unsigned char *)&tid, sizeof(tid),
- '\0');
+ hex = ossl_buf2hexstr_sep((const unsigned char *)&tid, sizeof(tid), '\0');
BIO_snprintf(buf, sizeof(buf), "%s:", hex == NULL ? "<null>" : hex);
offset = strlen(buf);
ossl_err_string_int(l, func, buf + offset, sizeof(buf) - offset);
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index 2f59cb421a..1d08c41052 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -229,7 +229,7 @@ static int OSSL_HTTP_REQ_CTX_set_content(OSSL_HTTP_REQ_CTX *rctx,
&& BIO_write(rctx->mem, req, req_len) == (int)req_len;
}
-BIO *HTTP_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val)
+BIO *ossl_http_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val)
{
BIO *res;
@@ -258,7 +258,7 @@ int OSSL_HTTP_REQ_CTX_i2d(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
return 0;
}
- res = (mem = HTTP_asn1_item2bio(it, req)) != NULL
+ res = (mem = ossl_http_asn1_item2bio(it, req)) != NULL
&& OSSL_HTTP_REQ_CTX_set_content(rctx, content_type, mem);
BIO_free(mem);
return res;
@@ -290,14 +290,15 @@ static int OSSL_HTTP_REQ_CTX_add1_headers(OSSL_HTTP_REQ_CTX *rctx,
* If !use_http_proxy then the 'server' and 'port' parameters are ignored.
* If req_mem == NULL then use GET and ignore content_type, else POST.
*/
-OSSL_HTTP_REQ_CTX *HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int use_http_proxy,
- const char *server, const char *port,
- const char *path,
- const STACK_OF(CONF_VALUE) *headers,
- const char *content_type, BIO *req_mem,
- int maxline, unsigned long max_resp_len,
- int timeout,
- const char *expected_ct, int expect_asn1)
+OSSL_HTTP_REQ_CTX
+*ossl_http_req_ctx_new(BIO *wbio, BIO *rbio, int use_http_proxy,
+ const char *server, const char *port,
+ const char *path,
+ const STACK_OF(CONF_VALUE) *headers,
+ const char *content_type, BIO *req_mem,
+ int maxline, unsigned long max_resp_len,
+ int timeout,
+ const char *expected_ct, int expect_asn1)
{
OSSL_HTTP_REQ_CTX *rctx;
@@ -868,7 +869,7 @@ BIO *OSSL_HTTP_transfer(const char *server, const char *port, const char *path,
port = NULL;
if (port == NULL && strchr(server, ':') == NULL)
port = use_ssl ? OSSL_HTTPS_PORT : OSSL_HTTP_PORT;
- proxy = http_adapt_proxy(proxy, no_proxy, server, use_ssl);
+ proxy = ossl_http_adapt_proxy(proxy, no_proxy, server, use_ssl);
if ((cbio = HTTP_new_bio(server, port, proxy)) == NULL)
return NULL;
#else
@@ -893,11 +894,11 @@ BIO *OSSL_HTTP_transfer(const char *server, const char *port, const char *path,
}
}
- rctx = HTTP_REQ_CTX_new(cbio, rbio != NULL ? rbio : cbio,
- !use_ssl && proxy != NULL, server, port, path,
- headers, content_type, req_mem, maxline,
- max_resp_len, update_timeout(timeout, start_time),
- expected_ct, expect_asn1);
+ rctx = ossl_http_req_ctx_new(cbio, rbio != NULL ? rbio : cbio,
+ !use_ssl && proxy != NULL, server, port, path,
+ headers, content_type, req_mem, maxline,
+ max_resp_len, update_timeout(timeout, start_time),
+ expected_ct, expect_asn1);
if (rctx == NULL)
goto end;
@@ -1090,7 +1091,7 @@ ASN1_VALUE *OSSL_HTTP_post_asn1(const char *server, const char *port,
}
/* remaining parameters are checked indirectly */
- req_mem = HTTP_asn1_item2bio(req_it, req);
+ req_mem = ossl_http_asn1_item2bio(req_it, req);
res_mem = OSSL_HTTP_transfer(server, port, path, use_ssl, proxy, no_proxy,
bio, rbio,
bio_update_fn, arg, headers, content_type,
diff --git a/crypto/http/http_lib.c b/crypto/http/http_lib.c
index 8b300a9db0..ebb2af9b2e 100644
--- a/crypto/http/http_lib.c
+++ b/crypto/http/http_lib.c
@@ -239,7 +239,7 @@ int OSSL_HTTP_parse_url(const char *url, int *pssl, char **puser, char **phost,
return 0;
}
-int http_use_proxy(const char *no_proxy, const char *server)
+int ossl_http_use_proxy(const char *no_proxy, const char *server)
{
size_t sl;
const char *found = NULL;
@@ -265,8 +265,8 @@ int http_use_proxy(const char *no_proxy, const char *server)
return found == NULL;
}
-const char *http_adapt_proxy(const char *proxy, const char *no_proxy,
- const char *server, int use_ssl)
+const char *ossl_http_adapt_proxy(const char *proxy, const char *no_proxy,
+ const char *server, int use_ssl)
{
const int http_len = strlen(OSSL_HTTP_PREFIX);
const int https_len = strlen(OSSL_HTTPS_PREFIX);
@@ -289,7 +289,7 @@ const char *http_adapt_proxy(const char *proxy, const char *no_proxy,
else if (strncmp(proxy, OSSL_HTTPS_PREFIX, https_len) == 0)
proxy += https_len;
- if (*proxy == '\0' || !http_use_proxy(no_proxy, server))
+ if (*proxy == '\0' || !ossl_http_use_proxy(no_proxy, server))
return NULL;
return proxy;
}
diff --git a/crypto/http/http_local.h b/crypto/http/http_local.h
index 3f52e0772f..1dfa03ce8e 100644
--- a/crypto/http/http_local.h
+++ b/crypto/http/http_local.h
@@ -13,18 +13,20 @@
# include <openssl/ocsp.h>
-BIO *HTTP_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
-OSSL_HTTP_REQ_CTX *HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int use_http_proxy,
- const char *server, const char *port,
- const char *path,
- const STACK_OF(CONF_VALUE) *headers,
- const char *content_type, BIO *req_mem,
- int maxline, unsigned long max_resp_len,
- int timeout,
- const char *expected_content_type,
- int expect_asn1);
-int http_use_proxy(const char *no_proxy, const char *server);
-const char *http_adapt_proxy(const char *proxy, const char *no_proxy,
- const char *server, int use_ssl);
+BIO *ossl_http_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
+OSSL_HTTP_REQ_CTX
+*ossl_http_req_ctx_new(BIO *wbio, BIO *rbio, int use_http_proxy,
+ const char *server, const char *port,
+ const char *path,
+ const STACK_OF(CONF_VALUE) *headers,
+ const char *content_type, BIO *req_mem,
+ int maxline, unsigned long max_resp_len,
+ int timeout,
+ const char *expected_content_type,
+ int expect_asn1);
+
+int ossl_http_use_proxy(const char *no_proxy, const char *server);
+const char *ossl_http_adapt_proxy(const char *proxy, const char *no_proxy,
+ const char *server, int use_ssl);
#endif /* !defined(OSSL_CRYPTO_HTTP_LOCAL_H) */
diff --git a/crypto/o_str.c b/crypto/o_str.c
index dbecf4841c..ec8f3512d3 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -181,8 +181,8 @@ int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen,
return hexstr2buf_sep(buf, buf_n, buflen, str, sep);
}
-unsigned char *openssl_hexstr2buf_sep(const char *str, long *buflen,
- const char sep)
+unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen,
+ const char sep)
{
unsigned char *buf;
size_t buf_n, tmp_buflen;
@@ -212,7 +212,7 @@ unsigned char *openssl_hexstr2buf_sep(const char *str, long *buflen,
unsigned char *OPENSSL_hexstr2buf(const char *str, long *buflen)
{
- return openssl_hexstr2buf_sep(str, buflen, DEFAULT_SEPARATOR);
+ return ossl_hexstr2buf_sep(str, buflen, DEFAULT_SEPARATOR);
}
static int buf2hexstr_sep(char *str, size_t str_n, size_t *strlen,
@@ -260,7 +260,7 @@ int OPENSSL_buf2hexstr_ex(char *str, size_t str_n, size_t *strlen,
return buf2hexstr_sep(str, str_n, strlen, buf, buflen, sep);
}
-char *openssl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep)
+char *ossl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep)
{
char *tmp;
size_t tmp_n;
@@ -288,7 +288,7 @@ char *openssl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep)
*/
char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen)
{
- return openssl_buf2hexstr_sep(buf, buflen, ':');
+ return ossl_buf2hexstr_sep(buf, buflen, ':');
}
int openssl_strerror_r(int errnum, char *buf, size_t buflen)
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index 530fdaa035..dfc74ec951 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -309,7 +309,7 @@ static uint32_t ilog_e(uint64_t v)
* \cdot(log_e(nBits \cdot log_e(2))^{2/3} - 4.69}{log_e(2)}
* The two cube roots are merged together here.
*/
-uint16_t ifc_ffc_compute_security_bits(int n)
+uint16_t ossl_ifc_ffc_compute_security_bits(int n)
{
uint64_t x;
uint32_t lx;
@@ -361,7 +361,7 @@ int RSA_security_bits(const RSA *rsa)
return 0;
}
#endif
- return ifc_ffc_compute_security_bits(bits);
+ return ossl_ifc_ffc_compute_security_bits(bits);
}
int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
diff --git a/crypto/rsa/rsa_sp800_56b_gen.c b/crypto/rsa/rsa_sp800_56b_gen.c
index 63cd9afc2f..077c32f1e9 100644
--- a/crypto/rsa/rsa_sp800_56b_gen.c
+++ b/crypto/rsa/rsa_sp800_56b_gen.c
@@ -171,7 +171,8 @@ err:
*/
int ossl_rsa_sp800_56b_validate_strength(int nbits, int strength)
{
- int s = (int)ifc_ffc_compute_security_bits(nbits);
+ int s = (int)ossl_ifc_ffc_compute_security_bits(nbits);
+
#ifdef FIPS_MODULE
if (s < RSA_FIPS1864_MIN_KEYGEN_STRENGTH
|| s > RSA_FIPS1864_MAX_KEYGEN_STRENGTH) {
diff --git a/crypto/x509/v3_ncons.c b/crypto/x509/v3_ncons.c
index 0eddfd07f6..1aa698cdd7 100644
--- a/crypto/x509/v3_ncons.c
+++ b/crypto/x509/v3_ncons.c
@@ -193,8 +193,8 @@ static int print_nc_ipadd(BIO *bp, ASN1_OCTET_STRING *ip)
/* ip->length should be 8 or 32 and len1 == len2 == 4 or len1 == len2 == 16 */
int len1 = ip->length >= 16 ? 16 : ip->length >= 4 ? 4 : ip->length;
int len2 = ip->length - len1;
- char *ip1 = ipaddr_to_asc(ip->data, len1);
- char *ip2 = ipaddr_to_asc(ip->data + len1, len2);
+ char *ip1 = ossl_ipaddr_to_asc(ip->data, len1);
+ char *ip2 = ossl_ipaddr_to_asc(ip->data + len1, len2);
int ret = ip1 != NULL && ip2 != NULL
&& BIO_printf(bp, "IP:%s/%s", ip1, ip2) > 0;
diff --git a/crypto/x509/v3_san.c b/crypto/x509/v3_san.c
index 2367c52400..7ad8ef30bb 100644
--- a/crypto/x509/v3_san.c
+++ b/crypto/x509/v3_san.c
@@ -178,7 +178,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
break;
case GEN_IPADD:
- tmp = ipaddr_to_asc(gen->d.ip->data, gen->d.ip->length);
+ tmp = ossl_ipaddr_to_asc(gen->d.ip->data, gen->d.ip->length);
if (tmp == NULL || !X509V3_add_value("IP Address", tmp, &ret))
ret = NULL;
OPENSSL_free(tmp);
@@ -267,7 +267,7 @@ int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen)
break;
case GEN_IPADD:
- tmp = ipaddr_to_asc(gen->d.ip->data, gen->d.ip->length);
+ tmp = ossl_ipaddr_to_asc(gen->d.ip->data, gen->d.ip->length);
if (tmp == NULL)
return 0;
BIO_printf(out, "IP Address:%s", tmp);
diff --git a/crypto/x509/v3_utl.c b/crypto/x509/v3_utl.c
index 4a8380d362..a238d01619 100644
--- a/crypto/x509/v3_utl.c
+++ b/crypto/x509/v3_utl.c
@@ -978,7 +978,7 @@ int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags)
return do_x509_check(x, (char *)ipout, iplen, flags, GEN_IPADD, NULL);
}
-char *ipaddr_to_asc(unsigned char *p, int len)
+char *ossl_ipaddr_to_asc(unsigned char *p, int len)
{
/*
* 40 is enough space for the longest IPv6 address + nul terminator byte
diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c
index 07615de7d7..2a34fce93e 100644
--- a/crypto/x509/x509_vpm.c
+++ b/crypto/x509/x509_vpm.c
@@ -455,7 +455,7 @@ char *X509_VERIFY_PARAM_get1_ip_asc(X509_VERIFY_PARAM *param)
size_t iplen;
unsigned char *ip = int_X509_VERIFY_PARAM_get0_ip(param, &iplen);
- return ip == NULL ? NULL : ipaddr_to_asc(ip, iplen);
+ return ip == NULL ? NULL : ossl_ipaddr_to_asc(ip, iplen);
}
int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
diff --git a/include/crypto/security_bits.h b/include/crypto/security_bits.h
index 3dc9e26ff3..58f49681dc 100644
--- a/include/crypto/security_bits.h
+++ b/include/crypto/security_bits.h
@@ -11,6 +11,6 @@
# define OSSL_SECURITY_BITS_H
# pragma once
-uint16_t ifc_ffc_compute_security_bits(int n);
+uint16_t ossl_ifc_ffc_compute_security_bits(int n);
#endif
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index 663c3ef808..26862310d8 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -249,11 +249,11 @@ static ossl_inline void ossl_sleep(unsigned long millis)
char *sk_ASN1_UTF8STRING2text(STACK_OF(ASN1_UTF8STRING) *text, const char *sep,
size_t max_len);
-char *ipaddr_to_asc(unsigned char *p, int len);
+char *ossl_ipaddr_to_asc(unsigned char *p, int len);
-char *openssl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep);
-unsigned char *openssl_hexstr2buf_sep(const char *str, long *buflen,
- const char sep);
+char *ossl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep);
+unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen,
+ const char sep);
static ossl_inline int ossl_ends_with_dirsep(const char *path)
{
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;
diff --git a/test/hexstr_test.c b/test/hexstr_test.c
index c03b58ef03..ffad66fe4f 100644
--- a/test/hexstr_test.c
+++ b/test/hexstr_test.c
@@ -68,9 +68,9 @@ static int test_hexstr_sep_to_from(int test_index)
char *out = NULL;
struct testdata *test = &tbl_testdata[test_index];
- if (!TEST_ptr(buf = openssl_hexstr2buf_sep(test->in, &len, test->sep))
+ if (!TEST_ptr(buf = ossl_hexstr2buf_sep(test->in, &len, test->sep))
|| !TEST_mem_eq(buf, len, test->expected, test->expected_len)
- || !TEST_ptr(out = openssl_buf2hexstr_sep(buf, len, test->sep))
+ || !TEST_ptr(out = ossl_buf2hexstr_sep(buf, len, test->sep))
|| !TEST_str_eq(out, test->in))
goto err;