diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c index 7983b1527eb30f8a112e5bd48ce26115a7e2d02d..8a156c7422f99bc7bc7d1c7381c58930fe2e7a06 100644 --- a/crypto/x509/by_file.c +++ b/crypto/x509/by_file.c @@ -129,7 +129,7 @@ int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type) if (file == NULL) return (1); - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) { X509err(X509_F_X509_LOAD_CERT_FILE, ERR_R_SYS_LIB); @@ -186,7 +186,7 @@ int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type) if (file == NULL) return (1); - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) { X509err(X509_F_X509_LOAD_CRL_FILE, ERR_R_SYS_LIB); diff --git a/include/openssl/bio.h b/include/openssl/bio.h index 0577bd875124b14ffc7bbe57594db16da4488568..f0fbc5bf73a901760782332feef9816a49a33415 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h @@ -635,7 +635,6 @@ int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, BIO_METHOD *BIO_s_file(void); BIO *BIO_new_file(const char *filename, const char *mode); -# define BIO_s_file_internal BIO_s_file # ifndef OPENSSL_NO_STDIO BIO *BIO_new_fp(FILE *stream, int close_flag); # endif diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index fb8a9f9716c5dadd6585056213ca950cd9bb532f..7571095932b9072910a043a59a9ce6e2d44f3ad9 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -689,7 +689,7 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file) sk = sk_X509_NAME_new(xname_cmp); - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if ((sk == NULL) || (in == NULL)) { SSLerr(SSL_F_SSL_LOAD_CLIENT_CA_FILE, ERR_R_MALLOC_FAILURE); @@ -756,7 +756,7 @@ int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, oldcmp = sk_X509_NAME_set_cmp_func(stack, xname_cmp); - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK, diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index 0a4625cf31892d4586f4efa7f800b15736cb2354..9c252fa609094e57e5e5abe7ca3df3bf908c0644 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -486,7 +486,7 @@ static int cmd_DHParameters(SSL_CONF_CTX *cctx, const char *value) DH *dh = NULL; BIO *in = NULL; if (cctx->ctx || cctx->ssl) { - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (!in) goto end; if (BIO_read_filename(in, value) <= 0) diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c index 9a3e0ec41b056da324103b8ade38d9980659d915..9e172b579cdf63d24a352c2ffcd1e566175f7bfa 100644 --- a/ssl/ssl_rsa.c +++ b/ssl/ssl_rsa.c @@ -90,7 +90,7 @@ int SSL_use_certificate_file(SSL *ssl, const char *file, int type) int ret = 0; X509 *x = NULL; - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_SSL_USE_CERTIFICATE_FILE, ERR_R_BUF_LIB); goto end; @@ -227,7 +227,7 @@ int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type) BIO *in; RSA *rsa = NULL; - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_SSL_USE_RSAPRIVATEKEY_FILE, ERR_R_BUF_LIB); goto end; @@ -299,7 +299,7 @@ int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) BIO *in; EVP_PKEY *pkey = NULL; - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE, ERR_R_BUF_LIB); goto end; @@ -430,7 +430,7 @@ int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type) int ret = 0; X509 *x = NULL; - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE_FILE, ERR_R_BUF_LIB); goto end; @@ -512,7 +512,7 @@ int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type) BIO *in; RSA *rsa = NULL; - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE, ERR_R_BUF_LIB); goto end; @@ -581,7 +581,7 @@ int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) BIO *in; EVP_PKEY *pkey = NULL; - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE, ERR_R_BUF_LIB); goto end; @@ -648,7 +648,7 @@ static int use_certificate_chain_file(SSL_CTX *ctx, SSL *ssl, const char *file) ERR_clear_error(); /* clear error stack for * SSL_CTX_use_certificate() */ - in = BIO_new(BIO_s_file_internal()); + in = BIO_new(BIO_s_file()); if (in == NULL) { SSLerr(SSL_F_USE_CERTIFICATE_CHAIN_FILE, ERR_R_BUF_LIB); goto end; @@ -930,7 +930,7 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file) goto end; } - bin = BIO_new(BIO_s_file_internal()); + bin = BIO_new(BIO_s_file()); if (bin == NULL) { SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO_FILE, ERR_R_BUF_LIB); goto end; diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c index 0f506f0fb91515daef0088b6e990a06152bc10bf..d9d6f397c77d7cb37b4197a24b575e19b637a685 100644 --- a/ssl/ssl_txt.c +++ b/ssl/ssl_txt.c @@ -92,7 +92,7 @@ int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x) BIO *b; int ret; - if ((b = BIO_new(BIO_s_file_internal())) == NULL) { + if ((b = BIO_new(BIO_s_file())) == NULL) { SSLerr(SSL_F_SSL_SESSION_PRINT_FP, ERR_R_BUF_LIB); return (0); }