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

Diff for /src/usr.bin/openssl/ca.c between version 1.21 and 1.22

version 1.21, 2016/08/30 11:32:28 version 1.22, 2016/08/31 11:42:09
Line 702 
Line 702 
   
         /*****************************************************************/          /*****************************************************************/
         /* lookup where to write new certificates */          /* lookup where to write new certificates */
         if ((outdir == NULL) && (req)) {          if (outdir == NULL && req) {
   
                 if ((outdir = NCONF_get_string(conf, section,                  if ((outdir = NCONF_get_string(conf, section,
                     ENV_NEW_CERTS_DIR)) == NULL) {                      ENV_NEW_CERTS_DIR)) == NULL) {
                         BIO_printf(bio_err, "there needs to be defined a directory for new certificate to be placed in\n");                          BIO_printf(bio_err, "output directory %s not defined\n",
                         goto err;                              ENV_NEW_CERTS_DIR);
                 }  
                 /*  
                  * outdir is a directory spec, but access() for VMS demands a  
                  * filename.  In any case, stat(), below, will catch the  
                  * problem if outdir is not a directory spec, and the fopen()  
                  * or open() will catch an error if there is no write access.  
                  *  
                  * Presumably, this problem could also be solved by using the  
                  * DEC C routines to convert the directory syntax to Unixly,  
                  * and give that to access().  However, time's too short to  
                  * do that just now.  
                  */  
                 if (access(outdir, R_OK | W_OK | X_OK) != 0) {  
                         BIO_printf(bio_err,  
                             "I am unable to access the %s directory\n", outdir);  
                         perror(outdir);  
                         goto err;  
                 }  
                 if (app_isdir(outdir) <= 0) {  
                         BIO_printf(bio_err,  
                             "%s need to be a directory\n", outdir);  
                         perror(outdir);  
                         goto err;                          goto err;
                 }                  }
         }          }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22