diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-11-01 13:45:30 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-11-01 13:45:30 +0000 |
commit | 8b8096d082292211cc977af195e9b12c88c26de3 (patch) | |
tree | e87a03240248b023aa8cbb45963d6d1a91d5dd19 /fips/rand/fips_drbgvs.c | |
parent | 9ab6d6813ec544a15f6aea3d4af83629fa1eb4e5 (diff) |
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).
Diffstat (limited to 'fips/rand/fips_drbgvs.c')
-rw-r--r-- | fips/rand/fips_drbgvs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fips/rand/fips_drbgvs.c b/fips/rand/fips_drbgvs.c index 4d3f0cfee0..bcdfa6dac3 100644 --- a/fips/rand/fips_drbgvs.c +++ b/fips/rand/fips_drbgvs.c @@ -76,7 +76,7 @@ int main(int argc, char **argv) #include "fips_utl.h" -static int parse_md(char *str) +static int dparse_md(char *str) { switch(atoi(str + 5)) { @@ -115,7 +115,7 @@ static int parse_ec(char *str) curve_nid = NID_secp521r1; else return NID_undef; - md_nid = parse_md(md); + md_nid = dparse_md(md); if (md_nid == NID_undef) return NID_undef; return (curve_nid << 16) | md_nid; @@ -170,9 +170,11 @@ static size_t test_nonce(DRBG_CTX *dctx, unsigned char **pout, return t->noncelen; } - - +#ifdef FIPS_ALGVS +int fips_drbgvs_main(int argc,char **argv) +#else int main(int argc,char **argv) +#endif { FILE *in, *out; DRBG_CTX *dctx = NULL; @@ -240,7 +242,7 @@ int main(int argc,char **argv) } if (strlen(buf) > 4 && !strncmp(buf, "[SHA-", 5)) { - nid = parse_md(buf); + nid = dparse_md(buf); if (nid == NID_undef) exit(1); if (drbg_type == DRBG_HMAC) |