diff options
author | Richard Levitte <levitte@openssl.org> | 2015-11-27 14:02:12 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-12-07 17:39:23 +0100 |
commit | 6e59a892db781658c050e5217127c4147c116ac9 (patch) | |
tree | eec9e79e1c71f9c2897f49b29084bf42a66e96db /test/sha1test.c | |
parent | 9b6c00707eae2cbce79479f4b1a5dc11019abca0 (diff) |
Adjust all accesses to EVP_MD_CTX to use accessor functions.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/sha1test.c')
-rw-r--r-- | test/sha1test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/sha1test.c b/test/sha1test.c index cc3633dc68..6b8ad42141 100644 --- a/test/sha1test.c +++ b/test/sha1test.c @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) char **P, **R; static unsigned char buf[1000]; char *p, *r; - EVP_MD_CTX c; + EVP_MD_CTX *c; unsigned char md[SHA_DIGEST_LENGTH]; #ifdef CHARSET_EBCDIC @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) ebcdic2ascii(test[1], test[1], strlen(test[1])); #endif - EVP_MD_CTX_init(&c); + c = EVP_MD_CTX_create(); P = test; R = ret; i = 1; @@ -118,10 +118,10 @@ int main(int argc, char *argv[]) #ifdef CHARSET_EBCDIC ebcdic2ascii(buf, buf, 1000); #endif /* CHARSET_EBCDIC */ - EVP_DigestInit_ex(&c, EVP_sha1(), NULL); + EVP_DigestInit_ex(c, EVP_sha1(), NULL); for (i = 0; i < 1000; i++) - EVP_DigestUpdate(&c, buf, 1000); - EVP_DigestFinal_ex(&c, md, NULL); + EVP_DigestUpdate(c, buf, 1000); + EVP_DigestFinal_ex(c, md, NULL); p = pt(md); r = bigret; @@ -137,7 +137,7 @@ int main(int argc, char *argv[]) printf("ERROR: %d\n", err); #endif EXIT(err); - EVP_MD_CTX_cleanup(&c); + EVP_MD_CTX_destroy(c); return (0); } |