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

Diff for /src/usr.bin/ssh/kexdh.c between version 1.27 and 1.28

version 1.27, 2018/12/27 03:25:25 version 1.28, 2019/01/21 10:00:23
Line 33 
Line 33 
 #include "sshkey.h"  #include "sshkey.h"
 #include "cipher.h"  #include "cipher.h"
 #include "kex.h"  #include "kex.h"
   #include "dh.h"
 #include "ssherr.h"  #include "ssherr.h"
 #include "sshbuf.h"  #include "sshbuf.h"
 #include "digest.h"  #include "digest.h"
   
   int
   kex_dh_keygen(struct kex *kex)
   {
           switch (kex->kex_type) {
           case KEX_DH_GRP1_SHA1:
                   kex->dh = dh_new_group1();
                   break;
           case KEX_DH_GRP14_SHA1:
           case KEX_DH_GRP14_SHA256:
                   kex->dh = dh_new_group14();
                   break;
           case KEX_DH_GRP16_SHA512:
                   kex->dh = dh_new_group16();
                   break;
           case KEX_DH_GRP18_SHA512:
                   kex->dh = dh_new_group18();
                   break;
           default:
                   return SSH_ERR_INVALID_ARGUMENT;
           }
           if (kex->dh == NULL)
                   return SSH_ERR_ALLOC_FAIL;
           return (dh_gen_key(kex->dh, kex->we_need * 8));
   }
   
 int  int
 kex_dh_hash(  kex_dh_hash(

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28