From e30c502ae930295b889cce7375a83a8c742c68b4 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Tue, 22 Nov 2022 13:28:56 +0000 Subject: [PATCH] QUIC Front-End I/O API: Fix implementation of SSL_get_error Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19734) --- ssl/ssl_lib.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 39a334c9896..deb040e5efd 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -4411,6 +4411,14 @@ int SSL_get_error(const SSL *s, int i) if (i > 0) return SSL_ERROR_NONE; +#ifndef OPENSSL_NO_QUIC + if (qc != NULL) { + reason = ossl_quic_get_error(qc, i); + if (reason != SSL_ERROR_NONE) + return reason; + } +#endif + if (sc == NULL) return SSL_ERROR_SSL; @@ -4425,14 +4433,6 @@ int SSL_get_error(const SSL *s, int i) return SSL_ERROR_SSL; } -#ifndef OPENSSL_NO_QUIC - if (qc != NULL) { - reason = ossl_quic_get_error(qc, i); - if (reason != SSL_ERROR_NONE) - return reason; - } -#endif - #ifndef OPENSSL_NO_QUIC if (qc == NULL) #endif -- 2.47.2