pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/poco Use newer OpenSSL APIs



details:   https://anonhg.NetBSD.org/pkgsrc/rev/94746ce68ceb
branches:  trunk
changeset: 414420:94746ce68ceb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Mar 27 02:08:11 2020 +0000

description:
Use newer OpenSSL APIs

diffstat:

 devel/poco/distinfo                                     |   6 +-
 devel/poco/patches/patch-Crypto_src_CipherImpl.cpp      |  68 +++++++++++++++++
 devel/poco/patches/patch-Crypto_src_DigestEngine.cpp    |  22 +++++
 devel/poco/patches/patch-Crypto_src_RSAKeyImpl.cpp      |  27 ++++++
 devel/poco/patches/patch-Crypto_src_X509Certificate.cpp |  13 +++
 5 files changed, 135 insertions(+), 1 deletions(-)

diffs (164 lines):

diff -r 21971de8f0e2 -r 94746ce68ceb devel/poco/distinfo
--- a/devel/poco/distinfo       Fri Mar 27 02:07:33 2020 +0000
+++ b/devel/poco/distinfo       Fri Mar 27 02:08:11 2020 +0000
@@ -1,9 +1,13 @@
-$NetBSD: distinfo,v 1.13 2018/02/06 11:41:14 jperkin Exp $
+$NetBSD: distinfo,v 1.14 2020/03/27 02:08:11 joerg Exp $
 
 SHA1 (poco-1.6.1-all.tar.gz) = 38841212a6893d4290909a62b4f310450230fb6d
 RMD160 (poco-1.6.1-all.tar.gz) = a7ab9429db5b4b5fc02c194a208f11f296deb90b
 SHA512 (poco-1.6.1-all.tar.gz) = 6c68f3f2692bad8ad4a111e541e8da6376246517b2dca73f429539e9ceaa107e791c3673261467cf8a2e2efabd0dd2a5160d9d412e71af114b4a6b700c9c2393
 Size (poco-1.6.1-all.tar.gz) = 5636597 bytes
+SHA1 (patch-Crypto_src_CipherImpl.cpp) = ebaa5380c6ce90d1b2c9ca05f34d0ace66804b32
+SHA1 (patch-Crypto_src_DigestEngine.cpp) = 8a99eb509df15e1d413e58671545a78b971939e0
+SHA1 (patch-Crypto_src_RSAKeyImpl.cpp) = 3e6bbe58f3cc24f4a744e8e580765bcc2ad0efdc
+SHA1 (patch-Crypto_src_X509Certificate.cpp) = 2a119c3bb207bd121dd789121f49b94a4969f8f4
 SHA1 (patch-Foundation_Makefile) = 492b55268b6b848bfb0d5c255b59ae2745eb4f72
 SHA1 (patch-Foundation_include_Poco_Platform.h) = a7d81c20902af7e23ce8a10eb90fc1a98d7cc412
 SHA1 (patch-Foundation_include_Poco_RegularExpression.h) = a113fdcfdd25a4d98deba6b32f9be7ae675450d6
diff -r 21971de8f0e2 -r 94746ce68ceb devel/poco/patches/patch-Crypto_src_CipherImpl.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/poco/patches/patch-Crypto_src_CipherImpl.cpp        Fri Mar 27 02:08:11 2020 +0000
@@ -0,0 +1,68 @@
+$NetBSD: patch-Crypto_src_CipherImpl.cpp,v 1.1 2020/03/27 02:08:11 joerg Exp $
+
+--- Crypto/src/CipherImpl.cpp.orig     2020-03-27 00:11:42.909559121 +0000
++++ Crypto/src/CipherImpl.cpp
+@@ -77,7 +77,7 @@ namespace
+ 
+       private:
+               const EVP_CIPHER* _pCipher;
+-              EVP_CIPHER_CTX    _ctx;
++              EVP_CIPHER_CTX    *_ctx;
+               ByteVec           _key;
+               ByteVec           _iv;
+       };
+@@ -92,9 +92,10 @@ namespace
+               _key(key),
+               _iv(iv)
+       {
+-              EVP_CipherInit(
+-                      &_ctx,
+-                      _pCipher,
++              _ctx = EVP_CIPHER_CTX_new();
++              EVP_CipherInit_ex(
++                      _ctx,
++                      _pCipher, NULL,
+                       &_key[0],
+                       _iv.empty() ? 0 : &_iv[0],
+                       (dir == DIR_ENCRYPT) ? 1 : 0);
+@@ -103,19 +104,19 @@ namespace
+ 
+       CryptoTransformImpl::~CryptoTransformImpl()
+       {
+-              EVP_CIPHER_CTX_cleanup(&_ctx);
++              EVP_CIPHER_CTX_free(_ctx);
+       }
+ 
+ 
+       std::size_t CryptoTransformImpl::blockSize() const
+       {
+-              return EVP_CIPHER_CTX_block_size(&_ctx);
++              return EVP_CIPHER_CTX_block_size(_ctx);
+       }
+ 
+       
+       int CryptoTransformImpl::setPadding(int padding)
+       {
+-              return EVP_CIPHER_CTX_set_padding(&_ctx, padding);
++              return EVP_CIPHER_CTX_set_padding(_ctx, padding);
+       }
+       
+ 
+@@ -129,7 +130,7 @@ namespace
+ 
+               int outLen = static_cast<int>(outputLength);
+               int rc = EVP_CipherUpdate(
+-                      &_ctx,
++                      _ctx,
+                       output,
+                       &outLen,
+                       input,
+@@ -153,7 +154,7 @@ namespace
+               // Use the '_ex' version that does not perform implicit cleanup since we
+               // will call EVP_CIPHER_CTX_cleanup() from the dtor as there is no
+               // guarantee that finalize() will be called if an error occurred.
+-              int rc = EVP_CipherFinal_ex(&_ctx, output, &len);
++              int rc = EVP_CipherFinal_ex(_ctx, output, &len);
+ 
+               if (rc == 0)
+                       throwError();
diff -r 21971de8f0e2 -r 94746ce68ceb devel/poco/patches/patch-Crypto_src_DigestEngine.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/poco/patches/patch-Crypto_src_DigestEngine.cpp      Fri Mar 27 02:08:11 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-Crypto_src_DigestEngine.cpp,v 1.1 2020/03/27 02:08:11 joerg Exp $
+
+--- Crypto/src/DigestEngine.cpp.orig   2020-03-27 00:22:29.908133661 +0000
++++ Crypto/src/DigestEngine.cpp
+@@ -39,7 +39,7 @@ DigestEngine::~DigestEngine()
+ 
+ int DigestEngine::nid() const
+ {
+-      return EVP_MD_nid(_ctx->digest);
++      return EVP_MD_nid(EVP_MD_CTX_md(_ctx));
+ }
+ 
+ std::size_t DigestEngine::digestLength() const
+@@ -50,7 +50,7 @@ std::size_t DigestEngine::digestLength()
+ 
+ void DigestEngine::reset()
+ {
+-      EVP_MD_CTX_cleanup(_ctx);
++      EVP_MD_CTX_reset(_ctx);
+       const EVP_MD* md = EVP_get_digestbyname(_name.c_str());
+       if (!md) throw Poco::NotFoundException(_name);
+       EVP_DigestInit_ex(_ctx, md, NULL);
diff -r 21971de8f0e2 -r 94746ce68ceb devel/poco/patches/patch-Crypto_src_RSAKeyImpl.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/poco/patches/patch-Crypto_src_RSAKeyImpl.cpp        Fri Mar 27 02:08:11 2020 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-Crypto_src_RSAKeyImpl.cpp,v 1.1 2020/03/27 02:08:11 joerg Exp $
+
+--- Crypto/src/RSAKeyImpl.cpp.orig     2020-03-27 00:20:44.185120322 +0000
++++ Crypto/src/RSAKeyImpl.cpp
+@@ -207,19 +207,19 @@ int RSAKeyImpl::size() const
+ 
+ RSAKeyImpl::ByteVec RSAKeyImpl::modulus() const
+ {
+-      return convertToByteVec(_pRSA->n);
++      return convertToByteVec(RSA_get0_n(_pRSA));
+ }
+ 
+ 
+ RSAKeyImpl::ByteVec RSAKeyImpl::encryptionExponent() const
+ {
+-      return convertToByteVec(_pRSA->e);
++      return convertToByteVec(RSA_get0_e(_pRSA));
+ }
+ 
+ 
+ RSAKeyImpl::ByteVec RSAKeyImpl::decryptionExponent() const
+ {
+-      return convertToByteVec(_pRSA->d);
++      return convertToByteVec(RSA_get0_d(_pRSA));
+ }
+ 
+ 
diff -r 21971de8f0e2 -r 94746ce68ceb devel/poco/patches/patch-Crypto_src_X509Certificate.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/poco/patches/patch-Crypto_src_X509Certificate.cpp   Fri Mar 27 02:08:11 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-Crypto_src_X509Certificate.cpp,v 1.1 2020/03/27 02:08:11 joerg Exp $
+
+--- Crypto/src/X509Certificate.cpp.orig        2020-03-27 00:40:15.548521424 +0000
++++ Crypto/src/X509Certificate.cpp
+@@ -59,7 +59,7 @@ X509Certificate::X509Certificate(X509* p
+       
+       if (shared)
+       {
+-              _pCert->references++;
++              X509_up_ref(_pCert);
+       }
+ 
+       init();



Home | Main Index | Thread Index | Old Index