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

Diff for /src/usr.bin/ssh/Attic/sshconnect1.c between version 1.72 and 1.73

version 1.72, 2013/09/02 22:00:34 version 1.73, 2014/01/27 19:18:54
Line 17 
Line 17 
 #include <sys/socket.h>  #include <sys/socket.h>
   
 #include <openssl/bn.h>  #include <openssl/bn.h>
 #include <openssl/md5.h>  
   
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 44 
Line 43 
 #include "canohost.h"  #include "canohost.h"
 #include "hostfile.h"  #include "hostfile.h"
 #include "auth.h"  #include "auth.h"
   #include "digest.h"
   
 /* Session id for the current session. */  /* Session id for the current session. */
 u_char session_id[16];  u_char session_id[16];
Line 158 
Line 158 
 respond_to_rsa_challenge(BIGNUM * challenge, RSA * prv)  respond_to_rsa_challenge(BIGNUM * challenge, RSA * prv)
 {  {
         u_char buf[32], response[16];          u_char buf[32], response[16];
         MD5_CTX md;          struct ssh_digest_ctx *md;
         int i, len;          int i, len;
   
         /* Decrypt the challenge using the private key. */          /* Decrypt the challenge using the private key. */
Line 176 
Line 176 
   
         memset(buf, 0, sizeof(buf));          memset(buf, 0, sizeof(buf));
         BN_bn2bin(challenge, buf + sizeof(buf) - len);          BN_bn2bin(challenge, buf + sizeof(buf) - len);
         MD5_Init(&md);          if ((md = ssh_digest_start(SSH_DIGEST_MD5)) == NULL ||
         MD5_Update(&md, buf, 32);              ssh_digest_update(md, buf, 32) < 0 ||
         MD5_Update(&md, session_id, 16);              ssh_digest_update(md, session_id, 16) < 0 ||
         MD5_Final(response, &md);              ssh_digest_final(md, response, sizeof(response)) < 0)
                   fatal("%s: md5 failed", __func__);
           ssh_digest_free(md);
   
         debug("Sending response to host key RSA challenge.");          debug("Sending response to host key RSA challenge.");
   

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73