[BACK]Return to ssh-rsa.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-rsa.c between version 1.77 and 1.78

version 1.77, 2022/10/28 00:44:44 version 1.78, 2022/10/28 02:47:04
Line 32 
Line 32 
   
 static int openssh_RSA_verify(int, u_char *, size_t, u_char *, size_t, RSA *);  static int openssh_RSA_verify(int, u_char *, size_t, u_char *, size_t, RSA *);
   
 int  
 sshkey_check_rsa_length(const struct sshkey *k, int min_size)  
 {  
 #ifdef WITH_OPENSSL  
         const BIGNUM *rsa_n;  
         int nbits;  
   
         if (k == NULL || k->rsa == NULL ||  
             (k->type != KEY_RSA && k->type != KEY_RSA_CERT))  
                 return 0;  
         RSA_get0_key(k->rsa, &rsa_n, NULL, NULL);  
         nbits = BN_num_bits(rsa_n);  
         if (nbits < SSH_RSA_MINIMUM_MODULUS_SIZE ||  
             (min_size > 0 && nbits < min_size))  
                 return SSH_ERR_KEY_LENGTH;  
 #endif /* WITH_OPENSSL */  
         return 0;  
 }  
   
   
 static u_int  static u_int
 ssh_rsa_size(const struct sshkey *key)  ssh_rsa_size(const struct sshkey *key)
 {  {

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78