[PATCH] wolfSSL: support both DER and PEM blobs
Jouni Malinen
j at w1.fi
Sun May 1 09:06:37 PDT 2022
On Fri, Apr 29, 2022 at 04:18:38PM +0200, Juliusz Sosinowicz wrote:
> Add support for loading private keys and certificates in both PEM and DER formats with wolfSSL
Thanks, applied.
> if (!ok && private_key) {
> if (wolfSSL_use_PrivateKey_file(conn->ssl, private_key,
> - SSL_FILETYPE_PEM) <= 0) {
> + SSL_FILETYPE_PEM) != SSL_SUCCESS) {
> wpa_printf(MSG_INFO,
> "SSL: use private key PEM file failed");
> if (wolfSSL_use_PrivateKey_file(conn->ssl, private_key,
> - SSL_FILETYPE_ASN1) <= 0)
> - {
> + SSL_FILETYPE_ASN1) != SSL_SUCCESS) {
> wpa_printf(MSG_INFO,
> "SSL: use private key DER file failed");
> - } else {
> - ok = 1;
> }
Though, I dropped this removal of ok = 1 path to avoid breaking existing
functionality for the first wolfSSL_use_PrivateKey_file(PEM) call.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list