aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuliusz Sosinowicz <juliusz@wolfssl.com>2020-10-21 15:59:53 (GMT)
committerJouni Malinen <j@w1.fi>2020-12-04 10:42:17 (GMT)
commit0225301fde6a51cfa5dce49c253e4f3c2c36a79c (patch)
tree3518400da7aecb643f9f39c0bf495ee86cb0d9da
parent297050b4600ed465ad174566a0f92df076397fd3 (diff)
downloadhostap-0225301fde6a51cfa5dce49c253e4f3c2c36a79c.zip
hostap-0225301fde6a51cfa5dce49c253e4f3c2c36a79c.tar.gz
hostap-0225301fde6a51cfa5dce49c253e4f3c2c36a79c.tar.bz2
wolfSSL: Client cert loading API fix
Client cert loading API should check equality to SSL_SUCCESS for success. Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
-rw-r--r--src/crypto/tls_wolfssl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/tls_wolfssl.c b/src/crypto/tls_wolfssl.c
index b8a7665..ea8f706 100644
--- a/src/crypto/tls_wolfssl.c
+++ b/src/crypto/tls_wolfssl.c
@@ -469,7 +469,7 @@ static int tls_connection_client_cert(struct tls_connection *conn,
if (client_cert_blob) {
if (wolfSSL_use_certificate_chain_buffer_format(
conn->ssl, client_cert_blob, blob_len,
- SSL_FILETYPE_ASN1) < 0) {
+ SSL_FILETYPE_ASN1) != SSL_SUCCESS) {
wpa_printf(MSG_INFO,
"SSL: use client cert DER blob failed");
return -1;
@@ -479,13 +479,13 @@ static int tls_connection_client_cert(struct tls_connection *conn,
}
if (client_cert) {
- if (wolfSSL_use_certificate_chain_file(conn->ssl,
- client_cert) < 0) {
+ if (wolfSSL_use_certificate_chain_file(
+ conn->ssl, client_cert) != SSL_SUCCESS) {
wpa_printf(MSG_INFO,
"SSL: use client cert PEM file failed");
if (wolfSSL_use_certificate_chain_file_format(
conn->ssl, client_cert,
- SSL_FILETYPE_ASN1) < 0) {
+ SSL_FILETYPE_ASN1) != SSL_SUCCESS) {
wpa_printf(MSG_INFO,
"SSL: use client cert DER file failed");
return -1;