public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-dns/pdns/files: pdns-3.3-fix-autoconf.patch pdns-3.3-lib_lua.patch pdns-3.3_sha.hh pdns-3.3-fix-curl-link.patch pdns-3.3-fix-conditional-polarssl.patch pdns-3.3-fix-polarssl_1.3.0.patch
@ 2013-12-16 14:56 Alexys Jacob (ultrabug)
  0 siblings, 0 replies; only message in thread
From: Alexys Jacob (ultrabug) @ 2013-12-16 14:56 UTC (permalink / raw
  To: gentoo-commits

ultrabug    13/12/16 14:56:40

  Added:                pdns-3.3-fix-autoconf.patch pdns-3.3-lib_lua.patch
                        pdns-3.3_sha.hh pdns-3.3-fix-curl-link.patch
                        pdns-3.3-fix-conditional-polarssl.patch
                        pdns-3.3-fix-polarssl_1.3.0.patch
  Log:
  version bump, fix #493302 and polarssl dependency
  
  (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B658FA13)

Revision  Changes    Path
1.1                  net-dns/pdns/files/pdns-3.3-fix-autoconf.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-autoconf.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-autoconf.patch?rev=1.1&content-type=text/plain

Index: pdns-3.3-fix-autoconf.patch
===================================================================
diff --git a/configure.ac b/configure.ac
index 1beab82..243b693 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,7 +180,7 @@ AC_ARG_WITH([system-polarssl],
  [system_polarssl=$withval],
  [system_polarssl=yes])
 AC_MSG_RESULT($system_polarssl)
-AM_CONDITIONAL(HAVE_LIBPOLARSSL, false)
+AM_CONDITIONAL(HAVE_LIBPOLARSSL, test x"$system_polarssl" = "xyes")
 if test x$system_polarssl = xyes; then
  AC_MSG_CHECKING([PolarSSL version >= 1.1])
  AC_COMPILE_IFELSE(



1.1                  net-dns/pdns/files/pdns-3.3-lib_lua.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-lib_lua.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-lib_lua.patch?rev=1.1&content-type=text/plain

Index: pdns-3.3-lib_lua.patch
===================================================================
--- a/modules/luabackend/Makefile.am	2013-12-10 11:57:48.597065748 +0100
+++ b/modules/luabackend/Makefile.am	2013-12-10 12:00:05.855127730 +0100
@@ -1,4 +1,4 @@
-AM_CPPFLAGS=-I/usr/include/lua5.1 @THREADFLAGS@
+AM_CPPFLAGS=$(LUA_CFLAGS) @THREADFLAGS@
 #AM_CPPFLAGS=-I/usr/local/include/luajit-2.0 -DUSE_LUAJIT @THREADFLAGS@
 EXTRA_DIST=OBJECTFILES OBJECTLIBS 
 
@@ -8,5 +8,6 @@
 libluabackend_la_SOURCES=luabackend.cc luabackend.hh minimal.cc reload.cc lua_functions.cc master.cc private.cc slave.cc supermaster.cc dnssec.cc \
 	lua_functions.hh 
 
-libluabackend_la_LDFLAGS=-module -avoid-version -llua5.1
+libluabackend_la_LDFLAGS=-module -avoid-version
+libluabackend_la_LIBADD=$(LUA_LIBS)
 #-lluajit-5.1



1.1                  net-dns/pdns/files/pdns-3.3_sha.hh

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3_sha.hh?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3_sha.hh?rev=1.1&content-type=text/plain

Index: pdns-3.3_sha.hh
===================================================================
#ifndef _SHA_HH
#define _SHA_HH

#include <string>
#include <stdint.h>
#include <polarssl/version.h>
#if POLARSSL_VERSION_NUMBER >= 0x01030000
  #include <polarssl/sha1.h>
  #include <polarssl/sha256.h>
  #include <polarssl/sha512.h>
  typedef sha256_context sha2_context;
  typedef sha512_context sha4_context;
  #define sha2_finish sha256_finish
  #define sha2_hmac_finish sha256_hmac_finish
  #define sha2_hmac_starts sha256_hmac_starts
  #define sha2_hmac_update sha256_hmac_update
  #define sha2_starts sha256_starts
  #define sha2_update sha256_update
  #define sha4_finish sha512_finish
  #define sha4_hmac_finish sha512_hmac_finish
  #define sha4_hmac_starts sha512_hmac_starts
  #define sha4_hmac_update sha512_hmac_update
  #define sha4_starts sha512_starts
  #define sha4_update sha512_update
  #define POLARSSL_SHA2_C POLARSSL_SHA256_C
  #define POLARSSL_SHA4_C POLARSSL_SHA512_C
  #define SIG_RSA_SHA1    POLARSSL_MD_SHA1
  #define SIG_RSA_SHA224  POLARSSL_MD_SHA224
  #define SIG_RSA_SHA256  POLARSSL_MD_SHA256
  #define SIG_RSA_SHA384  POLARSSL_MD_SHA384
  #define SIG_RSA_SHA512  POLARSSL_MD_SHA512
#else
  #include <polarssl/sha1.h>
  #include <polarssl/sha2.h>
  #include <polarssl/sha4.h>
  typedef int md_type_t;
#endif

class SHA1Summer
{
public:
   SHA1Summer() { sha1_starts(&d_context); };
   void feed(const std::string &str) { feed(str.c_str(), str.length()); };
   void feed(const char *ptr, size_t len) { sha1_update(&d_context, reinterpret_cast<const unsigned char*>(ptr), len); };
   const std::string get() const { 
     sha1_context ctx2;
     unsigned char result[20] = {0};
     ctx2=d_context;
     sha1_finish(&ctx2, result);
     return std::string(result, result + sizeof result);
   };
private:
   SHA1Summer(const SHA1Summer&);
   SHA1Summer& operator=(const SHA1Summer&);
   sha1_context d_context;
};

class SHA224Summer
{
public:
   SHA224Summer() { sha2_starts(&d_context, 1); };
   void feed(const std::string &str) { feed(str.c_str(), str.length()); };
   void feed(const char *ptr, size_t len) { sha2_update(&d_context, reinterpret_cast<const unsigned char*>(ptr), len); };
   const std::string get() const { 
     sha2_context ctx2;
     unsigned char result[32] = {0};
     ctx2=d_context;
     sha2_finish(&ctx2, result);
     return std::string(result, result + 28);
   };
private:
   SHA224Summer(const SHA1Summer&);
   SHA224Summer& operator=(const SHA1Summer&);
   sha2_context d_context;
};

class SHA256Summer
{
public:
   SHA256Summer() { sha2_starts(&d_context, 0); };
   void feed(const std::string &str) { feed(str.c_str(), str.length()); };
   void feed(const char *ptr, size_t len) { sha2_update(&d_context, reinterpret_cast<const unsigned char*>(ptr), len); };
   const std::string get() const {
     sha2_context ctx2;
     unsigned char result[32] = {0};
     ctx2=d_context;
     sha2_finish(&ctx2, result);
     return std::string(result, result + 32);
   };
private:
   SHA256Summer(const SHA1Summer&);
   SHA256Summer& operator=(const SHA1Summer&);
   sha2_context d_context;
};

class SHA384Summer
{
public:
   SHA384Summer() { sha4_starts(&d_context, 1); };
   void feed(const std::string &str) { feed(str.c_str(), str.length()); };
   void feed(const char *ptr, size_t len) { sha4_update(&d_context, reinterpret_cast<const unsigned char*>(ptr), len); };
   const std::string get() const {
     sha4_context ctx2;
     unsigned char result[64] = {0};
     ctx2 = d_context;
     sha4_finish(&ctx2, result);
     return std::string(result, result + 48);
   };
private:
   SHA384Summer(const SHA1Summer&);
   SHA384Summer& operator=(const SHA1Summer&);
   sha4_context d_context;
};

class SHA512Summer
{
public:
   SHA512Summer() { sha4_starts(&d_context, 0); };
   void feed(const std::string &str) { feed(str.c_str(), str.length()); };
   void feed(const char *ptr, size_t len) { sha4_update(&d_context, reinterpret_cast<const unsigned char*>(ptr), len); };
   const std::string get() const {
     sha4_context ctx2;
     unsigned char result[64] = {0};
     ctx2=d_context;
     sha4_finish(&ctx2, result);
     return std::string(result, result + sizeof result);
   };
private:
   SHA512Summer(const SHA1Summer&);
   SHA512Summer& operator=(const SHA1Summer&);
   sha4_context d_context;
};

#endif /* sha.hh */



1.1                  net-dns/pdns/files/pdns-3.3-fix-curl-link.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-curl-link.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-curl-link.patch?rev=1.1&content-type=text/plain

Index: pdns-3.3-fix-curl-link.patch
===================================================================
--- a/modules/remotebackend/Makefile.am	2013-12-10 11:45:24.487559267 +0100
+++ b/modules/remotebackend/Makefile.am	2013-12-10 11:45:48.887215368 +0100
@@ -13,7 +13,7 @@
 libremotebackend_la_SOURCES=remotebackend.hh remotebackend.cc unixconnector.cc httpconnector.cc pipeconnector.cc 
 
 libremotebackend_la_LDFLAGS=-module -avoid-version
-libremotebackend_la_LIBS=$(LIBCURL_LIBS)
+libremotebackend_la_LIBADD=$(LIBCURL_LIBS)
 
 TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message REMOTEBACKEND_HTTP=$(REMOTEBACKEND_HTTP) ./testrunner.sh 
 TESTS=test_remotebackend_pipe test_remotebackend_http test_remotebackend_post test_remotebackend_json



1.1                  net-dns/pdns/files/pdns-3.3-fix-conditional-polarssl.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-conditional-polarssl.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-conditional-polarssl.patch?rev=1.1&content-type=text/plain

Index: pdns-3.3-fix-conditional-polarssl.patch
===================================================================
--- a/pdns/Makefile.am	2013-12-10 11:53:54.530368351 +0100
+++ b/pdns/Makefile.am	2013-12-10 11:55:33.398973939 +0100
@@ -70,7 +70,11 @@
 
 #
 pdns_server_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@  $(BOOST_SERIALIZATION_LDFLAGS) -rdynamic 
+if HAVE_LIBPOLARSSL
+pdns_server_LDADD= $(BOOST_SERIALIZATION_LIBS) $(LUA_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
+else
 pdns_server_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_SERIALIZATION_LIBS) $(LUA_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
+endif
 
 if BOTAN110
 pdns_server_SOURCES += botan110signers.cc botansigners.cc
@@ -112,7 +116,11 @@
 
 
 pdnssec_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@  $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) 
+if HAVE_LIBPOLARSSL
+pdnssec_LDADD= $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
+else
 pdnssec_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
+endif
 
 if BOTAN110
 pdnssec_SOURCES += botan110signers.cc botansigners.cc



1.1                  net-dns/pdns/files/pdns-3.3-fix-polarssl_1.3.0.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-polarssl_1.3.0.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/pdns/files/pdns-3.3-fix-polarssl_1.3.0.patch?rev=1.1&content-type=text/plain

Index: pdns-3.3-fix-polarssl_1.3.0.patch
===================================================================
--- /dev/shm/portage/net-dns/pdns-3.3/work/pdns-3.3/pdns/polarrsakeyinfra.cc	2013-04-26 21:54:34.000000000 +0200
+++ pdns/pdns/polarrsakeyinfra.cc	2013-12-16 15:08:59.476418683 +0100
@@ -1,20 +1,8 @@
-#ifdef HAVE_LIBPOLARSSLSSL
 #include <polarssl/rsa.h>
 #include <polarssl/base64.h>
-#include <polarssl/sha1.h>
-#include <polarssl/sha2.h>
-#include <polarssl/sha4.h>
+#include <sha.hh>
 #include <polarssl/entropy.h>
 #include <polarssl/ctr_drbg.h>
-#else
-#include "ext/polarssl-1.1.2/include/polarssl/rsa.h"
-#include "ext/polarssl-1.1.2/include/polarssl/base64.h"
-#include "ext/polarssl-1.1.2/include/polarssl/sha1.h"
-#include "ext/polarssl-1.1.2/include/polarssl/sha2.h"
-#include "ext/polarssl-1.1.2/include/polarssl/sha4.h"
-#include "ext/polarssl-1.1.2/include/polarssl/entropy.h"
-#include "ext/polarssl-1.1.2/include/polarssl/ctr_drbg.h"
-#endif
 #include <boost/assign/std/vector.hpp> // for 'operator+=()'
 #include <boost/foreach.hpp>
 #include "dnssecinfra.hh"
@@ -147,7 +135,8 @@
 {
   string hash = this->hash(msg);
   unsigned char signature[mpi_size(&d_context.N)];
-  int hashKind;
+  md_type_t hashKind;
+
   if(hash.size()==20)
     hashKind= SIG_RSA_SHA1;
   else if(hash.size()==32) 
@@ -169,7 +158,7 @@
 
 bool RSADNSCryptoKeyEngine::verify(const std::string& msg, const std::string& signature) const
 {
-  int hashKind;
+  md_type_t hashKind;
   string hash=this->hash(msg);
   if(hash.size()==20)
     hashKind= SIG_RSA_SHA1;
@@ -178,7 +167,11 @@
   else
     hashKind = SIG_RSA_SHA512;
   
-  int ret=rsa_pkcs1_verify(const_cast<rsa_context*>(&d_context), RSA_PUBLIC, 
+  int ret=rsa_pkcs1_verify(const_cast<rsa_context*>(&d_context),
+#if POLARSSL_VERSION_NUMBER >= 0x01020900
+    NULL, NULL,
+#endif
+    RSA_PUBLIC,
     hashKind,
     hash.size(),
     (const unsigned char*) hash.c_str(), (unsigned char*) signature.c_str());
@@ -195,12 +188,20 @@
   } 
   else if(d_algorithm == 8) { // RSASHA256
     unsigned char hash[32];
+#if POLARSSL_VERSION_NUMBER >= 0x01030000
+    sha256((unsigned char*)toHash.c_str(), toHash.length(), hash, 0);
+#else
     sha2((unsigned char*)toHash.c_str(), toHash.length(), hash, 0);
+#endif
     return string((char*)hash, sizeof(hash));
   } 
   else if(d_algorithm == 10) { // RSASHA512
     unsigned char hash[64];
+#if POLARSSL_VERSION_NUMBER >= 0x01030000
+    sha512((unsigned char*)toHash.c_str(), toHash.length(), hash, 0);
+#else
     sha4((unsigned char*)toHash.c_str(), toHash.length(), hash, 0);
+#endif
     return string((char*)hash, sizeof(hash));
   }
   throw runtime_error("PolarSSL hashing method can't hash algorithm "+lexical_cast<string>(d_algorithm));





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-16 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16 14:56 [gentoo-commits] gentoo-x86 commit in net-dns/pdns/files: pdns-3.3-fix-autoconf.patch pdns-3.3-lib_lua.patch pdns-3.3_sha.hh pdns-3.3-fix-curl-link.patch pdns-3.3-fix-conditional-polarssl.patch pdns-3.3-fix-polarssl_1.3.0.patch Alexys Jacob (ultrabug)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox