diff options
author | Olli Hauer <ohauer@FreeBSD.org> | 2016-09-02 17:21:28 +0000 |
---|---|---|
committer | Olli Hauer <ohauer@FreeBSD.org> | 2016-09-02 17:21:28 +0000 |
commit | 90be07c84d0686089307f10a7fed1eed7980f35f (patch) | |
tree | e5119abe12da88e8567702ea3f23c2c4f9c616e4 /security/nmap/files/patch-ncat_ncat__ssl.c | |
parent | Update to 4.12. (diff) |
- fix build with libressl
no revision bump, libressl is not the default
Notes
Notes:
svn path=/head/; revision=421273
Diffstat (limited to 'security/nmap/files/patch-ncat_ncat__ssl.c')
-rw-r--r-- | security/nmap/files/patch-ncat_ncat__ssl.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/security/nmap/files/patch-ncat_ncat__ssl.c b/security/nmap/files/patch-ncat_ncat__ssl.c new file mode 100644 index 000000000000..db7b5f4366e3 --- /dev/null +++ b/security/nmap/files/patch-ncat_ncat__ssl.c @@ -0,0 +1,29 @@ +--- ncat/ncat_ssl.c.orig 2016-08-01 09:34:56 UTC ++++ ncat/ncat_ssl.c +@@ -315,7 +315,7 @@ static int cert_match_dnsname(X509 *cert + + /* We must copy this address into a temporary variable because ASN1_item_d2i + increments it. We don't want it to corrupt ext->value->data. */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + data = ext->value->data; + #else + ASN1_OCTET_STRING* asn1_str = X509_EXTENSION_get_data(ext); +@@ -328,7 +328,7 @@ static int cert_match_dnsname(X509 *cert + presence of null bytes. */ + #if (OPENSSL_VERSION_NUMBER > 0x00907000L) + if (method->it != NULL) { +- #if OPENSSL_VERSION_NUMBER < 0x10100000L ++ #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + gen_names = (STACK_OF(GENERAL_NAME) *) ASN1_item_d2i(NULL, + (const unsigned char **) &data, + ext->value->length, ASN1_ITEM_ptr(method->it)); +@@ -339,7 +339,7 @@ static int cert_match_dnsname(X509 *cert + asn1_str_a->length, ASN1_ITEM_ptr(method->it)); + #endif + } else { +- #if OPENSSL_VERSION_NUMBER < 0x10100000L ++ #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + gen_names = (STACK_OF(GENERAL_NAME) *) method->d2i(NULL, + (const unsigned char **) &data, + ext->value->length); |