1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00

security/openconnect; Fix build with LibreSSL

Approved by:	SSL blanket
This commit is contained in:
John Marino 2016-09-12 15:38:42 +00:00
parent a8ec6663ce
commit 011277a89d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=421931
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- openssl-esp.c.orig 2016-07-08 15:35:18 UTC
+++ openssl-esp.c
@@ -27,7 +27,7 @@
#include <openssl/evp.h>
#include <openssl/rand.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define EVP_CIPHER_CTX_free(c) do { \
EVP_CIPHER_CTX_cleanup(c); \
@@ -85,7 +85,7 @@ static int init_esp_ciphers(struct openc
}
EVP_CIPHER_CTX_set_padding(esp->cipher, 0);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
esp->hmac = malloc(sizeof(*esp->hmac));
esp->pkt_hmac = malloc(sizeof(*esp->pkt_hmac));
if (!esp->hmac || &esp->pkt_hmac) {

View File

@ -0,0 +1,25 @@
--- openssl.c.orig 2016-07-09 14:43:41 UTC
+++ openssl.c
@@ -36,11 +36,11 @@
#include <openssl/ui.h>
#include <openssl/rsa.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
#define X509_up_ref(x) CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509)
#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
#define EVP_MD_CTX_new EVP_MD_CTX_create
#define EVP_MD_CTX_free EVP_MD_CTX_destroy
#define X509_STORE_CTX_get0_chain(ctx) ((ctx)->chain)
@@ -991,7 +991,7 @@ static int set_peer_cert_hash(struct ope
return 0;
}
-#if OPENSSL_VERSION_NUMBER < 0x10002000L
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
static int match_hostname_elem(const char *hostname, int helem_len,
const char *match, int melem_len)
{