diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-05-21 16:58:08 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-01 12:40:00 +0200 |
commit | ed576acdf591d4164905ab98e89ca5a3b99d90ab (patch) | |
tree | c0f36ca1b3d42f34c0c502e700ad09b69b713d3c /crypto/engine/eng_openssl.c | |
parent | Pass library context and property query into private key decoders (diff) | |
download | openssl-ed576acdf591d4164905ab98e89ca5a3b99d90ab.tar.xz openssl-ed576acdf591d4164905ab98e89ca5a3b99d90ab.zip |
Rename all getters to use get/get0 in name
For functions that exist in 1.1.1 provide a simple aliases via #define.
Fixes #15236
Functions with OSSL_DECODER_, OSSL_ENCODER_, OSSL_STORE_LOADER_,
EVP_KEYEXCH_, EVP_KEM_, EVP_ASYM_CIPHER_, EVP_SIGNATURE_,
EVP_KEYMGMT_, EVP_RAND_, EVP_MAC_, EVP_KDF_, EVP_PKEY_,
EVP_MD_, and EVP_CIPHER_ prefixes are renamed.
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15405)
Diffstat (limited to 'crypto/engine/eng_openssl.c')
-rw-r--r-- | crypto/engine/eng_openssl.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 3ca95abc13..648d333dbc 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -205,7 +205,7 @@ typedef struct { static int test_rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { - const int n = EVP_CIPHER_CTX_key_length(ctx); + const int n = EVP_CIPHER_CTX_get_key_length(ctx); # ifdef TEST_ENG_OPENSSL_RC4_P_INIT fprintf(stderr, "(TEST_ENG_OPENSSL_RC4) test_init_key() called\n"); @@ -285,9 +285,9 @@ static int test_cipher_nids(const int **nids) if (!init) { const EVP_CIPHER *cipher; if ((cipher = test_r4_cipher()) != NULL) - cipher_nids[pos++] = EVP_CIPHER_nid(cipher); + cipher_nids[pos++] = EVP_CIPHER_get_nid(cipher); if ((cipher = test_r4_40_cipher()) != NULL) - cipher_nids[pos++] = EVP_CIPHER_nid(cipher); + cipher_nids[pos++] = EVP_CIPHER_get_nid(cipher); cipher_nids[pos] = 0; init = 1; } @@ -328,7 +328,7 @@ static int test_sha1_init(EVP_MD_CTX *ctx) # ifdef TEST_ENG_OPENSSL_SHA_P_INIT fprintf(stderr, "(TEST_ENG_OPENSSL_SHA) test_sha1_init() called\n"); # endif - return SHA1_Init(EVP_MD_CTX_md_data(ctx)); + return SHA1_Init(EVP_MD_CTX_get0_md_data(ctx)); } static int test_sha1_update(EVP_MD_CTX *ctx, const void *data, size_t count) @@ -336,7 +336,7 @@ static int test_sha1_update(EVP_MD_CTX *ctx, const void *data, size_t count) # ifdef TEST_ENG_OPENSSL_SHA_P_UPDATE fprintf(stderr, "(TEST_ENG_OPENSSL_SHA) test_sha1_update() called\n"); # endif - return SHA1_Update(EVP_MD_CTX_md_data(ctx), data, count); + return SHA1_Update(EVP_MD_CTX_get0_md_data(ctx), data, count); } static int test_sha1_final(EVP_MD_CTX *ctx, unsigned char *md) @@ -344,7 +344,7 @@ static int test_sha1_final(EVP_MD_CTX *ctx, unsigned char *md) # ifdef TEST_ENG_OPENSSL_SHA_P_FINAL fprintf(stderr, "(TEST_ENG_OPENSSL_SHA) test_sha1_final() called\n"); # endif - return SHA1_Final(md, EVP_MD_CTX_md_data(ctx)); + return SHA1_Final(md, EVP_MD_CTX_get0_md_data(ctx)); } static EVP_MD *sha1_md = NULL; @@ -383,7 +383,7 @@ static int test_digest_nids(const int **nids) if (!init) { const EVP_MD *md; if ((md = test_sha_md()) != NULL) - digest_nids[pos++] = EVP_MD_type(md); + digest_nids[pos++] = EVP_MD_get_type(md); digest_nids[pos] = 0; init = 1; } @@ -522,7 +522,7 @@ static int ossl_hmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) static int ossl_int_update(EVP_MD_CTX *ctx, const void *data, size_t count) { - OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(EVP_MD_CTX_pkey_ctx(ctx)); + OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(EVP_MD_CTX_get_pkey_ctx(ctx)); if (!HMAC_Update(hctx->ctx, data, count)) return 0; return 1; @@ -540,7 +540,7 @@ static int ossl_hmac_signctx(EVP_PKEY_CTX *ctx, unsigned char *sig, { unsigned int hlen; OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); - int l = EVP_MD_CTX_size(mctx); + int l = EVP_MD_CTX_get_size(mctx); if (l < 0) return 0; |