Skip to content

Commit

Permalink
RSA type check
Browse files Browse the repository at this point in the history
  • Loading branch information
beldmit committed Oct 20, 2023
1 parent fee1cd0 commit c33718e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ssh-rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ static int openssh_RSA_verify(int, const u_char *, size_t, u_char *, size_t, EVP
static u_int
ssh_rsa_size(const struct sshkey *k)
{
if (sshkey_type_plain(k->type) != KEY_RSA)
return 0;
if (k->pkey == NULL)
return 0;

return EVP_PKEY_bits(k->pkey);
}

Expand Down

0 comments on commit c33718e

Please sign in to comment.