From owner-svn-ports-all@freebsd.org Tue Feb 16 13:27:17 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8B18AAAB41; Tue, 16 Feb 2016 13:27:17 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 792C1160D; Tue, 16 Feb 2016 13:27:17 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1GDRGgJ008504; Tue, 16 Feb 2016 13:27:16 GMT (envelope-from cpm@FreeBSD.org) Received: (from cpm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1GDRGbR008501; Tue, 16 Feb 2016 13:27:16 GMT (envelope-from cpm@FreeBSD.org) Message-Id: <201602161327.u1GDRGbR008501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cpm set sender to cpm@FreeBSD.org using -f From: "Carlos J. Puga Medina" Date: Tue, 16 Feb 2016 13:27:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r408992 - in branches/2016Q1/security/libgcrypt: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 13:27:17 -0000 Author: cpm Date: Tue Feb 16 13:27:16 2016 New Revision: 408992 URL: https://svnweb.freebsd.org/changeset/ports/408992 Log: MFH: r408514 This patch fixes alignment of self-test context in salsa20 required for amd64 implementation. Other changes: - Regenerate patches to make portlint(1) happy - Update MAINTAINER to my @FreeBSD.org address - Bump PORTREVISION PR: 206919 Approved by: junovitch (mentor) Approved by: ports-secteam (eadler) Added: branches/2016Q1/security/libgcrypt/files/patch-cipher_salsa20.c - copied unchanged from r408514, head/security/libgcrypt/files/patch-cipher_salsa20.c branches/2016Q1/security/libgcrypt/files/patch-src_gcrypt.h.in - copied unchanged from r408514, head/security/libgcrypt/files/patch-src_gcrypt.h.in Deleted: branches/2016Q1/security/libgcrypt/files/patch-cipher-Makefile.in branches/2016Q1/security/libgcrypt/files/patch-git_f5832285 Modified: branches/2016Q1/security/libgcrypt/Makefile Directory Properties: branches/2016Q1/ (props changed) Modified: branches/2016Q1/security/libgcrypt/Makefile ============================================================================== --- branches/2016Q1/security/libgcrypt/Makefile Tue Feb 16 13:12:22 2016 (r408991) +++ branches/2016Q1/security/libgcrypt/Makefile Tue Feb 16 13:27:16 2016 (r408992) @@ -2,11 +2,11 @@ PORTNAME= libgcrypt PORTVERSION= 1.6.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security MASTER_SITES= GNUPG -MAINTAINER= cpm@fbsd.es +MAINTAINER= cpm@FreeBSD.org COMMENT= General purpose crypto library based on code used in GnuPG LICENSE= GPLv2 LGPL21 Copied: branches/2016Q1/security/libgcrypt/files/patch-cipher_salsa20.c (from r408514, head/security/libgcrypt/files/patch-cipher_salsa20.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q1/security/libgcrypt/files/patch-cipher_salsa20.c Tue Feb 16 13:27:16 2016 (r408992, copy of r408514, head/security/libgcrypt/files/patch-cipher_salsa20.c) @@ -0,0 +1,61 @@ +--- 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."; Copied: branches/2016Q1/security/libgcrypt/files/patch-src_gcrypt.h.in (from r408514, head/security/libgcrypt/files/patch-src_gcrypt.h.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q1/security/libgcrypt/files/patch-src_gcrypt.h.in Tue Feb 16 13:27:16 2016 (r408992, copy of r408514, head/security/libgcrypt/files/patch-src_gcrypt.h.in) @@ -0,0 +1,20 @@ +--- src/gcrypt.h.in.orig 2015-09-07 12:05:57 UTC ++++ src/gcrypt.h.in +@@ -506,7 +506,7 @@ enum gcry_mpi_flag + GCRYMPI_FLAG_USER1 = 0x0100,/* User flag 1. */ + GCRYMPI_FLAG_USER2 = 0x0200,/* User flag 2. */ + GCRYMPI_FLAG_USER3 = 0x0400,/* User flag 3. */ +- GCRYMPI_FLAG_USER4 = 0x0800,/* User flag 4. */ ++ GCRYMPI_FLAG_USER4 = 0x0800 /* User flag 4. */ + }; + + +@@ -1343,7 +1343,7 @@ enum gcry_mac_algos + /* Flags used with the open function. */ + enum gcry_mac_flags + { +- GCRY_MAC_FLAG_SECURE = 1, /* Allocate all buffers in "secure" memory. */ ++ GCRY_MAC_FLAG_SECURE = 1 /* Allocate all buffers in "secure" memory. */ + }; + + /* Create a MAC handle for algorithm ALGO. FLAGS may be given as an bitwise OR