VMS doesn't support more than on period in a file name
This commit is contained in:
parent
181355616e
commit
98405f240b
16
apps/ca.c
16
apps/ca.c
@ -980,7 +980,11 @@ bad:
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_SYS_VMS
|
||||||
j = BIO_snprintf(buf[0], sizeof buf[0], "%s.new", dbfile);
|
j = BIO_snprintf(buf[0], sizeof buf[0], "%s.new", dbfile);
|
||||||
|
#else
|
||||||
|
j = BIO_snprintf(buf[0], sizeof buf[0], "%s-new", dbfile);
|
||||||
|
#endif
|
||||||
if (j < 0 || j >= sizeof buf[0])
|
if (j < 0 || j >= sizeof buf[0])
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "file name too long\n");
|
BIO_printf(bio_err, "file name too long\n");
|
||||||
@ -998,7 +1002,11 @@ bad:
|
|||||||
|
|
||||||
BIO_free(out);
|
BIO_free(out);
|
||||||
out = NULL;
|
out = NULL;
|
||||||
|
#ifndef OPENSSL_SYS_VMS
|
||||||
j = BIO_snprintf(buf[1], sizeof buf[1], "%s.old", dbfile);
|
j = BIO_snprintf(buf[1], sizeof buf[1], "%s.old", dbfile);
|
||||||
|
#else
|
||||||
|
j = BIO_snprintf(buf[1], sizeof buf[1], "%s-old", dbfile);
|
||||||
|
#endif
|
||||||
if (j < 0 || j >= sizeof buf[1])
|
if (j < 0 || j >= sizeof buf[1])
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "file name too long\n");
|
BIO_printf(bio_err, "file name too long\n");
|
||||||
@ -1586,7 +1594,11 @@ bad:
|
|||||||
X509_free(revcert);
|
X509_free(revcert);
|
||||||
|
|
||||||
strncpy(buf[0],dbfile,BSIZE-4);
|
strncpy(buf[0],dbfile,BSIZE-4);
|
||||||
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(buf[0],".new");
|
strcat(buf[0],".new");
|
||||||
|
#else
|
||||||
|
strcat(buf[0],"-new");
|
||||||
|
#endif
|
||||||
if (BIO_write_filename(out,buf[0]) <= 0)
|
if (BIO_write_filename(out,buf[0]) <= 0)
|
||||||
{
|
{
|
||||||
perror(dbfile);
|
perror(dbfile);
|
||||||
@ -1596,7 +1608,11 @@ bad:
|
|||||||
j=TXT_DB_write(out,db);
|
j=TXT_DB_write(out,db);
|
||||||
if (j <= 0) goto err;
|
if (j <= 0) goto err;
|
||||||
strncpy(buf[1],dbfile,BSIZE-4);
|
strncpy(buf[1],dbfile,BSIZE-4);
|
||||||
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(buf[1],".old");
|
strcat(buf[1],".old");
|
||||||
|
#else
|
||||||
|
strcat(buf[1],"-old");
|
||||||
|
#endif
|
||||||
if (rename(dbfile,buf[1]) < 0)
|
if (rename(dbfile,buf[1]) < 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"unable to rename %s to %s\n", dbfile, buf[1]);
|
BIO_printf(bio_err,"unable to rename %s to %s\n", dbfile, buf[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user