has decided to change a succeess to a failure and change the error code.
Fixes a regression in the openssl-ruby tests which expect to test this
functionality.
ok tb@
-/* $OpenBSD: x509_verify.c,v 1.48 2021/09/03 08:58:53 beck Exp $ */
+/* $OpenBSD: x509_verify.c,v 1.49 2021/09/09 15:09:43 beck Exp $ */
/*
* Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
*
* verified chain. The callback could still tell us to
* fail.
*/
- if(!x509_vfy_callback_indicate_success(ctx->xsc))
+ if(!x509_vfy_callback_indicate_success(ctx->xsc)) {
+ /* The callback can change the error code */
+ ctx->error = ctx->xsc->error;
goto err;
+ }
} else {
/*
* We had a failure, indicate the failure, but