summaryrefslogtreecommitdiffstats
path: root/apps/fipsinstall.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-06-21 08:55:50 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-11-17 15:48:34 +0100
commit2ff286c26c29b69b02ca99656d26d2f8cfd54682 (patch)
tree71a01c51c47d0dd9528ff14357615d71420ba5a1 /apps/fipsinstall.c
parenta6838c8d52087f2b0494bbab8486e10944aff7f7 (diff)
Add and use HAS_PREFIX() and CHECK_AND_SKIP_PREFIX() for checking if string has literal prefix
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15847)
Diffstat (limited to 'apps/fipsinstall.c')
-rw-r--r--apps/fipsinstall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/fipsinstall.c b/apps/fipsinstall.c
index d0efdf7643..8152f3956b 100644
--- a/apps/fipsinstall.c
+++ b/apps/fipsinstall.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include <string.h>
+#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/provider.h>
@@ -368,9 +368,9 @@ opthelp:
case OPT_MACOPT:
if (!sk_OPENSSL_STRING_push(opts, opt_arg()))
goto opthelp;
- if (strncmp(opt_arg(), "hexkey:", 7) == 0)
+ if (HAS_PREFIX(opt_arg(), "hexkey:"))
gotkey = 1;
- else if (strncmp(opt_arg(), "digest:", 7) == 0)
+ else if (HAS_PREFIX(opt_arg(), "digest:"))
gotdigest = 1;
break;
case OPT_VERIFY: