diff options
Diffstat (limited to 'fips/fips_utl.h')
-rw-r--r-- | fips/fips_utl.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fips/fips_utl.h b/fips/fips_utl.h index 71147a2a31..3deb406cf4 100644 --- a/fips/fips_utl.h +++ b/fips/fips_utl.h @@ -63,6 +63,7 @@ int bint2bin(const char *in, int len, unsigned char *out); int bin2bint(const unsigned char *in,int len,char *out); void PrintValue(char *tag, unsigned char *val, int len); void OutputValue(char *tag, unsigned char *val, int len, FILE *rfp,int bitmode); +void fips_algtest_init(void); static int no_err; @@ -97,6 +98,16 @@ static void fips_set_error_print(void) FIPS_set_error_callbacks(put_err_cb, add_err_cb); } +void fips_algtest_init(void) + { + fips_set_error_print(); + if (!FIPS_mode_set(1)) + { + fprintf(stderr, "Error entering FIPS mode\n"); + exit(1); + } + } + int hex2bin(const char *in, unsigned char *out) { int n1, n2, isodd = 0; |