summaryrefslogtreecommitdiff
path: root/scripts/sign-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sign-file.c')
-rw-r--r--[-rwxr-xr-x]scripts/sign-file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/sign-file.c b/scripts/sign-file.c
index 53af6dc3e6c1..fbd34b8e8f57 100755..100644
--- a/scripts/sign-file.c
+++ b/scripts/sign-file.c
@@ -41,7 +41,9 @@
* signing with anything other than SHA1 - so we're stuck with that if such is
* the case.
*/
-#if OPENSSL_VERSION_NUMBER < 0x10000000L || defined(OPENSSL_NO_CMS)
+#if defined(LIBRESSL_VERSION_NUMBER) || \
+ OPENSSL_VERSION_NUMBER < 0x10000000L || \
+ defined(OPENSSL_NO_CMS)
#define USE_PKCS7
#endif
#ifndef USE_PKCS7
@@ -267,7 +269,7 @@ int main(int argc, char **argv)
}
x509_name = argv[2];
module_name = argv[3];
- if (argc == 5) {
+ if (argc == 5 && strcmp(argv[3], argv[4]) != 0) {
dest_name = argv[4];
replace_orig = false;
} else {