pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/ccrtp



Module Name:    pkgsrc
Committed By:   joerg
Date:           Mon Apr 20 00:42:30 UTC 2020

Modified Files:
        pkgsrc/net/ccrtp: distinfo
Added Files:
        pkgsrc/net/ccrtp/patches: patch-src_ccrtp_crypto_openssl_hmac.cpp

Log Message:
Use OpenSSL 1.1 interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/net/ccrtp/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/net/ccrtp/patches/patch-src_ccrtp_crypto_openssl_hmac.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/ccrtp/distinfo
diff -u pkgsrc/net/ccrtp/distinfo:1.7 pkgsrc/net/ccrtp/distinfo:1.8
--- pkgsrc/net/ccrtp/distinfo:1.7       Sat Aug 19 00:27:44 2017
+++ pkgsrc/net/ccrtp/distinfo   Mon Apr 20 00:42:30 2020
@@ -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 @@ SHA512 (ccrtp-2.1.2.tar.gz) = a835f57a0e
 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

Added files:

Index: pkgsrc/net/ccrtp/patches/patch-src_ccrtp_crypto_openssl_hmac.cpp
diff -u /dev/null pkgsrc/net/ccrtp/patches/patch-src_ccrtp_crypto_openssl_hmac.cpp:1.1
--- /dev/null   Mon Apr 20 00:42:30 2020
+++ pkgsrc/net/ccrtp/patches/patch-src_ccrtp_crypto_openssl_hmac.cpp    Mon Apr 20 00:42:30 2020
@@ -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