From 5548453a2d0061cf5d65180dca5d0141e15e14bb Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 17 Nov 2017 20:44:42 +0200 Subject: [PATCH] BoringSSL: Add DPP special cases regardless of claimed version number 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 --- src/common/dpp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/dpp.c b/src/common/dpp.c index ba9e3a9f1..894b03a7c 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -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;