diff options
author | joerg <joerg> | 2016-05-31 21:36:17 +0000 |
---|---|---|
committer | joerg <joerg> | 2016-05-31 21:36:17 +0000 |
commit | 24af2f407abb1a92636cdadc462b9ae038ea08d3 (patch) | |
tree | 52ed234b03439e13d15c3f843cad696f96e7a9ee /security | |
parent | b4ec818008e7e268d21b941236505615234bd518 (diff) | |
download | pkgsrc-24af2f407abb1a92636cdadc462b9ae038ea08d3.tar.gz |
Deal with lack of TR1 support in libc++ by using the C++11 directly
then.
Diffstat (limited to 'security')
-rw-r--r-- | security/botan/distinfo | 8 | ||||
-rw-r--r-- | security/botan/patches/patch-src_ssl_rec__wri.cpp | 13 | ||||
-rw-r--r-- | security/botan/patches/patch-src_ssl_tls__client.cpp | 15 | ||||
-rw-r--r-- | security/botan/patches/patch-src_ssl_tls__client.h | 24 | ||||
-rw-r--r-- | security/botan/patches/patch-src_ssl_tls__record.h | 45 | ||||
-rw-r--r-- | security/botan/patches/patch-src_ssl_tls__server.cpp | 15 | ||||
-rw-r--r-- | security/botan/patches/patch-src_ssl_tls__server.h | 24 |
7 files changed, 143 insertions, 1 deletions
diff --git a/security/botan/distinfo b/security/botan/distinfo index a01f5b1d4b3..5d9365155a5 100644 --- a/security/botan/distinfo +++ b/security/botan/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2016/05/19 22:10:24 joerg Exp $ +$NetBSD: distinfo,v 1.17 2016/05/31 21:36:17 joerg Exp $ SHA1 (Botan-1.10.12.tgz) = 45ad77e59dadc8498dc62dbcaf7c8cec46e2b073 RMD160 (Botan-1.10.12.tgz) = ebe525ff8bc35d2363bb934b045c83a29ea4f358 @@ -8,3 +8,9 @@ SHA1 (patch-src_build-data_arch_arm.txt) = 23e40eb4bf43ca8c96f809b7f7a33de4a5149 SHA1 (patch-src_build-data_makefile_unix.in) = 1ab76671c1acfe955d3e01d27e91687c0c382239 SHA1 (patch-src_build-data_makefile_unix__shr.in) = ecd64f1ee80cb791d58052a75c6f33c5d4360a96 SHA1 (patch-src_entropy_unix_procs_info.txt) = 0d94e14b48f049112c8913ac244c358318974c6f +SHA1 (patch-src_ssl_rec__wri.cpp) = af2dafd229b46c69674644a35dc231cdcc888786 +SHA1 (patch-src_ssl_tls__client.cpp) = 6e9f70d09c764bc5374a8d986351c01fd45395af +SHA1 (patch-src_ssl_tls__client.h) = 585e07caa7495ef53dea67e6544154f0f9f56878 +SHA1 (patch-src_ssl_tls__record.h) = 9b7ca33ae84b96af0fcd81c8e7602e38b6ed4888 +SHA1 (patch-src_ssl_tls__server.cpp) = 50cdff006e3057933999f57243fb6ac319642346 +SHA1 (patch-src_ssl_tls__server.h) = 3604a94261b4c3510e98c140718037bb4288b41f diff --git a/security/botan/patches/patch-src_ssl_rec__wri.cpp b/security/botan/patches/patch-src_ssl_rec__wri.cpp new file mode 100644 index 00000000000..1b16ca90c2a --- /dev/null +++ b/security/botan/patches/patch-src_ssl_rec__wri.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_ssl_rec__wri.cpp,v 1.1 2016/05/31 21:36:17 joerg Exp $ + +--- src/ssl/rec_wri.cpp.orig 2016-05-25 20:42:21.289208827 +0000 ++++ src/ssl/rec_wri.cpp +@@ -16,7 +16,7 @@ namespace Botan { + /** + * Record_Writer Constructor + */ +-Record_Writer::Record_Writer(std::tr1::function<void (const byte[], size_t)> out) : ++Record_Writer::Record_Writer(function<void (const byte[], size_t)> out) : + output_fn(out), + buffer(DEFAULT_BUFFERSIZE) + { diff --git a/security/botan/patches/patch-src_ssl_tls__client.cpp b/security/botan/patches/patch-src_ssl_tls__client.cpp new file mode 100644 index 00000000000..487537feb91 --- /dev/null +++ b/security/botan/patches/patch-src_ssl_tls__client.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_ssl_tls__client.cpp,v 1.1 2016/05/31 21:36:17 joerg Exp $ + +--- src/ssl/tls_client.cpp.orig 2016-05-25 20:42:19.378772780 +0000 ++++ src/ssl/tls_client.cpp +@@ -81,8 +81,8 @@ void client_check_state(Handshake_Type n + /** + * TLS Client Constructor + */ +-TLS_Client::TLS_Client(std::tr1::function<size_t (byte[], size_t)> input_fn, +- std::tr1::function<void (const byte[], size_t)> output_fn, ++TLS_Client::TLS_Client(function<size_t (byte[], size_t)> input_fn, ++ function<void (const byte[], size_t)> output_fn, + const TLS_Policy& policy, + RandomNumberGenerator& rng) : + input_fn(input_fn), diff --git a/security/botan/patches/patch-src_ssl_tls__client.h b/security/botan/patches/patch-src_ssl_tls__client.h new file mode 100644 index 00000000000..58625f3f2a3 --- /dev/null +++ b/security/botan/patches/patch-src_ssl_tls__client.h @@ -0,0 +1,24 @@ +$NetBSD: patch-src_ssl_tls__client.h,v 1.1 2016/05/31 21:36:17 joerg Exp $ + +--- src/ssl/tls_client.h.orig 2016-05-25 20:42:17.404292837 +0000 ++++ src/ssl/tls_client.h +@@ -33,8 +33,8 @@ class BOTAN_DLL TLS_Client : public TLS_ + void add_client_cert(const X509_Certificate& cert, + Private_Key* cert_key); + +- TLS_Client(std::tr1::function<size_t (byte[], size_t)> input_fn, +- std::tr1::function<void (const byte[], size_t)> output_fn, ++ TLS_Client(function<size_t (byte[], size_t)> input_fn, ++ function<void (const byte[], size_t)> output_fn, + const TLS_Policy& policy, + RandomNumberGenerator& rng); + +@@ -51,7 +51,7 @@ class BOTAN_DLL TLS_Client : public TLS_ + void read_handshake(byte, const MemoryRegion<byte>&); + void process_handshake_msg(Handshake_Type, const MemoryRegion<byte>&); + +- std::tr1::function<size_t (byte[], size_t)> input_fn; ++ function<size_t (byte[], size_t)> input_fn; + + const TLS_Policy& policy; + RandomNumberGenerator& rng; diff --git a/security/botan/patches/patch-src_ssl_tls__record.h b/security/botan/patches/patch-src_ssl_tls__record.h new file mode 100644 index 00000000000..1ea8cf4c538 --- /dev/null +++ b/security/botan/patches/patch-src_ssl_tls__record.h @@ -0,0 +1,45 @@ +$NetBSD: patch-src_ssl_tls__record.h,v 1.1 2016/05/31 21:36:17 joerg Exp $ + +--- src/ssl/tls_record.h.orig 2016-05-25 20:40:33.153653548 +0000 ++++ src/ssl/tls_record.h +@@ -17,7 +17,7 @@ + + #if defined(BOTAN_USE_STD_TR1) + +-#if defined(BOTAN_BUILD_COMPILER_IS_MSVC) ++#if defined(BOTAN_BUILD_COMPILER_IS_MSVC) || defined(_LIBCPP_VERSION) + #include <functional> + #else + #include <tr1/functional> +@@ -31,7 +31,13 @@ + + namespace Botan { + ++#if defined(_LIBCPP_VERSION) ++using namespace std::placeholders; ++using std::function; ++#else + using namespace std::tr1::placeholders; ++using std::tr1::function; ++#endif + + /** + * TLS Record Writer +@@ -52,7 +58,7 @@ class BOTAN_DLL Record_Writer + + void reset(); + +- Record_Writer(std::tr1::function<void (const byte[], size_t)> output_fn); ++ Record_Writer(function<void (const byte[], size_t)> output_fn); + + ~Record_Writer() { delete mac; } + private: +@@ -60,7 +66,7 @@ class BOTAN_DLL Record_Writer + void send_record(byte type, byte major, byte minor, + const byte input[], size_t length); + +- std::tr1::function<void (const byte[], size_t)> output_fn; ++ function<void (const byte[], size_t)> output_fn; + Pipe cipher; + MessageAuthenticationCode* mac; + diff --git a/security/botan/patches/patch-src_ssl_tls__server.cpp b/security/botan/patches/patch-src_ssl_tls__server.cpp new file mode 100644 index 00000000000..10c10cbdb8b --- /dev/null +++ b/security/botan/patches/patch-src_ssl_tls__server.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_ssl_tls__server.cpp,v 1.1 2016/05/31 21:36:17 joerg Exp $ + +--- src/ssl/tls_server.cpp.orig 2016-05-25 20:43:18.345421693 +0000 ++++ src/ssl/tls_server.cpp +@@ -85,8 +85,8 @@ void server_check_state(Handshake_Type n + /* + * TLS Server Constructor + */ +-TLS_Server::TLS_Server(std::tr1::function<size_t (byte[], size_t)> input_fn, +- std::tr1::function<void (const byte[], size_t)> output_fn, ++TLS_Server::TLS_Server(function<size_t (byte[], size_t)> input_fn, ++ function<void (const byte[], size_t)> output_fn, + const TLS_Policy& policy, + RandomNumberGenerator& rng, + const X509_Certificate& cert, diff --git a/security/botan/patches/patch-src_ssl_tls__server.h b/security/botan/patches/patch-src_ssl_tls__server.h new file mode 100644 index 00000000000..c2bdbc4a042 --- /dev/null +++ b/security/botan/patches/patch-src_ssl_tls__server.h @@ -0,0 +1,24 @@ +$NetBSD: patch-src_ssl_tls__server.h,v 1.1 2016/05/31 21:36:17 joerg Exp $ + +--- src/ssl/tls_server.h.orig 2016-05-25 20:42:12.789110157 +0000 ++++ src/ssl/tls_server.h +@@ -36,8 +36,8 @@ class BOTAN_DLL TLS_Server : public TLS_ + * FIXME: support cert chains (!) + * FIXME: support anonymous servers + */ +- TLS_Server(std::tr1::function<size_t (byte[], size_t)> input_fn, +- std::tr1::function<void (const byte[], size_t)> output_fn, ++ TLS_Server(function<size_t (byte[], size_t)> input_fn, ++ function<void (const byte[], size_t)> output_fn, + const TLS_Policy& policy, + RandomNumberGenerator& rng, + const X509_Certificate& cert, +@@ -53,7 +53,7 @@ class BOTAN_DLL TLS_Server : public TLS_ + + void process_handshake_msg(Handshake_Type, const MemoryRegion<byte>&); + +- std::tr1::function<size_t (byte[], size_t)> input_fn; ++ function<size_t (byte[], size_t)> input_fn; + + const TLS_Policy& policy; + RandomNumberGenerator& rng; |