Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Aug 16, 2024
1 parent c34a6fe commit 2077b2c
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 19 deletions.
1 change: 0 additions & 1 deletion crypto/dilithium/p_dilithium3_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down
4 changes: 2 additions & 2 deletions crypto/evp_extra/evp_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion crypto/evp_extra/p_dsa_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down
1 change: 0 additions & 1 deletion crypto/evp_extra/p_ec_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down
1 change: 0 additions & 1 deletion crypto/evp_extra/p_ed25519_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions crypto/evp_extra/p_hmac_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */,
Expand Down
1 change: 0 additions & 1 deletion crypto/evp_extra/p_kem_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down
2 changes: 0 additions & 2 deletions crypto/evp_extra/p_rsa_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Expand Down Expand Up @@ -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",

Expand Down
1 change: 0 additions & 1 deletion crypto/evp_extra/p_x25519_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ const EVP_PKEY_ASN1_METHOD x25519_asn1_meth = {
{0x2b, 0x65, 0x6e},
3,

EVP_PKEY_X25519,
"X25519",
"OpenSSL X25519 algorithm",

Expand Down
1 change: 0 additions & 1 deletion crypto/fipsmodule/evp/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
12 changes: 6 additions & 6 deletions include/openssl/evp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -956,8 +955,9 @@ OPENSSL_EXPORT const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(

// 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|.
// |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.
Expand Down

0 comments on commit 2077b2c

Please sign in to comment.