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

Diff for /src/usr.bin/ssh/readconf.c between version 1.240 and 1.241

version 1.240, 2015/08/21 23:53:08 version 1.241, 2015/09/24 06:15:11
Line 124 
Line 124 
         oPasswordAuthentication, oRSAAuthentication,          oPasswordAuthentication, oRSAAuthentication,
         oChallengeResponseAuthentication, oXAuthLocation,          oChallengeResponseAuthentication, oXAuthLocation,
         oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,          oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,
           oCertificateFile,
         oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,          oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
         oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,          oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
         oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,          oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
Line 191 
Line 192 
         { "identityfile", oIdentityFile },          { "identityfile", oIdentityFile },
         { "identityfile2", oIdentityFile },                     /* obsolete */          { "identityfile2", oIdentityFile },                     /* obsolete */
         { "identitiesonly", oIdentitiesOnly },          { "identitiesonly", oIdentitiesOnly },
           { "certificatefile", oCertificateFile },
         { "hostname", oHostName },          { "hostname", oHostName },
         { "hostkeyalias", oHostKeyAlias },          { "hostkeyalias", oHostKeyAlias },
         { "proxycommand", oProxyCommand },          { "proxycommand", oProxyCommand },
Line 354 
Line 356 
 }  }
   
 void  void
   add_certificate_file(Options *options, const char *path, int userprovided)
   {
           int i;
   
           if (options->num_certificate_files >= SSH_MAX_CERTIFICATE_FILES)
                   fatal("Too many certificate files specified (max %d)",
                       SSH_MAX_CERTIFICATE_FILES);
   
           /* Avoid registering duplicates */
           for (i = 0; i < options->num_certificate_files; i++) {
                   if (options->certificate_file_userprovided[i] == userprovided &&
                       strcmp(options->certificate_files[i], path) == 0) {
                           debug2("%s: ignoring duplicate key %s", __func__, path);
                           return;
                   }
           }
   
           options->certificate_file_userprovided[options->num_certificate_files] =
               userprovided;
           options->certificate_files[options->num_certificate_files++] =
               xstrdup(path);
   }
   
   void
 add_identity_file(Options *options, const char *dir, const char *filename,  add_identity_file(Options *options, const char *dir, const char *filename,
     int userprovided)      int userprovided)
 {  {
Line 969 
Line 995 
                 }                  }
                 break;                  break;
   
           case oCertificateFile:
                   arg = strdelim(&s);
                   if (!arg || *arg == '\0')
                           fatal("%.200s line %d: Missing argument.",
                               filename, linenum);
                   if (*activep) {
                           intptr = &options->num_certificate_files;
                           if (*intptr >= SSH_MAX_CERTIFICATE_FILES) {
                                   fatal("%.200s line %d: Too many certificate "
                                       "files specified (max %d).",
                                       filename, linenum,
                                       SSH_MAX_CERTIFICATE_FILES);
                           }
                           add_certificate_file(options, arg,
                               flags & SSHCONF_USERCONF);
                   }
                   break;
   
         case oXAuthLocation:          case oXAuthLocation:
                 charptr=&options->xauth_location;                  charptr=&options->xauth_location;
                 goto parse_string;                  goto parse_string;
Line 1613 
Line 1657 
         options->hostkeyalgorithms = NULL;          options->hostkeyalgorithms = NULL;
         options->protocol = SSH_PROTO_UNKNOWN;          options->protocol = SSH_PROTO_UNKNOWN;
         options->num_identity_files = 0;          options->num_identity_files = 0;
           options->num_certificate_files = 0;
         options->hostname = NULL;          options->hostname = NULL;
         options->host_key_alias = NULL;          options->host_key_alias = NULL;
         options->proxy_command = NULL;          options->proxy_command = NULL;

Legend:
Removed from v.1.240  
changed lines
  Added in v.1.241