]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
BoringSSL: Add DPP special cases regardless of claimed version number
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 17 Nov 2017 18:44:42 +0000 (20:44 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 17 Nov 2017 18:44:42 +0000 (20:44 +0200)
It looks like BoringSSL claims to have OPENSSL_VERSION_NUMBER for a
1.1.0 version, but it does not provide ECDSA_SIG_set0() or
ECDSA_SIG_get0(). For now, add the helper functions regardless of the
version BoringSSL claims to be. Similarly, include the X509_ALGOR_get0()
workaround unconditionally for BoringSSL.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/common/dpp.c

index ba9e3a9f107d7a7695342440982eb9c87b62e1b6..894b03a7c90ce505d56f4b07e2e2aa7f81b2ac90 100644 (file)
@@ -30,7 +30,7 @@
 enum dpp_test_behavior dpp_test = DPP_TEST_DISABLED;
 #endif /* CONFIG_TESTING_OPTIONS */
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(OPENSSL_IS_BORINGSSL)
 /* Compatibility wrappers for older versions. */
 
 static int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
@@ -764,7 +764,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(OPENSSL_IS_BORINGSSL)
        ASN1_OBJECT *pa_oid;
 #else
        const ASN1_OBJECT *pa_oid;