Commit 8b8096d0 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Add support for multicall fips_algvs utility combining functionality

of all fips test utilities in a single binary and some minimal script
parsing for platforms lacking a suitable shell.

In order to keep changes to the build system to a minimum it #includes all
the utilities C source files (yuck).
parent 9ab6d681
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@

 Changes between 1.0.1 and 1.1.0  [xx XXX xxxx]

  *) Add fips_algvs: a multicall fips utility incorporaing all the algorithm
     test programs and fips_test_suite. Includes functionality to parse
     the minimal script output of fipsalgest.pl directly.

  *) Add authorisation parameter to FIPS_module_mode_set().
     [Steve Henson]

+2 −0
Original line number Diff line number Diff line
@@ -387,6 +387,8 @@ build_apps:
	@dir=apps; target=all; $(BUILD_ONE_CMD)
build_tests:
	@dir=test; target=fipsexe; $(BUILD_ONE_CMD)
build_algvs:
	@dir=test; target=fipsalgvs; $(BUILD_ONE_CMD)
build_tools:
	@dir=tools; target=all; $(BUILD_ONE_CMD)

+6 −3
Original line number Diff line number Diff line
@@ -780,7 +780,7 @@ static int proc_file(char *rqfile, char *rspfile)
		    if(do_mct(amode, akeysz, aKey, iVec, 
			      dir, (unsigned char*)plaintext, len, 
			      rfp) < 0)
			EXIT(1);
			err = 1;
		    }
		else
		    {
@@ -862,7 +862,11 @@ static int proc_file(char *rqfile, char *rspfile)
    aes_test -d xxxxx.xxx
  The default is: -d req.txt
--------------------------------------------------*/
#ifdef FIPS_ALGVS
int fips_aesavs_main(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
    {
    char *rqlist = "req.txt", *rspfile = NULL;
    FILE *fp = NULL;
@@ -915,7 +919,7 @@ int main(int argc, char **argv)
	    if (proc_file(rfn, rspfile))
		{
		printf(">>> Processing failed for: %s <<<\n", rfn);
		EXIT(1);
		return 1;
		}
	    }
	fclose(fp);
@@ -929,7 +933,6 @@ int main(int argc, char **argv)
	    printf(">>> Processing failed for: %s <<<\n", fn);
	    }
	}
    EXIT(0);
    return 0;
    }

+5 −1
Original line number Diff line number Diff line
@@ -496,7 +496,11 @@ static void ccmtest(FILE *in, FILE *out)
	FIPS_cipher_ctx_cleanup(&ctx);
	}

#ifdef FIPS_ALGVS
int fips_gcmtest_main(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
	{
	int encrypt;
	int xts = 0, ccm = 0;
+4 −0
Original line number Diff line number Diff line
@@ -92,7 +92,11 @@ static int print_cmac_ver(const EVP_CIPHER *cipher, FILE *out,
		unsigned char *Mac, int Maclen,
		int Tlen);

#ifdef FIPS_ALGVS
int fips_cmactest_main(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
	{
	FILE *in = NULL, *out = NULL;
	int mode = 0;		/* 0 => Generate, 1 => Verify */
Loading