X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fp_lib.c;fp=crypto%2Fevp%2Fp_lib.c;h=07be8884febe929d7536e7e4e5ec07d15d27517f;hb=ed576acdf591d4164905ab98e89ca5a3b99d90ab;hp=d2c871179e105c456da65e995658cf3d6293575f;hpb=5e2d22d53ed322a7124e26a4fbd116a8210eb77a;p=openssl.git diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index d2c871179e..07be8884fe 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -58,7 +58,7 @@ static void evp_pkey_free_it(EVP_PKEY *key); /* The type of parameters selected in key parameter functions */ # define SELECT_PARAMETERS OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS -int EVP_PKEY_bits(const EVP_PKEY *pkey) +int EVP_PKEY_get_bits(const EVP_PKEY *pkey) { int size = 0; @@ -70,7 +70,7 @@ int EVP_PKEY_bits(const EVP_PKEY *pkey) return size < 0 ? 0 : size; } -int EVP_PKEY_security_bits(const EVP_PKEY *pkey) +int EVP_PKEY_get_security_bits(const EVP_PKEY *pkey) { int size = 0; @@ -616,7 +616,7 @@ static EVP_PKEY *new_cmac_key_int(const unsigned char *priv, size_t len, EVP_PKEY_CTX *ctx; if (cipher != NULL) - cipher_name = EVP_CIPHER_name(cipher); + cipher_name = EVP_CIPHER_get0_name(cipher); if (cipher_name == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_KEY_SETUP_FAILED); @@ -865,7 +865,7 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) # ifndef OPENSSL_NO_EC static const ECX_KEY *evp_pkey_get0_ECX_KEY(const EVP_PKEY *pkey, int type) { - if (EVP_PKEY_base_id(pkey) != type) { + if (EVP_PKEY_get_base_id(pkey) != type) { ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_A_ECX_KEY); return NULL; } @@ -970,12 +970,12 @@ int EVP_PKEY_type(int type) return ret; } -int EVP_PKEY_id(const EVP_PKEY *pkey) +int EVP_PKEY_get_id(const EVP_PKEY *pkey) { return pkey->type; } -int EVP_PKEY_base_id(const EVP_PKEY *pkey) +int EVP_PKEY_get_base_id(const EVP_PKEY *pkey) { return EVP_PKEY_type(pkey->type); } @@ -1052,7 +1052,7 @@ int EVP_PKEY_type_names_do_all(const EVP_PKEY *pkey, return 0; if (!evp_pkey_is_provided(pkey)) { - const char *name = OBJ_nid2sn(EVP_PKEY_id(pkey)); + const char *name = OBJ_nid2sn(EVP_PKEY_get_id(pkey)); fn(name, data); return 1; @@ -1063,7 +1063,7 @@ int EVP_PKEY_type_names_do_all(const EVP_PKEY *pkey, int EVP_PKEY_can_sign(const EVP_PKEY *pkey) { if (pkey->keymgmt == NULL) { - switch (EVP_PKEY_base_id(pkey)) { + switch (EVP_PKEY_get_base_id(pkey)) { case EVP_PKEY_RSA: return 1; # ifndef OPENSSL_NO_DSA @@ -1081,12 +1081,12 @@ int EVP_PKEY_can_sign(const EVP_PKEY *pkey) break; } } else { - const OSSL_PROVIDER *prov = EVP_KEYMGMT_provider(pkey->keymgmt); + const OSSL_PROVIDER *prov = EVP_KEYMGMT_get0_provider(pkey->keymgmt); OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); const char *supported_sig = pkey->keymgmt->query_operation_name != NULL ? pkey->keymgmt->query_operation_name(OSSL_OP_SIGNATURE) - : EVP_KEYMGMT_name(pkey->keymgmt); + : EVP_KEYMGMT_get0_name(pkey->keymgmt); EVP_SIGNATURE *signature = NULL; signature = EVP_SIGNATURE_fetch(libctx, supported_sig, NULL); @@ -1767,7 +1767,7 @@ void EVP_PKEY_free(EVP_PKEY *x) OPENSSL_free(x); } -int EVP_PKEY_size(const EVP_PKEY *pkey) +int EVP_PKEY_get_size(const EVP_PKEY *pkey) { int size = 0; @@ -1781,7 +1781,7 @@ int EVP_PKEY_size(const EVP_PKEY *pkey) return size < 0 ? 0 : size; } -const char *EVP_PKEY_description(const EVP_PKEY *pkey) +const char *EVP_PKEY_get0_description(const EVP_PKEY *pkey) { if (!evp_pkey_is_assigned(pkey)) return NULL; @@ -1971,7 +1971,7 @@ int evp_pkey_copy_downgraded(EVP_PKEY **dest, const EVP_PKEY *src) int type = src->type; const char *keytype = NULL; - keytype = EVP_KEYMGMT_name(keymgmt); + keytype = EVP_KEYMGMT_get0_name(keymgmt); /* * If the type is EVP_PKEY_NONE, then we have a problem somewhere