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

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.361 and 1.362

version 1.361, 2022/09/17 10:33:18 version 1.362, 2023/02/17 04:22:50
Line 1868 
Line 1868 
 }  }
   
 static int  static int
 try_identity(struct ssh *ssh, Identity *id)  
 {  
         if (!id->key)  
                 return (0);  
         if (sshkey_type_plain(id->key->type) == KEY_RSA &&  
             (ssh->compat & SSH_BUG_RSASIGMD5) != 0) {  
                 debug("Skipped %s key %s for RSA/MD5 server",  
                     sshkey_type(id->key), id->filename);  
                 return (0);  
         }  
         return 1;  
 }  
   
 static int  
 userauth_pubkey(struct ssh *ssh)  userauth_pubkey(struct ssh *ssh)
 {  {
         Authctxt *authctxt = (Authctxt *)ssh->authctxt;          Authctxt *authctxt = (Authctxt *)ssh->authctxt;
Line 1901 
Line 1887 
                  * private key instead                   * private key instead
                  */                   */
                 if (id->key != NULL) {                  if (id->key != NULL) {
                         if (try_identity(ssh, id)) {                          if (id->key != NULL) {
                                 ident = format_identity(id);                                  ident = format_identity(id);
                                 debug("Offering public key: %s", ident);                                  debug("Offering public key: %s", ident);
                                 free(ident);                                  free(ident);
Line 1911 
Line 1897 
                         debug("Trying private key: %s", id->filename);                          debug("Trying private key: %s", id->filename);
                         id->key = load_identity_file(id);                          id->key = load_identity_file(id);
                         if (id->key != NULL) {                          if (id->key != NULL) {
                                 if (try_identity(ssh, id)) {                                  if (id->key != NULL) {
                                         id->isprivate = 1;                                          id->isprivate = 1;
                                         sent = sign_and_send_pubkey(ssh, id);                                          sent = sign_and_send_pubkey(ssh, id);
                                 }                                  }

Legend:
Removed from v.1.361  
changed lines
  Added in v.1.362