[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.69 and 1.70

version 1.69, 2022/10/28 00:35:40 version 1.70, 2022/10/28 00:36:31
Line 58 
Line 58 
         k->rsa = NULL;          k->rsa = NULL;
 }  }
   
   static int
   ssh_rsa_equal(const struct sshkey *a, const struct sshkey *b)
   {
           const BIGNUM *rsa_e_a, *rsa_n_a;
           const BIGNUM *rsa_e_b, *rsa_n_b;
   
           if (a->rsa == NULL || b->rsa == NULL)
                   return 0;
           RSA_get0_key(a->rsa, &rsa_n_a, &rsa_e_a, NULL);
           RSA_get0_key(b->rsa, &rsa_n_b, &rsa_e_b, NULL);
           if (rsa_e_a == NULL || rsa_e_b == NULL)
                   return 0;
           if (rsa_n_a == NULL || rsa_n_b == NULL)
                   return 0;
           if (BN_cmp(rsa_e_a, rsa_e_b) != 0)
                   return 0;
           if (BN_cmp(rsa_n_a, rsa_n_b) != 0)
                   return 0;
           return 1;
   }
   
 static const char *  static const char *
 rsa_hash_alg_ident(int hash_alg)  rsa_hash_alg_ident(int hash_alg)
 {  {
Line 470 
Line 491 
         /* .size = */           ssh_rsa_size,          /* .size = */           ssh_rsa_size,
         /* .alloc = */          ssh_rsa_alloc,          /* .alloc = */          ssh_rsa_alloc,
         /* .cleanup = */        ssh_rsa_cleanup,          /* .cleanup = */        ssh_rsa_cleanup,
           /* .equal = */          ssh_rsa_equal,
 };  };
   
 const struct sshkey_impl sshkey_rsa_impl = {  const struct sshkey_impl sshkey_rsa_impl = {

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70