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

Diff for /src/usr.bin/ssh/ssh.c between version 1.419 and 1.420

version 1.419, 2015/07/20 18:42:35 version 1.420, 2015/07/30 00:01:34
Line 98 
Line 98 
 #include "roaming.h"  #include "roaming.h"
 #include "version.h"  #include "version.h"
 #include "ssherr.h"  #include "ssherr.h"
   #include "myproposal.h"
   
 #ifdef ENABLE_PKCS11  #ifdef ENABLE_PKCS11
 #include "ssh-pkcs11.h"  #include "ssh-pkcs11.h"
Line 764 
Line 765 
                         }                          }
                         break;                          break;
                 case 'c':                  case 'c':
                         if (ciphers_valid(optarg)) {                          if (ciphers_valid(*optarg == '+' ?
                               optarg + 1 : optarg)) {
                                 /* SSH2 only */                                  /* SSH2 only */
                                 options.ciphers = xstrdup(optarg);                                  options.ciphers = xstrdup(optarg);
                                 options.cipher = SSH_CIPHER_INVALID;                                  options.cipher = SSH_CIPHER_INVALID;
                         } else {                                  break;
                                 /* SSH1 only */  
                                 options.cipher = cipher_number(optarg);  
                                 if (options.cipher == -1) {  
                                         fprintf(stderr,  
                                             "Unknown cipher type '%s'\n",  
                                             optarg);  
                                         exit(255);  
                                 }  
                                 if (options.cipher == SSH_CIPHER_3DES)  
                                         options.ciphers = "3des-cbc";  
                                 else if (options.cipher == SSH_CIPHER_BLOWFISH)  
                                         options.ciphers = "blowfish-cbc";  
                                 else  
                                         options.ciphers = (char *)-1;  
                         }                          }
                           /* SSH1 only */
                           options.cipher = cipher_number(optarg);
                           if (options.cipher == -1) {
                                   fprintf(stderr, "Unknown cipher type '%s'\n",
                                       optarg);
                                   exit(255);
                           }
                           if (options.cipher == SSH_CIPHER_3DES)
                                   options.ciphers = xstrdup("3des-cbc");
                           else if (options.cipher == SSH_CIPHER_BLOWFISH)
                                   options.ciphers = xstrdup("blowfish-cbc");
                           else
                                   options.ciphers = xstrdup(KEX_CLIENT_ENCRYPT);
                         break;                          break;
                 case 'm':                  case 'm':
                         if (mac_valid(optarg))                          if (mac_valid(optarg))

Legend:
Removed from v.1.419  
changed lines
  Added in v.1.420