[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.70 and 1.71

version 1.70, 2022/10/28 00:36:31 version 1.71, 2022/10/28 00:37:24
Line 79 
Line 79 
         return 1;          return 1;
 }  }
   
   static int
   ssh_rsa_serialize_public(const struct sshkey *key, struct sshbuf *b,
       const char *typename, enum sshkey_serialize_rep opts)
   {
           int r;
           const BIGNUM *rsa_n, *rsa_e;
   
           if (key->rsa == NULL)
                   return SSH_ERR_INVALID_ARGUMENT;
           RSA_get0_key(key->rsa, &rsa_n, &rsa_e, NULL);
           if ((r = sshbuf_put_cstring(b, typename)) != 0 ||
               (r = sshbuf_put_bignum2(b, rsa_e)) != 0 ||
               (r = sshbuf_put_bignum2(b, rsa_n)) != 0)
                   return r;
   
           return 0;
   }
   
 static const char *  static const char *
 rsa_hash_alg_ident(int hash_alg)  rsa_hash_alg_ident(int hash_alg)
 {  {
Line 492 
Line 510 
         /* .alloc = */          ssh_rsa_alloc,          /* .alloc = */          ssh_rsa_alloc,
         /* .cleanup = */        ssh_rsa_cleanup,          /* .cleanup = */        ssh_rsa_cleanup,
         /* .equal = */          ssh_rsa_equal,          /* .equal = */          ssh_rsa_equal,
           /* .ssh_serialize_public = */ ssh_rsa_serialize_public,
 };  };
   
 const struct sshkey_impl sshkey_rsa_impl = {  const struct sshkey_impl sshkey_rsa_impl = {

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