mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-05-20 10:24:29 -05:00
Overwriting an existing file is not supported
This commit is contained in:
parent
ef5047038e
commit
8ab8a133f7
@ -3651,6 +3651,16 @@ static int use_legacy(void)
|
|||||||
}
|
}
|
||||||
#endif /* OPENSSL_VERSION_NUMBER>=0x30000000L */
|
#endif /* OPENSSL_VERSION_NUMBER>=0x30000000L */
|
||||||
|
|
||||||
|
static int file_exists(const char *filename)
|
||||||
|
{
|
||||||
|
FILE *file = fopen(filename, "rb");
|
||||||
|
if (file) {
|
||||||
|
fclose(file);
|
||||||
|
return 1; /* File exists */
|
||||||
|
}
|
||||||
|
return 0; /* File does not exist */
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* [in] argc, argv
|
* [in] argc, argv
|
||||||
* [in, out] options: structure holds the input data
|
* [in, out] options: structure holds the input data
|
||||||
@ -3981,6 +3991,10 @@ static int main_configure(int argc, char **argv, GLOBAL_OPTIONS *options)
|
|||||||
argc--;
|
argc--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (cmd != CMD_VERIFY && file_exists(options->outfile)) {
|
||||||
|
printf("Overwriting an existing file is not supported.\n");
|
||||||
|
return 0; /* FAILED */
|
||||||
|
}
|
||||||
if (argc > 0 ||
|
if (argc > 0 ||
|
||||||
#ifdef ENABLE_CURL
|
#ifdef ENABLE_CURL
|
||||||
(options->nturl && options->ntsurl) ||
|
(options->nturl && options->ntsurl) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user