Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Aug 29, 2024
1 parent 126021e commit e323568
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion crypto/evp_extra/evp_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,10 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **_pe,
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);

const size_t pem_str_len = OPENSSL_strnlen(ameth->pem_str, 16);
const size_t longest_pem_str_len = 10; // "DILITHIUM3"

const size_t pem_str_len =
OPENSSL_strnlen(ameth->pem_str, longest_pem_str_len);

// OPENSSL_strncasecmp(a, b, n) compares up to index n-1
const size_t cmp_len =
Expand Down
1 change: 1 addition & 0 deletions include/openssl/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ typedef struct evp_hpke_key_st EVP_HPKE_KEY;
typedef struct evp_kem_st EVP_KEM;
typedef struct kem_key_st KEM_KEY;
typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
typedef struct evp_pkey_st EVP_PKEY;
typedef struct hmac_ctx_st HMAC_CTX;
typedef struct md4_state_st MD4_CTX;
Expand Down
2 changes: 0 additions & 2 deletions include/openssl/evp.h
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,6 @@ OPENSSL_EXPORT int EVP_PKEY_kem_check_key(EVP_PKEY *key);

// ASN1 functions

typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;

// EVP_PKEY_asn1_get_count returns the number of available
// |EVP_PKEY_ASN1_METHOD| structures.
OPENSSL_EXPORT int EVP_PKEY_asn1_get_count(void);
Expand Down

0 comments on commit e323568

Please sign in to comment.