diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-02-12 18:25:18 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-02-12 18:25:18 +0000 |
commit | e47af46cd839c549fac2d9f8a2951c35c0113fbf (patch) | |
tree | 2fa93ea50fa6307c189711053274f8bba9949572 /fips/sha | |
parent | 36246be9151adf1049d62f1261f87f9e3719afac (diff) |
Change FIPS source and utilities to use the "FIPS_" names directly
instead of using regular OpenSSL API names.
Diffstat (limited to 'fips/sha')
-rw-r--r-- | fips/sha/fips_sha1_selftest.c | 2 | ||||
-rw-r--r-- | fips/sha/fips_shatest.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/fips/sha/fips_sha1_selftest.c b/fips/sha/fips_sha1_selftest.c index 4291617596..3a4b4315c5 100644 --- a/fips/sha/fips_sha1_selftest.c +++ b/fips/sha/fips_sha1_selftest.c @@ -86,7 +86,7 @@ int FIPS_selftest_sha1() { unsigned char md[SHA_DIGEST_LENGTH]; - EVP_Digest(test[n],strlen(test[n]),md, NULL, EVP_sha1(), NULL); + FIPS_digest(test[n],strlen(test[n]),md, NULL, EVP_sha1()); if(memcmp(md,ret[n],sizeof md)) { FIPSerr(FIPS_F_FIPS_SELFTEST_SHA1,FIPS_R_SELFTEST_FAILED); diff --git a/fips/sha/fips_shatest.c b/fips/sha/fips_shatest.c index 480b990fb8..9675518513 100644 --- a/fips/sha/fips_shatest.c +++ b/fips/sha/fips_shatest.c @@ -300,7 +300,7 @@ static int print_dgst(const EVP_MD *emd, FILE *out, { int i, mdlen; unsigned char md[EVP_MAX_MD_SIZE]; - if (!EVP_Digest(Msg, Msglen, md, (unsigned int *)&mdlen, emd, NULL)) + if (!FIPS_digest(Msg, Msglen, md, (unsigned int *)&mdlen, emd)) { fputs("Error calculating HASH\n", stderr); return 0; @@ -321,7 +321,7 @@ static int print_monte(const EVP_MD *md, FILE *out, unsigned char *m1, *m2, *m3, *p; unsigned int mlen, m1len, m2len, m3len; - EVP_MD_CTX_init(&ctx); + FIPS_md_ctx_init(&ctx); if (SeedLen > EVP_MAX_MD_SIZE) mlen = SeedLen; @@ -346,17 +346,17 @@ static int print_monte(const EVP_MD *md, FILE *out, { for (i = 0; i < 1000; i++) { - EVP_DigestInit_ex(&ctx, md, NULL); - EVP_DigestUpdate(&ctx, m1, m1len); - EVP_DigestUpdate(&ctx, m2, m2len); - EVP_DigestUpdate(&ctx, m3, m3len); + FIPS_digestinit(&ctx, md); + FIPS_digestupdate(&ctx, m1, m1len); + FIPS_digestupdate(&ctx, m2, m2len); + FIPS_digestupdate(&ctx, m3, m3len); p = m1; m1 = m2; m1len = m2len; m2 = m3; m2len = m3len; m3 = p; - EVP_DigestFinal_ex(&ctx, m3, &m3len); + FIPS_digestfinal(&ctx, m3, &m3len); } fprintf(out, "COUNT = %d\n", j); fputs("MD = ", out); @@ -378,7 +378,7 @@ static int print_monte(const EVP_MD *md, FILE *out, if (m3) OPENSSL_free(m3); - EVP_MD_CTX_cleanup(&ctx); + FIPS_md_ctx_cleanup(&ctx); return ret; } |