diff options
author | bluhm <> | 2018-11-09 06:30:41 +0000 |
---|---|---|
committer | bluhm <> | 2018-11-09 06:30:41 +0000 |
commit | b88042ee7a2d2fc6e740c79270b86ab3fe455897 (patch) | |
tree | 645159c1ec7a09a740cc2fa32e1faad4aadb0291 /src/regress/lib/libssl/interop/util.c | |
parent | c6acb32cb24165396b53a48759e8cbc90cfc9b60 (diff) | |
download | openbsd-b88042ee7a2d2fc6e740c79270b86ab3fe455897.tar.gz openbsd-b88042ee7a2d2fc6e740c79270b86ab3fe455897.tar.bz2 openbsd-b88042ee7a2d2fc6e740c79270b86ab3fe455897.zip |
The cert subdir is testing all combinations of certificate validation.
Having the three libraries, client and server certificates, missing
or invalid CA or certificates, and enforcing peer certificate results
in 1944 new test cases.
Diffstat (limited to 'src/regress/lib/libssl/interop/util.c')
-rw-r--r-- | src/regress/lib/libssl/interop/util.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/regress/lib/libssl/interop/util.c b/src/regress/lib/libssl/interop/util.c index b012d73193..5190e81828 100644 --- a/src/regress/lib/libssl/interop/util.c +++ b/src/regress/lib/libssl/interop/util.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: util.c,v 1.2 2018/11/07 06:29:26 bluhm Exp $ */ | 1 | /* $OpenBSD: util.c,v 1.3 2018/11/09 06:30:41 bluhm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org> | 3 | * Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org> |
4 | * | 4 | * |
@@ -133,3 +133,13 @@ err_ssl(int eval, const char *fmt, ...) | |||
133 | verrx(eval, fmt, ap); | 133 | verrx(eval, fmt, ap); |
134 | va_end(ap); | 134 | va_end(ap); |
135 | } | 135 | } |
136 | |||
137 | int | ||
138 | verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) | ||
139 | { | ||
140 | printf("verify: %s\n", preverify_ok ? "pass" : "fail"); | ||
141 | if (fflush(stdout) != 0) | ||
142 | err(1, "fflush stdout"); | ||
143 | |||
144 | return preverify_ok; | ||
145 | } | ||