Skip to content

Commit

Permalink
Merge pull request #3 from lenovo/4k_keys
Browse files Browse the repository at this point in the history
Add support for 4k keys.
  • Loading branch information
mrhpearson committed May 17, 2023
2 parents bc77cc2 + 5cf705c commit 674b602
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tlmi_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ int cert_format_pem(char *certFile, char **base64cert, size_t *certLen)
// Key length
print_info(" Public Key\n");
print_info(" %d bit RSA key\n", EVP_PKEY_bits(pkey));
if (EVP_PKEY_bits(pkey) != 2048) {
fprintf(stderr, "RSA key size must be 2048 bit.\n");
if ((EVP_PKEY_bits(pkey) != 2048) && (EVP_PKEY_bits(pkey) != 4096)) {
fprintf(stderr, "RSA key size must be 2048 or 4096 bits.\n");
return -1;
}

Expand Down

0 comments on commit 674b602

Please sign in to comment.