*
*/
+#ifndef FIPS_UTL_H
+#define FIPS_UTL_H
+
#define OPENSSL_FIPSAPI
#include <openssl/fips_rand.h>
#define RESP_EOL "\r\n"
#endif
+#ifndef FIPS_AUTH_OFFICER_PASS
+#define FIPS_AUTH_OFFICER_PASS "Default FIPS Crypto Officer Password"
+#endif
+
+#ifndef FIPS_AUTH_USER_PASS
+#define FIPS_AUTH_USER_PASS "Default FIPS Crypto User Password"
+#endif
+
+
int hex2bin(const char *in, unsigned char *out);
unsigned char *hex2bin_m(const char *in, long *plen);
int do_hex2bn(BIGNUM **pr, const char *in);
void fips_algtest_init(void)
{
fips_algtest_init_nofips();
- if (!FIPS_module_mode_set(1))
+ if (!FIPS_module_mode_set(1, FIPS_AUTH_USER_PASS))
{
fprintf(stderr, "Error entering FIPS mode\n");
exit(1);
return fips_strncasecmp(str1, str2, (size_t)-1);
}
+
+#endif