diff options
author | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2020-10-15 11:55:50 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-10-15 12:59:53 +0200 |
commit | b425001010044adbdbcd98f8682694b30b73bbf4 (patch) | |
tree | e87a5b512d7869cb6a500ecc74b706281be762cf /crypto/sm2 | |
parent | Make evp_pkey_ctx_get0_libctx/propq public API (diff) | |
download | openssl-b425001010044adbdbcd98f8682694b30b73bbf4.tar.xz openssl-b425001010044adbdbcd98f8682694b30b73bbf4.zip |
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 <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12621)
Diffstat (limited to 'crypto/sm2')
-rw-r--r-- | crypto/sm2/sm2_crypt.c | 4 | ||||
-rw-r--r-- | crypto/sm2/sm2_sign.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crypto/sm2/sm2_crypt.c b/crypto/sm2/sm2_crypt.c index 0ae67fb22b..6db87f6845 100644 --- a/crypto/sm2/sm2_crypt.c +++ b/crypto/sm2/sm2_crypt.c @@ -139,7 +139,7 @@ int sm2_encrypt(const EC_KEY *key, size_t field_size; const int C3_size = EVP_MD_size(digest); EVP_MD *fetched_digest = NULL; - OPENSSL_CTX *libctx = ec_key_get_libctx(key); + OSSL_LIB_CTX *libctx = ec_key_get_libctx(key); const char *propq = ec_key_get0_propq(key); /* NULL these before any "goto done" */ @@ -297,7 +297,7 @@ int sm2_decrypt(const EC_KEY *key, const uint8_t *C3 = NULL; int msg_len = 0; EVP_MD_CTX *hash = NULL; - OPENSSL_CTX *libctx = ec_key_get_libctx(key); + OSSL_LIB_CTX *libctx = ec_key_get_libctx(key); const char *propq = ec_key_get0_propq(key); if (field_size == 0 || hash_size <= 0) diff --git a/crypto/sm2/sm2_sign.c b/crypto/sm2/sm2_sign.c index 39b6e11cf2..ddc19a2de8 100644 --- a/crypto/sm2/sm2_sign.c +++ b/crypto/sm2/sm2_sign.c @@ -147,7 +147,7 @@ static BIGNUM *sm2_compute_msg_hash(const EVP_MD *digest, uint8_t *z = NULL; BIGNUM *e = NULL; EVP_MD *fetched_digest = NULL; - OPENSSL_CTX *libctx = ec_key_get_libctx(key); + OSSL_LIB_CTX *libctx = ec_key_get_libctx(key); const char *propq = ec_key_get0_propq(key); if (md_size < 0) { @@ -206,7 +206,7 @@ static ECDSA_SIG *sm2_sig_gen(const EC_KEY *key, const BIGNUM *e) BIGNUM *s = NULL; BIGNUM *x1 = NULL; BIGNUM *tmp = NULL; - OPENSSL_CTX *libctx = ec_key_get_libctx(key); + OSSL_LIB_CTX *libctx = ec_key_get_libctx(key); kG = EC_POINT_new(group); ctx = BN_CTX_new_ex(libctx); @@ -306,7 +306,7 @@ static int sm2_sig_verify(const EC_KEY *key, const ECDSA_SIG *sig, BIGNUM *x1 = NULL; const BIGNUM *r = NULL; const BIGNUM *s = NULL; - OPENSSL_CTX *libctx = ec_key_get_libctx(key); + OSSL_LIB_CTX *libctx = ec_key_get_libctx(key); ctx = BN_CTX_new_ex(libctx); pt = EC_POINT_new(group); |