]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Fix X509_ALGOR_get0() use with LibreSSL
authorJouni Malinen <j@w1.fi>
Sat, 14 Apr 2018 20:53:35 +0000 (23:53 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 14 Apr 2018 21:01:35 +0000 (00:01 +0300)
At least LibreSSL v2.7.2 indicates support for OpenSSL API 1.1.0, but it
does not apparently use const ASN1_OBJECT * with X509_ALGOR_get0(). Use
the older non-const version here with LibreSSL to fix compilation.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/dpp.c

index 805507c639fc2d1211cec4b8d3d1f2a04895bc4d..f9bf8c2db76b08fd9959235185eda3d9db1eebb4 100644 (file)
@@ -811,7 +811,7 @@ static int dpp_parse_uri_pk(struct dpp_bootstrap_info *bi, const char *info)
        const unsigned char *pk;
        int ppklen;
        X509_ALGOR *pa;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
        ASN1_OBJECT *pa_oid;
 #else
        const ASN1_OBJECT *pa_oid;