summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/shatest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/sha/shatest.c')
-rw-r--r--src/lib/libcrypto/sha/shatest.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/sha/shatest.c b/src/lib/libcrypto/sha/shatest.c
index ff702aa53e..ed0fe06a7b 100644
--- a/src/lib/libcrypto/sha/shatest.c
+++ b/src/lib/libcrypto/sha/shatest.c
@@ -106,7 +106,7 @@ static char *pt(unsigned char *md);
106int main(int argc, char *argv[]) 106int main(int argc, char *argv[])
107 { 107 {
108 int i,err=0; 108 int i,err=0;
109 unsigned char **P,**R; 109 char **P,**R;
110 static unsigned char buf[1000]; 110 static unsigned char buf[1000];
111 char *p,*r; 111 char *p,*r;
112 EVP_MD_CTX c; 112 EVP_MD_CTX c;
@@ -118,12 +118,12 @@ int main(int argc, char *argv[])
118#endif 118#endif
119 119
120 EVP_MD_CTX_init(&c); 120 EVP_MD_CTX_init(&c);
121 P=(unsigned char **)test; 121 P=test;
122 R=(unsigned char **)ret; 122 R=ret;
123 i=1; 123 i=1;
124 while (*P != NULL) 124 while (*P != NULL)
125 { 125 {
126 EVP_Digest(*P,(unsigned long)strlen((char *)*P),md,NULL,EVP_sha(), NULL); 126 EVP_Digest(*P,strlen((char *)*P),md,NULL,EVP_sha(), NULL);
127 p=pt(md); 127 p=pt(md);
128 if (strcmp(p,(char *)*R) != 0) 128 if (strcmp(p,(char *)*R) != 0)
129 { 129 {
@@ -157,6 +157,10 @@ int main(int argc, char *argv[])
157 } 157 }
158 else 158 else
159 printf("test 3 ok\n"); 159 printf("test 3 ok\n");
160
161#ifdef OPENSSL_SYS_NETWARE
162 if (err) printf("ERROR: %d\n", err);
163#endif
160 EVP_MD_CTX_cleanup(&c); 164 EVP_MD_CTX_cleanup(&c);
161 EXIT(err); 165 EXIT(err);
162 return(0); 166 return(0);