[PATCH] wolfSSL: Client cert loading API fix

Jouni Malinen j at w1.fi
Fri Dec 4 09:56:18 EST 2020


On Wed, Oct 21, 2020 at 05:59:53PM +0200, Juliusz Sosinowicz wrote:
> Client cert loading API should check equality to SSL_SUCCESS for success.

Thanks, applied.

> diff --git a/src/crypto/tls_wolfssl.c b/src/crypto/tls_wolfssl.c
> @@ -480,7 +480,7 @@ static int tls_connection_client_cert(struct tls_connection *conn,
>  
>  	if (client_cert) {
>  		if (wolfSSL_use_certificate_chain_file(conn->ssl,
> -						       client_cert) < 0) {
> +						       client_cert) != SSL_SUCCESS) {
>  			wpa_printf(MSG_INFO,
>  				   "SSL: use client cert PEM file failed");
>  			if (wolfSSL_use_certificate_chain_file_format(

I'm assuming this wolfSSL_use_certificate_chain_file_format() call is
supposed to use the same error checking, so I updated that as well to
get all the wolfSSL_use_certificate_*() cases covered.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list