pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/botan Deal with lack of TR1 support in libc++...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/82c4580e08a8
branches:  trunk
changeset: 347851:82c4580e08a8
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue May 31 21:36:17 2016 +0000

description:
Deal with lack of TR1 support in libc++ by using the C++11 directly
then.

diffstat:

 security/botan/distinfo                              |   8 +++-
 security/botan/patches/patch-src_ssl_rec__wri.cpp    |  13 +++++
 security/botan/patches/patch-src_ssl_tls__client.cpp |  15 ++++++
 security/botan/patches/patch-src_ssl_tls__client.h   |  24 ++++++++++
 security/botan/patches/patch-src_ssl_tls__record.h   |  45 ++++++++++++++++++++
 security/botan/patches/patch-src_ssl_tls__server.cpp |  15 ++++++
 security/botan/patches/patch-src_ssl_tls__server.h   |  24 ++++++++++
 7 files changed, 143 insertions(+), 1 deletions(-)

diffs (179 lines):

diff -r ff85dd2e8b30 -r 82c4580e08a8 security/botan/distinfo
--- a/security/botan/distinfo   Tue May 31 21:35:11 2016 +0000
+++ b/security/botan/distinfo   Tue May 31 21:36:17 2016 +0000
@@ -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_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 -r ff85dd2e8b30 -r 82c4580e08a8 security/botan/patches/patch-src_ssl_rec__wri.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/botan/patches/patch-src_ssl_rec__wri.cpp Tue May 31 21:36:17 2016 +0000
@@ -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 -r ff85dd2e8b30 -r 82c4580e08a8 security/botan/patches/patch-src_ssl_tls__client.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/botan/patches/patch-src_ssl_tls__client.cpp      Tue May 31 21:36:17 2016 +0000
@@ -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 -r ff85dd2e8b30 -r 82c4580e08a8 security/botan/patches/patch-src_ssl_tls__client.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/botan/patches/patch-src_ssl_tls__client.h        Tue May 31 21:36:17 2016 +0000
@@ -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 -r ff85dd2e8b30 -r 82c4580e08a8 security/botan/patches/patch-src_ssl_tls__record.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/botan/patches/patch-src_ssl_tls__record.h        Tue May 31 21:36:17 2016 +0000
@@ -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 -r ff85dd2e8b30 -r 82c4580e08a8 security/botan/patches/patch-src_ssl_tls__server.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/botan/patches/patch-src_ssl_tls__server.cpp      Tue May 31 21:36:17 2016 +0000
@@ -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 -r ff85dd2e8b30 -r 82c4580e08a8 security/botan/patches/patch-src_ssl_tls__server.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/botan/patches/patch-src_ssl_tls__server.h        Tue May 31 21:36:17 2016 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index