From 985d7b1c67213400a7c9ca389caaab0a09f80eb5 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 27 Jun 2016 17:26:16 +0200 Subject: [PATCH] openssl: Update PKCS#12 API to OpenSSL 1.1.0 --- src/libstrongswan/plugins/openssl/openssl_pkcs12.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libstrongswan/plugins/openssl/openssl_pkcs12.c b/src/libstrongswan/plugins/openssl/openssl_pkcs12.c index d16b2cc056..705e96c695 100644 --- a/src/libstrongswan/plugins/openssl/openssl_pkcs12.c +++ b/src/libstrongswan/plugins/openssl/openssl_pkcs12.c @@ -23,6 +23,10 @@ #include #include +#ifdef OPENSSL_IS_BORINGSSL +#define EVP_PKEY_base_id(p) EVP_PKEY_type(p->type) +#endif + typedef struct private_pkcs12_t private_pkcs12_t; /** @@ -110,7 +114,7 @@ static bool add_key(private_pkcs12_t *this, EVP_PKEY *private) { /* no private key is ok */ return TRUE; } - switch (EVP_PKEY_type(private->type)) + switch (EVP_PKEY_base_id(private)) { case EVP_PKEY_RSA: type = KEY_RSA; -- 2.47.2