]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix build with OpenSSL 1.0.2
authorJouni Malinen <jouni@codeaurora.org>
Thu, 14 Mar 2019 22:33:33 +0000 (00:33 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 14 Mar 2019 22:33:33 +0000 (00:33 +0200)
X509_get_subject_name() in OpenSSL 1.0.2 does not mark its argument as a
const pointer, so need to type cast this to avoid a build warning.

Fixes: 841205a1ceb1 ("OpenSSL: Add 'check_cert_subject' support for TLS server")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/crypto/tls_openssl.c

index 699e074436339dc21c652e974773e4cf8e07c837..b8d055664baa8b328acd5394996087565cd266cf 100644 (file)
@@ -1823,7 +1823,7 @@ static int match_dn_field(const X509 *cert, int nid, const char *field,
        X509_NAME *name;
 
        len = os_strlen(value);
-       name = X509_get_subject_name(cert);
+       name = X509_get_subject_name((X509 *) cert);
 
        /* Assign incremented cnt for every field of DN to check DN field in
         * right order */