Enc doesn't support AEAD ciphers.
[openssl.git] / fips / hmac / fips_hmactest.c
index 8c51fe523be1ce5e6e61165a267ec2e443bd9fcb..da9c8d7926aea55b6e38c4e463d606735bff7086 100644 (file)
@@ -56,6 +56,8 @@
  *
  */
 
+#define OPENSSL_FIPSAPI
+
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -65,8 +67,6 @@
 #include <openssl/err.h>
 #include <openssl/bn.h>
 
-#include <openssl/x509v3.h>
-
 #ifndef OPENSSL_FIPS
 
 int main(int argc, char *argv[])
@@ -77,6 +77,7 @@ int main(int argc, char *argv[])
 
 #else
 
+#include <openssl/fips.h>
 #include "fips_utl.h"
 
 static int hmac_test(const EVP_MD *md, FILE *out, FILE *in);
@@ -84,14 +85,16 @@ static int print_hmac(const EVP_MD *md, FILE *out,
                unsigned char *Key, int Klen,
                unsigned char *Msg, int Msglen, int Tlen);
 
+#ifdef FIPS_ALGVS
+int fips_hmactest_main(int argc, char **argv)
+#else
 int main(int argc, char **argv)
+#endif
        {
        FILE *in = NULL, *out = NULL;
 
        int ret = 1;
-       fips_set_error_print();
-       if(!FIPS_mode_set(1))
-               goto end;
+       fips_algtest_init();
 
        if (argc == 1)
                in = stdin;
@@ -314,7 +317,7 @@ static int print_hmac(const EVP_MD *emd, FILE *out,
        fputs("Mac = ", out);
        for (i = 0; i < Tlen; i++)
                fprintf(out, "%02x", md[i]);
-       fputs("\n", out);
+       fputs(RESP_EOL, out);
        return 1;
        }