"Show" more respect to no-sha* config options.
[oweals/openssl.git] / crypto / sha / shatest.c
index 331294a74f91f9c81ca504b7461ad40ad6d3c349..bfb11f0a5f2cf5fca08e26bcc7f720a4e0a72b7f 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef OPENSSL_NO_SHA
+#include "../e_os.h"
+
+#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA0)
 int main(int argc, char *argv[])
 {
-    printf("No SHA support\n");
+    printf("No SHA0 support\n");
     return(0);
 }
 #else
@@ -121,7 +123,7 @@ int main(int argc, char *argv[])
        i=1;
        while (*P != NULL)
                {
-               EVP_Digest(*P,(unsigned long)strlen((char *)*P),md,NULL,EVP_sha(), NULL);
+               EVP_Digest(*P,strlen((char *)*P),md,NULL,EVP_sha(), NULL);
                p=pt(md);
                if (strcmp(p,(char *)*R) != 0)
                        {
@@ -155,8 +157,12 @@ int main(int argc, char *argv[])
                }
        else
                printf("test 3 ok\n");
+
+#ifdef OPENSSL_SYS_NETWARE
+    if (err) printf("ERROR: %d\n", err);
+#endif
        EVP_MD_CTX_cleanup(&c);
-       exit(err);
+       EXIT(err);
        return(0);
        }