--- /usr/ports/security/libgcrypt/Makefile 2016-02-08 21:54:10.000000000 +0100 +++ /usr/ports/security/libgcrypt/Makefile 2016-02-16 00:12:37.582482000 +0100 @@ -1,15 +1,14 @@ # $FreeBSD: head/security/libgcrypt/Makefile 408514 2016-02-08 20:54:10Z cpm $ PORTNAME= libgcrypt -PORTVERSION= 1.6.4 -PORTREVISION= 4 +PORTVERSION= 1.6.5 CATEGORIES= security MASTER_SITES= GNUPG MAINTAINER= cpm@FreeBSD.org COMMENT= General purpose crypto library based on code used in GnuPG -LICENSE= GPLv2 LGPL21 +LICENSE= GPLv2+ LGPL21+ LICENSE_COMB= multi BUILD_DEPENDS= libgpg-error>=1.8:${PORTSDIR}/security/libgpg-error --- /usr/ports/security/libgcrypt/distinfo 2015-10-27 16:54:54.000000000 +0100 +++ /usr/ports/security/libgcrypt/distinfo 2016-02-16 00:12:51.269655000 +0100 @@ -1,2 +1,2 @@ -SHA256 (libgcrypt-1.6.4.tar.bz2) = c9bc2c7fe2e5f4ea13b0c74f9d24bcbb1ad889bb39297d8082aebf23f4336026 -SIZE (libgcrypt-1.6.4.tar.bz2) = 2549820 +SHA256 (libgcrypt-1.6.5.tar.bz2) = f49ebc5842d455ae7019def33eb5a014a0f07a2a8353dc3aa50a76fd1dafa924 +SIZE (libgcrypt-1.6.5.tar.bz2) = 2549601 --- /usr/ports/security/libgcrypt/files/patch-cipher-Makefile.in 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/security/libgcrypt/files/patch-cipher-Makefile.in 2016-02-16 00:12:13.063458000 +0100 @@ -0,0 +1,23 @@ +--- cipher/Makefile.in.orig 2015-09-08 06:32:11 UTC ++++ cipher/Makefile.in +@@ -818,13 +818,19 @@ uninstall-am: + tags tags-am uninstall uninstall-am + + +-# We need to lower the optimization for this module. ++# We need to lower the optimization for these modules. + tiger.o: $(srcdir)/tiger.c + `echo $(COMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` + + tiger.lo: $(srcdir)/tiger.c + `echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` + ++salsa20.o: $(srcdir)/salsa20.c ++ `echo $(COMPILE) -c $(srcdir)/salsa20.c | $(o_flag_munging) ` ++ ++salsa20.lo: $(srcdir)/salsa20.c ++ `echo $(LTCOMPILE) -c $(srcdir)/salsa20.c | $(o_flag_munging) ` ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: --- /usr/ports/security/libgcrypt/files/patch-cipher_salsa20.c 2016-02-08 21:54:10.000000000 +0100 +++ /usr/ports/security/libgcrypt/files/patch-cipher_salsa20.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,61 +0,0 @@ ---- cipher/salsa20.c.orig 2016-02-03 17:12:14 UTC -+++ cipher/salsa20.c -@@ -485,7 +485,8 @@ salsa20r12_encrypt_stream (void *context - static const char* - selftest (void) - { -- SALSA20_context_t ctx; -+ byte ctxbuf[sizeof(SALSA20_context_t) + 15]; -+ SALSA20_context_t *ctx; - byte scratch[8+1]; - byte buf[256+64+4]; - int i; -@@ -502,32 +503,35 @@ selftest (void) - static const byte ciphertext_1[] = - { 0xE3, 0xBE, 0x8F, 0xDD, 0x8B, 0xEC, 0xA2, 0xE3}; - -- salsa20_setkey (&ctx, key_1, sizeof key_1); -- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); -+ /* 16-byte alignment required for amd64 implementation. */ -+ ctx = (SALSA20_context_t *)((uintptr_t)(ctxbuf + 15) & ~(uintptr_t)15); -+ -+ salsa20_setkey (ctx, key_1, sizeof key_1); -+ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); - scratch[8] = 0; -- salsa20_encrypt_stream (&ctx, scratch, plaintext_1, sizeof plaintext_1); -+ salsa20_encrypt_stream (ctx, scratch, plaintext_1, sizeof plaintext_1); - if (memcmp (scratch, ciphertext_1, sizeof ciphertext_1)) - return "Salsa20 encryption test 1 failed."; - if (scratch[8]) - return "Salsa20 wrote too much."; -- salsa20_setkey( &ctx, key_1, sizeof(key_1)); -- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); -- salsa20_encrypt_stream (&ctx, scratch, scratch, sizeof plaintext_1); -+ salsa20_setkey (ctx, key_1, sizeof(key_1)); -+ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); -+ salsa20_encrypt_stream (ctx, scratch, scratch, sizeof plaintext_1); - if (memcmp (scratch, plaintext_1, sizeof plaintext_1)) - return "Salsa20 decryption test 1 failed."; - - for (i = 0; i < sizeof buf; i++) - buf[i] = i; -- salsa20_setkey (&ctx, key_1, sizeof key_1); -- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); -+ salsa20_setkey (ctx, key_1, sizeof key_1); -+ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); - /*encrypt*/ - salsa20_encrypt_stream (&ctx, buf, buf, sizeof buf); - /*decrypt*/ -- salsa20_setkey (&ctx, key_1, sizeof key_1); -- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1); -- salsa20_encrypt_stream (&ctx, buf, buf, 1); -- salsa20_encrypt_stream (&ctx, buf+1, buf+1, (sizeof buf)-1-1); -- salsa20_encrypt_stream (&ctx, buf+(sizeof buf)-1, buf+(sizeof buf)-1, 1); -+ salsa20_setkey (ctx, key_1, sizeof key_1); -+ salsa20_setiv (ctx, nonce_1, sizeof nonce_1); -+ salsa20_encrypt_stream (ctx, buf, buf, 1); -+ salsa20_encrypt_stream (ctx, buf+1, buf+1, (sizeof buf)-1-1); -+ salsa20_encrypt_stream (ctx, buf+(sizeof buf)-1, buf+(sizeof buf)-1, 1); - for (i = 0; i < sizeof buf; i++) - if (buf[i] != (byte)i) - return "Salsa20 encryption test 2 failed."; --- /usr/ports/security/libgcrypt/pkg-plist 2015-10-29 15:30:24.000000000 +0100 +++ /usr/ports/security/libgcrypt/pkg-plist 2016-02-16 00:13:01.799102000 +0100 @@ -6,6 +6,6 @@ lib/libgcrypt.a lib/libgcrypt.so lib/libgcrypt.so.20 -lib/libgcrypt.so.20.0.4 +lib/libgcrypt.so.20.0.5 man/man1/hmac256.1.gz share/aclocal/libgcrypt.m4