pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/ccrtp Use OpenSSL 1.1 interfaces.
details: https://anonhg.NetBSD.org/pkgsrc/rev/9022b7425b2f
branches: trunk
changeset: 427724:9022b7425b2f
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Apr 20 00:42:30 2020 +0000
description:
Use OpenSSL 1.1 interfaces.
diffstat:
net/ccrtp/distinfo | 3 +-
net/ccrtp/patches/patch-src_ccrtp_crypto_openssl_hmac.cpp | 44 +++++++++++++++
2 files changed, 46 insertions(+), 1 deletions(-)
diffs (62 lines):
diff -r 8feb45b8ec42 -r 9022b7425b2f net/ccrtp/distinfo
--- a/net/ccrtp/distinfo Mon Apr 20 00:42:07 2020 +0000
+++ b/net/ccrtp/distinfo Mon Apr 20 00:42:30 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2017/08/19 00:27:44 jlam Exp $
+$NetBSD: distinfo,v 1.8 2020/04/20 00:42:30 joerg Exp $
SHA1 (ccrtp-2.1.2.tar.gz) = ecad8c17c5ed61e1c9fb1b785592958c678b7c4b
RMD160 (ccrtp-2.1.2.tar.gz) = b3b2cb2f6822e08422b19fcd1528f976ca10ad66
@@ -6,3 +6,4 @@
Size (ccrtp-2.1.2.tar.gz) = 764869 bytes
SHA1 (patch-doc_CMakeLists.txt) = e9cfcfc618dc6bc16da5d3bff61774c57febaff6
SHA1 (patch-src_ccrtp_crypto_gcrypt_InitializeGcrypt.cpp) = 407f3a7f6536028a1b727a826183133dfe3ce4d6
+SHA1 (patch-src_ccrtp_crypto_openssl_hmac.cpp) = eb0372a01628cecb638a00278686054633d396dd
diff -r 8feb45b8ec42 -r 9022b7425b2f net/ccrtp/patches/patch-src_ccrtp_crypto_openssl_hmac.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ccrtp/patches/patch-src_ccrtp_crypto_openssl_hmac.cpp Mon Apr 20 00:42:30 2020 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_ccrtp_crypto_openssl_hmac.cpp,v 1.1 2020/04/20 00:42:30 joerg Exp $
+
+--- src/ccrtp/crypto/openssl/hmac.cpp.orig 2020-04-19 15:28:45.135992336 +0000
++++ src/ccrtp/crypto/openssl/hmac.cpp
+@@ -52,23 +52,20 @@ void hmac_sha1( uint8_t* key, int32_t ke
+ const uint8_t* data_chunks[],
+ uint32_t data_chunck_length[],
+ uint8_t* mac, int32_t* mac_length ) {
+- HMAC_CTX ctx;
+- HMAC_CTX_init(&ctx);
+- HMAC_Init_ex(&ctx, key, key_length, EVP_sha1(), NULL);
++ HMAC_CTX *ctx = HMAC_CTX_new();
++ HMAC_Init_ex(ctx, key, key_length, EVP_sha1(), NULL);
+ while (*data_chunks) {
+- HMAC_Update(&ctx, *data_chunks, *data_chunck_length);
++ HMAC_Update(ctx, *data_chunks, *data_chunck_length);
+ data_chunks ++;
+ data_chunck_length ++;
+ }
+- HMAC_Final(&ctx, mac, reinterpret_cast<uint32_t*>(mac_length));
+- HMAC_CTX_cleanup(&ctx);
++ HMAC_Final(ctx, mac, reinterpret_cast<uint32_t*>(mac_length));
++ HMAC_CTX_free(ctx);
+ }
+
+ void* createSha1HmacContext(uint8_t* key, int32_t key_length)
+ {
+- HMAC_CTX* ctx = (HMAC_CTX*)malloc(sizeof(HMAC_CTX));
+-
+- HMAC_CTX_init(ctx);
++ HMAC_CTX* ctx = HMAC_CTX_new();
+ HMAC_Init_ex(ctx, key, key_length, EVP_sha1(), NULL);
+ return ctx;
+ }
+@@ -100,7 +97,6 @@ void hmacSha1Ctx(void* ctx, const uint8_
+ void freeSha1HmacContext(void* ctx)
+ {
+ if (ctx) {
+- HMAC_CTX_cleanup((HMAC_CTX*)ctx);
+- free(ctx);
++ HMAC_CTX_free((HMAC_CTX*)ctx);
+ }
+ }
+\ No newline at end of file
Home |
Main Index |
Thread Index |
Old Index