summaryrefslogtreecommitdiffstats
path: root/test/danetest.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-05-02 14:46:51 -0400
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-05-11 01:46:06 -0400
commitfde2257f055f187e8e78542ea6d64ad6c206d10b (patch)
tree8255a3511f0df776420218852273595f75fd5bcb /test/danetest.c
parent9b5164ce7788d6985b005e410bb7b53bd553c99e (diff)
Fix i2d_X509_AUX, update docs and add tests
When *pp is NULL, don't write garbage, return an unexpected pointer or leak memory on error. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'test/danetest.c')
-rw-r--r--test/danetest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/danetest.c b/test/danetest.c
index e89f71100a..3bcc02e504 100644
--- a/test/danetest.c
+++ b/test/danetest.c
@@ -475,7 +475,7 @@ int main(int argc, char *argv[])
progname = argv[0];
if (argc != 4) {
test_usage();
- EXIT(1);
+ EXIT(ret);
}
basedomain = argv[1];
CAfile = argv[2];
@@ -492,10 +492,9 @@ int main(int argc, char *argv[])
if (f == NULL) {
fprintf(stderr, "%s: Error opening tlsa record file: '%s': %s\n",
progname, tlsafile, strerror(errno));
- return 0;
+ EXIT(ret);
}
-
ctx = SSL_CTX_new(TLS_client_method());
if (SSL_CTX_dane_enable(ctx) <= 0) {
print_errors();