From b425001010044adbdbcd98f8682694b30b73bbf4 Mon Sep 17 00:00:00 2001 From: "Dr. Matthias St. Pierre" Date: Thu, 15 Oct 2020 12:55:50 +0300 Subject: Rename OPENSSL_CTX prefix to OSSL_LIB_CTX Many of the new types introduced by OpenSSL 3.0 have an OSSL_ prefix, e.g., OSSL_CALLBACK, OSSL_PARAM, OSSL_ALGORITHM, OSSL_SERIALIZER. The OPENSSL_CTX type stands out a little by using a different prefix. For consistency reasons, this type is renamed to OSSL_LIB_CTX. Reviewed-by: Paul Dale Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/12621) --- crypto/pem/pem_info.c | 4 ++-- crypto/pem/pem_pk8.c | 8 ++++---- crypto/pem/pem_pkey.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'crypto/pem') diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index 57e02e9db3..2284959e91 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -26,7 +26,7 @@ #ifndef OPENSSL_NO_STDIO STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, - void *u, OPENSSL_CTX *libctx, const char *propq) + void *u, OSSL_LIB_CTX *libctx, const char *propq) { BIO *b; STACK_OF(X509_INFO) *ret; @@ -50,7 +50,7 @@ STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bp, STACK_OF(X509_INFO) *sk, - pem_password_cb *cb, void *u, OPENSSL_CTX *libctx, + pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq) { X509_INFO *xi = NULL; diff --git a/crypto/pem/pem_pk8.c b/crypto/pem/pem_pk8.c index 05d6c4ae83..2abf687cbd 100644 --- a/crypto/pem/pem_pk8.c +++ b/crypto/pem/pem_pk8.c @@ -22,14 +22,14 @@ static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc, const char *kstr, int klen, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq); + OSSL_LIB_CTX *libctx, const char *propq); #ifndef OPENSSL_NO_STDIO static int do_pk8pkey_fp(FILE *bp, const EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc, const char *kstr, int klen, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq); + OSSL_LIB_CTX *libctx, const char *propq); #endif /* * These functions write a private key in PKCS#8 format: it is a "drop in" @@ -69,7 +69,7 @@ int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid, static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc, const char *kstr, int klen, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq) + OSSL_LIB_CTX *libctx, const char *propq) { int ret = 0; const char *outtype = isder ? "DER" : "PEM"; @@ -230,7 +230,7 @@ int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc static int do_pk8pkey_fp(FILE *fp, const EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc, const char *kstr, int klen, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq) + OSSL_LIB_CTX *libctx, const char *propq) { BIO *bp; int ret; diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 462010d2ac..214fd1267c 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -31,7 +31,7 @@ int pem_check_suffix(const char *pem_str, const char *suffix); static EVP_PKEY *pem_read_bio_key(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq, + OSSL_LIB_CTX *libctx, const char *propq, int expected_store_info_type, int try_secure) { @@ -101,7 +101,7 @@ static EVP_PKEY *pem_read_bio_key(BIO *bp, EVP_PKEY **x, EVP_PKEY *PEM_read_bio_PUBKEY_ex(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq) + OSSL_LIB_CTX *libctx, const char *propq) { return pem_read_bio_key(bp, x, cb, u, libctx, propq, OSSL_STORE_INFO_PUBKEY, 0); @@ -116,7 +116,7 @@ EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, #ifndef OPENSSL_NO_STDIO EVP_PKEY *PEM_read_PUBKEY_ex(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq) + OSSL_LIB_CTX *libctx, const char *propq) { BIO *b; EVP_PKEY *ret; @@ -139,7 +139,7 @@ EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u) EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u, - OPENSSL_CTX *libctx, const char *propq) + OSSL_LIB_CTX *libctx, const char *propq) { return pem_read_bio_key(bp, x, cb, u, libctx, propq, OSSL_STORE_INFO_PKEY, 1); @@ -198,7 +198,7 @@ int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x, } EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x, - OPENSSL_CTX *libctx, const char *propq) + OSSL_LIB_CTX *libctx, const char *propq) { return pem_read_bio_key(bp, x, NULL, NULL, libctx, propq, OSSL_STORE_INFO_PARAMS, 0); @@ -227,7 +227,7 @@ PEM_write_fnsig(Parameters, EVP_PKEY, BIO, write_bio) #ifndef OPENSSL_NO_STDIO EVP_PKEY *PEM_read_PrivateKey_ex(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, - void *u, OPENSSL_CTX *libctx, + void *u, OSSL_LIB_CTX *libctx, const char *propq) { BIO *b; -- cgit v1.2.3