diff --git a/crypto/dilithium/p_dilithium3_asn1.c b/crypto/dilithium/p_dilithium3_asn1.c index cf554a3d547..019f260cd3e 100644 --- a/crypto/dilithium/p_dilithium3_asn1.c +++ b/crypto/dilithium/p_dilithium3_asn1.c @@ -222,7 +222,6 @@ const EVP_PKEY_ASN1_METHOD dilithium3_asn1_meth = { {0x2B, 0x06, 0x01, 0x04, 0x01, 0x02, 0x82, 0x0B, 0x07, 0x06, 0x05}, 11, - EVP_PKEY_DILITHIUM3, "DILITHIUM3", "AWS-LC DILITHIUM3 method", diff --git a/crypto/evp_extra/evp_asn1.c b/crypto/evp_extra/evp_asn1.c index c67a0be3b36..56deca62db6 100644 --- a/crypto/evp_extra/evp_asn1.c +++ b/crypto/evp_extra/evp_asn1.c @@ -588,7 +588,7 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx) { const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **_pe, int type) { for (size_t i = 0; i < (size_t)EVP_PKEY_asn1_get_count(); i++) { const EVP_PKEY_ASN1_METHOD *ameth = EVP_PKEY_asn1_get0(i); - if (ameth->pkey_base_id == type) { + if (ameth->pkey_id == type) { return ameth; } } @@ -628,7 +628,7 @@ int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, int *ppkey_flags, *ppkey_id = ameth->pkey_id; } if (pkey_base_id) { - *pkey_base_id = ameth->pkey_base_id; + *pkey_base_id = ameth->pkey_id; } // This value is not supported. if (ppkey_flags) { diff --git a/crypto/evp_extra/p_dsa_asn1.c b/crypto/evp_extra/p_dsa_asn1.c index 9520397e137..9d927897b13 100644 --- a/crypto/evp_extra/p_dsa_asn1.c +++ b/crypto/evp_extra/p_dsa_asn1.c @@ -260,7 +260,6 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meth = { // 1.2.840.10040.4.1 {0x2a, 0x86, 0x48, 0xce, 0x38, 0x04, 0x01}, 7, - EVP_PKEY_DSA, "DSA", "OpenSSL DSA method", diff --git a/crypto/evp_extra/p_ec_asn1.c b/crypto/evp_extra/p_ec_asn1.c index 31da8fb96de..de364a6f4f7 100644 --- a/crypto/evp_extra/p_ec_asn1.c +++ b/crypto/evp_extra/p_ec_asn1.c @@ -253,7 +253,6 @@ const EVP_PKEY_ASN1_METHOD ec_asn1_meth = { // 1.2.840.10045.2.1 {0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01}, 7, - EVP_PKEY_EC, "EC", "OpenSSL EC algorithm", diff --git a/crypto/evp_extra/p_ed25519_asn1.c b/crypto/evp_extra/p_ed25519_asn1.c index 723f72a0218..14c4cfdf8e3 100644 --- a/crypto/evp_extra/p_ed25519_asn1.c +++ b/crypto/evp_extra/p_ed25519_asn1.c @@ -261,7 +261,6 @@ const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { EVP_PKEY_ED25519, {0x2b, 0x65, 0x70}, 3, - EVP_PKEY_ED25519, "ED25519", "OpenSSL ED25519 algorithm", ed25519_pub_decode, diff --git a/crypto/evp_extra/p_hmac_asn1.c b/crypto/evp_extra/p_hmac_asn1.c index caa5052098f..153ced0b680 100644 --- a/crypto/evp_extra/p_hmac_asn1.c +++ b/crypto/evp_extra/p_hmac_asn1.c @@ -122,9 +122,8 @@ const EVP_PKEY_ASN1_METHOD hmac_asn1_meth = { {0xff} /* placeholder oid */, 0 /* oid_len */, - EVP_PKEY_HMAC, "HMAC", - "AWS-LC HMAC method", + "OpenSSL HMAC method", NULL /* pub_decode */, NULL /* pub_encode */, diff --git a/crypto/evp_extra/p_kem_asn1.c b/crypto/evp_extra/p_kem_asn1.c index 19c1d7f237e..d6ca05676e1 100644 --- a/crypto/evp_extra/p_kem_asn1.c +++ b/crypto/evp_extra/p_kem_asn1.c @@ -120,7 +120,6 @@ const EVP_PKEY_ASN1_METHOD kem_asn1_meth = { {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, 11, - EVP_PKEY_KEM, "KEM", "AWS-LC KEM method", diff --git a/crypto/evp_extra/p_rsa_asn1.c b/crypto/evp_extra/p_rsa_asn1.c index 7e614fafe58..04235950cc9 100644 --- a/crypto/evp_extra/p_rsa_asn1.c +++ b/crypto/evp_extra/p_rsa_asn1.c @@ -224,7 +224,6 @@ const EVP_PKEY_ASN1_METHOD rsa_asn1_meth = { // 1.2.840.113549.1.1.1 {0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01}, 9, - EVP_PKEY_RSA, "RSA", "OpenSSL RSA method", @@ -256,7 +255,6 @@ const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth = { // 1.2.840.113549.1.1.10 {0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0a}, 9, - EVP_PKEY_RSA_PSS, "RSA-PSS", "OpenSSL RSA-PSS method", diff --git a/crypto/evp_extra/p_x25519_asn1.c b/crypto/evp_extra/p_x25519_asn1.c index 85fcf048651..b6963a82281 100644 --- a/crypto/evp_extra/p_x25519_asn1.c +++ b/crypto/evp_extra/p_x25519_asn1.c @@ -253,7 +253,6 @@ const EVP_PKEY_ASN1_METHOD x25519_asn1_meth = { {0x2b, 0x65, 0x6e}, 3, - EVP_PKEY_X25519, "X25519", "OpenSSL X25519 algorithm", diff --git a/crypto/fipsmodule/evp/internal.h b/crypto/fipsmodule/evp/internal.h index 27dcddeb61c..0465d6cd66c 100644 --- a/crypto/fipsmodule/evp/internal.h +++ b/crypto/fipsmodule/evp/internal.h @@ -85,7 +85,6 @@ struct evp_pkey_asn1_method_st { uint8_t oid[11]; uint8_t oid_len; - int pkey_base_id; const char *pem_str; const char *info; diff --git a/include/openssl/evp.h b/include/openssl/evp.h index cc08e43ca9a..136663a41b2 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -936,10 +936,9 @@ typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD; // |EVP_PKEY_ASN1_METHOD| structures. OPENSSL_EXPORT int EVP_PKEY_asn1_get_count(void); -// EVP_PKEY_asn1_get0 -// Returns a pointer to an EVP_PKEY_ASN1_METHOD structure. |idx| is the index -// value, which must be a non-negative value smaller than the return value of -// |EVP_PKEY_asn1_get_count|. +// EVP_PKEY_asn1_get0 returns a pointer to an EVP_PKEY_ASN1_METHOD structure. +// |idx| is the index value, which must be a non-negative value smaller than +// the return value of |EVP_PKEY_asn1_get_count|. OPENSSL_EXPORT const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx); // EVP_PKEY_asn1_find finds an |EVP_PKEY_ASN1_METHOD| structure for the given @@ -955,9 +954,11 @@ OPENSSL_EXPORT const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str( ENGINE **_pe, const char *name, int len); // EVP_PKEY_asn1_get0_info retrieves information about an |EVP_PKEY_ASN1_METHOD| -// structure. |ppkey_id| is a pointer to get the key type identifier. -// |pkey_base_id| is a pointer to get the base key type. -// |ppkey_flags| is not supported. Value is set to 0 is pointer is not |NULL|. +// structure. +// |ppkey_id| is a pointer to get the key type identifier. +// |pkey_base_id| is a pointer to get the base key type. Value will be the same +// as |ppkey_id|. +// |ppkey_flags| is not supported. Value is set to 0 if pointer is not |NULL|. // |pinfo| is a pointer to get a text description. // |ppem_str| is a pointer to get the PEM string name. // |ameth| is a pointer to the EVP_PKEY_ASN1_METHOD structure.