From b88042ee7a2d2fc6e740c79270b86ab3fe455897 Mon Sep 17 00:00:00 2001 From: bluhm <> Date: Fri, 9 Nov 2018 06:30:41 +0000 Subject: 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. --- src/regress/lib/libssl/interop/util.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/regress/lib/libssl/interop/util.c') 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 @@ -/* $OpenBSD: util.c,v 1.2 2018/11/07 06:29:26 bluhm Exp $ */ +/* $OpenBSD: util.c,v 1.3 2018/11/09 06:30:41 bluhm Exp $ */ /* * Copyright (c) 2018 Alexander Bluhm * @@ -133,3 +133,13 @@ err_ssl(int eval, const char *fmt, ...) verrx(eval, fmt, ap); va_end(ap); } + +int +verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) +{ + printf("verify: %s\n", preverify_ok ? "pass" : "fail"); + if (fflush(stdout) != 0) + err(1, "fflush stdout"); + + return preverify_ok; +} -- cgit v1.2.3-55-g6feb