openssl: Update PKCS#12 API to OpenSSL 1.1.0
authorTobias Brunner <tobias@strongswan.org>
Mon, 27 Jun 2016 15:26:16 +0000 (17:26 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 29 Jun 2016 09:09:37 +0000 (11:09 +0200)
src/libstrongswan/plugins/openssl/openssl_pkcs12.c

index d16b2cc..705e96c 100644 (file)
 #include <library.h>
 #include <credentials/sets/mem_cred.h>
 
+#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;