summaryrefslogtreecommitdiff
path: root/package/strongswan/patches/patch-src_libstrongswan_plugins_openssl_openssl_plugin_c
blob: 44915d63c6f818d8bfdb9555bc42e06edb1743ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- strongswan-5.9.5.orig/src/libstrongswan/plugins/openssl/openssl_plugin.c	2022-01-08 12:54:02.000000000 +0100
+++ strongswan-5.9.5/src/libstrongswan/plugins/openssl/openssl_plugin.c	2022-03-21 16:41:08.736944525 +0100
@@ -329,7 +329,7 @@ static private_key_t *openssl_private_ke
 				case EVP_PKEY_EC:
 					return openssl_ec_private_key_create(key, FALSE);
 #endif
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(OPENSSL_NO_EC)
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER)
 				case EVP_PKEY_ED25519:
 				case EVP_PKEY_ED448:
 					return openssl_ed_private_key_create(key, FALSE);
@@ -481,7 +481,7 @@ static private_key_t *openssl_private_ke
 		case EVP_PKEY_EC:
 			return openssl_ec_private_key_create(key, TRUE);
 #endif
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(OPENSSL_NO_EC)
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER)
 		case EVP_PKEY_ED25519:
 		case EVP_PKEY_ED448:
 			return openssl_ed_private_key_create(key, TRUE);
@@ -980,7 +980,7 @@ plugin_t *openssl_plugin_create()
 		},
 	);
 
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
 	/* note that we can't call OPENSSL_cleanup() when the plugin is destroyed
 	 * as we couldn't initialize the library again afterwards */
 	OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG |