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

Diff for /src/usr.bin/ssh/ssh-pkcs11-client.c between version 1.10 and 1.11

version 1.10, 2018/07/09 21:59:10 version 1.11, 2018/09/13 02:08:33
Line 150 
Line 150 
 static int  static int
 wrap_key(RSA *rsa)  wrap_key(RSA *rsa)
 {  {
         static RSA_METHOD helper_rsa;          static RSA_METHOD *helper_rsa;
   
         memcpy(&helper_rsa, RSA_get_default_method(), sizeof(helper_rsa));          if ((helper_rsa = RSA_meth_dup(RSA_get_default_method())) == NULL)
         helper_rsa.name = "ssh-pkcs11-helper";                  fatal("%s: RSA_meth_dup failed", __func__);
         helper_rsa.rsa_priv_enc = pkcs11_rsa_private_encrypt;          if (!RSA_meth_set1_name(helper_rsa, "ssh-pkcs11-helper") ||
         RSA_set_method(rsa, &helper_rsa);              !RSA_meth_set_priv_enc(helper_rsa, pkcs11_rsa_private_encrypt))
                   fatal("%s: failed to prepare method", __func__);
           RSA_set_method(rsa, helper_rsa);
         return (0);          return (0);
 }  }
   

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11