Correct the return codes for ecdsatest.

Submitted by: Nils Larsch
Reviewed by: Geoff Thorpe
This commit is contained in:
Geoff Thorpe 2004-06-14 23:37:32 +00:00
parent 9f6ea7163b
commit b3b6720944

View File

@ -449,7 +449,7 @@ builtin_err:
int main(void) int main(void)
{ {
int ret = 0; int ret = 1;
BIO *out; BIO *out;
out = BIO_new_fp(stdout, BIO_NOCLOSE); out = BIO_new_fp(stdout, BIO_NOCLOSE);
@ -477,9 +477,9 @@ int main(void)
if (!x9_62_tests(out)) goto err; if (!x9_62_tests(out)) goto err;
if (!test_builtin(out)) goto err; if (!test_builtin(out)) goto err;
ret = 1; ret = 0;
err: err:
if (!ret) if (ret)
BIO_printf(out, "\nECDSA test failed\n"); BIO_printf(out, "\nECDSA test failed\n");
else else
BIO_printf(out, "\nECDSA test passed\n"); BIO_printf(out, "\nECDSA test passed\n");
@ -491,6 +491,6 @@ err:
CRYPTO_mem_leaks(out); CRYPTO_mem_leaks(out);
if (out != NULL) if (out != NULL)
BIO_free(out); BIO_free(out);
return(0); return ret;
} }
#endif #endif