From owner-svn-src-projects@freebsd.org Mon Sep 17 00:08:10 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE44C108A4B2 for ; Mon, 17 Sep 2018 00:08:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6330E860B6; Mon, 17 Sep 2018 00:08:10 +0000 (UTC) (envelope-from rmacklem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 584A2130F; Mon, 17 Sep 2018 00:08:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8H08AI4066004; Mon, 17 Sep 2018 00:08:10 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8H08ArH066003; Mon, 17 Sep 2018 00:08:10 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201809170008.w8H08ArH066003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 17 Sep 2018 00:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338703 - in projects/pnfs-planb-server-stable11: etc sys usr.bin usr.sbin X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server-stable11: etc sys usr.bin usr.sbin X-SVN-Commit-Revision: 338703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 00:08:10 -0000 Author: rmacklem Date: Mon Sep 17 00:08:09 2018 New Revision: 338703 URL: https://svnweb.freebsd.org/changeset/base/338703 Log: Delete this projects tree, since the up to date code is now in head/current. Deleted: projects/pnfs-planb-server-stable11/etc/ projects/pnfs-planb-server-stable11/sys/ projects/pnfs-planb-server-stable11/usr.bin/ projects/pnfs-planb-server-stable11/usr.sbin/ From owner-svn-src-projects@freebsd.org Mon Sep 17 00:16:55 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 292EB108A7AD for ; Mon, 17 Sep 2018 00:16:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C007286571; Mon, 17 Sep 2018 00:16:54 +0000 (UTC) (envelope-from rmacklem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B546D14A3; Mon, 17 Sep 2018 00:16:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8H0Gsbb070851; Mon, 17 Sep 2018 00:16:54 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8H0GsgB070850; Mon, 17 Sep 2018 00:16:54 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201809170016.w8H0GsgB070850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 17 Sep 2018 00:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338704 - in projects/pnfs-planb-server: etc sys usr.bin usr.sbin X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server: etc sys usr.bin usr.sbin X-SVN-Commit-Revision: 338704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 00:16:55 -0000 Author: rmacklem Date: Mon Sep 17 00:16:54 2018 New Revision: 338704 URL: https://svnweb.freebsd.org/changeset/base/338704 Log: Delete this project source tree since the up to date sources are now in head/current. Deleted: projects/pnfs-planb-server/etc/ projects/pnfs-planb-server/sys/ projects/pnfs-planb-server/usr.bin/ projects/pnfs-planb-server/usr.sbin/ From owner-svn-src-projects@freebsd.org Mon Sep 17 00:20:23 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F2FF108A878 for ; Mon, 17 Sep 2018 00:20:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55754866EB; Mon, 17 Sep 2018 00:20:23 +0000 (UTC) (envelope-from rmacklem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3651E14AA; Mon, 17 Sep 2018 00:20:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8H0KNPZ071113; Mon, 17 Sep 2018 00:20:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8H0KNIi071112; Mon, 17 Sep 2018 00:20:23 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201809170020.w8H0KNIi071112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 17 Sep 2018 00:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338705 - projects/nfsv42 X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/nfsv42 X-SVN-Commit-Revision: 338705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 00:20:23 -0000 Author: rmacklem Date: Mon Sep 17 00:20:22 2018 New Revision: 338705 URL: https://svnweb.freebsd.org/changeset/base/338705 Log: Create a project area for adding NFSv4.2 support to the NFS client and server. Added: projects/nfsv42/ - copied from r338704, head/sys/ Directory Properties: projects/nfsv42/sys/ (props changed) From owner-svn-src-projects@freebsd.org Mon Sep 17 00:59:59 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09583108B77A for ; Mon, 17 Sep 2018 00:59:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8BF588002; Mon, 17 Sep 2018 00:59:58 +0000 (UTC) (envelope-from rmacklem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DC5F1B34; Mon, 17 Sep 2018 00:59:58 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8H0xw8h091359; Mon, 17 Sep 2018 00:59:58 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8H0xuk4091349; Mon, 17 Sep 2018 00:59:56 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201809170059.w8H0xuk4091349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 17 Sep 2018 00:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338706 - in projects/nfsv42/sys/fs: nfs nfsclient nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/nfsv42/sys/fs: nfs nfsclient nfsserver X-SVN-Commit-Revision: 338706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 00:59:59 -0000 Author: rmacklem Date: Mon Sep 17 00:59:56 2018 New Revision: 338706 URL: https://svnweb.freebsd.org/changeset/base/338706 Log: Add the basic support for NFSv4.2 to the client and server. There are no new operations supported yet. Modified: projects/nfsv42/sys/fs/nfs/nfs.h projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c projects/nfsv42/sys/fs/nfs/nfsport.h projects/nfsv42/sys/fs/nfs/nfsproto.h projects/nfsv42/sys/fs/nfsclient/nfs_clcomsubs.c projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c projects/nfsv42/sys/fs/nfsclient/nfs_clstate.c projects/nfsv42/sys/fs/nfsclient/nfs_clvfsops.c projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsubs.c Modified: projects/nfsv42/sys/fs/nfs/nfs.h ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfs.h Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfs/nfs.h Mon Sep 17 00:59:56 2018 (r338706) @@ -686,6 +686,7 @@ struct nfsrv_descript { #define ND_CURSTATEID 0x80000000 #define ND_SAVEDCURSTATEID 0x100000000 #define ND_HASSLOTID 0x200000000 +#define ND_NFSV42 0x400000000 /* * ND_GSS should be the "or" of all GSS type authentications. Modified: projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c Mon Sep 17 00:59:56 2018 (r338706) @@ -106,7 +106,7 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, pnfsmirror, CTLFLAG_RD, * non-idempotent Ops. * Define it here, since it is used by both the client and server. */ -struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS] = { +struct nfsv4_opflag nfsv4_opflag[NFSV42_NOPS] = { { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* undef */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* undef */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* undef */ @@ -166,6 +166,19 @@ struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS] = { { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Want Delegation */ { 0, 0, 0, 0, LK_EXCLUSIVE, 0, 0 }, /* Destroy ClientID */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 0 }, /* Reclaim Complete */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Allocate */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Copy */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Copy Notify */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Deallocate */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* IO Advise */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Layout Error */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Layout Stats */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Offload Cancel */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Offload Status */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Read Plus */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Seek */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Write Same */ + { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Clone */ }; #endif /* !APPLEKEXT */ @@ -300,13 +313,17 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, nd->nd_flag = ND_NFSV4 | ND_NFSCL; if (minorvers == NFSV41_MINORVERSION) nd->nd_flag |= ND_NFSV41; + else if (minorvers == NFSV42_MINORVERSION) + nd->nd_flag |= (ND_NFSV41 | ND_NFSV42); } else if (vers == NFS_VER3) nd->nd_flag = ND_NFSV3 | ND_NFSCL; else { if (NFSHASNFSV4(nmp)) { nd->nd_flag = ND_NFSV4 | ND_NFSCL; - if (NFSHASNFSV4N(nmp)) + if (nmp->nm_minorvers == 1) nd->nd_flag |= ND_NFSV41; + else if (nmp->nm_minorvers == 2) + nd->nd_flag |= (ND_NFSV41 | ND_NFSV42); } else if (NFSHASNFSV3(nmp)) nd->nd_flag = ND_NFSV3 | ND_NFSCL; else @@ -355,7 +372,9 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, (void) nfsm_strtom(nd, nfsv4_opmap[procnum].tag, nfsv4_opmap[procnum].taglen); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); - if ((nd->nd_flag & ND_NFSV41) != 0) + if ((nd->nd_flag & ND_NFSV42) != 0) + *tl++ = txdr_unsigned(NFSV42_MINORVERSION); + else if ((nd->nd_flag & ND_NFSV41) != 0) *tl++ = txdr_unsigned(NFSV41_MINORVERSION); else *tl++ = txdr_unsigned(NFSV4_MINORVERSION); Modified: projects/nfsv42/sys/fs/nfs/nfsport.h ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfsport.h Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfs/nfsport.h Mon Sep 17 00:59:56 2018 (r338706) @@ -257,9 +257,29 @@ /* * Must be one more than last op#. - * NFSv4.2 isn't implemented yet, but define the op# limit for it. */ #define NFSV41_NOPS 59 + +/* + * Additional operations for NFSv4.2. + */ +#define NFSV4OP_ALLOCATE 59 +#define NFSV4OP_COPY 60 +#define NFSV4OP_COPYNOTIFY 61 +#define NFSV4OP_DEALLOCATE 62 +#define NFSV4OP_IOADVISE 63 +#define NFSV4OP_LAYOUTERROR 64 +#define NFSV4OP_LAYOUTSTATS 65 +#define NFSV4OP_OFFLOADCANCEL 66 +#define NFSV4OP_OFFLOADSTATUS 67 +#define NFSV4OP_READPLUS 68 +#define NFSV4OP_SEEK 69 +#define NFSV4OP_WRITESAME 70 +#define NFSV4OP_CLONE 71 + +/* + * Must be one more than the last op#. + */ #define NFSV42_NOPS 72 /* Quirky case if the illegal op code */ @@ -309,6 +329,12 @@ #define NFSV4OP_CBNOTIFYDEVID 14 #define NFSV41_CBNOPS 15 + +/* + * Additional callback operations for NFSv4.2. + */ +#define NFSV4OP_CBOFFLOAD 15 + #define NFSV42_CBNOPS 16 /* Modified: projects/nfsv42/sys/fs/nfs/nfsproto.h ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfsproto.h Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfs/nfsproto.h Mon Sep 17 00:59:56 2018 (r338706) @@ -78,6 +78,7 @@ #define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */ #define NFSV4_MINORVERSION 0 /* V4 Minor version */ #define NFSV41_MINORVERSION 1 /* V4 Minor version */ +#define NFSV42_MINORVERSION 2 /* V4 Minor version */ #define NFSV4_CBVERS 1 /* V4 CB Version */ #define NFSV41_CBVERS 4 /* V4.1 CB Version */ #define NFSV4_SMALLSTR 50 /* Strings small enough for stack */ @@ -920,6 +921,10 @@ struct nfsv3_sattr { #define NFSATTRBIT_MODESETMASKED 74 #define NFSATTRBIT_SUPPATTREXCLCREAT 75 #define NFSATTRBIT_FSCHARSETCAP 76 +#define NFSATTRBIT_CLONEBLKSIZE 77 +#define NFSATTRBIT_SPACEFREED 78 +#define NFSATTRBIT_CHANGEATTRTYPE 79 +#define NFSATTRBIT_SECLABEL 80 #define NFSATTRBM_SUPPORTEDATTRS 0x00000001 #define NFSATTRBM_TYPE 0x00000002 @@ -998,8 +1003,12 @@ struct nfsv3_sattr { #define NFSATTRBM_MODESETMASKED 0x00000400 #define NFSATTRBM_SUPPATTREXCLCREAT 0x00000800 #define NFSATTRBM_FSCHARSETCAP 0x00001000 +#define NFSATTRBM_CLONEBLKSIZE 0x00002000 +#define NFSATTRBM_SPACEFREED 0x00004000 +#define NFSATTRBM_CHANGEATTRTYPE 0x00008000 +#define NFSATTRBM_SECLABEL 0x00010000 -#define NFSATTRBIT_MAX 77 +#define NFSATTRBIT_MAX 81 /* * Sets of attributes that are supported, by words in the bitmap. Modified: projects/nfsv42/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- projects/nfsv42/sys/fs/nfsclient/nfs_clcomsubs.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfsclient/nfs_clcomsubs.c Mon Sep 17 00:59:56 2018 (r338706) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include extern struct nfsstatsv1 nfsstatsv1; -extern struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS]; extern int ncl_mbuf_mlen; extern enum vtype newnv2tov_type[8]; extern enum vtype nv34tov_type[8]; Modified: projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfsclient/nfs_clrpcops.c Mon Sep 17 00:59:56 2018 (r338706) @@ -5091,9 +5091,10 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *de NFSM_DISSECT(tl, uint32_t *, 5 * NFSX_UNSIGNED); vers = fxdr_unsigned(uint32_t, *tl++); minorvers = fxdr_unsigned(uint32_t, *tl++); - if ((vers == NFS_VER4 && minorvers == - NFSV41_MINORVERSION) || (vers == NFS_VER3 && - gotvers == 0)) { + if ((vers == NFS_VER4 && (minorvers == + NFSV41_MINORVERSION || minorvers == + NFSV42_MINORVERSION)) || (vers == + NFS_VER3 && gotvers == 0)) { gotvers = vers; /* We'll take this one. */ ndi->nfsdi_versindex = i; Modified: projects/nfsv42/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- projects/nfsv42/sys/fs/nfsclient/nfs_clstate.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfsclient/nfs_clstate.c Mon Sep 17 00:59:56 2018 (r338706) @@ -3283,7 +3283,9 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) NFSM_BUILD(retopsp, u_int32_t *, NFSX_UNSIGNED); NFSM_DISSECT(tl, u_int32_t *, 3 * NFSX_UNSIGNED); minorvers = fxdr_unsigned(u_int32_t, *tl++); - if (minorvers != NFSV4_MINORVERSION && minorvers != NFSV41_MINORVERSION) + if (minorvers != NFSV4_MINORVERSION && + minorvers != NFSV41_MINORVERSION && + minorvers != NFSV42_MINORVERSION) nd->nd_repstat = NFSERR_MINORVERMISMATCH; cbident = fxdr_unsigned(u_int32_t, *tl++); if (nd->nd_repstat) @@ -3301,14 +3303,16 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) if (op < NFSV4OP_CBGETATTR || (op > NFSV4OP_CBRECALL && minorvers == NFSV4_MINORVERSION) || (op > NFSV4OP_CBNOTIFYDEVID && - minorvers == NFSV41_MINORVERSION)) { + minorvers == NFSV41_MINORVERSION) || + (op > NFSV4OP_CBOFFLOAD && + minorvers == NFSV42_MINORVERSION)) { nd->nd_repstat = NFSERR_OPILLEGAL; *repp = nfscl_errmap(nd, minorvers); retops++; break; } nd->nd_procnum = op; - if (op < NFSV41_CBNOPS) + if (op < NFSV42_CBNOPS) nfsstatsv1.cbrpccnt[nd->nd_procnum]++; switch (op) { case NFSV4OP_CBGETATTR: @@ -3610,7 +3614,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) } break; default: - if (i == 0 && minorvers == NFSV41_MINORVERSION) + if (i == 0 && minorvers != NFSV4_MINORVERSION) error = NFSERR_OPNOTINSESS; else { NFSCL_DEBUG(1, "unsupp callback %d\n", op); Modified: projects/nfsv42/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- projects/nfsv42/sys/fs/nfsclient/nfs_clvfsops.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfsclient/nfs_clvfsops.c Mon Sep 17 00:59:56 2018 (r338706) @@ -1150,7 +1150,7 @@ nfs_mount(struct mount *mp) if (vfs_getopt(mp->mnt_optnew, "minorversion", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &minvers); - if (ret != 1 || minvers < 0 || minvers > 1 || + if (ret != 1 || minvers < 0 || minvers > 2 || (args.flags & NFSMNT_NFSV4) == 0) { vfs_mount_error(mp, "illegal minorversion: %s", opt); error = EINVAL; Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c Mon Sep 17 00:59:56 2018 (r338706) @@ -137,7 +137,7 @@ int (*nfsrv3_procs2[NFS_V3NPROCS])(struct nfsrv_descri (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, }; -int (*nfsrv4_ops0[NFSV41_NOPS])(struct nfsrv_descript *, +int (*nfsrv4_ops0[NFSV42_NOPS])(struct nfsrv_descript *, int, vnode_t , NFSPROC_T *, struct nfsexstuff *) = { (int (*)(struct nfsrv_descript *, int, vnode_t , NFSPROC_T *, struct nfsexstuff *))0, (int (*)(struct nfsrv_descript *, int, vnode_t , NFSPROC_T *, struct nfsexstuff *))0, @@ -198,9 +198,22 @@ int (*nfsrv4_ops0[NFSV41_NOPS])(struct nfsrv_descript nfsrvd_notsupp, nfsrvd_destroyclientid, nfsrvd_reclaimcomplete, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, + nfsrvd_notsupp, }; -int (*nfsrv4_ops1[NFSV41_NOPS])(struct nfsrv_descript *, +int (*nfsrv4_ops1[NFSV42_NOPS])(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *) = { (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, @@ -262,9 +275,22 @@ int (*nfsrv4_ops1[NFSV41_NOPS])(struct nfsrv_descript (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t *, fhandle_t *, NFSPROC_T *, struct nfsexstuff *))0, }; -int (*nfsrv4_ops2[NFSV41_NOPS])(struct nfsrv_descript *, +int (*nfsrv4_ops2[NFSV42_NOPS])(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *) = { (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, @@ -326,6 +352,19 @@ int (*nfsrv4_ops2[NFSV41_NOPS])(struct nfsrv_descript (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, + (int (*)(struct nfsrv_descript *, int, vnode_t , vnode_t , NFSPROC_T *, struct nfsexstuff *, struct nfsexstuff *))0, }; #endif /* !APPLEKEXT */ @@ -377,7 +416,7 @@ static void nfsrvd_compound(struct nfsrv_descript *nd, static int nfs_retfh[NFS_V3NPROCS] = { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0 }; -extern struct nfsv4_opflag nfsv4_opflag[NFSV41_NOPS]; +extern struct nfsv4_opflag nfsv4_opflag[NFSV42_NOPS]; static int nfsv3to4op[NFS_V3NPROCS] = { NFSPROC_NULL, @@ -746,7 +785,9 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram (void) nfsm_strtom(nd, tag, taglen); NFSM_BUILD(retopsp, u_int32_t *, NFSX_UNSIGNED); NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); - if (minorvers != NFSV4_MINORVERSION && minorvers != NFSV41_MINORVERSION) + if (minorvers != NFSV4_MINORVERSION && + minorvers != NFSV41_MINORVERSION && + minorvers != NFSV42_MINORVERSION) nd->nd_repstat = NFSERR_MINORVERMISMATCH; if (nd->nd_repstat) numops = 0; @@ -771,9 +812,9 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram nfsrvd_statstart(op, &start_time); statsinprog = 1; - if (op < NFSV4OP_ACCESS || + if (op < NFSV4OP_ACCESS || op >= NFSV42_NOPS || (op >= NFSV4OP_NOPS && (nd->nd_flag & ND_NFSV41) == 0) || - (op >= NFSV41_NOPS && (nd->nd_flag & ND_NFSV41) != 0)) { + (op >= NFSV41_NOPS && (nd->nd_flag & ND_NFSV42) == 0)) { nd->nd_repstat = NFSERR_OPILLEGAL; *repp++ = txdr_unsigned(NFSV4OP_OPILLEGAL); *repp = nfsd_errmap(nd); Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c Mon Sep 17 00:59:56 2018 (r338706) @@ -4478,7 +4478,10 @@ nfsrv_cbcallargs(struct nfsrv_descript *nd, struct nfs (void)nfsm_strtom(nd, optag, len); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); if ((nd->nd_flag & ND_NFSV41) != 0) { - *tl++ = txdr_unsigned(NFSV41_MINORVERSION); + if ((nd->nd_flag & ND_NFSV42) != 0) + *tl++ = txdr_unsigned(NFSV42_MINORVERSION); + else + *tl++ = txdr_unsigned(NFSV41_MINORVERSION); *tl++ = txdr_unsigned(callback); *tl++ = txdr_unsigned(2); *tl = txdr_unsigned(NFSV4OP_CBSEQUENCE); Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsubs.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsubs.c Mon Sep 17 00:20:22 2018 (r338705) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsubs.c Mon Sep 17 00:59:56 2018 (r338706) @@ -2121,6 +2121,8 @@ nfsd_getminorvers(struct nfsrv_descript *nd, u_char *t *tagstrp = tagstr; if (*minversp == NFSV41_MINORVERSION) nd->nd_flag |= ND_NFSV41; + else if (*minversp == NFSV42_MINORVERSION) + nd->nd_flag |= (ND_NFSV41 | ND_NFSV42); nfsmout: if (error != 0) { if (tagstr != NULL && taglen > NFSV4_SMALLSTR) From owner-svn-src-projects@freebsd.org Mon Sep 17 19:04:17 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 483FE10A4F03 for ; Mon, 17 Sep 2018 19:04:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E02FA88A83; Mon, 17 Sep 2018 19:04:16 +0000 (UTC) (envelope-from dim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D589A15197; Mon, 17 Sep 2018 19:04:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8HJ4GGg053831; Mon, 17 Sep 2018 19:04:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HJ4FIL053826; Mon, 17 Sep 2018 19:04:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201809171904.w8HJ4FIL053826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 17 Sep 2018 19:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338730 - in projects/clang700-import: contrib/llvm/tools/clang/lib/Basic contrib/llvm/tools/lld/docs lib/clang/include/clang/Basic lib/clang/include/lld/Common lib/clang/include/llvm/S... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang700-import: contrib/llvm/tools/clang/lib/Basic contrib/llvm/tools/lld/docs lib/clang/include/clang/Basic lib/clang/include/lld/Common lib/clang/include/llvm/Support X-SVN-Commit-Revision: 338730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 19:04:17 -0000 Author: dim Date: Mon Sep 17 19:04:15 2018 New Revision: 338730 URL: https://svnweb.freebsd.org/changeset/base/338730 Log: Merge llvm, clang, lld, lldb, compiler-rt and libc++ 7.0.0 release r342383, and bump version numbers. PR: 230240, 230355 Modified: projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp projects/clang700-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst projects/clang700-import/lib/clang/include/clang/Basic/Version.inc projects/clang700-import/lib/clang/include/lld/Common/Version.inc projects/clang700-import/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: projects/clang700-import/contrib/compiler-rt/ (props changed) projects/clang700-import/contrib/libc++/ (props changed) projects/clang700-import/contrib/llvm/ (props changed) projects/clang700-import/contrib/llvm/tools/clang/ (props changed) projects/clang700-import/contrib/llvm/tools/lld/ (props changed) projects/clang700-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp ============================================================================== --- projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp Mon Sep 17 18:56:47 2018 (r338729) +++ projects/clang700-import/contrib/llvm/tools/clang/lib/Basic/Version.cpp Mon Sep 17 19:04:15 2018 (r338730) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_70/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_700/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: projects/clang700-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst ============================================================================== --- projects/clang700-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst Mon Sep 17 18:56:47 2018 (r338729) +++ projects/clang700-import/contrib/llvm/tools/lld/docs/ReleaseNotes.rst Mon Sep 17 19:04:15 2018 (r338730) @@ -10,15 +10,25 @@ Introduction lld is a high-performance linker that supports ELF (Unix), COFF (Windows), Mach-O (macOS), MinGW and WebAssembly. lld is command-line-compatible with GNU -linkers and Microsoft link.exe, and is significantly faster than these system +linkers and Microsoft link.exe, and is significantly faster than the system default linkers. -lld 7 for ELF and COFF are production-ready. lld/ELF can build the entire -FreeBSD/AMD64 and will be the default linker of the next version of the -operating system. lld/COFF is being used to build popular large programs such as -the Chrome web browser. Mach-O, MinGW and WebAssembly supports are still -experimental. +lld 7 for ELF, COFF and MinGW are production-ready. +* lld/ELF can build the entire FreeBSD/{AMD64,ARMv7} and will be the default + linker of the next version of the operating system. + +* lld/COFF is being used to create official builds of large popular programs + such as Chrome and Firefox. + +* lld/MinGW is being used by Firefox for their MinGW builds. lld/MinGW still + needs a sysroot specifically built for lld, with llvm-dlltool, though. + +* lld/WebAssembly is used as the default (only) linker in Emscripten when using + the upstream LLVM compiler. + +* lld/Mach-O is still experimental. + Non-comprehensive list of changes in this release ================================================= @@ -95,6 +105,8 @@ COFF Improvements * Sped up PDB file creation. * Changed section layout to improve compatibility with link.exe. + +* `/subsystem` inference is improved to cover more corner cases. * Added the following flags: ``--color-diagnostics={always,never,auto}``, ``--no-color-diagnostics``, ``/brepro``, ``/debug:full``, ``/debug:ghash``, Modified: projects/clang700-import/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- projects/clang700-import/lib/clang/include/clang/Basic/Version.inc Mon Sep 17 18:56:47 2018 (r338729) +++ projects/clang700-import/lib/clang/include/clang/Basic/Version.inc Mon Sep 17 19:04:15 2018 (r338730) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "341916" +#define SVN_REVISION "342383" Modified: projects/clang700-import/lib/clang/include/lld/Common/Version.inc ============================================================================== --- projects/clang700-import/lib/clang/include/lld/Common/Version.inc Mon Sep 17 18:56:47 2018 (r338729) +++ projects/clang700-import/lib/clang/include/lld/Common/Version.inc Mon Sep 17 19:04:15 2018 (r338730) @@ -7,4 +7,4 @@ #define LLD_REPOSITORY_STRING "FreeBSD" // - -#define LLD_REVISION_STRING "341916-1200005" +#define LLD_REVISION_STRING "342383-1200005" Modified: projects/clang700-import/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- projects/clang700-import/lib/clang/include/llvm/Support/VCSRevision.h Mon Sep 17 18:56:47 2018 (r338729) +++ projects/clang700-import/lib/clang/include/llvm/Support/VCSRevision.h Mon Sep 17 19:04:15 2018 (r338730) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "svn-r341916" +#define LLVM_REVISION "svn-r342383" From owner-svn-src-projects@freebsd.org Mon Sep 17 19:05:37 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D316910A4FA5 for ; Mon, 17 Sep 2018 19:05:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BBBD88C3C; Mon, 17 Sep 2018 19:05:36 +0000 (UTC) (envelope-from dim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C1B71519A; Mon, 17 Sep 2018 19:05:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8HJ5a3l053992; Mon, 17 Sep 2018 19:05:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HJ5WBv053974; Mon, 17 Sep 2018 19:05:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201809171905.w8HJ5WBv053974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 17 Sep 2018 19:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338731 - in projects/clang700-import: etc lib/libc/amd64/string lib/libc/i386/string lib/libc/net sys/amd64/amd64 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/ichiic sys/net ... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang700-import: etc lib/libc/amd64/string lib/libc/i386/string lib/libc/net sys/amd64/amd64 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/ichiic sys/net sys/netpfil/pf sys/x86/is... X-SVN-Commit-Revision: 338731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 19:05:37 -0000 Author: dim Date: Mon Sep 17 19:05:32 2018 New Revision: 338731 URL: https://svnweb.freebsd.org/changeset/base/338731 Log: Merge ^/head r338690 through r338730. Added: projects/clang700-import/lib/libc/net/hosts - copied unchanged from r338730, head/lib/libc/net/hosts projects/clang700-import/lib/libc/net/hosts.equiv - copied unchanged from r338730, head/lib/libc/net/hosts.equiv projects/clang700-import/lib/libc/net/networks - copied unchanged from r338730, head/lib/libc/net/networks projects/clang700-import/lib/libc/net/nsswitch.conf - copied unchanged from r338730, head/lib/libc/net/nsswitch.conf projects/clang700-import/lib/libc/net/protocols - copied unchanged from r338730, head/lib/libc/net/protocols Deleted: projects/clang700-import/etc/hosts projects/clang700-import/etc/hosts.equiv projects/clang700-import/etc/networks projects/clang700-import/etc/nsswitch.conf projects/clang700-import/etc/protocols Modified: projects/clang700-import/etc/Makefile projects/clang700-import/lib/libc/amd64/string/bcopy.S projects/clang700-import/lib/libc/i386/string/bcopy.S projects/clang700-import/lib/libc/net/Makefile.inc projects/clang700-import/sys/amd64/amd64/machdep.c projects/clang700-import/sys/amd64/amd64/pmap.c projects/clang700-import/sys/amd64/amd64/support.S projects/clang700-import/sys/amd64/amd64/trap.c projects/clang700-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c projects/clang700-import/sys/dev/ichiic/ig4_pci.c projects/clang700-import/sys/net/if_gre.c projects/clang700-import/sys/netpfil/pf/pf.c projects/clang700-import/sys/x86/isa/atpic.c Directory Properties: projects/clang700-import/ (props changed) projects/clang700-import/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang700-import/etc/Makefile ============================================================================== --- projects/clang700-import/etc/Makefile Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/etc/Makefile Mon Sep 17 19:05:32 2018 (r338731) @@ -16,18 +16,13 @@ BIN1= \ dhclient.conf \ disktab \ group \ - hosts \ hosts.allow \ - hosts.equiv \ libalias.conf \ libmap.conf \ login.access \ mac.conf \ netconfig \ - networks \ - nsswitch.conf \ phones \ - protocols \ rc.bsdextended \ rc.firewall \ remote \ @@ -159,10 +154,6 @@ distribution: ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif -.endif -.if ${MK_NIS} == "no" - sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ - ${DESTDIR}/etc/nsswitch.conf .endif MTREE_CMD?= mtree Modified: projects/clang700-import/lib/libc/amd64/string/bcopy.S ============================================================================== --- projects/clang700-import/lib/libc/amd64/string/bcopy.S Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/lib/libc/amd64/string/bcopy.S Mon Sep 17 19:05:32 2018 (r338731) @@ -66,6 +66,9 @@ ENTRY(bcopy) movsq movq %rdx,%rcx andq $7,%rcx /* any bytes left? */ + jne 2f + ret +2: rep movsb ret @@ -73,11 +76,13 @@ ENTRY(bcopy) addq %rcx,%rdi /* copy backwards. */ addq %rcx,%rsi std - andq $7,%rcx /* any fractional bytes? */ decq %rdi decq %rsi + andq $7,%rcx /* any fractional bytes? */ + je 3f rep movsb +3: movq %rdx,%rcx /* copy remainder by words */ shrq $3,%rcx subq $7,%rsi Modified: projects/clang700-import/lib/libc/i386/string/bcopy.S ============================================================================== --- projects/clang700-import/lib/libc/i386/string/bcopy.S Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/lib/libc/i386/string/bcopy.S Mon Sep 17 19:05:32 2018 (r338731) @@ -64,7 +64,7 @@ ENTRY(bcopy) movl %edi,%edx subl %esi,%edx cmpl %ecx,%edx /* overlapping? */ - jb 1f + jb 2f cld /* nope, copy forwards. */ movl %ecx,%edx shrl $2,%ecx /* copy by words */ @@ -72,21 +72,28 @@ ENTRY(bcopy) movsl movl %edx,%ecx andl $3,%ecx /* any bytes left? */ + jne 1f + popl %edi + popl %esi + ret +1: rep movsb popl %edi popl %esi ret -1: +2: addl %ecx,%edi /* copy backwards. */ addl %ecx,%esi std movl %ecx,%edx - andl $3,%ecx /* any fractional bytes? */ decl %edi decl %esi + andl $3,%ecx /* any fractional bytes? */ + je 3f rep movsb +3: movl %edx,%ecx /* copy remainder by words */ shrl $2,%ecx subl $3,%esi Modified: projects/clang700-import/lib/libc/net/Makefile.inc ============================================================================== --- projects/clang700-import/lib/libc/net/Makefile.inc Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/lib/libc/net/Makefile.inc Mon Sep 17 19:05:32 2018 (r338731) @@ -4,6 +4,7 @@ # machine-independent net sources .PATH: ${LIBC_SRCTOP}/net +CONFS+= net/hosts net/hosts.equiv net/networks net/nsswitch.conf net/protocols SRCS+= base64.c ether_addr.c eui64.c \ gai_strerror.c getaddrinfo.c \ gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \ @@ -123,3 +124,8 @@ SRCS+= hesiod.c MAN+= hesiod.3 .endif +.if ${MK_NIS} == "no" +afterinstallconfig: + sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ + ${DESTDIR}/etc/nsswitch.conf +.endif Copied: projects/clang700-import/lib/libc/net/hosts (from r338730, head/lib/libc/net/hosts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang700-import/lib/libc/net/hosts Mon Sep 17 19:05:32 2018 (r338731, copy of r338730, head/lib/libc/net/hosts) @@ -0,0 +1,31 @@ +# $FreeBSD$ +# +# Host Database +# +# This file should contain the addresses and aliases for local hosts that +# share this file. Replace 'my.domain' below with the domainname of your +# machine. +# +# In the presence of the domain name service or NIS, this file may +# not be consulted at all; see /etc/nsswitch.conf for the resolution order. +# +# +::1 localhost localhost.my.domain +127.0.0.1 localhost localhost.my.domain +# +# Imaginary network. +#10.0.0.2 myname.my.domain myname +#10.0.0.3 myfriend.my.domain myfriend +# +# According to RFC 1918, you can use the following IP networks for +# private nets which will never be connected to the Internet: +# +# 10.0.0.0 - 10.255.255.255 +# 172.16.0.0 - 172.31.255.255 +# 192.168.0.0 - 192.168.255.255 +# +# In case you want to be able to connect to the Internet, you need +# real official assigned numbers. Do not try to invent your own network +# numbers but instead get one from your network provider (if any) or +# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.) +# Copied: projects/clang700-import/lib/libc/net/hosts.equiv (from r338730, head/lib/libc/net/hosts.equiv) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang700-import/lib/libc/net/hosts.equiv Mon Sep 17 19:05:32 2018 (r338731, copy of r338730, head/lib/libc/net/hosts.equiv) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +#localhost +#my_very_good_friend.domain Copied: projects/clang700-import/lib/libc/net/networks (from r338730, head/lib/libc/net/networks) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang700-import/lib/libc/net/networks Mon Sep 17 19:05:32 2018 (r338731, copy of r338730, head/lib/libc/net/networks) @@ -0,0 +1,17 @@ +# $FreeBSD$ +# @(#)networks 5.1 (Berkeley) 6/30/90 +# +# Your Local Networks Database +# +your-net 127 # your comment +your-netmask 255.255.255 # subnet mask for your-net + +# +# Your subnets +# +subnet1 127.0.1 alias1 # comment 1 +subnet2 127.0.2 alias2 # comment 2 + +# +# Internet networks (from nic.ddn.mil) +# Copied: projects/clang700-import/lib/libc/net/nsswitch.conf (from r338730, head/lib/libc/net/nsswitch.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang700-import/lib/libc/net/nsswitch.conf Mon Sep 17 19:05:32 2018 (r338731, copy of r338730, head/lib/libc/net/nsswitch.conf) @@ -0,0 +1,16 @@ +# +# nsswitch.conf(5) - name service switch configuration file +# $FreeBSD$ +# +group: compat +group_compat: nis +hosts: files dns +netgroup: compat +networks: files +passwd: compat +passwd_compat: nis +shells: files +services: compat +services_compat: nis +protocols: files +rpc: files Copied: projects/clang700-import/lib/libc/net/protocols (from r338730, head/lib/libc/net/protocols) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang700-import/lib/libc/net/protocols Mon Sep 17 19:05:32 2018 (r338731, copy of r338730, head/lib/libc/net/protocols) @@ -0,0 +1,158 @@ +# +# Internet protocols +# +# $FreeBSD$ +# from: @(#)protocols 5.1 (Berkeley) 4/17/89 +# +# See also http://www.iana.org/assignments/protocol-numbers +# +ip 0 IP # internet protocol, pseudo protocol number +#hopopt 0 HOPOPT # hop-by-hop options for ipv6 +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # internet group management protocol +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st2 5 ST2 # ST2 datagram mode (RFC 1819) (officially ``ST'') +tcp 6 TCP # transmission control protocol +cbt 7 CBT # CBT, Tony Ballardie +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco: for IGRP) +bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring +nvp 11 NVP-II # Network Voice Protocol +pup 12 PUP # PARC universal packet protocol +argus 13 ARGUS # ARGUS +emcon 14 EMCON # EMCON +xnet 15 XNET # Cross Net Debugger +chaos 16 CHAOS # Chaos +udp 17 UDP # user datagram protocol +mux 18 MUX # Multiplexing protocol +dcn 19 DCN-MEAS # DCN Measurement Subsystems +hmp 20 HMP # host monitoring protocol +prm 21 PRM # packet radio measurement protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +trunk-1 23 TRUNK-1 # Trunk-1 +trunk-2 24 TRUNK-2 # Trunk-2 +leaf-1 25 LEAF-1 # Leaf-1 +leaf-2 26 LEAF-2 # Leaf-2 +rdp 27 RDP # "reliable datagram" protocol +irtp 28 IRTP # Internet Reliable Transaction Protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4 +netblt 30 NETBLT # Bulk Data Transfer Protocol +mfe-nsp 31 MFE-NSP # MFE Network Services Protocol +merit-inp 32 MERIT-INP # MERIT Internodal Protocol +dccp 33 DCCP # Datagram Congestion Control Protocol +3pc 34 3PC # Third Party Connect Protocol +idpr 35 IDPR # Inter-Domain Policy Routing Protocol +xtp 36 XTP # Xpress Transfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto +tp++ 39 TP++ # TP++ Transport Protocol +il 40 IL # IL Transport Protocol +ipv6 41 IPV6 # ipv6 +sdrp 42 SDRP # Source Demand Routing Protocol +ipv6-route 43 IPV6-ROUTE # routing header for ipv6 +ipv6-frag 44 IPV6-FRAG # fragment header for ipv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Resource ReSerVation Protocol +gre 47 GRE # Generic Routing Encapsulation +dsr 48 DSR # Dynamic Source Routing Protocol +bna 49 BNA # BNA +esp 50 ESP # encapsulating security payload +ah 51 AH # authentication header +i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA +swipe 53 SWIPE # IP with Encryption +narp 54 NARP # NBMA Address Resolution Protocol +mobile 55 MOBILE # IP Mobility +tlsp 56 TLSP # Transport Layer Security Protocol +skip 57 SKIP # SKIP +ipv6-icmp 58 IPV6-ICMP icmp6 # ICMP for IPv6 +ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6 +ipv6-opts 60 IPV6-OPTS # destination options for ipv6 +# 61 # any host internal protocol +cftp 62 CFTP # CFTP +# 63 # any local network +sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK +kryptolan 65 KRYPTOLAN # Kryptolan +rvd 66 RVD # MIT Remote Virtual Disk Protocol +ippc 67 IPPC # Internet Pluribus Packet Core +# 68 # any distributed filesystem +sat-mon 69 SAT-MON # SATNET Monitoring +visa 70 VISA # VISA Protocol +ipcv 71 IPCV # Internet Packet Core Utility +cpnx 72 CPNX # Computer Protocol Network Executive +cphb 73 CPHB # Computer Protocol Heart Beat +wsn 74 WSN # Wang Span Network +pvp 75 PVP # Packet Video Protocol +br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring +sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary +wb-mon 78 WB-MON # WIDEBAND Monitoring +wb-expak 79 WB-EXPAK # WIDEBAND EXPAK +iso-ip 80 ISO-IP # ISO Internet Protocol +vmtp 81 VMTP # Versatile Message Transport +secure-vmtp 82 SECURE-VMTP # SECURE-VMTP +vines 83 VINES # VINES +ttp 84 TTP # TTP +#iptm 84 IPTM # Protocol Internet Protocol Traffic +nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP +dgp 86 DGP # Dissimilar Gateway Protocol +tcf 87 TCF # TCF +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol +larp 91 LARP # Locus Address Resolution Protocol +mtp 92 MTP # Multicast Transport Protocol +ax.25 93 AX.25 # AX.25 Frames +ipip 94 IPIP # Yet Another IP encapsulation +micp 95 MICP # Mobile Internetworking Control Pro. +scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro. +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation +encap 98 ENCAP # Yet Another IP encapsulation +# 99 # any private encryption scheme +gmtp 100 GMTP # GMTP +ifmp 101 IFMP # Ipsilon Flow Management Protocol +pnni 102 PNNI # PNNI over IP +pim 103 PIM # Protocol Independent Multicast +aris 104 ARIS # ARIS +scps 105 SCPS # SCPS +qnx 106 QNX # QNX +a/n 107 A/N # Active Networks +ipcomp 108 IPComp # IP Payload Compression Protocol +snp 109 SNP # Sitara Networks Protocol +compaq-peer 110 Compaq-Peer # Compaq Peer Protocol +ipx-in-ip 111 IPX-in-IP # IPX in IP +carp 112 CARP vrrp # Common Address Redundancy Protocol +pgm 113 PGM # PGM Reliable Transport Protocol +# 114 # any 0-hop protocol +l2tp 115 L2TP # Layer Two Tunneling Protocol +ddx 116 DDX # D-II Data Exchange +iatp 117 IATP # Interactive Agent Transfer Protocol +stp 118 STP # Schedule Transfer Protocol +srp 119 SRP # SpectraLink Radio Protocol +uti 120 UTI # UTI +smp 121 SMP # Simple Message Protocol +sm 122 SM # SM +ptp 123 PTP # Performance Transparency Protocol +isis 124 ISIS # ISIS over IPv4 +fire 125 FIRE +crtp 126 CRTP # Combat Radio Transport Protocol +crudp 127 CRUDP # Combat Radio User Datagram +sscopmce 128 SSCOPMCE +iplt 129 IPLT +sps 130 SPS # Secure Packet Shield +pipe 131 PIPE # Private IP Encapsulation within IP +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +rsvp-e2e-ignore 134 RSVP-E2E-IGNORE # Aggregation of RSVP for IP reservations +mobility-header 135 Mobility-Header # Mobility Support in IPv6 +udplite 136 UDPLite # The UDP-Lite Protocol +mpls-in-ip 137 MPLS-IN-IP # Encapsulating MPLS in IP +manet 138 MANET # MANET Protocols (RFC5498) +hip 139 HIP # Host Identity Protocol (RFC5201) +shim6 140 SHIM6 # Shim6 Protocol (RFC5533) +wesp 141 WESP # Wrapped Encapsulating Security Payload (RFC5840) +rohc 142 ROHC # Robust Header Compression (RFC5858) +# 138-254 # Unassigned +pfsync 240 PFSYNC # PF Synchronization +# 253-254 # Use for experimentation and testing (RFC3692) +# 255 # Reserved +divert 258 DIVERT # Divert pseudo-protocol [non IANA] Modified: projects/clang700-import/sys/amd64/amd64/machdep.c ============================================================================== --- projects/clang700-import/sys/amd64/amd64/machdep.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/amd64/amd64/machdep.c Mon Sep 17 19:05:32 2018 (r338731) @@ -1581,6 +1581,21 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) */ identify_cpu2(); + /* + * Check for pti, pcid, and invpcid before ifuncs are + * resolved, to correctly select the implementation for + * pmap_activate_sw_mode(). + */ + pti = pti_get_default(); + TUNABLE_INT_FETCH("vm.pmap.pti", &pti); + TUNABLE_INT_FETCH("vm.pmap.pcid_enabled", &pmap_pcid_enabled); + if ((cpu_feature2 & CPUID2_PCID) != 0 && pmap_pcid_enabled) { + invpcid_works = (cpu_stdext_feature & + CPUID_STDEXT_INVPCID) != 0; + } else { + pmap_pcid_enabled = 0; + } + link_elf_ireloc(kmdp); /* @@ -1645,9 +1660,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) mtx_init(&dt_lock, "descriptor tables", NULL, MTX_DEF); /* exceptions */ - pti = pti_get_default(); - TUNABLE_INT_FETCH("vm.pmap.pti", &pti); - for (x = 0; x < NIDT; x++) setidt(x, pti ? &IDTVEC(rsvd_pti) : &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); Modified: projects/clang700-import/sys/amd64/amd64/pmap.c ============================================================================== --- projects/clang700-import/sys/amd64/amd64/pmap.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/amd64/amd64/pmap.c Mon Sep 17 19:05:32 2018 (r338731) @@ -146,6 +146,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1179,11 +1180,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) pmap_init_pat(); /* Initialize TLB Context Id. */ - TUNABLE_INT_FETCH("vm.pmap.pcid_enabled", &pmap_pcid_enabled); - if ((cpu_feature2 & CPUID2_PCID) != 0 && pmap_pcid_enabled) { - /* Check for INVPCID support */ - invpcid_works = (cpu_stdext_feature & CPUID_STDEXT_INVPCID) - != 0; + if (pmap_pcid_enabled) { for (i = 0; i < MAXCPU; i++) { kernel_pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN; kernel_pmap->pm_pcids[i].pm_gen = 1; @@ -1204,8 +1201,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) * during pcpu setup. */ load_cr4(rcr4() | CR4_PCIDE); - } else { - pmap_pcid_enabled = 0; } } @@ -7441,17 +7436,177 @@ pmap_pcid_alloc(pmap_t pmap, u_int cpuid) return (0); } +static uint64_t +pmap_pcid_alloc_checked(pmap_t pmap, u_int cpuid) +{ + uint64_t cached; + + cached = pmap_pcid_alloc(pmap, cpuid); + KASSERT(pmap->pm_pcids[cpuid].pm_pcid >= 0 && + pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, + ("pmap %p cpu %d pcid %#x", pmap, cpuid, + pmap->pm_pcids[cpuid].pm_pcid)); + KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || + pmap == kernel_pmap, + ("non-kernel pmap pmap %p cpu %d pcid %#x", + pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); + return (cached); +} + +static void +pmap_activate_sw_pti_post(pmap_t pmap) +{ + + if (pmap->pm_ucr3 != PMAP_NO_CR3) + PCPU_GET(tssp)->tss_rsp0 = ((vm_offset_t)PCPU_PTR(pti_stack) + + PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful; +} + +static void inline +pmap_activate_sw_pcid_pti(pmap_t pmap, u_int cpuid, const bool invpcid_works1) +{ + struct invpcid_descr d; + uint64_t cached, cr3, kcr3, ucr3; + + cached = pmap_pcid_alloc_checked(pmap, cpuid); + cr3 = rcr3(); + if ((cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) + load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid); + PCPU_SET(curpmap, pmap); + kcr3 = pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid; + ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[cpuid].pm_pcid | + PMAP_PCID_USER_PT; + + if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) { + /* + * Explicitly invalidate translations cached from the + * user page table. They are not automatically + * flushed by reload of cr3 with the kernel page table + * pointer above. + * + * Note that the if() condition is resolved statically + * by using the function argument instead of + * runtime-evaluated invpcid_works value. + */ + if (invpcid_works1) { + d.pcid = PMAP_PCID_USER_PT | + pmap->pm_pcids[cpuid].pm_pcid; + d.pad = 0; + d.addr = 0; + invpcid(&d, INVPCID_CTX); + } else { + pmap_pti_pcid_invalidate(ucr3, kcr3); + } + } + + PCPU_SET(kcr3, kcr3 | CR3_PCID_SAVE); + PCPU_SET(ucr3, ucr3 | CR3_PCID_SAVE); + if (cached) + PCPU_INC(pm_save_cnt); +} + +static void +pmap_activate_sw_pcid_invpcid_pti(pmap_t pmap, u_int cpuid) +{ + + pmap_activate_sw_pcid_pti(pmap, cpuid, true); + pmap_activate_sw_pti_post(pmap); +} + +static void +pmap_activate_sw_pcid_noinvpcid_pti(pmap_t pmap, u_int cpuid) +{ + register_t rflags; + + /* + * If the INVPCID instruction is not available, + * invltlb_pcid_handler() is used to handle an invalidate_all + * IPI, which checks for curpmap == smp_tlb_pmap. The below + * sequence of operations has a window where %CR3 is loaded + * with the new pmap's PML4 address, but the curpmap value has + * not yet been updated. This causes the invltlb IPI handler, + * which is called between the updates, to execute as a NOP, + * which leaves stale TLB entries. + * + * Note that the most typical use of pmap_activate_sw(), from + * the context switch, is immune to this race, because + * interrupts are disabled (while the thread lock is owned), + * and the IPI happens after curpmap is updated. Protect + * other callers in a similar way, by disabling interrupts + * around the %cr3 register reload and curpmap assignment. + */ + rflags = intr_disable(); + pmap_activate_sw_pcid_pti(pmap, cpuid, false); + intr_restore(rflags); + pmap_activate_sw_pti_post(pmap); +} + +static void +pmap_activate_sw_pcid_nopti(pmap_t pmap, u_int cpuid) +{ + uint64_t cached, cr3; + + cached = pmap_pcid_alloc_checked(pmap, cpuid); + cr3 = rcr3(); + if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) + load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | + cached); + PCPU_SET(curpmap, pmap); + if (cached) + PCPU_INC(pm_save_cnt); +} + +static void +pmap_activate_sw_pcid_noinvpcid_nopti(pmap_t pmap, u_int cpuid) +{ + register_t rflags; + + rflags = intr_disable(); + pmap_activate_sw_pcid_nopti(pmap, cpuid); + intr_restore(rflags); +} + +static void +pmap_activate_sw_nopcid_nopti(pmap_t pmap, u_int cpuid __unused) +{ + + load_cr3(pmap->pm_cr3); + PCPU_SET(curpmap, pmap); +} + +static void +pmap_activate_sw_nopcid_pti(pmap_t pmap, u_int cpuid __unused) +{ + + pmap_activate_sw_nopcid_nopti(pmap, cpuid); + PCPU_SET(kcr3, pmap->pm_cr3); + PCPU_SET(ucr3, pmap->pm_ucr3); + pmap_activate_sw_pti_post(pmap); +} + +DEFINE_IFUNC(static, void, pmap_activate_sw_mode, (pmap_t, u_int), static) +{ + + if (pmap_pcid_enabled && pti && invpcid_works) + return (pmap_activate_sw_pcid_invpcid_pti); + else if (pmap_pcid_enabled && pti && !invpcid_works) + return (pmap_activate_sw_pcid_noinvpcid_pti); + else if (pmap_pcid_enabled && !pti && invpcid_works) + return (pmap_activate_sw_pcid_nopti); + else if (pmap_pcid_enabled && !pti && !invpcid_works) + return (pmap_activate_sw_pcid_noinvpcid_nopti); + else if (!pmap_pcid_enabled && pti) + return (pmap_activate_sw_nopcid_pti); + else /* if (!pmap_pcid_enabled && !pti) */ + return (pmap_activate_sw_nopcid_nopti); +} + void pmap_activate_sw(struct thread *td) { pmap_t oldpmap, pmap; - struct invpcid_descr d; - uint64_t cached, cr3, kcr3, kern_pti_cached, rsp0, ucr3; - register_t rflags; u_int cpuid; - struct amd64tss *tssp; - rflags = 0; oldpmap = PCPU_GET(curpmap); pmap = vmspace_pmap(td->td_proc->p_vmspace); if (oldpmap == pmap) @@ -7462,91 +7617,7 @@ pmap_activate_sw(struct thread *td) #else CPU_SET(cpuid, &pmap->pm_active); #endif - cr3 = rcr3(); - if (pmap_pcid_enabled) { - cached = pmap_pcid_alloc(pmap, cpuid); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid >= 0 && - pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, - ("pmap %p cpu %d pcid %#x", pmap, cpuid, - pmap->pm_pcids[cpuid].pm_pcid)); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || - pmap == kernel_pmap, - ("non-kernel pmap thread %p pmap %p cpu %d pcid %#x", - td, pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); - - /* - * If the INVPCID instruction is not available, - * invltlb_pcid_handler() is used for handle - * invalidate_all IPI, which checks for curpmap == - * smp_tlb_pmap. Below operations sequence has a - * window where %CR3 is loaded with the new pmap's - * PML4 address, but curpmap value is not yet updated. - * This causes invltlb IPI handler, called between the - * updates, to execute as NOP, which leaves stale TLB - * entries. - * - * Note that the most typical use of - * pmap_activate_sw(), from the context switch, is - * immune to this race, because interrupts are - * disabled (while the thread lock is owned), and IPI - * happens after curpmap is updated. Protect other - * callers in a similar way, by disabling interrupts - * around the %cr3 register reload and curpmap - * assignment. - */ - if (!invpcid_works) - rflags = intr_disable(); - - kern_pti_cached = pti ? 0 : cached; - if (!kern_pti_cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) { - load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | - kern_pti_cached); - } - PCPU_SET(curpmap, pmap); - if (pti) { - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid; - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[cpuid].pm_pcid | - PMAP_PCID_USER_PT; - - if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) { - /* - * Manually invalidate translations cached - * from the user page table. They are not - * flushed by reload of cr3 with the kernel - * page table pointer above. - */ - if (invpcid_works) { - d.pcid = PMAP_PCID_USER_PT | - pmap->pm_pcids[cpuid].pm_pcid; - d.pad = 0; - d.addr = 0; - invpcid(&d, INVPCID_CTX); - } else { - pmap_pti_pcid_invalidate(ucr3, kcr3); - } - } - - PCPU_SET(kcr3, kcr3 | CR3_PCID_SAVE); - PCPU_SET(ucr3, ucr3 | CR3_PCID_SAVE); - } - if (!invpcid_works) - intr_restore(rflags); - if (cached) - PCPU_INC(pm_save_cnt); - } else { - load_cr3(pmap->pm_cr3); - PCPU_SET(curpmap, pmap); - if (pti) { - PCPU_SET(kcr3, pmap->pm_cr3); - PCPU_SET(ucr3, pmap->pm_ucr3); - } - } - if (pmap->pm_ucr3 != PMAP_NO_CR3) { - rsp0 = ((vm_offset_t)PCPU_PTR(pti_stack) + - PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful; - tssp = PCPU_GET(tssp); - tssp->tss_rsp0 = rsp0; - } + pmap_activate_sw_mode(pmap, cpuid); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); #else Modified: projects/clang700-import/sys/amd64/amd64/support.S ============================================================================== --- projects/clang700-import/sys/amd64/amd64/support.S Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/amd64/amd64/support.S Mon Sep 17 19:05:32 2018 (r338731) @@ -108,40 +108,40 @@ END(sse2_pagezero) */ ENTRY(memmove_std) PUSH_FRAME_POINTER - movq %rdi,%r9 + movq %rdi,%rax movq %rdx,%rcx - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping && src < dst? */ - jb 1f + movq %rdi,%r8 + subq %rsi,%r8 + cmpq %rcx,%r8 /* overlapping && src < dst? */ + jb 2f shrq $3,%rcx /* copy by 64-bit words */ rep movsq movq %rdx,%rcx andq $7,%rcx /* any bytes left? */ - jne 2f - movq %r9,%rax + jne 1f POP_FRAME_POINTER ret -2: +1: rep movsb - movq %r9,%rax POP_FRAME_POINTER ret /* ALIGN_TEXT */ -1: +2: addq %rcx,%rdi /* copy backwards */ addq %rcx,%rsi decq %rdi decq %rsi - andq $7,%rcx /* any fractional bytes? */ std + andq $7,%rcx /* any fractional bytes? */ + je 3f rep movsb +3: movq %rdx,%rcx /* copy remainder by 32-bit words */ shrq $3,%rcx subq $7,%rsi @@ -149,24 +149,22 @@ ENTRY(memmove_std) rep movsq cld - movq %r9,%rax POP_FRAME_POINTER ret END(memmove_std) ENTRY(memmove_erms) PUSH_FRAME_POINTER - movq %rdi,%r9 + movq %rdi,%rax movq %rdx,%rcx - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping && src < dst? */ + movq %rdi,%r8 + subq %rsi,%r8 + cmpq %rcx,%r8 /* overlapping && src < dst? */ jb 1f rep movsb - movq %r9,%rax POP_FRAME_POINTER ret @@ -179,7 +177,6 @@ ENTRY(memmove_erms) rep movsb cld - movq %r9,%rax POP_FRAME_POINTER ret END(memmove_erms) Modified: projects/clang700-import/sys/amd64/amd64/trap.c ============================================================================== --- projects/clang700-import/sys/amd64/amd64/trap.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/amd64/amd64/trap.c Mon Sep 17 19:05:32 2018 (r338731) @@ -705,6 +705,17 @@ trap_is_smap(struct trapframe *frame) PGEX_P && (frame->tf_rflags & PSL_AC) == 0); } +static bool +trap_is_pti(struct trapframe *frame) +{ + + return (PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && + pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W | + PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) && + (curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK) == + (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)); +} + static int trap_pfault(struct trapframe *frame, int usermode) { @@ -806,12 +817,8 @@ trap_pfault(struct trapframe *frame, int usermode) * If nx protection of the usermode portion of kernel page * tables caused trap, panic. */ - if (usermode && PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && - pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W | - PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) && - (curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK)== - (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)) - panic("PTI: pid %d comm %s tf_err %#lx\n", p->p_pid, + if (usermode && trap_is_pti(frame)) + panic("PTI: pid %d comm %s tf_err %#lx", p->p_pid, p->p_comm, frame->tf_err); /* Modified: projects/clang700-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- projects/clang700-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Sep 17 19:05:32 2018 (r338731) @@ -415,9 +415,10 @@ vdev_geom_io(struct g_consumer *cp, int *cmds, void ** * least one valid label was found. */ static int -vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config) +vdev_geom_read_config(struct g_consumer *cp, nvlist_t **configp) { struct g_provider *pp; + nvlist_t *config; vdev_phys_t *vdev_lists[VDEV_LABELS]; char *buf; size_t buflen; @@ -442,7 +443,6 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t buflen = sizeof(vdev_lists[0]->vp_nvlist); - *config = NULL; /* Create all of the IO requests */ for (l = 0; l < VDEV_LABELS; l++) { cmds[l] = BIO_READ; @@ -458,6 +458,7 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t VDEV_LABELS); /* Parse the labels */ + config = *configp = NULL; nlabels = 0; for (l = 0; l < VDEV_LABELS; l++) { if (errors[l] != 0) @@ -465,24 +466,26 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t buf = vdev_lists[l]->vp_nvlist; - if (nvlist_unpack(buf, buflen, config, 0) != 0) + if (nvlist_unpack(buf, buflen, &config, 0) != 0) continue; - if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE, + if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, &state) != 0 || state > POOL_STATE_L2CACHE) { - nvlist_free(*config); - *config = NULL; + nvlist_free(config); continue; } if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE && - (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, + (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) != 0 || txg == 0)) { - nvlist_free(*config); - *config = NULL; + nvlist_free(config); continue; } + + if (*configp != NULL) + nvlist_free(*configp); + *configp = config; nlabels++; } Modified: projects/clang700-import/sys/dev/ichiic/ig4_pci.c ============================================================================== --- projects/clang700-import/sys/dev/ichiic/ig4_pci.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/dev/ichiic/ig4_pci.c Mon Sep 17 19:05:32 2018 (r338731) @@ -112,8 +112,8 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { PCI_CHIP_SKYLAKE_I2C_3, "Intel Sunrise Point-LP I2C Controller-3", IG4_SKYLAKE}, { PCI_CHIP_SKYLAKE_I2C_4, "Intel Sunrise Point-LP I2C Controller-4", IG4_SKYLAKE}, { PCI_CHIP_SKYLAKE_I2C_5, "Intel Sunrise Point-LP I2C Controller-5", IG4_SKYLAKE}, - { PCI_CHIP_KABYLAKE_I2C_0, "Intel Sunrise Point-LP I2C Controller-0", IG4_SKYLAKE}, - { PCI_CHIP_KABYLAKE_I2C_1, "Intel Sunrise Point-LP I2C Controller-1", IG4_SKYLAKE}, + { PCI_CHIP_KABYLAKE_I2C_0, "Intel Sunrise Point-H I2C Controller-0", IG4_SKYLAKE}, + { PCI_CHIP_KABYLAKE_I2C_1, "Intel Sunrise Point-H I2C Controller-1", IG4_SKYLAKE}, { PCI_CHIP_APL_I2C_0, "Intel Apollo Lake I2C Controller-0", IG4_APL}, { PCI_CHIP_APL_I2C_1, "Intel Apollo Lake I2C Controller-1", IG4_APL}, { PCI_CHIP_APL_I2C_2, "Intel Apollo Lake I2C Controller-2", IG4_APL}, Modified: projects/clang700-import/sys/net/if_gre.c ============================================================================== --- projects/clang700-import/sys/net/if_gre.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/net/if_gre.c Mon Sep 17 19:05:32 2018 (r338731) @@ -569,6 +569,8 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) goto drop; } af = m->m_pkthdr.csum_data; + BPF_MTAP2(ifp, &af, sizeof(af), m); + m->m_flags &= ~(M_BCAST|M_MCAST); M_SETFIB(m, sc->gre_fibnum); M_PREPEND(m, sc->gre_hlen, M_NOWAIT); if (m == NULL) { Modified: projects/clang700-import/sys/netpfil/pf/pf.c ============================================================================== --- projects/clang700-import/sys/netpfil/pf/pf.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/netpfil/pf/pf.c Mon Sep 17 19:05:32 2018 (r338731) @@ -1719,24 +1719,28 @@ pf_purge_expired_states(u_int i, int maxcheck) while (maxcheck > 0) { ih = &V_pf_idhash[i]; + + /* only take the lock if we expect to do work */ + if (!LIST_EMPTY(&ih->states)) { relock: - PF_HASHROW_LOCK(ih); - LIST_FOREACH(s, &ih->states, entry) { - if (pf_state_expires(s) <= time_uptime) { - V_pf_status.states -= - pf_unlink_state(s, PF_ENTER_LOCKED); - goto relock; + PF_HASHROW_LOCK(ih); + LIST_FOREACH(s, &ih->states, entry) { + if (pf_state_expires(s) <= time_uptime) { + V_pf_status.states -= + pf_unlink_state(s, PF_ENTER_LOCKED); + goto relock; + } + s->rule.ptr->rule_flag |= PFRULE_REFS; + if (s->nat_rule.ptr != NULL) + s->nat_rule.ptr->rule_flag |= PFRULE_REFS; + if (s->anchor.ptr != NULL) + s->anchor.ptr->rule_flag |= PFRULE_REFS; + s->kif->pfik_flags |= PFI_IFLAG_REFS; + if (s->rt_kif) + s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; } - s->rule.ptr->rule_flag |= PFRULE_REFS; - if (s->nat_rule.ptr != NULL) - s->nat_rule.ptr->rule_flag |= PFRULE_REFS; - if (s->anchor.ptr != NULL) - s->anchor.ptr->rule_flag |= PFRULE_REFS; - s->kif->pfik_flags |= PFI_IFLAG_REFS; - if (s->rt_kif) - s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; + PF_HASHROW_UNLOCK(ih); } - PF_HASHROW_UNLOCK(ih); /* Return when we hit end of hash. */ if (++i > pf_hashmask) { Modified: projects/clang700-import/sys/x86/isa/atpic.c ============================================================================== --- projects/clang700-import/sys/x86/isa/atpic.c Mon Sep 17 19:04:15 2018 (r338730) +++ projects/clang700-import/sys/x86/isa/atpic.c Mon Sep 17 19:05:32 2018 (r338731) @@ -221,14 +221,20 @@ atpic_register_sources(struct pic *pic) * that APIC ISA routing and allowing the ATPIC source for that IRQ * to leak through. We used to depend on this feature for routing * IRQ0 via mixed mode, but now we don't use mixed mode at all. + * + * To avoid the slave not register sources after the master + * registers its sources, register all IRQs when this function is + * called on the master. */ + if (ap != &atpics[MASTER]) + return; for (i = 0; i < NUM_ISA_IRQS; i++) if (intr_lookup_source(i) != NULL) return; /* Loop through all interrupt sources and add them. */ - for (i = 0, ai = atintrs + ap->at_irqbase; i < 8; i++, ai++) { - if (ap->at_irqbase + i == ICU_SLAVEID) + for (i = 0, ai = atintrs; i < NUM_ISA_IRQS; i++, ai++) { + if (i == ICU_SLAVEID) continue; intr_register_source(&ai->at_intsrc); } From owner-svn-src-projects@freebsd.org Tue Sep 18 01:47:02 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31DE01082FBF for ; Tue, 18 Sep 2018 01:47:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB87076716; Tue, 18 Sep 2018 01:47:01 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D66E11942A; Tue, 18 Sep 2018 01:47:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I1l1Ra062181; Tue, 18 Sep 2018 01:47:01 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I1l1d7062180; Tue, 18 Sep 2018 01:47:01 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809180147.w8I1l1d7062180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 18 Sep 2018 01:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338746 - projects/openssl111/secure/lib/libcrypto/amd64 X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto/amd64 X-SVN-Commit-Revision: 338746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2018 01:47:02 -0000 Author: jkim Date: Tue Sep 18 01:47:01 2018 New Revision: 338746 URL: https://svnweb.freebsd.org/changeset/base/338746 Log: Remove unused AVX2 and AVX-512 assembly files for amd64. Deleted: projects/openssl111/secure/lib/libcrypto/amd64/ecp_nistz256-avx2.S projects/openssl111/secure/lib/libcrypto/amd64/keccak1600-avx2.S projects/openssl111/secure/lib/libcrypto/amd64/keccak1600-avx512.S projects/openssl111/secure/lib/libcrypto/amd64/keccak1600-avx512vl.S From owner-svn-src-projects@freebsd.org Tue Sep 18 01:51:28 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEE4510894E3 for ; Tue, 18 Sep 2018 01:51:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 847B076A22; Tue, 18 Sep 2018 01:51:28 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F7321948B; Tue, 18 Sep 2018 01:51:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I1pSZt063361; Tue, 18 Sep 2018 01:51:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I1pSne063360; Tue, 18 Sep 2018 01:51:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809180151.w8I1pSne063360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 18 Sep 2018 01:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338747 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2018 01:51:29 -0000 Author: jkim Date: Tue Sep 18 01:51:28 2018 New Revision: 338747 URL: https://svnweb.freebsd.org/changeset/base/338747 Log: Do not generate unused AVX2 and AVX-512 assembly files for amd64. Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.asm Tue Sep 18 01:47:01 2018 (r338746) +++ projects/openssl111/secure/lib/libcrypto/Makefile.asm Tue Sep 18 01:51:28 2018 (r338747) @@ -75,7 +75,7 @@ SRCS+= cmll-x86_64.pl SRCS+= chacha-x86_64.pl # ec -SRCS+= ecp_nistz256-avx2.pl ecp_nistz256-x86_64.pl x25519-x86_64.pl +SRCS+= ecp_nistz256-x86_64.pl x25519-x86_64.pl # engines SRCS+= e_padlock-x86_64.pl @@ -93,8 +93,7 @@ SRCS+= poly1305-x86_64.pl SRCS+= rc4-md5-x86_64.pl rc4-x86_64.pl # sha -SRCS+= keccak1600-avx2.pl keccak1600-avx512.pl keccak1600-avx512vl.pl \ - keccak1600-x86_64.pl sha1-mb-x86_64.pl sha1-x86_64.pl \ +SRCS+= keccak1600-x86_64.pl sha1-mb-x86_64.pl sha1-x86_64.pl \ sha256-mb-x86_64.pl # whrlpool From owner-svn-src-projects@freebsd.org Wed Sep 19 00:06:49 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 711ED10AC5F7 for ; Wed, 19 Sep 2018 00:06:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A17889BD6; Wed, 19 Sep 2018 00:06:49 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3AED27267; Wed, 19 Sep 2018 00:06:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J06m9m057559; Wed, 19 Sep 2018 00:06:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J06mls057558; Wed, 19 Sep 2018 00:06:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190006.w8J06mls057558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 00:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338763 - projects/openssl111/secure/lib/libcrypto/engines X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto/engines X-SVN-Commit-Revision: 338763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 00:06:49 -0000 Author: jkim Date: Wed Sep 19 00:06:48 2018 New Revision: 338763 URL: https://svnweb.freebsd.org/changeset/base/338763 Log: Do not build engines for now. Modified: projects/openssl111/secure/lib/libcrypto/engines/Makefile Modified: projects/openssl111/secure/lib/libcrypto/engines/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/engines/Makefile Tue Sep 18 22:41:30 2018 (r338762) +++ projects/openssl111/secure/lib/libcrypto/engines/Makefile Wed Sep 19 00:06:48 2018 (r338763) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= lib4758cca libaep libatalla libcapi libchil libcswift libgost \ - libnuron libsureware libubsec +#SUBDIR= lib4758cca libaep libatalla libcapi libchil libcswift libgost \ +# libnuron libsureware libubsec SUBDIR_PARALLEL= .include From owner-svn-src-projects@freebsd.org Wed Sep 19 00:07:11 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5C5010AC60A for ; Wed, 19 Sep 2018 00:07:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9374389CBC; Wed, 19 Sep 2018 00:07:10 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7448C27268; Wed, 19 Sep 2018 00:07:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J07A86057624; Wed, 19 Sep 2018 00:07:10 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J07Aak057623; Wed, 19 Sep 2018 00:07:10 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190007.w8J07Aak057623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 00:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338764 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 00:07:11 -0000 Author: jkim Date: Wed Sep 19 00:07:09 2018 New Revision: 338764 URL: https://svnweb.freebsd.org/changeset/base/338764 Log: Build libcrypto for amd64. Modified: projects/openssl111/secure/lib/libcrypto/Makefile projects/openssl111/secure/lib/libcrypto/Makefile.inc Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Wed Sep 19 00:06:48 2018 (r338763) +++ projects/openssl111/secure/lib/libcrypto/Makefile Wed Sep 19 00:07:09 2018 (r338764) @@ -16,420 +16,369 @@ NO_LINT= .endif .include "Makefile.inc" -.if defined(NOTYET) -MAN+= config.5 des_modes.7 -.endif - -# base sources -SRCS= cpt_err.c cryptlib.c cversion.c ex_data.c mem.c mem_dbg.c o_dir.c \ - o_fips.c o_init.c o_str.c o_time.c uid.c -.if defined(ASM_aarch64) -SRCS+= arm64cpuid.S armcap.c mem_clr.c -ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto -.elif defined(ASM_amd64) +SRCS= cpt_err.c cryptlib.c ctype.c cversion.c ex_data.c init.c mem.c +SRCS+= mem_dbg.c mem_sec.c o_dir.c o_fips.c o_fopen.c o_init.c o_str.c +SRCS+= o_time.c threads_pthread.c uid.c +.if defined(ASM_amd64) SRCS+= x86_64cpuid.S -.elif defined(ASM_arm) -SRCS+= armcap.c armv4cpuid.S -.elif defined(ASM_i386) -SRCS+= x86cpuid.S .else SRCS+= mem_clr.c .endif -INCS+= crypto.h ebcdic.h opensslv.h ossl_typ.h symhacks.h ../e_os2.h # aes -SRCS+= aes_cfb.c aes_ctr.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c -.if defined(ASM_aarch64) -SRCS+= aes_cbc.c aes_core.c aesv8-armx.S -ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto -.elif defined(ASM_amd64) -SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S \ - aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S -.elif defined(ASM_arm) -SRCS+= aes-armv4.S aes_cbc.c aesv8-armx.S bsaes-armv7.S -.elif defined(ASM_i386) -SRCS+= aes-586.S aesni-x86.S vpaes-x86.S +SRCS+= aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c +.if defined(ASM_amd64) +SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S +SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S .else SRCS+= aes_cbc.c aes_core.c .endif -INCS+= aes.h +# aria +SRCS+= aria.c + # asn1 -SRCS+= a_bitstr.c a_bool.c a_bytes.c a_d2i_fp.c a_digest.c a_dup.c a_enum.c \ - a_gentm.c a_i2d_fp.c a_int.c a_mbstr.c a_object.c a_octet.c a_print.c \ - a_set.c a_sign.c a_strex.c a_strnid.c a_time.c a_type.c a_utctm.c \ - a_utf8.c a_verify.c ameth_lib.c asn1_err.c asn1_gen.c asn1_lib.c \ - asn1_par.c asn_mime.c asn_moid.c asn_pack.c bio_asn1.c bio_ndef.c \ - d2i_pr.c d2i_pu.c evp_asn1.c f_enum.c f_int.c f_string.c i2d_pr.c \ - i2d_pu.c n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c p8_pkey.c t_bitst.c \ - t_crl.c t_pkey.c t_req.c t_spki.c t_x509.c t_x509a.c tasn_dec.c \ - tasn_enc.c tasn_fre.c tasn_new.c tasn_prn.c tasn_typ.c tasn_utl.c \ - x_algor.c x_attrib.c x_bignum.c x_crl.c x_exten.c x_info.c x_long.c \ - x_name.c x_nx509.c x_pkey.c x_pubkey.c x_req.c x_sig.c x_spki.c \ - x_val.c x_x509.c x_x509a.c -INCS+= asn1.h asn1_mac.h asn1t.h +SRCS+= a_bitstr.c a_d2i_fp.c a_digest.c a_dup.c a_gentm.c a_i2d_fp.c +SRCS+= a_int.c a_mbstr.c a_object.c a_octet.c a_print.c a_sign.c a_strex.c +SRCS+= a_strnid.c a_time.c a_type.c a_utctm.c a_utf8.c a_verify.c +SRCS+= ameth_lib.c asn1_err.c asn1_gen.c asn1_item_list.c asn1_lib.c +SRCS+= asn1_par.c asn_mime.c asn_moid.c asn_mstbl.c asn_pack.c bio_asn1.c +SRCS+= bio_ndef.c d2i_pr.c d2i_pu.c evp_asn1.c f_int.c f_string.c i2d_pr.c +SRCS+= i2d_pu.c n_pkey.c nsseq.c p5_pbe.c p5_pbev2.c p5_scrypt.c p8_pkey.c +SRCS+= t_bitst.c t_pkey.c t_spki.c tasn_dec.c tasn_enc.c tasn_fre.c +SRCS+= tasn_new.c tasn_prn.c tasn_scn.c tasn_typ.c tasn_utl.c x_algor.c +SRCS+= x_bignum.c x_info.c x_int64.c x_long.c x_pkey.c x_sig.c x_spki.c +SRCS+= x_val.c +# async +SRCS+= async.c async_err.c async_posix.c async_wait.c + # bf -SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c -.if defined(ASM_i386) -.if ${MACHINE_CPU:Mi686} -SRCS+= bf-686.S -.else -SRCS+= bf-586.S -.endif -.else -SRCS+= bf_enc.c -.endif -INCS+= blowfish.h +SRCS+= bf_cfb64.c bf_ecb.c bf_enc.c bf_ofb64.c bf_skey.c # bio -SRCS+= b_dump.c b_print.c b_sock.c bf_buff.c bf_nbio.c bf_null.c bio_cb.c \ - bio_err.c bio_lib.c bss_acpt.c bss_bio.c bss_conn.c bss_dgram.c \ - bss_fd.c bss_file.c bss_log.c bss_mem.c bss_null.c bss_sock.c -INCS+= bio.h +SRCS+= b_addr.c b_dump.c b_print.c b_sock.c b_sock2.c bf_buff.c bf_lbuf.c +SRCS+= bf_nbio.c bf_null.c bio_cb.c bio_err.c bio_lib.c bio_meth.c +SRCS+= bss_acpt.c bss_bio.c bss_conn.c bss_dgram.c bss_fd.c bss_file.c +SRCS+= bss_log.c bss_mem.c bss_null.c bss_sock.c +# blake2 +SRCS+= blake2b.c blake2s.c m_blake2b.c m_blake2s.c + # bn -SRCS+= bn_add.c bn_blind.c bn_const.c bn_ctx.c bn_depr.c bn_div.c bn_err.c \ - bn_exp.c bn_exp2.c bn_gcd.c bn_gf2m.c bn_kron.c bn_lib.c bn_mod.c \ - bn_mont.c bn_mpi.c bn_mul.c bn_nist.c bn_prime.c bn_print.c bn_rand.c \ - bn_recp.c bn_shift.c bn_sqr.c bn_sqrt.c bn_word.c bn_x931p.c +SRCS+= bn_add.c bn_blind.c bn_const.c bn_ctx.c bn_depr.c bn_dh.c bn_div.c +SRCS+= bn_err.c bn_exp.c bn_exp2.c bn_gcd.c bn_gf2m.c bn_intern.c bn_kron.c +SRCS+= bn_lib.c bn_mod.c bn_mont.c bn_mpi.c bn_mul.c bn_nist.c bn_prime.c +SRCS+= bn_print.c bn_rand.c bn_recp.c bn_shift.c bn_sqr.c bn_sqrt.c +SRCS+= bn_srp.c bn_word.c bn_x931p.c .if defined(ASM_amd64) -SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S \ - x86_64-mont.S x86_64-mont5.S -.elif defined(ASM_arm) -SRCS+= armv4-mont.S armv4-gf2m.S bn_asm.c -.elif defined(ASM_i386) -SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S +SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S +SRCS+= x86_64-mont.S x86_64-mont5.S .else SRCS+= bn_asm.c .endif -INCS+= bn.h # buffer -SRCS+= buf_err.c buf_str.c buffer.c -INCS+= buffer.h +SRCS+= buf_err.c buffer.c # camellia -SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_ofb.c cmll_utl.c +SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_misc.c cmll_ofb.c .if defined(ASM_amd64) -SRCS+= cmll_misc.c cmll-x86_64.S -.elif defined(ASM_i386) -SRCS+= cmll-x86.S +SRCS+= cmll-x86_64.S .else -SRCS+= camellia.c cmll_cbc.c cmll_misc.c +SRCS+= camellia.c cmll_cbc.c .endif -INCS+= camellia.h # cast SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c -INCS+= cast.h +# chacha +.if defined(ASM_amd64) +SRCS+= chacha-x86_64.S +.else +SRCS+= chacha_enc.c +.endif + # cmac SRCS+= cm_ameth.c cm_pmeth.c cmac.c -INCS+= cmac.h # cms -SRCS+= cms_asn1.c cms_att.c cms_dd.c cms_enc.c cms_env.c cms_err.c \ - cms_ess.c cms_io.c cms_kari.c cms_lib.c cms_pwri.c cms_sd.c \ - cms_smime.c -INCS+= cms.h +SRCS+= cms_asn1.c cms_att.c cms_dd.c cms_enc.c cms_env.c cms_err.c +SRCS+= cms_ess.c cms_io.c cms_kari.c cms_lib.c cms_pwri.c cms_sd.c +SRCS+= cms_smime.c # comp -SRCS+= c_rle.c c_zlib.c comp_err.c comp_lib.c -INCS+= comp.h +SRCS+= c_zlib.c comp_err.c comp_lib.c # conf -SRCS+= conf_api.c conf_def.c conf_err.c conf_lib.c conf_mall.c conf_mod.c \ - conf_sap.c -INCS+= conf.h conf_api.h +SRCS+= conf_api.c conf_def.c conf_err.c conf_lib.c conf_mall.c conf_mod.c +SRCS+= conf_sap.c conf_ssl.c +# ct +SRCS+= ct_b64.c ct_err.c ct_log.c ct_oct.c ct_policy.c ct_prn.c ct_sct.c +SRCS+= ct_sct_ctx.c ct_vfy.c ct_x509v3.c + # des -SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c des_old.c \ - des_old2.c ecb3_enc.c ecb_enc.c ede_cbcm_enc.c enc_read.c enc_writ.c \ - fcrypt.c ofb64ede.c ofb64enc.c ofb_enc.c pcbc_enc.c qud_cksm.c \ - rand_key.c read2pwd.c rpc_enc.c set_key.c str2key.c xcbc_enc.c -.if defined(ASM_i386) -SRCS+= crypt586.S des-586.S -.else -SRCS+= des_enc.c fcrypt_b.c -.endif -INCS+= des.h des_old.h +SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c des_enc.c +SRCS+= ecb3_enc.c ecb_enc.c fcrypt.c fcrypt_b.c ofb64ede.c ofb64enc.c +SRCS+= ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c set_key.c str2key.c +SRCS+= xcbc_enc.c # dh -SRCS+= dh_ameth.c dh_asn1.c dh_check.c dh_depr.c dh_err.c dh_gen.c dh_kdf.c \ - dh_key.c dh_lib.c dh_pmeth.c dh_prn.c dh_rfc5114.c -INCS+= dh.h +SRCS+= dh_ameth.c dh_asn1.c dh_check.c dh_depr.c dh_err.c dh_gen.c dh_kdf.c +SRCS+= dh_key.c dh_lib.c dh_meth.c dh_pmeth.c dh_prn.c dh_rfc5114.c +SRCS+= dh_rfc7919.c # dsa -SRCS+= dsa_ameth.c dsa_asn1.c dsa_depr.c dsa_err.c dsa_gen.c dsa_key.c \ - dsa_lib.c dsa_ossl.c dsa_pmeth.c dsa_prn.c dsa_sign.c dsa_vrf.c -INCS+= dsa.h +SRCS+= dsa_ameth.c dsa_asn1.c dsa_depr.c dsa_err.c dsa_gen.c dsa_key.c +SRCS+= dsa_lib.c dsa_meth.c dsa_ossl.c dsa_pmeth.c dsa_prn.c dsa_sign.c +SRCS+= dsa_vrf.c # dso -SRCS+= dso_dlfcn.c dso_err.c dso_lib.c dso_openssl.c -INCS+= dso.h +SRCS+= dso_dlfcn.c dso_err.c dso_lib.c # ec -SRCS+= ec2_mult.c ec2_oct.c ec2_smpl.c ec_ameth.c ec_asn1.c ec_check.c \ - ec_curve.c ec_cvt.c ec_err.c ec_key.c ec_lib.c ec_mult.c ec_oct.c \ - ec_pmeth.c ec_print.c eck_prn.c ecp_mont.c ecp_nist.c ecp_oct.c \ - ecp_smpl.c +SRCS+= curve25519.c curve448.c curve448_tables.c ec2_oct.c ec2_smpl.c +SRCS+= ec_ameth.c ec_asn1.c ec_check.c ec_curve.c ec_cvt.c ec_err.c +SRCS+= ec_key.c ec_kmeth.c ec_lib.c ec_mult.c ec_oct.c ec_pmeth.c +SRCS+= ec_print.c ecdh_kdf.c ecdh_ossl.c ecdsa_ossl.c ecdsa_sign.c +SRCS+= ecdsa_vrf.c eck_prn.c ecp_mont.c ecp_nist.c ecp_oct.c ecp_smpl.c +SRCS+= ecx_meth.c eddsa.c f_generic.c f_impl.c scalar.c .if defined(ASM_amd64) -SRCS+= ecp_nistz256.c ecp_nistz256-x86_64.S +SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S .endif -INCS+= ec.h -# ecdh -SRCS+= ech_err.c ech_kdf.c ech_key.c ech_lib.c ech_ossl.c -INCS+= ecdh.h - -# ecdsa -SRCS+= ecs_asn1.c ecs_err.c ecs_lib.c ecs_ossl.c ecs_sign.c ecs_vrf.c -INCS+= ecdsa.h - # engine -SRCS+= eng_all.c eng_cnf.c eng_cryptodev.c eng_ctrl.c eng_dyn.c eng_err.c \ - eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c \ - eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_digest.c \ - tb_dsa.c tb_ecdh.c tb_ecdsa.c tb_pkmeth.c tb_rand.c tb_rsa.c tb_store.c -INCS+= engine.h +SRCS+= eng_all.c eng_cnf.c eng_ctrl.c eng_dyn.c eng_err.c eng_fat.c +SRCS+= eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c +SRCS+= eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_digest.c +SRCS+= tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c # err SRCS+= err.c err_all.c err_prn.c -INCS+= err.h # evp -SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \ - digest.c e_aes.c e_aes_cbc_hmac_sha1.c e_aes_cbc_hmac_sha256.c e_bf.c \ - e_camellia.c e_cast.c e_des.c e_des3.c e_idea.c e_null.c e_old.c \ - e_rc2.c e_rc4.c e_rc4_hmac_md5.c e_rc5.c e_seed.c e_xcbc_d.c encode.c \ - evp_acnf.c evp_cnf.c evp_enc.c evp_err.c evp_key.c evp_lib.c \ - evp_pbe.c evp_pkey.c m_dss.c m_dss1.c m_ecdsa.c m_md4.c m_md5.c \ - m_mdc2.c m_null.c m_ripemd.c m_sha.c m_sha1.c m_sigver.c m_wp.c \ - names.c p5_crpt.c p5_crpt2.c p_dec.c p_enc.c p_lib.c p_open.c \ - p_seal.c p_sign.c p_verify.c pmeth_fn.c pmeth_gn.c pmeth_lib.c -INCS+= evp.h +SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_allc.c c_alld.c cmeth_lib.c +SRCS+= digest.c e_aes.c e_aes_cbc_hmac_sha1.c e_aes_cbc_hmac_sha256.c +SRCS+= e_aria.c e_bf.c e_camellia.c e_cast.c e_chacha20_poly1305.c e_des.c +SRCS+= e_des3.c e_idea.c e_null.c e_old.c e_rc2.c e_rc4.c e_rc4_hmac_md5.c +SRCS+= e_rc5.c e_seed.c e_sm4.c e_xcbc_d.c encode.c evp_cnf.c evp_enc.c +SRCS+= evp_err.c evp_key.c evp_lib.c evp_pbe.c evp_pkey.c m_md4.c m_md5.c +SRCS+= m_md5_sha1.c m_mdc2.c m_null.c m_ripemd.c m_sha1.c m_sha3.c +SRCS+= m_sigver.c m_wp.c names.c p5_crpt.c p5_crpt2.c p_dec.c p_enc.c +SRCS+= p_lib.c p_open.c p_seal.c p_sign.c p_verify.c pbe_scrypt.c +SRCS+= pmeth_fn.c pmeth_gn.c pmeth_lib.c # hmac SRCS+= hm_ameth.c hm_pmeth.c hmac.c -INCS+= hmac.h # idea SRCS+= i_cbc.c i_cfb64.c i_ecb.c i_ofb64.c i_skey.c -INCS+= idea.h -# krb5 -INCS+= krb5_asn.h +# kdf +SRCS+= hkdf.c kdf_err.c scrypt.c tls1_prf.c # lhash SRCS+= lh_stats.c lhash.c -INCS+= lhash.h # md4 SRCS+= md4_dgst.c md4_one.c -INCS+= md4.h # md5 SRCS+= md5_dgst.c md5_one.c .if defined(ASM_amd64) SRCS+= md5-x86_64.S -.elif defined(ASM_i386) -SRCS+= md5-586.S .endif -INCS+= md5.h # mdc2 SRCS+= mdc2_one.c mdc2dgst.c -INCS+= mdc2.h # modes -SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gcm128.c ofb128.c \ - wrap128.c xts128.c -.if defined(ASM_aarch64) -SRCS+= ghashv8-armx.S -ACFLAGS.ghashv8-armx.S= -march=armv8-a+crypto -.elif defined(ASM_amd64) +SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gcm128.c ocb128.c +SRCS+= ofb128.c wrap128.c xts128.c +.if defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S -.elif defined(ASM_arm) -SRCS+= ghash-armv4.S ghashv8-armx.S -.elif defined(ASM_i386) -SRCS+= ghash-x86.S .endif -INCS+= modes.h # objects SRCS+= o_names.c obj_dat.c obj_err.c obj_lib.c obj_xref.c -INCS+= obj_mac.h objects.h # ocsp -SRCS+= ocsp_asn.c ocsp_cl.c ocsp_err.c ocsp_ext.c ocsp_ht.c ocsp_lib.c \ - ocsp_prn.c ocsp_srv.c ocsp_vfy.c -INCS+= ocsp.h +SRCS+= ocsp_asn.c ocsp_cl.c ocsp_err.c ocsp_ext.c ocsp_ht.c ocsp_lib.c +SRCS+= ocsp_prn.c ocsp_srv.c ocsp_vfy.c v3_ocsp.c # pem -SRCS+= pem_all.c pem_err.c pem_info.c pem_lib.c pem_oth.c pem_pk8.c \ - pem_pkey.c pem_seal.c pem_sign.c pem_x509.c pem_xaux.c pvkfmt.c -INCS+= pem.h pem2.h +SRCS+= pem_all.c pem_err.c pem_info.c pem_lib.c pem_oth.c pem_pk8.c +SRCS+= pem_pkey.c pem_sign.c pem_x509.c pem_xaux.c pvkfmt.c # pkcs12 -SRCS+= p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c \ - p12_init.c p12_key.c p12_kiss.c p12_mutl.c p12_npas.c p12_p8d.c \ - p12_p8e.c p12_utl.c pk12err.c -INCS+= pkcs12.h +SRCS+= p12_add.c p12_asn.c p12_attr.c p12_crpt.c p12_crt.c p12_decr.c +SRCS+= p12_init.c p12_key.c p12_kiss.c p12_mutl.c p12_npas.c p12_p8d.c +SRCS+= p12_p8e.c p12_sbag.c p12_utl.c pk12err.c # pkcs7 -SRCS+= bio_pk7.c pk7_asn1.c pk7_attr.c pk7_doit.c pk7_lib.c pk7_mime.c \ - pk7_smime.c pkcs7err.c -INCS+= pkcs7.h +SRCS+= bio_pk7.c pk7_asn1.c pk7_attr.c pk7_doit.c pk7_lib.c pk7_mime.c +SRCS+= pk7_smime.c pkcs7err.c -# pqueue -SRCS+= pqueue.c -INCS+= pqueue.h +# poly1305 +SRCS+= poly1305.c poly1305_ameth.c poly1305_pmeth.c +.if defined(ASM_amd64) +SRCS+= poly1305-x86_64.S +.endif # rand -SRCS+= md_rand.c rand_egd.c rand_err.c rand_lib.c rand_unix.c randfile.c -INCS+= rand.h +SRCS+= drbg_ctr.c drbg_lib.c rand_err.c rand_lib.c rand_unix.c randfile.c # rc2 SRCS+= rc2_cbc.c rc2_ecb.c rc2_skey.c rc2cfb64.c rc2ofb64.c -INCS+= rc2.h # rc4 -SRCS+= rc4_utl.c .if defined(ASM_amd64) SRCS+= rc4-md5-x86_64.S rc4-x86_64.S -.elif defined(ASM_i386) -SRCS+= rc4-586.S .else SRCS+= rc4_enc.c rc4_skey.c .endif -INCS+= rc4.h # rc5 -SRCS+= rc5_ecb.c rc5_skey.c rc5cfb64.c rc5ofb64.c -.if defined(ASM_i386) -SRCS+= rc5-586.S -.else -SRCS+= rc5_enc.c -.endif -INCS+= rc5.h +SRCS+= rc5_ecb.c rc5_enc.c rc5_skey.c rc5cfb64.c rc5ofb64.c # ripemd SRCS+= rmd_dgst.c rmd_one.c -.if defined(ASM_i386) -SRCS+= rmd-586.S -.endif -INCS+= ripemd.h # rsa -SRCS+= rsa_ameth.c rsa_asn1.c rsa_chk.c rsa_crpt.c rsa_depr.c rsa_eay.c \ - rsa_err.c rsa_gen.c rsa_lib.c rsa_none.c rsa_null.c rsa_oaep.c \ - rsa_pk1.c rsa_pmeth.c rsa_prn.c rsa_pss.c rsa_saos.c rsa_sign.c \ - rsa_ssl.c rsa_x931.c -INCS+= rsa.h +SRCS+= rsa_ameth.c rsa_asn1.c rsa_chk.c rsa_crpt.c rsa_depr.c rsa_err.c +SRCS+= rsa_gen.c rsa_lib.c rsa_meth.c rsa_mp.c rsa_none.c rsa_oaep.c +SRCS+= rsa_ossl.c rsa_pk1.c rsa_pmeth.c rsa_prn.c rsa_pss.c rsa_saos.c +SRCS+= rsa_sign.c rsa_ssl.c rsa_x931.c rsa_x931g.c # seed SRCS+= seed.c seed_cbc.c seed_cfb.c seed_ecb.c seed_ofb.c -INCS+= seed.h # sha -SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c sha_dgst.c sha_one.c -.if defined(ASM_aarch64) -SRCS+= sha1-armv8.S sha256-armv8.S sha512-armv8.S -.elif defined(ASM_amd64) -SRCS+= sha1-mb-x86_64.S sha1-x86_64.S sha256-mb-x86_64.S sha256-x86_64.S \ - sha512-x86_64.S -.elif defined(ASM_arm) -SRCS+= sha1-armv4-large.S sha256-armv4.S sha512-armv4.S -.elif defined(ASM_i386) -SRCS+= sha1-586.S sha256-586.S sha512-586.S +SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c +.if defined(ASM_amd64) +SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S +SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S +.else +SRCS+= keccak1600.c .endif -INCS+= sha.h +# siphash +SRCS+= siphash.c siphash_ameth.c siphash_pmeth.c + +# sm2 +SRCS+= sm2_crypt.c sm2_err.c sm2_pmeth.c sm2_sign.c + +# sm3 +SRCS+= m_sm3.c sm3.c + +# sm4 +SRCS+= sm4.c + # srp SRCS+= srp_lib.c srp_vfy.c -INCS+= srp.h # stack SRCS+= stack.c -INCS+= safestack.h stack.h +# store +SRCS+= loader_file.c store_err.c store_init.c store_lib.c store_register.c +SRCS+= store_strings.c + # ts -SRCS+= ts_asn1.c ts_conf.c ts_err.c ts_lib.c ts_req_print.c ts_req_utils.c \ - ts_rsp_print.c ts_rsp_sign.c ts_rsp_utils.c ts_rsp_verify.c \ - ts_verify_ctx.c -INCS+= ts.h +SRCS+= ts_asn1.c ts_conf.c ts_err.c ts_lib.c ts_req_print.c ts_req_utils.c +SRCS+= ts_rsp_print.c ts_rsp_sign.c ts_rsp_utils.c ts_rsp_verify.c +SRCS+= ts_verify_ctx.c # txt_db SRCS+= txt_db.c -INCS+= txt_db.h # ui -SRCS+= ui_compat.c ui_err.c ui_lib.c ui_openssl.c ui_util.c -INCS+= ui.h ui_compat.h +SRCS+= ui_err.c ui_lib.c ui_null.c ui_openssl.c ui_util.c # whrlpool SRCS+= wp_dgst.c .if defined(ASM_amd64) SRCS+= wp-x86_64.S -.elif defined(ASM_i386) -SRCS+= wp-mmx.S wp_block.c .else SRCS+= wp_block.c .endif -INCS+= whrlpool.h # x509 -SRCS+= by_dir.c by_file.c x509_att.c x509_cmp.c x509_d2.c x509_def.c \ - x509_err.c x509_ext.c x509_lu.c x509_obj.c x509_r2x.c x509_req.c \ - x509_set.c x509_trs.c x509_txt.c x509_v3.c x509_vfy.c x509_vpm.c \ - x509cset.c x509name.c x509rset.c x509spki.c x509type.c x_all.c -INCS+= x509.h x509_vfy.h +SRCS+= by_dir.c by_file.c t_crl.c t_req.c t_x509.c x509_att.c x509_cmp.c +SRCS+= x509_d2.c x509_def.c x509_err.c x509_ext.c x509_lu.c x509_meth.c +SRCS+= x509_obj.c x509_r2x.c x509_req.c x509_set.c x509_trs.c x509_txt.c +SRCS+= x509_v3.c x509_vfy.c x509_vpm.c x509cset.c x509name.c x509rset.c +SRCS+= x509spki.c x509type.c x_all.c x_attrib.c x_crl.c x_exten.c x_name.c +SRCS+= x_pubkey.c x_req.c x_x509.c x_x509a.c # x509v3 -SRCS+= pcy_cache.c pcy_data.c pcy_lib.c pcy_map.c pcy_node.c pcy_tree.c \ - v3_addr.c v3_akey.c v3_akeya.c v3_alt.c v3_asid.c v3_bcons.c \ - v3_bitst.c v3_conf.c v3_cpols.c v3_crld.c v3_enum.c v3_extku.c \ - v3_genn.c v3_ia5.c v3_info.c v3_int.c v3_lib.c v3_ncons.c v3_ocsp.c \ - v3_pci.c v3_pcia.c v3_pcons.c v3_pku.c v3_pmaps.c v3_prn.c v3_purp.c \ - v3_scts.c v3_skey.c v3_sxnet.c v3_utl.c v3err.c -INCS+= x509v3.h +SRCS+= pcy_cache.c pcy_data.c pcy_lib.c pcy_map.c pcy_node.c pcy_tree.c +SRCS+= v3_addr.c v3_admis.c v3_akey.c v3_akeya.c v3_alt.c v3_asid.c +SRCS+= v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c v3_crld.c v3_enum.c +SRCS+= v3_extku.c v3_genn.c v3_ia5.c v3_info.c v3_int.c v3_lib.c v3_ncons.c +SRCS+= v3_pci.c v3_pcia.c v3_pcons.c v3_pku.c v3_pmaps.c v3_prn.c v3_purp.c +SRCS+= v3_skey.c v3_sxnet.c v3_tlsf.c v3_utl.c v3err.c -SRCS+= buildinf.h -INCS+= opensslconf.h +INCS= aes.h asn1.h asn1_mac.h asn1err.h asn1t.h async.h asyncerr.h bio.h +INCS+= bioerr.h blowfish.h bn.h bnerr.h buffer.h buffererr.h camellia.h +INCS+= cast.h cmac.h cms.h cmserr.h comp.h comperr.h conf.h conf_api.h +INCS+= conferr.h crypto.h cryptoerr.h ct.h cterr.h des.h dh.h dherr.h dsa.h +INCS+= dsaerr.h dtls1.h e_os2.h ebcdic.h ec.h ecdh.h ecdsa.h ecerr.h +INCS+= engine.h engineerr.h err.h evp.h evperr.h hmac.h idea.h kdf.h +INCS+= kdferr.h lhash.h md2.h md4.h md5.h mdc2.h modes.h obj_mac.h +INCS+= objects.h objectserr.h ocsp.h ocsperr.h opensslconf.h opensslv.h +INCS+= ossl_typ.h pem.h pem2.h pemerr.h pkcs12.h pkcs12err.h pkcs7.h +INCS+= pkcs7err.h rand.h rand_drbg.h randerr.h rc2.h rc4.h rc5.h ripemd.h +INCS+= rsa.h rsaerr.h safestack.h seed.h sha.h srp.h srtp.h ssl.h ssl2.h +INCS+= ssl3.h sslerr.h stack.h store.h storeerr.h symhacks.h tls1.h ts.h +INCS+= tserr.h txt_db.h ui.h uierr.h whrlpool.h x509.h x509_vfy.h x509err.h +INCS+= x509v3.h x509v3err.h + INCSDIR= ${INCLUDEDIR}/openssl CSTD= gnu89 -CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${LCRYPTO_SRC}/crypto -CFLAGS+= -I${LCRYPTO_SRC}/crypto/asn1 -CFLAGS+= -I${LCRYPTO_SRC}/crypto/evp +CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 +CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes +CFLAGS+= -I${.OBJDIR} .if !empty(SRCS:M*.S) ACFLAGS+= -Wa,--noexecstack .endif -CLEANFILES= buildinf.h opensslconf.h opensslconf.h.tmp +SRCS+= buildinf.h openssl/opensslconf.h -buildinf.h: Makefile - ( echo "#ifndef MK1MF_BUILD"; \ - echo " /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */"; \ - echo " #define CFLAGS \"compiler: ${COMPILER_TYPE}\""; \ - echo " #define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ - echo "#endif" ) > ${.TARGET} +CLEANDIRS= openssl +CLEANFILES= ${GENINCS} opensslconf.h.tmp +buildinf.h: + ( echo "/*"; \ + echo " * WARNING: do not edit!"; \ + echo " * Generated by ${.ALLSRC}"; \ + echo " */"; \ + echo "#define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ + echo "#define DATE \"built on: reproducible build, date unspecified\""; \ + echo "static const char compiler_flags[] = \"compiler: ${COMPILER_TYPE}\";" ) \ + > ${.TARGET} + +openssl/opensslconf.h: opensslconf.h + mkdir -p openssl + ln -fs ${.OBJDIR}/${.ALLSRC} ${.TARGET} + opensslconf.h: opensslconf-${MACHINE_CPUARCH:C/^(amd64|i386)$/x86/}.h.in .if defined(ASM_${MACHINE_CPUARCH}) sed 's/%%ASM%%//; /%%NO_ASM%%/d' ${.ALLSRC} > ${.TARGET}.tmp .else sed '/%%ASM%%/d; s/%%NO_ASM%%//' ${.ALLSRC} > ${.TARGET}.tmp .endif - ${CP} ${.TARGET}.tmp ${.TARGET} + mv -f ${.TARGET}.tmp ${.TARGET} .include +PICFLAG+= -DOPENSSL_PIC + .if defined(ASM_${MACHINE_CPUARCH}) .PATH: ${.CURDIR}/${MACHINE_CPUARCH} .if defined(ASM_amd64) @@ -439,30 +388,36 @@ opensslconf.h: opensslconf-${MACHINE_CPUARCH:C/^(amd64 .PATH: ${LCRYPTO_SRC}/crypto \ ${LCRYPTO_SRC}/crypto/aes \ + ${LCRYPTO_SRC}/crypto/aria \ ${LCRYPTO_SRC}/crypto/asn1 \ + ${LCRYPTO_SRC}/crypto/async \ + ${LCRYPTO_SRC}/crypto/async/arch \ ${LCRYPTO_SRC}/crypto/bf \ ${LCRYPTO_SRC}/crypto/bio \ + ${LCRYPTO_SRC}/crypto/blake2 \ ${LCRYPTO_SRC}/crypto/bn \ ${LCRYPTO_SRC}/crypto/buffer \ ${LCRYPTO_SRC}/crypto/camellia \ ${LCRYPTO_SRC}/crypto/cast \ + ${LCRYPTO_SRC}/crypto/chacha \ ${LCRYPTO_SRC}/crypto/cmac \ ${LCRYPTO_SRC}/crypto/cms \ ${LCRYPTO_SRC}/crypto/comp \ ${LCRYPTO_SRC}/crypto/conf \ + ${LCRYPTO_SRC}/crypto/ct \ ${LCRYPTO_SRC}/crypto/des \ ${LCRYPTO_SRC}/crypto/dh \ ${LCRYPTO_SRC}/crypto/dsa \ ${LCRYPTO_SRC}/crypto/dso \ ${LCRYPTO_SRC}/crypto/ec \ - ${LCRYPTO_SRC}/crypto/ecdh \ - ${LCRYPTO_SRC}/crypto/ecdsa \ + ${LCRYPTO_SRC}/crypto/ec/curve448 \ + ${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 \ ${LCRYPTO_SRC}/crypto/engine \ ${LCRYPTO_SRC}/crypto/err \ ${LCRYPTO_SRC}/crypto/evp \ ${LCRYPTO_SRC}/crypto/hmac \ ${LCRYPTO_SRC}/crypto/idea \ - ${LCRYPTO_SRC}/crypto/krb5 \ + ${LCRYPTO_SRC}/crypto/kdf \ ${LCRYPTO_SRC}/crypto/lhash \ ${LCRYPTO_SRC}/crypto/md4 \ ${LCRYPTO_SRC}/crypto/md5 \ @@ -473,7 +428,7 @@ opensslconf.h: opensslconf-${MACHINE_CPUARCH:C/^(amd64 ${LCRYPTO_SRC}/crypto/pem \ ${LCRYPTO_SRC}/crypto/pkcs12 \ ${LCRYPTO_SRC}/crypto/pkcs7 \ - ${LCRYPTO_SRC}/crypto/pqueue \ + ${LCRYPTO_SRC}/crypto/poly1305 \ ${LCRYPTO_SRC}/crypto/rand \ ${LCRYPTO_SRC}/crypto/rc2 \ ${LCRYPTO_SRC}/crypto/rc4 \ @@ -482,12 +437,18 @@ opensslconf.h: opensslconf-${MACHINE_CPUARCH:C/^(amd64 ${LCRYPTO_SRC}/crypto/rsa \ ${LCRYPTO_SRC}/crypto/seed \ ${LCRYPTO_SRC}/crypto/sha \ + ${LCRYPTO_SRC}/crypto/siphash \ + ${LCRYPTO_SRC}/crypto/sm2 \ + ${LCRYPTO_SRC}/crypto/sm3 \ + ${LCRYPTO_SRC}/crypto/sm4 \ ${LCRYPTO_SRC}/crypto/srp \ ${LCRYPTO_SRC}/crypto/stack \ + ${LCRYPTO_SRC}/crypto/store \ ${LCRYPTO_SRC}/crypto/ts \ ${LCRYPTO_SRC}/crypto/txt_db \ ${LCRYPTO_SRC}/crypto/ui \ ${LCRYPTO_SRC}/crypto/whrlpool \ ${LCRYPTO_SRC}/crypto/x509 \ ${LCRYPTO_SRC}/crypto/x509v3 \ + ${LCRYPTO_SRC}/include/openssl \ ${.CURDIR}/man Modified: projects/openssl111/secure/lib/libcrypto/Makefile.inc ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.inc Wed Sep 19 00:06:48 2018 (r338763) +++ projects/openssl111/secure/lib/libcrypto/Makefile.inc Wed Sep 19 00:07:09 2018 (r338764) @@ -10,15 +10,15 @@ LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc CFLAGS+= -I${LCRYPTO_SRC} -CFLAGS+= -DTERMIOS -DANSI_SOURCE -CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H +CFLAGS+= -I${LCRYPTO_SRC}/crypto/include +CFLAGS+= -I${LCRYPTO_SRC}/include .include .if ${TARGET_ENDIANNESS} == 1234 -CFLAGS+=-DL_ENDIAN +CFLAGS+= -DL_ENDIAN .elif ${TARGET_ENDIANNESS} == 4321 -CFLAGS+=-DB_ENDIAN +CFLAGS+= -DB_ENDIAN .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" @@ -33,85 +33,32 @@ ASM_${MACHINE_CPUARCH}= .endif .endif +.if defined(ASM_${MACHINE_CPUARCH}) +CFLAGS+= -DOPENSSL_CPUID_OBJ .if defined(ASM_aarch64) -CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM .elif defined(ASM_amd64) -CFLAGS+=-DOPENSSL_IA32_SSE2 -CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM -CFLAGS+=-DECP_NISTZ256_ASM -CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -CFLAGS+=-DMD5_ASM -CFLAGS+=-DGHASH_ASM -CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+=-DWHIRLPOOL_ASM -.elif defined(ASM_arm) -CFLAGS+=-DAES_ASM -DBSAES_ASM -CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+=-DGHASH_ASM -CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -.elif defined(ASM_i386) -CFLAGS+=-DOPENSSL_IA32_SSE2 -CFLAGS+=-DAES_ASM -DVPAES_ASM -CFLAGS+=-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -CFLAGS+=-DMD5_ASM -CFLAGS+=-DGHASH_ASM -CFLAGS+=-DRMD160_ASM -CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -CFLAGS+=-DWHIRLPOOL_ASM +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 \ + -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DAES_ASM -DVPAES_ASM -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM .endif +.endif -MANDIR= ${SHAREDIR}/openssl/man/man - .if defined(LIB) -_docs= ${LIB} -.if ${LIB} == crypto -_docs+= man3 +CFLAGS+= -DOPENSSLDIR="\"/etc/ssl\"" +CFLAGS+= -DENGINESDIR="\"/usr/lib/engines\"" .endif -_skip= SSLeay_version des_modes -_sec= 3 -.else -_docs= apps -_skip= c_rehash config -_sec= 1 -.endif -man-update: -.for manpage in ${MAN} - @(sec=${manpage:E}; \ - pod=${manpage:R}.pod; \ - for i in ${_docs}; do \ - test -f ${LCRYPTO_DOC}/$$i/$$pod && \ - cp ${LCRYPTO_DOC}/$$i/$$pod .; \ - done; \ - pod2man --section=$$sec --release="${OPENSSL_VER}" \ - --date="${OPENSSL_DATE}" --center="OpenSSL" \ - $$pod > ${.CURDIR}/man/${manpage}; \ - rm -f $$pod; \ - ${ECHO} ${manpage}) -.endfor +CFLAGS+= -DNDEBUG -man-makefile-update: - rm -f ${.CURDIR}/Makefile.man - echo '# $$'FreeBSD'$$' >> ${.CURDIR}/Makefile.man - echo '# DO NOT EDIT: generated from man-makefile-update target' >> \ - ${.CURDIR}/Makefile.man - for i in ${_docs}; do \ - for j in ${LCRYPTO_DOC}/$$i/*.pod; do \ - test -f $$j || continue; \ - fn=`basename $$j .pod`; \ - if ! echo '${_skip}' | grep -qw "$$fn"; then \ - ${ECHO} "MAN+= $$fn.${_sec}"; \ - fi; \ - done; \ - done | env LANG=C sort >> ${.CURDIR}/Makefile.man - for i in ${_docs}; do \ - for j in ${LCRYPTO_DOC}/$$i/*.pod; do \ - test -f $$j || continue; \ - fn=`basename $$j .pod`; \ - if ! echo '${_skip}' | grep -qw "$$fn"; then \ - perl ${LCRYPTO_SRC}/util/extract-names.pl < $$j | \ - awk "/^$$fn\$$/ { next; } \ - { print \"MLINKS+= $$fn.${_sec} \" \$$1 \".${_sec}\" }"; \ - fi; \ - done; \ - done | env LANG=C sort >> ${.CURDIR}/Makefile.man +MANDIR= ${SHAREDIR}/openssl/man/man From owner-svn-src-projects@freebsd.org Wed Sep 19 00:08:28 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 768EC10AC62C for ; Wed, 19 Sep 2018 00:08:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA1089DB1; Wed, 19 Sep 2018 00:08:28 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECB0B27269; Wed, 19 Sep 2018 00:08:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J08Rfx057720; Wed, 19 Sep 2018 00:08:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J08RcU057718; Wed, 19 Sep 2018 00:08:27 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190008.w8J08RcU057718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 00:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338765 - projects/openssl111/crypto/openssl/crypto/include/internal X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/crypto/openssl/crypto/include/internal X-SVN-Commit-Revision: 338765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 00:08:28 -0000 Author: jkim Date: Wed Sep 19 00:08:27 2018 New Revision: 338765 URL: https://svnweb.freebsd.org/changeset/base/338765 Log: Add generated header files for FreeBSD. Added: projects/openssl111/crypto/openssl/crypto/include/internal/bn_conf.h (contents, props changed) projects/openssl111/crypto/openssl/crypto/include/internal/dso_conf.h (contents, props changed) Added: projects/openssl111/crypto/openssl/crypto/include/internal/bn_conf.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/crypto/openssl/crypto/include/internal/bn_conf.h Wed Sep 19 00:08:27 2018 (r338765) @@ -0,0 +1,35 @@ +/* $FreeBSD$ */ +/* WARNING: do not edit! */ +/* Generated by Makefile from crypto/include/internal/bn_conf.h.in */ +/* + * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_BN_CONF_H +# define HEADER_BN_CONF_H + +/* + * The contents of this file are not used in the UEFI build, as + * both 32-bit and 64-bit builds are supported from a single run + * of the Configure script. + */ + +/* Should we define BN_DIV2W here? */ + +/* Only one for the following should be defined */ +#ifdef __LP64__ +#define SIXTY_FOUR_BIT_LONG +#undef SIXTY_FOUR_BIT +#undef THIRTY_TWO_BIT +#else +#undef SIXTY_FOUR_BIT_LONG +#undef SIXTY_FOUR_BIT +#define THIRTY_TWO_BIT +#endif + +#endif Added: projects/openssl111/crypto/openssl/crypto/include/internal/dso_conf.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/crypto/openssl/crypto/include/internal/dso_conf.h Wed Sep 19 00:08:27 2018 (r338765) @@ -0,0 +1,20 @@ +/* $FreeBSD$ */ +/* WARNING: do not edit! */ +/* Generated by Makefile from crypto/include/internal/dso_conf.h.in */ +/* + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_DSO_CONF_H +# define HEADER_DSO_CONF_H + +# define DSO_DLFCN +# define HAVE_DLFCN_H +# define DSO_EXTENSION ".so" + +#endif From owner-svn-src-projects@freebsd.org Wed Sep 19 00:24:01 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C93A310ACA36 for ; Wed, 19 Sep 2018 00:24:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 685768A4B5; Wed, 19 Sep 2018 00:24:01 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DCDC275A2; Wed, 19 Sep 2018 00:24:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J0O1EU067998; Wed, 19 Sep 2018 00:24:01 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J0O149067997; Wed, 19 Sep 2018 00:24:01 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190024.w8J0O149067997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 00:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338766 - projects/openssl111/secure/lib/libssl X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libssl X-SVN-Commit-Revision: 338766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 00:24:02 -0000 Author: jkim Date: Wed Sep 19 00:24:00 2018 New Revision: 338766 URL: https://svnweb.freebsd.org/changeset/base/338766 Log: Build libssl for amd64. Modified: projects/openssl111/secure/lib/libssl/Makefile Modified: projects/openssl111/secure/lib/libssl/Makefile ============================================================================== --- projects/openssl111/secure/lib/libssl/Makefile Wed Sep 19 00:08:27 2018 (r338765) +++ projects/openssl111/secure/lib/libssl/Makefile Wed Sep 19 00:24:00 2018 (r338766) @@ -8,21 +8,29 @@ NO_LINT= .include "../libcrypto/Makefile.inc" -SRCS= bio_ssl.c d1_both.c d1_clnt.c d1_lib.c d1_meth.c d1_pkt.c d1_srtp.c \ - d1_srvr.c s23_clnt.c s23_lib.c s23_meth.c s23_pkt.c s23_srvr.c \ - s3_both.c s3_cbc.c s3_clnt.c s3_enc.c s3_lib.c s3_meth.c s3_pkt.c \ - s3_srvr.c ssl_algs.c ssl_asn1.c ssl_cert.c ssl_ciph.c ssl_conf.c \ - ssl_err.c ssl_err2.c ssl_lib.c ssl_rsa.c ssl_sess.c ssl_stat.c \ - ssl_txt.c t1_clnt.c t1_enc.c t1_ext.c t1_lib.c t1_meth.c t1_reneg.c \ - t1_srvr.c tls_srp.c +SRCS= bio_ssl.c d1_lib.c d1_msg.c d1_srtp.c methods.c packet.c pqueue.c +SRCS+= s3_cbc.c s3_enc.c s3_lib.c s3_msg.c ssl_asn1.c ssl_cert.c ssl_ciph.c +SRCS+= ssl_conf.c ssl_err.c ssl_init.c ssl_lib.c ssl_mcnf.c ssl_rsa.c +SRCS+= ssl_sess.c ssl_stat.c ssl_txt.c t1_enc.c t1_lib.c tls_srp.c +SRCS+= tls13_enc.c -INCS= dtls1.h kssl.h srtp.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h -INCSDIR=${INCLUDEDIR}/openssl +# record +SRCS+= dtls1_bitmap.c rec_layer_d1.c rec_layer_s3.c ssl3_buffer.c +SRCS+= ssl3_record.c ssl3_record_tls13.c +# statem +SRCS+= extensions.c extensions_clnt.c extensions_cust.c extensions_srvr.c +SRCS+= statem.c statem_clnt.c statem_dtls.c statem_lib.c statem_srvr.c + LIBADD= crypto -CFLAGS+= -I${LCRYPTO_SRC}/crypto +CFLAGS+= -I${LCRYPTO_SRC}/ssl +CFLAGS+= -I${.OBJDIR:H}/libcrypto .include -.PATH: ${LCRYPTO_SRC}/ssl +PICFLAG+= -DOPENSS_PIC + +.PATH: ${LCRYPTO_SRC}/ssl \ + ${LCRYPTO_SRC}/ssl/record \ + ${LCRYPTO_SRC}/ssl/statem From owner-svn-src-projects@freebsd.org Wed Sep 19 00:32:49 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C399110ACC79 for ; Wed, 19 Sep 2018 00:32:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 750EC8A8B9; Wed, 19 Sep 2018 00:32:48 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FCED2773A; Wed, 19 Sep 2018 00:32:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J0WmTE072798; Wed, 19 Sep 2018 00:32:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J0WmpR072797; Wed, 19 Sep 2018 00:32:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190032.w8J0WmpR072797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 00:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338767 - projects/openssl111/crypto/openssl/apps X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/crypto/openssl/apps X-SVN-Commit-Revision: 338767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 00:32:49 -0000 Author: jkim Date: Wed Sep 19 00:32:48 2018 New Revision: 338767 URL: https://svnweb.freebsd.org/changeset/base/338767 Log: Add generated header file for openssl(1). Added: projects/openssl111/crypto/openssl/apps/progs.h (contents, props changed) Added: projects/openssl111/crypto/openssl/apps/progs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/crypto/openssl/apps/progs.h Wed Sep 19 00:32:48 2018 (r338767) @@ -0,0 +1,508 @@ +/* $FreeBSD$ */ +/* + * WARNING: do not edit! + * Generated by apps/progs.pl + * + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +typedef enum FUNC_TYPE { + FT_none, FT_general, FT_md, FT_cipher, FT_pkey, + FT_md_alg, FT_cipher_alg +} FUNC_TYPE; + +typedef struct function_st { + FUNC_TYPE type; + const char *name; + int (*func)(int argc, char *argv[]); + const OPTIONS *help; +} FUNCTION; + +DEFINE_LHASH_OF(FUNCTION); + +extern int asn1parse_main(int argc, char *argv[]); +extern int ca_main(int argc, char *argv[]); +extern int ciphers_main(int argc, char *argv[]); +extern int cms_main(int argc, char *argv[]); +extern int crl_main(int argc, char *argv[]); +extern int crl2pkcs7_main(int argc, char *argv[]); +extern int dgst_main(int argc, char *argv[]); +extern int dhparam_main(int argc, char *argv[]); +extern int dsa_main(int argc, char *argv[]); +extern int dsaparam_main(int argc, char *argv[]); +extern int ec_main(int argc, char *argv[]); +extern int ecparam_main(int argc, char *argv[]); +extern int enc_main(int argc, char *argv[]); +extern int engine_main(int argc, char *argv[]); +extern int errstr_main(int argc, char *argv[]); +extern int gendsa_main(int argc, char *argv[]); +extern int genpkey_main(int argc, char *argv[]); +extern int genrsa_main(int argc, char *argv[]); +extern int help_main(int argc, char *argv[]); +extern int list_main(int argc, char *argv[]); +extern int nseq_main(int argc, char *argv[]); +extern int ocsp_main(int argc, char *argv[]); +extern int passwd_main(int argc, char *argv[]); +extern int pkcs12_main(int argc, char *argv[]); +extern int pkcs7_main(int argc, char *argv[]); +extern int pkcs8_main(int argc, char *argv[]); +extern int pkey_main(int argc, char *argv[]); +extern int pkeyparam_main(int argc, char *argv[]); +extern int pkeyutl_main(int argc, char *argv[]); +extern int prime_main(int argc, char *argv[]); +extern int rand_main(int argc, char *argv[]); +extern int rehash_main(int argc, char *argv[]); +extern int req_main(int argc, char *argv[]); +extern int rsa_main(int argc, char *argv[]); +extern int rsautl_main(int argc, char *argv[]); +extern int s_client_main(int argc, char *argv[]); +extern int s_server_main(int argc, char *argv[]); +extern int s_time_main(int argc, char *argv[]); +extern int sess_id_main(int argc, char *argv[]); +extern int smime_main(int argc, char *argv[]); +extern int speed_main(int argc, char *argv[]); +extern int spkac_main(int argc, char *argv[]); +extern int srp_main(int argc, char *argv[]); +extern int storeutl_main(int argc, char *argv[]); +extern int ts_main(int argc, char *argv[]); +extern int verify_main(int argc, char *argv[]); +extern int version_main(int argc, char *argv[]); +extern int x509_main(int argc, char *argv[]); + +extern const OPTIONS asn1parse_options[]; +extern const OPTIONS ca_options[]; +extern const OPTIONS ciphers_options[]; +extern const OPTIONS cms_options[]; +extern const OPTIONS crl_options[]; +extern const OPTIONS crl2pkcs7_options[]; +extern const OPTIONS dgst_options[]; +extern const OPTIONS dhparam_options[]; +extern const OPTIONS dsa_options[]; +extern const OPTIONS dsaparam_options[]; +extern const OPTIONS ec_options[]; +extern const OPTIONS ecparam_options[]; +extern const OPTIONS enc_options[]; +extern const OPTIONS engine_options[]; +extern const OPTIONS errstr_options[]; +extern const OPTIONS gendsa_options[]; +extern const OPTIONS genpkey_options[]; +extern const OPTIONS genrsa_options[]; +extern const OPTIONS help_options[]; +extern const OPTIONS list_options[]; +extern const OPTIONS nseq_options[]; +extern const OPTIONS ocsp_options[]; +extern const OPTIONS passwd_options[]; +extern const OPTIONS pkcs12_options[]; +extern const OPTIONS pkcs7_options[]; +extern const OPTIONS pkcs8_options[]; +extern const OPTIONS pkey_options[]; +extern const OPTIONS pkeyparam_options[]; +extern const OPTIONS pkeyutl_options[]; +extern const OPTIONS prime_options[]; +extern const OPTIONS rand_options[]; +extern const OPTIONS rehash_options[]; +extern const OPTIONS req_options[]; +extern const OPTIONS rsa_options[]; +extern const OPTIONS rsautl_options[]; +extern const OPTIONS s_client_options[]; +extern const OPTIONS s_server_options[]; +extern const OPTIONS s_time_options[]; +extern const OPTIONS sess_id_options[]; +extern const OPTIONS smime_options[]; +extern const OPTIONS speed_options[]; +extern const OPTIONS spkac_options[]; +extern const OPTIONS srp_options[]; +extern const OPTIONS storeutl_options[]; +extern const OPTIONS ts_options[]; +extern const OPTIONS verify_options[]; +extern const OPTIONS version_options[]; +extern const OPTIONS x509_options[]; + +#ifdef INCLUDE_FUNCTION_TABLE +static FUNCTION functions[] = { + {FT_general, "asn1parse", asn1parse_main, asn1parse_options}, + {FT_general, "ca", ca_main, ca_options}, +#ifndef OPENSSL_NO_SOCK + {FT_general, "ciphers", ciphers_main, ciphers_options}, +#endif +#ifndef OPENSSL_NO_CMS + {FT_general, "cms", cms_main, cms_options}, +#endif + {FT_general, "crl", crl_main, crl_options}, + {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options}, + {FT_general, "dgst", dgst_main, dgst_options}, +#ifndef OPENSSL_NO_DH + {FT_general, "dhparam", dhparam_main, dhparam_options}, +#endif +#ifndef OPENSSL_NO_DSA + {FT_general, "dsa", dsa_main, dsa_options}, +#endif +#ifndef OPENSSL_NO_DSA + {FT_general, "dsaparam", dsaparam_main, dsaparam_options}, +#endif +#ifndef OPENSSL_NO_EC + {FT_general, "ec", ec_main, ec_options}, +#endif +#ifndef OPENSSL_NO_EC + {FT_general, "ecparam", ecparam_main, ecparam_options}, +#endif + {FT_general, "enc", enc_main, enc_options}, +#ifndef OPENSSL_NO_ENGINE + {FT_general, "engine", engine_main, engine_options}, +#endif + {FT_general, "errstr", errstr_main, errstr_options}, +#ifndef OPENSSL_NO_DSA + {FT_general, "gendsa", gendsa_main, gendsa_options}, +#endif + {FT_general, "genpkey", genpkey_main, genpkey_options}, +#ifndef OPENSSL_NO_RSA + {FT_general, "genrsa", genrsa_main, genrsa_options}, +#endif + {FT_general, "help", help_main, help_options}, + {FT_general, "list", list_main, list_options}, + {FT_general, "nseq", nseq_main, nseq_options}, +#ifndef OPENSSL_NO_OCSP + {FT_general, "ocsp", ocsp_main, ocsp_options}, +#endif + {FT_general, "passwd", passwd_main, passwd_options}, +#ifndef OPENSSL_NO_DES + {FT_general, "pkcs12", pkcs12_main, pkcs12_options}, +#endif + {FT_general, "pkcs7", pkcs7_main, pkcs7_options}, + {FT_general, "pkcs8", pkcs8_main, pkcs8_options}, + {FT_general, "pkey", pkey_main, pkey_options}, + {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options}, + {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options}, + {FT_general, "prime", prime_main, prime_options}, + {FT_general, "rand", rand_main, rand_options}, + {FT_general, "rehash", rehash_main, rehash_options}, + {FT_general, "req", req_main, req_options}, + {FT_general, "rsa", rsa_main, rsa_options}, +#ifndef OPENSSL_NO_RSA + {FT_general, "rsautl", rsautl_main, rsautl_options}, +#endif +#ifndef OPENSSL_NO_SOCK + {FT_general, "s_client", s_client_main, s_client_options}, +#endif +#ifndef OPENSSL_NO_SOCK + {FT_general, "s_server", s_server_main, s_server_options}, +#endif +#ifndef OPENSSL_NO_SOCK + {FT_general, "s_time", s_time_main, s_time_options}, +#endif + {FT_general, "sess_id", sess_id_main, sess_id_options}, + {FT_general, "smime", smime_main, smime_options}, + {FT_general, "speed", speed_main, speed_options}, + {FT_general, "spkac", spkac_main, spkac_options}, +#ifndef OPENSSL_NO_SRP + {FT_general, "srp", srp_main, srp_options}, +#endif + {FT_general, "storeutl", storeutl_main, storeutl_options}, +#ifndef OPENSSL_NO_TS + {FT_general, "ts", ts_main, ts_options}, +#endif + {FT_general, "verify", verify_main, verify_options}, + {FT_general, "version", version_main, version_options}, + {FT_general, "x509", x509_main, x509_options}, +#ifndef OPENSSL_NO_MD2 + {FT_md, "md2", dgst_main}, +#endif +#ifndef OPENSSL_NO_MD4 + {FT_md, "md4", dgst_main}, +#endif + {FT_md, "md5", dgst_main}, +#ifndef OPENSSL_NO_GOST + {FT_md, "gost", dgst_main}, +#endif + {FT_md, "sha1", dgst_main}, + {FT_md, "sha224", dgst_main}, + {FT_md, "sha256", dgst_main}, + {FT_md, "sha384", dgst_main}, + {FT_md, "sha512", dgst_main}, + {FT_md, "sha512-224", dgst_main}, + {FT_md, "sha512-256", dgst_main}, + {FT_md, "sha3-224", dgst_main}, + {FT_md, "sha3-256", dgst_main}, + {FT_md, "sha3-384", dgst_main}, + {FT_md, "sha3-512", dgst_main}, + {FT_md, "shake128", dgst_main}, + {FT_md, "shake256", dgst_main}, +#ifndef OPENSSL_NO_MDC2 + {FT_md, "mdc2", dgst_main}, +#endif +#ifndef OPENSSL_NO_RMD160 + {FT_md, "rmd160", dgst_main}, +#endif +#ifndef OPENSSL_NO_BLAKE2 + {FT_md, "blake2b512", dgst_main}, +#endif +#ifndef OPENSSL_NO_BLAKE2 + {FT_md, "blake2s256", dgst_main}, +#endif +#ifndef OPENSSL_NO_SM3 + {FT_md, "sm3", dgst_main}, +#endif + {FT_cipher, "aes-128-cbc", enc_main, enc_options}, + {FT_cipher, "aes-128-ecb", enc_main, enc_options}, + {FT_cipher, "aes-192-cbc", enc_main, enc_options}, + {FT_cipher, "aes-192-ecb", enc_main, enc_options}, + {FT_cipher, "aes-256-cbc", enc_main, enc_options}, + {FT_cipher, "aes-256-ecb", enc_main, enc_options}, +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-128-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-128-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-128-ctr", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-128-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-128-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-128-cfb1", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-128-cfb8", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-192-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-192-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-192-ctr", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-192-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-192-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-192-cfb1", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-192-cfb8", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-256-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-256-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-256-ctr", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-256-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-256-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-256-cfb1", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_ARIA + {FT_cipher, "aria-256-cfb8", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAMELLIA + {FT_cipher, "camellia-128-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAMELLIA + {FT_cipher, "camellia-128-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAMELLIA + {FT_cipher, "camellia-192-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAMELLIA + {FT_cipher, "camellia-192-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAMELLIA + {FT_cipher, "camellia-256-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAMELLIA + {FT_cipher, "camellia-256-ecb", enc_main, enc_options}, +#endif + {FT_cipher, "base64", enc_main, enc_options}, +#ifdef ZLIB + {FT_cipher, "zlib", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des3", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "desx", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_IDEA + {FT_cipher, "idea", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SEED + {FT_cipher, "seed", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC4 + {FT_cipher, "rc4", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC4 + {FT_cipher, "rc4-40", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC2 + {FT_cipher, "rc2", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_BF + {FT_cipher, "bf", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAST + {FT_cipher, "cast", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC5 + {FT_cipher, "rc5", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede3", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede3-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede3-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_DES + {FT_cipher, "des-ede3-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_IDEA + {FT_cipher, "idea-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_IDEA + {FT_cipher, "idea-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_IDEA + {FT_cipher, "idea-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_IDEA + {FT_cipher, "idea-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SEED + {FT_cipher, "seed-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SEED + {FT_cipher, "seed-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SEED + {FT_cipher, "seed-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SEED + {FT_cipher, "seed-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC2 + {FT_cipher, "rc2-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC2 + {FT_cipher, "rc2-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC2 + {FT_cipher, "rc2-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC2 + {FT_cipher, "rc2-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC2 + {FT_cipher, "rc2-64-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC2 + {FT_cipher, "rc2-40-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_BF + {FT_cipher, "bf-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_BF + {FT_cipher, "bf-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_BF + {FT_cipher, "bf-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_BF + {FT_cipher, "bf-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAST + {FT_cipher, "cast5-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAST + {FT_cipher, "cast5-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAST + {FT_cipher, "cast5-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAST + {FT_cipher, "cast5-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_CAST + {FT_cipher, "cast-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC5 + {FT_cipher, "rc5-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC5 + {FT_cipher, "rc5-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC5 + {FT_cipher, "rc5-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_RC5 + {FT_cipher, "rc5-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SM4 + {FT_cipher, "sm4-cbc", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SM4 + {FT_cipher, "sm4-ecb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SM4 + {FT_cipher, "sm4-cfb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SM4 + {FT_cipher, "sm4-ofb", enc_main, enc_options}, +#endif +#ifndef OPENSSL_NO_SM4 + {FT_cipher, "sm4-ctr", enc_main, enc_options}, +#endif + {0, NULL, NULL} +}; +#endif From owner-svn-src-projects@freebsd.org Wed Sep 19 06:29:07 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88DA41091064 for ; Wed, 19 Sep 2018 06:29:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3700072E14; Wed, 19 Sep 2018 06:29:07 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24C21308C; Wed, 19 Sep 2018 06:29:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6T6rL051226; Wed, 19 Sep 2018 06:29:06 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6T6cD051225; Wed, 19 Sep 2018 06:29:06 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190629.w8J6T6cD051225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338768 - projects/openssl111/secure/usr.bin/openssl X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/usr.bin/openssl X-SVN-Commit-Revision: 338768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:29:07 -0000 Author: jkim Date: Wed Sep 19 06:29:06 2018 New Revision: 338768 URL: https://svnweb.freebsd.org/changeset/base/338768 Log: Build openssl(1). Modified: projects/openssl111/secure/usr.bin/openssl/Makefile Modified: projects/openssl111/secure/usr.bin/openssl/Makefile ============================================================================== --- projects/openssl111/secure/usr.bin/openssl/Makefile Wed Sep 19 00:32:48 2018 (r338767) +++ projects/openssl111/secure/usr.bin/openssl/Makefile Wed Sep 19 06:29:06 2018 (r338768) @@ -2,22 +2,23 @@ PROG= openssl -LIBADD= ssl crypto +LIBADD= ssl crypto pthread .if exists(Makefile.man) .include "Makefile.man" .endif .include "../../lib/libcrypto/Makefile.inc" -CFLAGS+= -DMONOLITH +CFLAGS+= -I${LCRYPTO_SRC}/apps +CFLAGS+= -I${OBJTOP}/secure/lib/libcrypto -SRCS+= app_rand.c apps.c asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c \ - dgst.c dh.c dhparam.c dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c \ - errstr.c gendh.c gendsa.c genpkey.c genrsa.c nseq.c ocsp.c openssl.c \ - passwd.c pkcs12.c pkcs7.c pkcs8.c pkey.c pkeyparam.c pkeyutl.c \ - prime.c rand.c req.c rsa.c rsautl.c s_cb.c s_client.c s_server.c \ - s_socket.c s_time.c sess_id.c smime.c speed.c spkac.c srp.c ts.c \ - verify.c version.c x509.c +SRCS= app_rand.c apps.c asn1pars.c bf_prefix.c ca.c ciphers.c cms.c crl.c +SRCS+= crl2p7.c dgst.c dhparam.c dsa.c dsaparam.c ec.c ecparam.c enc.c +SRCS+= engine.c errstr.c gendsa.c genpkey.c genrsa.c nseq.c ocsp.c +SRCS+= openssl.c opt.c passwd.c pkcs12.c pkcs7.c pkcs8.c pkey.c pkeyparam.c +SRCS+= pkeyutl.c prime.c rand.c rehash.c req.c rsa.c rsautl.c s_cb.c +SRCS+= s_client.c s_server.c s_socket.c s_time.c sess_id.c smime.c speed.c +SRCS+= spkac.c srp.c storeutl.c ts.c verify.c version.c x509.c .include From owner-svn-src-projects@freebsd.org Wed Sep 19 06:39:11 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDCD81091319 for ; Wed, 19 Sep 2018 06:39:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CA3E73212; Wed, 19 Sep 2018 06:39:11 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69132321E; Wed, 19 Sep 2018 06:39:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6dBG8056204; Wed, 19 Sep 2018 06:39:11 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6dB2k056203; Wed, 19 Sep 2018 06:39:11 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190639.w8J6dB2k056203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338769 - projects/openssl111/contrib/bsnmp/lib X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/contrib/bsnmp/lib X-SVN-Commit-Revision: 338769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:39:12 -0000 Author: jkim Date: Wed Sep 19 06:39:10 2018 New Revision: 338769 URL: https://svnweb.freebsd.org/changeset/base/338769 Log: Make libbsnmp buildable. Modified: projects/openssl111/contrib/bsnmp/lib/snmpcrypto.c Modified: projects/openssl111/contrib/bsnmp/lib/snmpcrypto.c ============================================================================== --- projects/openssl111/contrib/bsnmp/lib/snmpcrypto.c Wed Sep 19 06:29:06 2018 (r338768) +++ projects/openssl111/contrib/bsnmp/lib/snmpcrypto.c Wed Sep 19 06:39:10 2018 (r338769) @@ -94,9 +94,14 @@ snmp_pdu_calc_digest(const struct snmp_pdu *pdu, uint8 uint32_t i, keylen, olen; int32_t err; const EVP_MD *dtype; - EVP_MD_CTX ctx; + EVP_MD_CTX *ctx; - err = snmp_digest_init(&pdu->user, &ctx, &dtype, &keylen); + ctx = EVP_MD_CTX_new(); + if (ctx == NULL) + return (SNMP_CODE_FAILED); + err = snmp_digest_init(&pdu->user, ctx, &dtype, &keylen); + if (err <= 0) + EVP_MD_CTX_free(ctx); if (err < 0) return (SNMP_CODE_BADDIGEST); else if (err == 0) @@ -111,29 +116,29 @@ snmp_pdu_calc_digest(const struct snmp_pdu *pdu, uint8 key2[i] = extkey[i] ^ opad; } - if (EVP_DigestUpdate(&ctx, key1, SNMP_EXTENDED_KEY_SIZ) != 1 || - EVP_DigestUpdate(&ctx, pdu->outer_ptr, pdu->outer_len) != 1 || - EVP_DigestFinal(&ctx, md, &olen) != 1) + if (EVP_DigestUpdate(ctx, key1, SNMP_EXTENDED_KEY_SIZ) != 1 || + EVP_DigestUpdate(ctx, pdu->outer_ptr, pdu->outer_len) != 1 || + EVP_DigestFinal(ctx, md, &olen) != 1) goto failed; - if (EVP_DigestInit(&ctx, dtype) != 1 || - EVP_DigestUpdate(&ctx, key2, SNMP_EXTENDED_KEY_SIZ) != 1 || - EVP_DigestUpdate(&ctx, md, olen) != 1 || - EVP_DigestFinal(&ctx, md, &olen) != 1) + if (EVP_DigestInit(ctx, dtype) != 1 || + EVP_DigestUpdate(ctx, key2, SNMP_EXTENDED_KEY_SIZ) != 1 || + EVP_DigestUpdate(ctx, md, olen) != 1 || + EVP_DigestFinal(ctx, md, &olen) != 1) goto failed; if (olen < SNMP_USM_AUTH_SIZE) { snmp_error("bad digest size - %d", olen); - EVP_MD_CTX_cleanup(&ctx); + EVP_MD_CTX_free(ctx); return (SNMP_CODE_BADDIGEST); } memcpy(digest, md, SNMP_USM_AUTH_SIZE); - EVP_MD_CTX_cleanup(&ctx); + EVP_MD_CTX_free(ctx); return (SNMP_CODE_OK); failed: - EVP_MD_CTX_cleanup(&ctx); + EVP_MD_CTX_free(ctx); return (SNMP_CODE_BADDIGEST); } @@ -176,7 +181,7 @@ snmp_pdu_encrypt(const struct snmp_pdu *pdu) int32_t err, olen; uint8_t iv[SNMP_PRIV_AES_IV_SIZ]; const EVP_CIPHER *ctype; - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; err = snmp_pdu_cipher_init(pdu, pdu->scoped_len, &ctype, iv); if (err < 0) @@ -184,18 +189,23 @@ snmp_pdu_encrypt(const struct snmp_pdu *pdu) else if (err == 0) return (SNMP_CODE_OK); - if (EVP_EncryptInit(&ctx, ctype, pdu->user.priv_key, iv) != 1) + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) return (SNMP_CODE_FAILED); + if (EVP_EncryptInit(ctx, ctype, pdu->user.priv_key, iv) != 1) + goto failed; - if (EVP_EncryptUpdate(&ctx, pdu->scoped_ptr, &olen, pdu->scoped_ptr, + if (EVP_EncryptUpdate(ctx, pdu->scoped_ptr, &olen, pdu->scoped_ptr, pdu->scoped_len) != 1 || - EVP_EncryptFinal(&ctx, pdu->scoped_ptr + olen, &olen) != 1) { - EVP_CIPHER_CTX_cleanup(&ctx); - return (SNMP_CODE_FAILED); - } + EVP_EncryptFinal(ctx, pdu->scoped_ptr + olen, &olen) != 1) + goto failed; - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); return (SNMP_CODE_OK); + +failed: + EVP_CIPHER_CTX_free(ctx); + return (SNMP_CODE_FAILED); } enum snmp_code @@ -204,7 +214,7 @@ snmp_pdu_decrypt(const struct snmp_pdu *pdu) int32_t err, olen; uint8_t iv[SNMP_PRIV_AES_IV_SIZ]; const EVP_CIPHER *ctype; - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; err = snmp_pdu_cipher_init(pdu, pdu->scoped_len, &ctype, iv); if (err < 0) @@ -212,19 +222,24 @@ snmp_pdu_decrypt(const struct snmp_pdu *pdu) else if (err == 0) return (SNMP_CODE_OK); - if (EVP_DecryptInit(&ctx, ctype, pdu->user.priv_key, iv) != 1 || - EVP_CIPHER_CTX_set_padding(&ctx, 0) != 1) - return (SNMP_CODE_EDECRYPT); + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) + return (SNMP_CODE_FAILED); + if (EVP_DecryptInit(ctx, ctype, pdu->user.priv_key, iv) != 1 || + EVP_CIPHER_CTX_set_padding(ctx, 0) != 1) + goto failed; - if (EVP_DecryptUpdate(&ctx, pdu->scoped_ptr, &olen, pdu->scoped_ptr, + if (EVP_DecryptUpdate(ctx, pdu->scoped_ptr, &olen, pdu->scoped_ptr, pdu->scoped_len) != 1 || - EVP_DecryptFinal(&ctx, pdu->scoped_ptr + olen, &olen) != 1) { - EVP_CIPHER_CTX_cleanup(&ctx); - return (SNMP_CODE_EDECRYPT); - } + EVP_DecryptFinal(ctx, pdu->scoped_ptr + olen, &olen) != 1) + goto failed; - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); return (SNMP_CODE_OK); + +failed: + EVP_CIPHER_CTX_free(ctx); + return (SNMP_CODE_EDECRYPT); } /* [RFC 3414] - A.2. Password to Key Algorithm */ @@ -234,13 +249,19 @@ snmp_passwd_to_keys(struct snmp_user *user, char *pass int err, loop, i, pwdlen; uint32_t keylen, olen; const EVP_MD *dtype; - EVP_MD_CTX ctx; + EVP_MD_CTX *ctx; uint8_t authbuf[SNMP_AUTH_BUF_SIZE]; if (passwd == NULL || user == NULL) return (SNMP_CODE_FAILED); - err = snmp_digest_init(user, &ctx, &dtype, &keylen); + ctx = EVP_MD_CTX_new(); + if (ctx == NULL) + return (SNMP_CODE_FAILED); + + err = snmp_digest_init(user, ctx, &dtype, &keylen); + if (err <= 0) + EVP_MD_CTX_free(ctx); if (err < 0) return (SNMP_CODE_BADDIGEST); else if (err == 0) @@ -252,18 +273,18 @@ snmp_passwd_to_keys(struct snmp_user *user, char *pass for (loop = 0; loop < SNMP_AUTH_KEY_LOOPCNT; loop += i) { for (i = 0; i < SNMP_EXTENDED_KEY_SIZ; i++) authbuf[i] = passwd[(loop + i) % pwdlen]; - if (EVP_DigestUpdate(&ctx, authbuf, SNMP_EXTENDED_KEY_SIZ) != 1) + if (EVP_DigestUpdate(ctx, authbuf, SNMP_EXTENDED_KEY_SIZ) != 1) goto failed; } - if (EVP_DigestFinal(&ctx, user->auth_key, &olen) != 1) + if (EVP_DigestFinal(ctx, user->auth_key, &olen) != 1) goto failed; - EVP_MD_CTX_cleanup(&ctx); + EVP_MD_CTX_free(ctx); return (SNMP_CODE_OK); failed: - EVP_MD_CTX_cleanup(&ctx); + EVP_MD_CTX_free(ctx); return (SNMP_CODE_BADDIGEST); } @@ -274,16 +295,22 @@ snmp_get_local_keys(struct snmp_user *user, uint8_t *e int err; uint32_t keylen, olen; const EVP_MD *dtype; - EVP_MD_CTX ctx; + EVP_MD_CTX *ctx; uint8_t authbuf[SNMP_AUTH_BUF_SIZE]; if (user == NULL || eid == NULL || elen > SNMP_ENGINE_ID_SIZ) return (SNMP_CODE_FAILED); + ctx = EVP_MD_CTX_new(); + if (ctx == NULL) + return (SNMP_CODE_FAILED); + memset(user->priv_key, 0, sizeof(user->priv_key)); memset(authbuf, 0, sizeof(authbuf)); - err = snmp_digest_init(user, &ctx, &dtype, &keylen); + err = snmp_digest_init(user, ctx, &dtype, &keylen); + if (err <= 0) + EVP_MD_CTX_free(ctx); if (err < 0) return (SNMP_CODE_BADDIGEST); else if (err == 0) @@ -293,12 +320,12 @@ snmp_get_local_keys(struct snmp_user *user, uint8_t *e memcpy(authbuf + keylen, eid, elen); memcpy(authbuf + keylen + elen, user->auth_key, keylen); - if (EVP_DigestUpdate(&ctx, authbuf, 2 * keylen + elen) != 1 || - EVP_DigestFinal(&ctx, user->auth_key, &olen) != 1) { - EVP_MD_CTX_cleanup(&ctx); + if (EVP_DigestUpdate(ctx, authbuf, 2 * keylen + elen) != 1 || + EVP_DigestFinal(ctx, user->auth_key, &olen) != 1) { + EVP_MD_CTX_free(ctx); return (SNMP_CODE_BADDIGEST); } - EVP_MD_CTX_cleanup(&ctx); + EVP_MD_CTX_free(ctx); if (user->priv_proto != SNMP_PRIV_NOPRIV) memcpy(user->priv_key, user->auth_key, sizeof(user->priv_key)); @@ -312,9 +339,15 @@ snmp_calc_keychange(struct snmp_user *user, uint8_t *k int32_t err, rvalue[SNMP_AUTH_HMACSHA_KEY_SIZ / 4]; uint32_t i, keylen, olen; const EVP_MD *dtype; - EVP_MD_CTX ctx; + EVP_MD_CTX *ctx; - err = snmp_digest_init(user, &ctx, &dtype, &keylen); + ctx = EVP_MD_CTX_new(); + if (ctx == NULL) + return (SNMP_CODE_FAILED); + + err = snmp_digest_init(user, ctx, &dtype, &keylen); + if (err <= 0) + EVP_MD_CTX_free(ctx); if (err < 0) return (SNMP_CODE_BADDIGEST); else if (err == 0) @@ -326,13 +359,13 @@ snmp_calc_keychange(struct snmp_user *user, uint8_t *k memcpy(keychange, user->auth_key, keylen); memcpy(keychange + keylen, rvalue, keylen); - if (EVP_DigestUpdate(&ctx, keychange, 2 * keylen) != 1 || - EVP_DigestFinal(&ctx, keychange, &olen) != 1) { - EVP_MD_CTX_cleanup(&ctx); + if (EVP_DigestUpdate(ctx, keychange, 2 * keylen) != 1 || + EVP_DigestFinal(ctx, keychange, &olen) != 1) { + EVP_MD_CTX_free(ctx); return (SNMP_CODE_BADDIGEST); } - EVP_MD_CTX_cleanup(&ctx); + EVP_MD_CTX_free(ctx); return (SNMP_CODE_OK); } From owner-svn-src-projects@freebsd.org Wed Sep 19 06:42:07 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD16110913B8 for ; Wed, 19 Sep 2018 06:42:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 72E8473522; Wed, 19 Sep 2018 06:42:07 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D7C2338C; Wed, 19 Sep 2018 06:42:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6g7qI060783; Wed, 19 Sep 2018 06:42:07 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6g5u0060776; Wed, 19 Sep 2018 06:42:05 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190642.w8J6g5u0060776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338770 - projects/openssl111/contrib/dma X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/contrib/dma X-SVN-Commit-Revision: 338770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:42:08 -0000 Author: jkim Date: Wed Sep 19 06:42:05 2018 New Revision: 338770 URL: https://svnweb.freebsd.org/changeset/base/338770 Log: Make dma(8) buildable. Modified: projects/openssl111/contrib/dma/crypto.c projects/openssl111/contrib/dma/dma-mbox-create.c projects/openssl111/contrib/dma/local.c projects/openssl111/contrib/dma/mail.c projects/openssl111/contrib/dma/net.c projects/openssl111/contrib/dma/spool.c projects/openssl111/contrib/dma/util.c Modified: projects/openssl111/contrib/dma/crypto.c ============================================================================== --- projects/openssl111/contrib/dma/crypto.c Wed Sep 19 06:39:10 2018 (r338769) +++ projects/openssl111/contrib/dma/crypto.c Wed Sep 19 06:42:05 2018 (r338770) @@ -40,6 +40,7 @@ #include #include +#include #include #include "dma.h" @@ -93,7 +94,12 @@ smtp_init_crypto(int fd, int feature) SSL_library_init(); SSL_load_error_strings(); - meth = TLSv1_client_method(); + // Allow any possible version +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + meth = TLS_client_method(); +#else + meth = SSLv23_client_method(); +#endif ctx = SSL_CTX_new(meth); if (ctx == NULL) { Modified: projects/openssl111/contrib/dma/dma-mbox-create.c ============================================================================== --- projects/openssl111/contrib/dma/dma-mbox-create.c Wed Sep 19 06:39:10 2018 (r338769) +++ projects/openssl111/contrib/dma/dma-mbox-create.c Wed Sep 19 06:42:05 2018 (r338770) @@ -56,6 +56,7 @@ #include #include #include +#include #include #include Modified: projects/openssl111/contrib/dma/local.c ============================================================================== --- projects/openssl111/contrib/dma/local.c Wed Sep 19 06:39:10 2018 (r338769) +++ projects/openssl111/contrib/dma/local.c Wed Sep 19 06:42:05 2018 (r338770) @@ -44,6 +44,7 @@ #include #include #include +#include #include #include Modified: projects/openssl111/contrib/dma/mail.c ============================================================================== --- projects/openssl111/contrib/dma/mail.c Wed Sep 19 06:39:10 2018 (r338769) +++ projects/openssl111/contrib/dma/mail.c Wed Sep 19 06:42:05 2018 (r338770) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include Modified: projects/openssl111/contrib/dma/net.c ============================================================================== --- projects/openssl111/contrib/dma/net.c Wed Sep 19 06:39:10 2018 (r338769) +++ projects/openssl111/contrib/dma/net.c Wed Sep 19 06:42:05 2018 (r338770) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include Modified: projects/openssl111/contrib/dma/spool.c ============================================================================== --- projects/openssl111/contrib/dma/spool.c Wed Sep 19 06:39:10 2018 (r338769) +++ projects/openssl111/contrib/dma/spool.c Wed Sep 19 06:42:05 2018 (r338770) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include "dma.h" Modified: projects/openssl111/contrib/dma/util.c ============================================================================== --- projects/openssl111/contrib/dma/util.c Wed Sep 19 06:39:10 2018 (r338769) +++ projects/openssl111/contrib/dma/util.c Wed Sep 19 06:42:05 2018 (r338770) @@ -44,6 +44,7 @@ #include #include #include +#include #include #include From owner-svn-src-projects@freebsd.org Wed Sep 19 06:44:32 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81EE2109153E for ; Wed, 19 Sep 2018 06:44:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 330B87369A; Wed, 19 Sep 2018 06:44:32 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28A9A33B1; Wed, 19 Sep 2018 06:44:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6iWEH060936; Wed, 19 Sep 2018 06:44:32 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6iWTd060935; Wed, 19 Sep 2018 06:44:32 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190644.w8J6iWTd060935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338771 - projects/openssl111/contrib/ldns/ldns X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/contrib/ldns/ldns X-SVN-Commit-Revision: 338771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:44:32 -0000 Author: jkim Date: Wed Sep 19 06:44:31 2018 New Revision: 338771 URL: https://svnweb.freebsd.org/changeset/base/338771 Log: Make libldns buildable. Modified: projects/openssl111/contrib/ldns/ldns/config.h Modified: projects/openssl111/contrib/ldns/ldns/config.h ============================================================================== --- projects/openssl111/contrib/ldns/ldns/config.h Wed Sep 19 06:42:05 2018 (r338770) +++ projects/openssl111/contrib/ldns/ldns/config.h Wed Sep 19 06:44:31 2018 (r338771) @@ -60,19 +60,19 @@ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the `DSA_get0_key' function. */ -/* #undef HAVE_DSA_GET0_KEY */ +#define HAVE_DSA_GET0_KEY 1 /* Define to 1 if you have the `DSA_get0_pqg' function. */ -/* #undef HAVE_DSA_GET0_PQG */ +#define HAVE_DSA_GET0_PQG 1 /* Define to 1 if you have the `DSA_SIG_get0' function. */ -/* #undef HAVE_DSA_SIG_GET0 */ +#define HAVE_DSA_SIG_GET0 1 /* Define to 1 if you have the `DSA_SIG_set0' function. */ -/* #undef HAVE_DSA_SIG_SET0 */ +#define HAVE_DSA_SIG_SET0 1 /* Define to 1 if you have the `ECDSA_SIG_get0' function. */ -/* #undef HAVE_ECDSA_SIG_GET0 */ +#define HAVE_ECDSA_SIG_GET0 1 /* Define to 1 if you have the `endprotoent' function. */ #define HAVE_ENDPROTOENT 1 @@ -84,10 +84,10 @@ #define HAVE_ENGINE_LOAD_CRYPTODEV 1 /* Define to 1 if you have the `EVP_dss1' function. */ -#define HAVE_EVP_DSS1 1 +/* #undef HAVE_EVP_DSS1 */ /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -/* #undef HAVE_EVP_MD_CTX_NEW */ +#define HAVE_EVP_MD_CTX_NEW 1 /* Define to 1 if you have the `EVP_PKEY_base_id' function. */ #define HAVE_EVP_PKEY_BASE_ID 1 From owner-svn-src-projects@freebsd.org Wed Sep 19 06:45:14 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 320561091566 for ; Wed, 19 Sep 2018 06:45:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCDD973786; Wed, 19 Sep 2018 06:45:13 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C22B333B2; Wed, 19 Sep 2018 06:45:13 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6jDNL061016; Wed, 19 Sep 2018 06:45:13 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6jDNa061015; Wed, 19 Sep 2018 06:45:13 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190645.w8J6jDNa061015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338772 - projects/openssl111/contrib/openbsm/bin/auditdistd X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/contrib/openbsm/bin/auditdistd X-SVN-Commit-Revision: 338772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:45:14 -0000 Author: jkim Date: Wed Sep 19 06:45:13 2018 New Revision: 338772 URL: https://svnweb.freebsd.org/changeset/base/338772 Log: Make auditdistd(8) buildable. Modified: projects/openssl111/contrib/openbsm/bin/auditdistd/proto_tls.c Modified: projects/openssl111/contrib/openbsm/bin/auditdistd/proto_tls.c ============================================================================== --- projects/openssl111/contrib/openbsm/bin/auditdistd/proto_tls.c Wed Sep 19 06:44:31 2018 (r338771) +++ projects/openssl111/contrib/openbsm/bin/auditdistd/proto_tls.c Wed Sep 19 06:45:13 2018 (r338772) @@ -379,7 +379,7 @@ tls_exec_client(const char *user, int startfd, const c * libcrypto use sysctl kern.arandom to obtain random data * instead of /dev/urandom and friends. */ - sslctx = SSL_CTX_new(TLSv1_client_method()); + sslctx = SSL_CTX_new(TLS_client_method()); if (sslctx == NULL) pjdlog_exitx(EX_TEMPFAIL, "SSL_CTX_new() failed."); @@ -666,7 +666,7 @@ tls_exec_server(const char *user, int startfd, const c SSL_load_error_strings(); SSL_library_init(); - sslctx = SSL_CTX_new(TLSv1_server_method()); + sslctx = SSL_CTX_new(TLS_server_method()); if (sslctx == NULL) pjdlog_exitx(EX_TEMPFAIL, "SSL_CTX_new() failed."); From owner-svn-src-projects@freebsd.org Wed Sep 19 06:48:47 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02CB010915A2 for ; Wed, 19 Sep 2018 06:48:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70EDF73893; Wed, 19 Sep 2018 06:48:46 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D35533B3; Wed, 19 Sep 2018 06:48:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6mk5T061187; Wed, 19 Sep 2018 06:48:46 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6mkUE061186; Wed, 19 Sep 2018 06:48:46 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190648.w8J6mkUE061186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338773 - projects/openssl111/contrib/sendmail/src X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/contrib/sendmail/src X-SVN-Commit-Revision: 338773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:48:47 -0000 Author: jkim Date: Wed Sep 19 06:48:45 2018 New Revision: 338773 URL: https://svnweb.freebsd.org/changeset/base/338773 Log: Make sendmail(8) buildable. Modified: projects/openssl111/contrib/sendmail/src/tls.c Modified: projects/openssl111/contrib/sendmail/src/tls.c ============================================================================== --- projects/openssl111/contrib/sendmail/src/tls.c Wed Sep 19 06:45:13 2018 (r338772) +++ projects/openssl111/contrib/sendmail/src/tls.c Wed Sep 19 06:48:45 2018 (r338773) @@ -60,18 +60,58 @@ static unsigned char dh512_g[] = 0x02 }; +#if OPENSSL_VERSION_NUMBER < 0x10100000 + +static inline int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + /* If the fields p and g in d are NULL, the corresponding input + * parameters MUST be non-NULL. q may remain NULL. + */ + if ((dh->p == NULL && p == NULL) + || (dh->g == NULL && g == NULL)) + return 0; + + if (p != NULL) { + BN_free(dh->p); + dh->p = p; + } + if (q != NULL) { + BN_free(dh->q); + dh->q = q; + } + if (g != NULL) { + BN_free(dh->g); + dh->g = g; + } + + if (q != NULL) { + dh->length = BN_num_bits(q); + } + + return 1; +} +#endif + static DH * get_dh512() { DH *dh = NULL; + BIGNUM *p; + BIGNUM *g; - if ((dh = DH_new()) == NULL) - return NULL; - dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); - dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); - if ((dh->p == NULL) || (dh->g == NULL)) - return NULL; + dh = DH_new(); + p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); + g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); + if (!dh || !p || !g) + goto err; + if (!DH_set0_pqg(dh, p, NULL, g)) + goto err; return dh; +err: + DH_free(dh); + BN_free(p); + BN_free(g); + return NULL; } # if 0 @@ -117,17 +157,22 @@ get_dh2048() }; static unsigned char dh2048_g[]={ 0x02, }; DH *dh; + BIGNUM *p; + BIGNUM *g; - if ((dh=DH_new()) == NULL) - return(NULL); - dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); - dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); - if ((dh->p == NULL) || (dh->g == NULL)) - { - DH_free(dh); - return(NULL); - } + dh = DH_new(); + p = BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); + g = BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); + if (!dh || !p || !g) + goto err; + if (!DH_set0_pqg(dh, p, NULL, g)) + goto err; return(dh); +err: + DH_free(dh); + BN_free(p); + BN_free(g); + return NULL; } # endif /* !NO_DH */ @@ -926,7 +971,7 @@ inittls(ctx, req, options, srv, certfile, keyfile, cac { /* get a pointer to the current certificate validation store */ store = SSL_CTX_get_cert_store(*ctx); /* does not fail */ - crl_file = BIO_new(BIO_s_file_internal()); + crl_file = BIO_new(BIO_s_file()); if (crl_file != NULL) { if (BIO_read_filename(crl_file, CRLFile) >= 0) @@ -1000,26 +1045,41 @@ inittls(ctx, req, options, srv, certfile, keyfile, cac ** maybe we should do it only on demand... */ - if (bitset(TLS_I_RSA_TMP, req) # if SM_CONF_SHM - && ShmId != SM_SHM_NO_ID && - (rsa_tmp = RSA_generate_key(RSA_KEYLENGTH, RSA_F4, NULL, - NULL)) == NULL -# else /* SM_CONF_SHM */ - && 0 /* no shared memory: no need to generate key now */ -# endif /* SM_CONF_SHM */ - ) + if (bitset(TLS_I_RSA_TMP, req) + && ShmId != SM_SHM_NO_ID) { - if (LogLevel > 7) + BIGNUM *bn; + + bn = BN_new(); + rsa_tmp = RSA_new(); + if (!bn || !rsa_tmp || !BN_set_word(bn, RSA_F4)) { + RSA_free(rsa_tmp); + rsa_tmp = NULL; + } + if (rsa_tmp) { - sm_syslog(LOG_WARNING, NOQID, - "STARTTLS=%s, error: RSA_generate_key failed", - who); - if (LogLevel > 9) - tlslogerr(LOG_WARNING, who); + if (!RSA_generate_key_ex(rsa_tmp, RSA_KEYLENGTH, bn, NULL)) + { + RSA_free(rsa_tmp); + rsa_tmp = NULL; + } } - return false; + BN_free(bn); + if (!rsa_tmp) + { + if (LogLevel > 7) + { + sm_syslog(LOG_WARNING, NOQID, + "STARTTLS=%s, error: RSA_generate_key failed", + who); + if (LogLevel > 9) + tlslogerr(LOG_WARNING, who); + } + return false; + } } +# endif /* SM_CONF_SHM */ # endif /* !TLS_NO_RSA */ /* @@ -1210,9 +1270,15 @@ inittls(ctx, req, options, srv, certfile, keyfile, cac sm_dprintf("inittls: Generating %d bit DH parameters\n", bits); /* this takes a while! */ - dsa = DSA_generate_parameters(bits, NULL, 0, NULL, - NULL, 0, NULL); - dh = DSA_dup_DH(dsa); + dsa = DSA_new(); + if (dsa) { + int r; + + r = DSA_generate_parameters_ex(dsa, bits, NULL, 0, + NULL, NULL, NULL); + if (r != 0) + dh = DSA_dup_DH(dsa); + } DSA_free(dsa); } else if (dh == NULL && bitset(TLS_I_DHFIXED, req)) @@ -1733,6 +1799,9 @@ tmp_rsa_key(s, export, keylength) int export; int keylength; { + BIGNUM *bn; + int ret; + # if SM_CONF_SHM extern int ShmId; extern int *PRSATmpCnt; @@ -1742,10 +1811,22 @@ tmp_rsa_key(s, export, keylength) return rsa_tmp; # endif /* SM_CONF_SHM */ - if (rsa_tmp != NULL) - RSA_free(rsa_tmp); - rsa_tmp = RSA_generate_key(RSA_KEYLENGTH, RSA_F4, NULL, NULL); - if (rsa_tmp == NULL) + if (rsa_tmp == NULL) { + rsa_tmp = RSA_new(); + if (!rsa_tmp) + return NULL; + } + + bn = BN_new(); + if (!bn) + return NULL; + if (!BN_set_word(bn, RSA_F4)) { + BN_free(bn); + return NULL; + } + ret = RSA_generate_key_ex(rsa_tmp, RSA_KEYLENGTH, bn, NULL); + BN_free(bn); + if (!ret) { if (LogLevel > 0) sm_syslog(LOG_ERR, NOQID, @@ -1971,9 +2052,9 @@ x509_verify_cb(ok, ctx) { if (LogLevel > 13) tls_verify_log(ok, ctx, "x509"); - if (ctx->error == X509_V_ERR_UNABLE_TO_GET_CRL) + if (X509_STORE_CTX_get_error(ctx) == X509_V_ERR_UNABLE_TO_GET_CRL) { - ctx->error = 0; + X509_STORE_CTX_set_error(ctx, 0); return 1; /* override it */ } } From owner-svn-src-projects@freebsd.org Wed Sep 19 06:50:01 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3A4310915CD for ; Wed, 19 Sep 2018 06:50:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 959817398A; Wed, 19 Sep 2018 06:50:00 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 902C533B7; Wed, 19 Sep 2018 06:50:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6o0tc061330; Wed, 19 Sep 2018 06:50:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6ntjR061273; Wed, 19 Sep 2018 06:49:55 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190649.w8J6ntjR061273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338774 - in projects/openssl111/contrib: serf serf/auth serf/buckets serf/build telnet/libtelnet unbound X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/contrib: serf serf/auth serf/buckets serf/build telnet/libtelnet unbound X-SVN-Commit-Revision: 338774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:50:01 -0000 Author: jkim Date: Wed Sep 19 06:49:55 2018 New Revision: 338774 URL: https://svnweb.freebsd.org/changeset/base/338774 Log: Update Apache Serf to 1.3.9 to make it buildable with OpenSSL 1.1.1. Modified: projects/openssl111/contrib/serf/CHANGES projects/openssl111/contrib/serf/NOTICE projects/openssl111/contrib/serf/README projects/openssl111/contrib/serf/SConstruct projects/openssl111/contrib/serf/auth/auth.c projects/openssl111/contrib/serf/auth/auth.h projects/openssl111/contrib/serf/auth/auth_basic.c projects/openssl111/contrib/serf/auth/auth_digest.c projects/openssl111/contrib/serf/auth/auth_spnego.c projects/openssl111/contrib/serf/auth/auth_spnego.h projects/openssl111/contrib/serf/auth/auth_spnego_gss.c projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c projects/openssl111/contrib/serf/buckets/aggregate_buckets.c projects/openssl111/contrib/serf/buckets/allocator.c projects/openssl111/contrib/serf/buckets/barrier_buckets.c projects/openssl111/contrib/serf/buckets/buckets.c projects/openssl111/contrib/serf/buckets/bwtp_buckets.c projects/openssl111/contrib/serf/buckets/chunk_buckets.c projects/openssl111/contrib/serf/buckets/dechunk_buckets.c projects/openssl111/contrib/serf/buckets/deflate_buckets.c projects/openssl111/contrib/serf/buckets/file_buckets.c projects/openssl111/contrib/serf/buckets/headers_buckets.c projects/openssl111/contrib/serf/buckets/iovec_buckets.c projects/openssl111/contrib/serf/buckets/limit_buckets.c projects/openssl111/contrib/serf/buckets/mmap_buckets.c projects/openssl111/contrib/serf/buckets/request_buckets.c projects/openssl111/contrib/serf/buckets/response_body_buckets.c projects/openssl111/contrib/serf/buckets/response_buckets.c projects/openssl111/contrib/serf/buckets/simple_buckets.c projects/openssl111/contrib/serf/buckets/socket_buckets.c projects/openssl111/contrib/serf/buckets/ssl_buckets.c projects/openssl111/contrib/serf/build/check.py projects/openssl111/contrib/serf/build/gen_def.py projects/openssl111/contrib/serf/context.c projects/openssl111/contrib/serf/incoming.c projects/openssl111/contrib/serf/outgoing.c projects/openssl111/contrib/serf/serf.h projects/openssl111/contrib/serf/serf_bucket_types.h projects/openssl111/contrib/serf/serf_bucket_util.h projects/openssl111/contrib/serf/serf_private.h projects/openssl111/contrib/serf/ssltunnel.c projects/openssl111/contrib/telnet/libtelnet/enc_des.c projects/openssl111/contrib/telnet/libtelnet/encrypt.h projects/openssl111/contrib/telnet/libtelnet/kerberos.c projects/openssl111/contrib/telnet/libtelnet/pk.c projects/openssl111/contrib/telnet/libtelnet/pk.h projects/openssl111/contrib/unbound/config.h Modified: projects/openssl111/contrib/serf/CHANGES ============================================================================== --- projects/openssl111/contrib/serf/CHANGES Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/CHANGES Wed Sep 19 06:49:55 2018 (r338774) @@ -1,7 +1,26 @@ -Serf 1.3.8 [2014-10-20, from /tags/1.3.8, rxxxx] -Fix issue #152: CRC calculation error for gzipped http reponses > 4GB. -Fix issue #153: SSPI CredHandle not freed when APR pool is destroyed. -Fix issue #154: Disable SSLv2 and SSLv3 as both or broken. +Apache Serf 1.3.9 [2016-09-01, from tags/1.3.9, rxxxx] + serf is now Apache Serf; apply header changes (r1700062) + Fix issue #151: SCons build broken when only one library in ENVPATH + Fix issue #153: avoid SSPI handle leak + Fix issue #167: Explicitly use the ANSI version of SSPI + Fix issue #170: Allow building with Microsoft Visual Studio 2015 + Fix build of 'check' target when using VPATH-style builds (r1699858, ...) + (builddir != srcdir). + Resolve a bucket (aka "memory") leak when a request bucket is + destroyed before it is morphed into an aggregate bucket (r1699791) + Reset state variables when resetting connection (r1708849) + Fix types of passed, but unused batons (r1699986, r1699987) + Fix some usages of the openssl BIO api (r1699852) + Improve handling of bad data in the response state line. (r1699985) + Resolve several compiler issues with less common compilers + Support more overrides via SCons arguments (r1701836, ...) + Adapt to OpenSSL 1.1.x api (r1750819) + + +Serf 1.3.8 [2014-10-20, from /tags/1.3.8, r2441] + Fix issue #152: CRC calculation error for gzipped http reponses > 4GB. + Fix issue #153: SSPI CredHandle not freed when APR pool is destroyed. + Fix issue #154: Disable SSLv2 and SSLv3 as both or broken. Serf 1.3.7 [2014-08-11, from /tags/1.3.7, r2411] Modified: projects/openssl111/contrib/serf/NOTICE ============================================================================== --- projects/openssl111/contrib/serf/NOTICE Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/NOTICE Wed Sep 19 06:49:55 2018 (r338774) @@ -1,2 +1,7 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). +Apache Serf +Copyright 2015 The Apache Software Foundation + +This product includes software developed by many people, and distributed +under Contributor License Agreements to The Apache Software Foundation +(http://www.apache.org/). See the revision logs for an exact contribution +history. Modified: projects/openssl111/contrib/serf/README ============================================================================== --- projects/openssl111/contrib/serf/README Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/README Wed Sep 19 06:49:55 2018 (r338774) @@ -1,15 +1,14 @@ -Welcome to serf, a high-performance asynchronous HTTP client library. +Welcome to Apache Serf, a high-performance asynchronous HTTP client library. -The serf library is a C-based HTTP client library built upon the Apache +The Apache Serf library is a C-based HTTP client library built upon the Apache Portable Runtime (APR) library. It multiplexes connections, running the read/write communication asynchronously. Memory copies and transformations are kept to a minimum to provide high performance operation. - * Status: http://code.google.com/p/serf/wiki/ - * Site: http://code.google.com/p/serf/ - * Code: http://serf.googlecode.com/svn/ - * Issues: http://code.google.com/p/serf/issues/list - * Mail: serf-dev@googlegroups.com + * Site: http://serf.apache.org// + * Code: http://svn.apache.org/repos/asf/serf/ + * Issues: https://issues.apache.org/jira/browse/SERF + * Mail: dev@serf.apache.org * People: Justin Erenkrantz, Greg Stein ---- @@ -18,8 +17,8 @@ kept to a minimum to provide high performance operatio 1.1. SCons build system -serf uses SCons 2.3 for its build system. If it is not installed on -your system, then you can install it onto your system. If you do not +Apache Serf uses SCons 2.3 for its build system. If it is not installed +on your system, then you can install it onto your system. If you do not have permissions, then you can download and install the "local" version into your home directory. When installed privately, simply create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. @@ -28,7 +27,7 @@ Fetch the scons-local package: http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz -1.2 Building serf +1.2 Building Apache Serf To build serf: @@ -70,7 +69,7 @@ $ scons --help $ scons check -1.4 Installing serf +1.4 Installing Apache Serf $ scons install Modified: projects/openssl111/contrib/serf/SConstruct ============================================================================== --- projects/openssl111/contrib/serf/SConstruct Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/SConstruct Wed Sep 19 06:49:55 2018 (r338774) @@ -1,19 +1,24 @@ # -*- python -*- # -# Copyright 2011-2012 Justin Erenkrantz and Greg Stein +# ==================================================================== +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ==================================================================== # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# import sys import os @@ -135,7 +140,8 @@ if sys.platform == 'win32': EnumVariable('MSVC_VERSION', "Visual C++ to use for building (E.g. 11.0, 9.0)", None, - allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') + allowed_values=('14.0', '12.0', + '11.0', '10.0', '9.0', '8.0', '6.0') ), # We always documented that we handle an install layout, but in fact we @@ -177,8 +183,7 @@ CALLOUT_OKAY = not (env.GetOption('clean') or env.GetO unknown = opts.UnknownVariables() if unknown: - print 'Unknown variables:', ', '.join(unknown.keys()) - Exit(1) + print 'Warning: Used unknown variables:', ', '.join(unknown.keys()) apr = str(env['APR']) apu = str(env['APU']) @@ -210,7 +215,8 @@ incdir = '$PREFIX/include/serf-$MAJOR' # Unfortunately we can't set the .dylib compatibility_version option separately # from current_version, so don't use the PATCH level to avoid that build and # runtime patch levels have to be identical. -env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0) +if sys.platform != 'sunos5': + env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0) LIBNAME = 'libserf-%d' % (MAJOR,) if sys.platform != 'win32': @@ -223,31 +229,43 @@ env.Append(RPATH=libdir, if sys.platform == 'darwin': # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) - env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) + env.Append(LINKFLAGS=['-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)]) if sys.platform != 'win32': - ### gcc only. figure out appropriate test / better way to check these - ### flags, and check for gcc. - env.Append(CFLAGS='-std=c89') + def CheckGnuCC(context): + src = ''' + #ifndef __GNUC__ + oh noes! + #endif + ''' + context.Message('Checking for GNU-compatible C compiler...') + result = context.TryCompile(src, '.c') + context.Result(result) + return result - ### These warnings are not available on Solaris - if sys.platform != 'sunos5': + conf = Configure(env, custom_tests = dict(CheckGnuCC=CheckGnuCC)) + have_gcc = conf.CheckGnuCC() + env = conf.Finish() + + if have_gcc: + env.Append(CFLAGS=['-std=c89']) env.Append(CCFLAGS=['-Wdeclaration-after-statement', '-Wmissing-prototypes', '-Wall']) if debug: - env.Append(CCFLAGS='-g') + env.Append(CCFLAGS=['-g']) env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) else: - env.Append(CCFLAGS='-O2') - env.Append(CPPDEFINES='NDEBUG') + env.Append(CCFLAGS=['-O2']) + env.Append(CPPDEFINES=['NDEBUG']) ### works for Mac OS. probably needs to change env.Append(LIBS=['ssl', 'crypto', 'z', ]) if sys.platform == 'sunos5': - env.Append(LIBS='m') + env.Append(LIBS=['m']) + env.Append(PLATFORM='posix') else: # Warning level 4, no unused argument warnings env.Append(CCFLAGS=['/W4', '/wd4100']) @@ -260,8 +278,8 @@ else: else: # Optimize for speed, use DLL runtime env.Append(CCFLAGS=['/O2', '/MD']) - env.Append(CPPDEFINES='NDEBUG') - env.Append(LINKFLAGS='/RELEASE') + env.Append(CPPDEFINES=['NDEBUG']) + env.Append(LINKFLAGS=['/RELEASE']) # PLAN THE BUILD SHARED_SOURCES = [] @@ -291,6 +309,7 @@ if sys.platform == 'win32': if aprstatic: apr_libs='apr-1.lib' apu_libs='aprutil-1.lib' + env.Append(LIBS=['shell32.lib', 'xml.lib']) else: apr_libs='libapr-1.lib' apu_libs='libaprutil-1.lib' @@ -307,25 +326,25 @@ if sys.platform == 'win32': CPPPATH=['$APR/include', '$APU/include']) # zlib - env.Append(LIBS='zlib.lib') + env.Append(LIBS=['zlib.lib']) if not env.get('SOURCE_LAYOUT', None): - env.Append(CPPPATH='$ZLIB/include', - LIBPATH='$ZLIB/lib') + env.Append(CPPPATH=['$ZLIB/include'], + LIBPATH=['$ZLIB/lib']) else: - env.Append(CPPPATH='$ZLIB', - LIBPATH='$ZLIB') + env.Append(CPPPATH=['$ZLIB'], + LIBPATH=['$ZLIB']) # openssl env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) if not env.get('SOURCE_LAYOUT', None): - env.Append(CPPPATH='$OPENSSL/include/openssl', - LIBPATH='$OPENSSL/lib') + env.Append(CPPPATH=['$OPENSSL/include/openssl'], + LIBPATH=['$OPENSSL/lib']) elif 0: # opensslstatic: - env.Append(CPPPATH='$OPENSSL/inc32', - LIBPATH='$OPENSSL/out32') + env.Append(CPPPATH=['$OPENSSL/inc32'], + LIBPATH=['$OPENSSL/out32']) else: - env.Append(CPPPATH='$OPENSSL/inc32', - LIBPATH='$OPENSSL/out32dll') + env.Append(CPPPATH=['$OPENSSL/inc32'], + LIBPATH=['$OPENSSL/out32dll']) else: if os.path.isdir(apr): apr = os.path.join(apr, 'bin', 'apr-1-config') @@ -351,8 +370,8 @@ else: apr_libs = '' apu_libs = '' - env.Append(CPPPATH='$OPENSSL/include') - env.Append(LIBPATH='$OPENSSL/lib') + env.Append(CPPPATH=['$OPENSSL/include']) + env.Append(LIBPATH=['$OPENSSL/lib']) # If build with gssapi, get its information and define SERF_HAVE_GSSAPI @@ -362,7 +381,7 @@ if gssapi and CALLOUT_OKAY: env['GSSAPI_LIBS'] = cmd.strip() return env.MergeFlags(cmd, unique) env.ParseConfig('$GSSAPI --libs gssapi', parse_libs) - env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') + env.Append(CPPDEFINES=['SERF_HAVE_GSSAPI']) if sys.platform == 'win32': env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) @@ -428,6 +447,12 @@ env.Alias('install', ['install-lib', 'install-inc', 'i tenv = env.Clone() +# MockHTTP requires C99 standard, so use it for the test suite. +cflags = tenv['CFLAGS'] +tenv.Replace(CFLAGS = [f.replace('-std=c89', '-std=c99') for f in cflags]) + +tenv.Append(CPPDEFINES=['MOCKHTTP_OPENSSL']) + TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', 'test_all', 'serf_bwtp' ] if sys.platform == 'win32': @@ -435,13 +460,22 @@ if sys.platform == 'win32': else: TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] -env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', - ENV={'PATH' : os.environ['PATH']})) - # Find the (dynamic) library in this directory tenv.Replace(RPATH=thisdir) tenv.Prepend(LIBS=[LIBNAMESTATIC, ], LIBPATH=[thisdir, ]) + +check_script = env.File('build/check.py').rstr() +test_dir = env.File('test/test_all.c').rfile().get_dir() +src_dir = env.File('serf.h').rfile().get_dir() +test_app = ("%s %s %s %s") % (sys.executable, check_script, test_dir, 'test') + +# Set the library search path for the test programs +test_env = {'PATH' : os.environ['PATH'], + 'srcdir' : src_dir} +if sys.platform != 'win32': + test_env['LD_LIBRARY_PATH'] = ':'.join(tenv.get('LIBPATH', [])) +env.AlwaysBuild(env.Alias('check', TEST_EXES, test_app, ENV=test_env)) testall_files = [ 'test/test_all.c', Modified: projects/openssl111/contrib/serf/auth/auth.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "serf.h" Modified: projects/openssl111/contrib/serf/auth/auth.h ============================================================================== --- projects/openssl111/contrib/serf/auth/auth.h Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth.h Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #ifndef AUTH_H Modified: projects/openssl111/contrib/serf/auth/auth_basic.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_basic.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth_basic.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ /*** Basic authentication ***/ Modified: projects/openssl111/contrib/serf/auth/auth_digest.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_digest.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth_digest.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ /*** Digest authentication ***/ Modified: projects/openssl111/contrib/serf/auth/auth_spnego.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth_spnego.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,17 +1,23 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ + #include "auth_spnego.h" Modified: projects/openssl111/contrib/serf/auth/auth_spnego.h ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego.h Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth_spnego.h Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2010 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #ifndef AUTH_SPNEGO_H Modified: projects/openssl111/contrib/serf/auth/auth_spnego_gss.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego_gss.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth_spnego_gss.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "serf.h" Modified: projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2010 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "auth_spnego.h" @@ -138,7 +143,7 @@ serf__spnego_create_sec_context(serf__spnego_context_t else sspi_package = "NTLM"; - sspi_status = AcquireCredentialsHandle( + sspi_status = AcquireCredentialsHandleA( NULL, sspi_package, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &ctx->sspi_credentials, NULL); @@ -247,7 +252,7 @@ serf__spnego_init_sec_context(serf_connection_t *conn, sspi_out_buffer_desc.pBuffers = &sspi_out_buffer; sspi_out_buffer_desc.ulVersion = SECBUFFER_VERSION; - status = InitializeSecurityContext( + status = InitializeSecurityContextA( &ctx->sspi_credentials, ctx->initalized ? &ctx->sspi_context : NULL, ctx->target_name, Modified: projects/openssl111/contrib/serf/buckets/aggregate_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/aggregate_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/aggregate_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "serf.h" Modified: projects/openssl111/contrib/serf/buckets/allocator.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/allocator.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/allocator.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/barrier_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/barrier_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/barrier_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/bwtp_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/bwtp_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/bwtp_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/chunk_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/chunk_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/chunk_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/dechunk_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/dechunk_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/dechunk_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/deflate_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/deflate_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/deflate_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/file_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/file_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/file_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/headers_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/headers_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/headers_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/iovec_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/iovec_buckets.c Wed Sep 19 06:48:45 2018 (r338773) +++ projects/openssl111/contrib/serf/buckets/iovec_buckets.c Wed Sep 19 06:49:55 2018 (r338774) @@ -1,16 +1,21 @@ -/* Copyright 2011 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Wed Sep 19 06:56:43 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE542109187F for ; Wed, 19 Sep 2018 06:56:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 63D5273DD7; Wed, 19 Sep 2018 06:56:42 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E8C538AE; Wed, 19 Sep 2018 06:56:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6ugSg066755; Wed, 19 Sep 2018 06:56:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6ubRw066730; Wed, 19 Sep 2018 06:56:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190656.w8J6ubRw066730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338775 - in projects/openssl111/contrib: serf serf/auth serf/buckets serf/build telnet/libtelnet unbound X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/contrib: serf serf/auth serf/buckets serf/build telnet/libtelnet unbound X-SVN-Commit-Revision: 338775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:56:43 -0000 Author: jkim Date: Wed Sep 19 06:56:37 2018 New Revision: 338775 URL: https://svnweb.freebsd.org/changeset/base/338775 Log: Revert r338774. Unrelated changes were committed with Apache Serf. Modified: projects/openssl111/contrib/serf/CHANGES projects/openssl111/contrib/serf/NOTICE projects/openssl111/contrib/serf/README projects/openssl111/contrib/serf/SConstruct projects/openssl111/contrib/serf/auth/auth.c projects/openssl111/contrib/serf/auth/auth.h projects/openssl111/contrib/serf/auth/auth_basic.c projects/openssl111/contrib/serf/auth/auth_digest.c projects/openssl111/contrib/serf/auth/auth_spnego.c projects/openssl111/contrib/serf/auth/auth_spnego.h projects/openssl111/contrib/serf/auth/auth_spnego_gss.c projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c projects/openssl111/contrib/serf/buckets/aggregate_buckets.c projects/openssl111/contrib/serf/buckets/allocator.c projects/openssl111/contrib/serf/buckets/barrier_buckets.c projects/openssl111/contrib/serf/buckets/buckets.c projects/openssl111/contrib/serf/buckets/bwtp_buckets.c projects/openssl111/contrib/serf/buckets/chunk_buckets.c projects/openssl111/contrib/serf/buckets/dechunk_buckets.c projects/openssl111/contrib/serf/buckets/deflate_buckets.c projects/openssl111/contrib/serf/buckets/file_buckets.c projects/openssl111/contrib/serf/buckets/headers_buckets.c projects/openssl111/contrib/serf/buckets/iovec_buckets.c projects/openssl111/contrib/serf/buckets/limit_buckets.c projects/openssl111/contrib/serf/buckets/mmap_buckets.c projects/openssl111/contrib/serf/buckets/request_buckets.c projects/openssl111/contrib/serf/buckets/response_body_buckets.c projects/openssl111/contrib/serf/buckets/response_buckets.c projects/openssl111/contrib/serf/buckets/simple_buckets.c projects/openssl111/contrib/serf/buckets/socket_buckets.c projects/openssl111/contrib/serf/buckets/ssl_buckets.c projects/openssl111/contrib/serf/build/check.py projects/openssl111/contrib/serf/build/gen_def.py projects/openssl111/contrib/serf/context.c projects/openssl111/contrib/serf/incoming.c projects/openssl111/contrib/serf/outgoing.c projects/openssl111/contrib/serf/serf.h projects/openssl111/contrib/serf/serf_bucket_types.h projects/openssl111/contrib/serf/serf_bucket_util.h projects/openssl111/contrib/serf/serf_private.h projects/openssl111/contrib/serf/ssltunnel.c projects/openssl111/contrib/telnet/libtelnet/enc_des.c projects/openssl111/contrib/telnet/libtelnet/encrypt.h projects/openssl111/contrib/telnet/libtelnet/kerberos.c projects/openssl111/contrib/telnet/libtelnet/pk.c projects/openssl111/contrib/telnet/libtelnet/pk.h projects/openssl111/contrib/unbound/config.h Modified: projects/openssl111/contrib/serf/CHANGES ============================================================================== --- projects/openssl111/contrib/serf/CHANGES Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/CHANGES Wed Sep 19 06:56:37 2018 (r338775) @@ -1,26 +1,7 @@ -Apache Serf 1.3.9 [2016-09-01, from tags/1.3.9, rxxxx] - serf is now Apache Serf; apply header changes (r1700062) - Fix issue #151: SCons build broken when only one library in ENVPATH - Fix issue #153: avoid SSPI handle leak - Fix issue #167: Explicitly use the ANSI version of SSPI - Fix issue #170: Allow building with Microsoft Visual Studio 2015 - Fix build of 'check' target when using VPATH-style builds (r1699858, ...) - (builddir != srcdir). - Resolve a bucket (aka "memory") leak when a request bucket is - destroyed before it is morphed into an aggregate bucket (r1699791) - Reset state variables when resetting connection (r1708849) - Fix types of passed, but unused batons (r1699986, r1699987) - Fix some usages of the openssl BIO api (r1699852) - Improve handling of bad data in the response state line. (r1699985) - Resolve several compiler issues with less common compilers - Support more overrides via SCons arguments (r1701836, ...) - Adapt to OpenSSL 1.1.x api (r1750819) - - -Serf 1.3.8 [2014-10-20, from /tags/1.3.8, r2441] - Fix issue #152: CRC calculation error for gzipped http reponses > 4GB. - Fix issue #153: SSPI CredHandle not freed when APR pool is destroyed. - Fix issue #154: Disable SSLv2 and SSLv3 as both or broken. +Serf 1.3.8 [2014-10-20, from /tags/1.3.8, rxxxx] +Fix issue #152: CRC calculation error for gzipped http reponses > 4GB. +Fix issue #153: SSPI CredHandle not freed when APR pool is destroyed. +Fix issue #154: Disable SSLv2 and SSLv3 as both or broken. Serf 1.3.7 [2014-08-11, from /tags/1.3.7, r2411] Modified: projects/openssl111/contrib/serf/NOTICE ============================================================================== --- projects/openssl111/contrib/serf/NOTICE Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/NOTICE Wed Sep 19 06:56:37 2018 (r338775) @@ -1,7 +1,2 @@ -Apache Serf -Copyright 2015 The Apache Software Foundation - -This product includes software developed by many people, and distributed -under Contributor License Agreements to The Apache Software Foundation -(http://www.apache.org/). See the revision logs for an exact contribution -history. +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). Modified: projects/openssl111/contrib/serf/README ============================================================================== --- projects/openssl111/contrib/serf/README Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/README Wed Sep 19 06:56:37 2018 (r338775) @@ -1,14 +1,15 @@ -Welcome to Apache Serf, a high-performance asynchronous HTTP client library. +Welcome to serf, a high-performance asynchronous HTTP client library. -The Apache Serf library is a C-based HTTP client library built upon the Apache +The serf library is a C-based HTTP client library built upon the Apache Portable Runtime (APR) library. It multiplexes connections, running the read/write communication asynchronously. Memory copies and transformations are kept to a minimum to provide high performance operation. - * Site: http://serf.apache.org// - * Code: http://svn.apache.org/repos/asf/serf/ - * Issues: https://issues.apache.org/jira/browse/SERF - * Mail: dev@serf.apache.org + * Status: http://code.google.com/p/serf/wiki/ + * Site: http://code.google.com/p/serf/ + * Code: http://serf.googlecode.com/svn/ + * Issues: http://code.google.com/p/serf/issues/list + * Mail: serf-dev@googlegroups.com * People: Justin Erenkrantz, Greg Stein ---- @@ -17,8 +18,8 @@ kept to a minimum to provide high performance operatio 1.1. SCons build system -Apache Serf uses SCons 2.3 for its build system. If it is not installed -on your system, then you can install it onto your system. If you do not +serf uses SCons 2.3 for its build system. If it is not installed on +your system, then you can install it onto your system. If you do not have permissions, then you can download and install the "local" version into your home directory. When installed privately, simply create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. @@ -27,7 +28,7 @@ Fetch the scons-local package: http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz -1.2 Building Apache Serf +1.2 Building serf To build serf: @@ -69,7 +70,7 @@ $ scons --help $ scons check -1.4 Installing Apache Serf +1.4 Installing serf $ scons install Modified: projects/openssl111/contrib/serf/SConstruct ============================================================================== --- projects/openssl111/contrib/serf/SConstruct Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/SConstruct Wed Sep 19 06:56:37 2018 (r338775) @@ -1,24 +1,19 @@ # -*- python -*- # -# ==================================================================== -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ==================================================================== +# Copyright 2011-2012 Justin Erenkrantz and Greg Stein # +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import sys import os @@ -140,8 +135,7 @@ if sys.platform == 'win32': EnumVariable('MSVC_VERSION', "Visual C++ to use for building (E.g. 11.0, 9.0)", None, - allowed_values=('14.0', '12.0', - '11.0', '10.0', '9.0', '8.0', '6.0') + allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') ), # We always documented that we handle an install layout, but in fact we @@ -183,7 +177,8 @@ CALLOUT_OKAY = not (env.GetOption('clean') or env.GetO unknown = opts.UnknownVariables() if unknown: - print 'Warning: Used unknown variables:', ', '.join(unknown.keys()) + print 'Unknown variables:', ', '.join(unknown.keys()) + Exit(1) apr = str(env['APR']) apu = str(env['APU']) @@ -215,8 +210,7 @@ incdir = '$PREFIX/include/serf-$MAJOR' # Unfortunately we can't set the .dylib compatibility_version option separately # from current_version, so don't use the PATCH level to avoid that build and # runtime patch levels have to be identical. -if sys.platform != 'sunos5': - env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0) +env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0) LIBNAME = 'libserf-%d' % (MAJOR,) if sys.platform != 'win32': @@ -229,43 +223,31 @@ env.Append(RPATH=libdir, if sys.platform == 'darwin': # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) - env.Append(LINKFLAGS=['-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)]) + env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) if sys.platform != 'win32': - def CheckGnuCC(context): - src = ''' - #ifndef __GNUC__ - oh noes! - #endif - ''' - context.Message('Checking for GNU-compatible C compiler...') - result = context.TryCompile(src, '.c') - context.Result(result) - return result + ### gcc only. figure out appropriate test / better way to check these + ### flags, and check for gcc. + env.Append(CFLAGS='-std=c89') - conf = Configure(env, custom_tests = dict(CheckGnuCC=CheckGnuCC)) - have_gcc = conf.CheckGnuCC() - env = conf.Finish() - - if have_gcc: - env.Append(CFLAGS=['-std=c89']) + ### These warnings are not available on Solaris + if sys.platform != 'sunos5': env.Append(CCFLAGS=['-Wdeclaration-after-statement', '-Wmissing-prototypes', '-Wall']) if debug: - env.Append(CCFLAGS=['-g']) + env.Append(CCFLAGS='-g') env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) else: - env.Append(CCFLAGS=['-O2']) - env.Append(CPPDEFINES=['NDEBUG']) + env.Append(CCFLAGS='-O2') + env.Append(CPPDEFINES='NDEBUG') ### works for Mac OS. probably needs to change env.Append(LIBS=['ssl', 'crypto', 'z', ]) if sys.platform == 'sunos5': - env.Append(LIBS=['m']) - env.Append(PLATFORM='posix') + env.Append(LIBS='m') else: # Warning level 4, no unused argument warnings env.Append(CCFLAGS=['/W4', '/wd4100']) @@ -278,8 +260,8 @@ else: else: # Optimize for speed, use DLL runtime env.Append(CCFLAGS=['/O2', '/MD']) - env.Append(CPPDEFINES=['NDEBUG']) - env.Append(LINKFLAGS=['/RELEASE']) + env.Append(CPPDEFINES='NDEBUG') + env.Append(LINKFLAGS='/RELEASE') # PLAN THE BUILD SHARED_SOURCES = [] @@ -309,7 +291,6 @@ if sys.platform == 'win32': if aprstatic: apr_libs='apr-1.lib' apu_libs='aprutil-1.lib' - env.Append(LIBS=['shell32.lib', 'xml.lib']) else: apr_libs='libapr-1.lib' apu_libs='libaprutil-1.lib' @@ -326,25 +307,25 @@ if sys.platform == 'win32': CPPPATH=['$APR/include', '$APU/include']) # zlib - env.Append(LIBS=['zlib.lib']) + env.Append(LIBS='zlib.lib') if not env.get('SOURCE_LAYOUT', None): - env.Append(CPPPATH=['$ZLIB/include'], - LIBPATH=['$ZLIB/lib']) + env.Append(CPPPATH='$ZLIB/include', + LIBPATH='$ZLIB/lib') else: - env.Append(CPPPATH=['$ZLIB'], - LIBPATH=['$ZLIB']) + env.Append(CPPPATH='$ZLIB', + LIBPATH='$ZLIB') # openssl env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) if not env.get('SOURCE_LAYOUT', None): - env.Append(CPPPATH=['$OPENSSL/include/openssl'], - LIBPATH=['$OPENSSL/lib']) + env.Append(CPPPATH='$OPENSSL/include/openssl', + LIBPATH='$OPENSSL/lib') elif 0: # opensslstatic: - env.Append(CPPPATH=['$OPENSSL/inc32'], - LIBPATH=['$OPENSSL/out32']) + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32') else: - env.Append(CPPPATH=['$OPENSSL/inc32'], - LIBPATH=['$OPENSSL/out32dll']) + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32dll') else: if os.path.isdir(apr): apr = os.path.join(apr, 'bin', 'apr-1-config') @@ -370,8 +351,8 @@ else: apr_libs = '' apu_libs = '' - env.Append(CPPPATH=['$OPENSSL/include']) - env.Append(LIBPATH=['$OPENSSL/lib']) + env.Append(CPPPATH='$OPENSSL/include') + env.Append(LIBPATH='$OPENSSL/lib') # If build with gssapi, get its information and define SERF_HAVE_GSSAPI @@ -381,7 +362,7 @@ if gssapi and CALLOUT_OKAY: env['GSSAPI_LIBS'] = cmd.strip() return env.MergeFlags(cmd, unique) env.ParseConfig('$GSSAPI --libs gssapi', parse_libs) - env.Append(CPPDEFINES=['SERF_HAVE_GSSAPI']) + env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') if sys.platform == 'win32': env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) @@ -447,12 +428,6 @@ env.Alias('install', ['install-lib', 'install-inc', 'i tenv = env.Clone() -# MockHTTP requires C99 standard, so use it for the test suite. -cflags = tenv['CFLAGS'] -tenv.Replace(CFLAGS = [f.replace('-std=c89', '-std=c99') for f in cflags]) - -tenv.Append(CPPDEFINES=['MOCKHTTP_OPENSSL']) - TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', 'test_all', 'serf_bwtp' ] if sys.platform == 'win32': @@ -460,22 +435,13 @@ if sys.platform == 'win32': else: TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] +env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', + ENV={'PATH' : os.environ['PATH']})) + # Find the (dynamic) library in this directory tenv.Replace(RPATH=thisdir) tenv.Prepend(LIBS=[LIBNAMESTATIC, ], LIBPATH=[thisdir, ]) - -check_script = env.File('build/check.py').rstr() -test_dir = env.File('test/test_all.c').rfile().get_dir() -src_dir = env.File('serf.h').rfile().get_dir() -test_app = ("%s %s %s %s") % (sys.executable, check_script, test_dir, 'test') - -# Set the library search path for the test programs -test_env = {'PATH' : os.environ['PATH'], - 'srcdir' : src_dir} -if sys.platform != 'win32': - test_env['LD_LIBRARY_PATH'] = ':'.join(tenv.get('LIBPATH', [])) -env.AlwaysBuild(env.Alias('check', TEST_EXES, test_app, ENV=test_env)) testall_files = [ 'test/test_all.c', Modified: projects/openssl111/contrib/serf/auth/auth.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2009 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "serf.h" Modified: projects/openssl111/contrib/serf/auth/auth.h ============================================================================== --- projects/openssl111/contrib/serf/auth/auth.h Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth.h Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2009 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef AUTH_H Modified: projects/openssl111/contrib/serf/auth/auth_basic.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_basic.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth_basic.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2009 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /*** Basic authentication ***/ Modified: projects/openssl111/contrib/serf/auth/auth_digest.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_digest.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth_digest.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2009 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /*** Digest authentication ***/ Modified: projects/openssl111/contrib/serf/auth/auth_spnego.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth_spnego.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,23 +1,17 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2009 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - #include "auth_spnego.h" Modified: projects/openssl111/contrib/serf/auth/auth_spnego.h ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego.h Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth_spnego.h Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2010 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef AUTH_SPNEGO_H Modified: projects/openssl111/contrib/serf/auth/auth_spnego_gss.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego_gss.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth_spnego_gss.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2009 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "serf.h" Modified: projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2010 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "auth_spnego.h" @@ -143,7 +138,7 @@ serf__spnego_create_sec_context(serf__spnego_context_t else sspi_package = "NTLM"; - sspi_status = AcquireCredentialsHandleA( + sspi_status = AcquireCredentialsHandle( NULL, sspi_package, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &ctx->sspi_credentials, NULL); @@ -252,7 +247,7 @@ serf__spnego_init_sec_context(serf_connection_t *conn, sspi_out_buffer_desc.pBuffers = &sspi_out_buffer; sspi_out_buffer_desc.ulVersion = SECBUFFER_VERSION; - status = InitializeSecurityContextA( + status = InitializeSecurityContext( &ctx->sspi_credentials, ctx->initalized ? &ctx->sspi_context : NULL, ctx->target_name, Modified: projects/openssl111/contrib/serf/buckets/aggregate_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/aggregate_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/aggregate_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "serf.h" Modified: projects/openssl111/contrib/serf/buckets/allocator.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/allocator.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/allocator.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/barrier_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/barrier_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/barrier_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/bwtp_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/bwtp_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/bwtp_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/chunk_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/chunk_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/chunk_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/dechunk_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/dechunk_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/dechunk_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/deflate_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/deflate_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/deflate_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/file_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/file_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/file_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/headers_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/headers_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/headers_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2004 Justin Erenkrantz and Greg Stein * - * http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include Modified: projects/openssl111/contrib/serf/buckets/iovec_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/iovec_buckets.c Wed Sep 19 06:49:55 2018 (r338774) +++ projects/openssl111/contrib/serf/buckets/iovec_buckets.c Wed Sep 19 06:56:37 2018 (r338775) @@ -1,21 +1,16 @@ -/* ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at +/* Copyright 2011 Justin Erenkrantz and Greg Stein * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Wed Sep 19 06:59:34 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21487109190F for ; Wed, 19 Sep 2018 06:59:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA9B573EEC; Wed, 19 Sep 2018 06:59:33 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C071338AF; Wed, 19 Sep 2018 06:59:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J6xXxo066946; Wed, 19 Sep 2018 06:59:33 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J6xTnw066920; Wed, 19 Sep 2018 06:59:29 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190659.w8J6xTnw066920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 06:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338776 - in projects/openssl111/contrib/serf: . auth buckets build X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/contrib/serf: . auth buckets build X-SVN-Commit-Revision: 338776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 06:59:34 -0000 Author: jkim Date: Wed Sep 19 06:59:28 2018 New Revision: 338776 URL: https://svnweb.freebsd.org/changeset/base/338776 Log: Update Apache Serf to 1.9.3 to support OpenSSL 1.1.1. Modified: projects/openssl111/contrib/serf/CHANGES projects/openssl111/contrib/serf/NOTICE projects/openssl111/contrib/serf/README projects/openssl111/contrib/serf/SConstruct projects/openssl111/contrib/serf/auth/auth.c projects/openssl111/contrib/serf/auth/auth.h projects/openssl111/contrib/serf/auth/auth_basic.c projects/openssl111/contrib/serf/auth/auth_digest.c projects/openssl111/contrib/serf/auth/auth_spnego.c projects/openssl111/contrib/serf/auth/auth_spnego.h projects/openssl111/contrib/serf/auth/auth_spnego_gss.c projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c projects/openssl111/contrib/serf/buckets/aggregate_buckets.c projects/openssl111/contrib/serf/buckets/allocator.c projects/openssl111/contrib/serf/buckets/barrier_buckets.c projects/openssl111/contrib/serf/buckets/buckets.c projects/openssl111/contrib/serf/buckets/bwtp_buckets.c projects/openssl111/contrib/serf/buckets/chunk_buckets.c projects/openssl111/contrib/serf/buckets/dechunk_buckets.c projects/openssl111/contrib/serf/buckets/deflate_buckets.c projects/openssl111/contrib/serf/buckets/file_buckets.c projects/openssl111/contrib/serf/buckets/headers_buckets.c projects/openssl111/contrib/serf/buckets/iovec_buckets.c projects/openssl111/contrib/serf/buckets/limit_buckets.c projects/openssl111/contrib/serf/buckets/mmap_buckets.c projects/openssl111/contrib/serf/buckets/request_buckets.c projects/openssl111/contrib/serf/buckets/response_body_buckets.c projects/openssl111/contrib/serf/buckets/response_buckets.c projects/openssl111/contrib/serf/buckets/simple_buckets.c projects/openssl111/contrib/serf/buckets/socket_buckets.c projects/openssl111/contrib/serf/buckets/ssl_buckets.c projects/openssl111/contrib/serf/build/check.py projects/openssl111/contrib/serf/build/gen_def.py projects/openssl111/contrib/serf/context.c projects/openssl111/contrib/serf/incoming.c projects/openssl111/contrib/serf/outgoing.c projects/openssl111/contrib/serf/serf.h projects/openssl111/contrib/serf/serf_bucket_types.h projects/openssl111/contrib/serf/serf_bucket_util.h projects/openssl111/contrib/serf/serf_private.h projects/openssl111/contrib/serf/ssltunnel.c Modified: projects/openssl111/contrib/serf/CHANGES ============================================================================== --- projects/openssl111/contrib/serf/CHANGES Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/CHANGES Wed Sep 19 06:59:28 2018 (r338776) @@ -1,7 +1,26 @@ -Serf 1.3.8 [2014-10-20, from /tags/1.3.8, rxxxx] -Fix issue #152: CRC calculation error for gzipped http reponses > 4GB. -Fix issue #153: SSPI CredHandle not freed when APR pool is destroyed. -Fix issue #154: Disable SSLv2 and SSLv3 as both or broken. +Apache Serf 1.3.9 [2016-09-01, from tags/1.3.9, rxxxx] + serf is now Apache Serf; apply header changes (r1700062) + Fix issue #151: SCons build broken when only one library in ENVPATH + Fix issue #153: avoid SSPI handle leak + Fix issue #167: Explicitly use the ANSI version of SSPI + Fix issue #170: Allow building with Microsoft Visual Studio 2015 + Fix build of 'check' target when using VPATH-style builds (r1699858, ...) + (builddir != srcdir). + Resolve a bucket (aka "memory") leak when a request bucket is + destroyed before it is morphed into an aggregate bucket (r1699791) + Reset state variables when resetting connection (r1708849) + Fix types of passed, but unused batons (r1699986, r1699987) + Fix some usages of the openssl BIO api (r1699852) + Improve handling of bad data in the response state line. (r1699985) + Resolve several compiler issues with less common compilers + Support more overrides via SCons arguments (r1701836, ...) + Adapt to OpenSSL 1.1.x api (r1750819) + + +Serf 1.3.8 [2014-10-20, from /tags/1.3.8, r2441] + Fix issue #152: CRC calculation error for gzipped http reponses > 4GB. + Fix issue #153: SSPI CredHandle not freed when APR pool is destroyed. + Fix issue #154: Disable SSLv2 and SSLv3 as both or broken. Serf 1.3.7 [2014-08-11, from /tags/1.3.7, r2411] Modified: projects/openssl111/contrib/serf/NOTICE ============================================================================== --- projects/openssl111/contrib/serf/NOTICE Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/NOTICE Wed Sep 19 06:59:28 2018 (r338776) @@ -1,2 +1,7 @@ -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). +Apache Serf +Copyright 2015 The Apache Software Foundation + +This product includes software developed by many people, and distributed +under Contributor License Agreements to The Apache Software Foundation +(http://www.apache.org/). See the revision logs for an exact contribution +history. Modified: projects/openssl111/contrib/serf/README ============================================================================== --- projects/openssl111/contrib/serf/README Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/README Wed Sep 19 06:59:28 2018 (r338776) @@ -1,15 +1,14 @@ -Welcome to serf, a high-performance asynchronous HTTP client library. +Welcome to Apache Serf, a high-performance asynchronous HTTP client library. -The serf library is a C-based HTTP client library built upon the Apache +The Apache Serf library is a C-based HTTP client library built upon the Apache Portable Runtime (APR) library. It multiplexes connections, running the read/write communication asynchronously. Memory copies and transformations are kept to a minimum to provide high performance operation. - * Status: http://code.google.com/p/serf/wiki/ - * Site: http://code.google.com/p/serf/ - * Code: http://serf.googlecode.com/svn/ - * Issues: http://code.google.com/p/serf/issues/list - * Mail: serf-dev@googlegroups.com + * Site: http://serf.apache.org// + * Code: http://svn.apache.org/repos/asf/serf/ + * Issues: https://issues.apache.org/jira/browse/SERF + * Mail: dev@serf.apache.org * People: Justin Erenkrantz, Greg Stein ---- @@ -18,8 +17,8 @@ kept to a minimum to provide high performance operatio 1.1. SCons build system -serf uses SCons 2.3 for its build system. If it is not installed on -your system, then you can install it onto your system. If you do not +Apache Serf uses SCons 2.3 for its build system. If it is not installed +on your system, then you can install it onto your system. If you do not have permissions, then you can download and install the "local" version into your home directory. When installed privately, simply create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. @@ -28,7 +27,7 @@ Fetch the scons-local package: http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz -1.2 Building serf +1.2 Building Apache Serf To build serf: @@ -70,7 +69,7 @@ $ scons --help $ scons check -1.4 Installing serf +1.4 Installing Apache Serf $ scons install Modified: projects/openssl111/contrib/serf/SConstruct ============================================================================== --- projects/openssl111/contrib/serf/SConstruct Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/SConstruct Wed Sep 19 06:59:28 2018 (r338776) @@ -1,19 +1,24 @@ # -*- python -*- # -# Copyright 2011-2012 Justin Erenkrantz and Greg Stein +# ==================================================================== +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ==================================================================== # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# import sys import os @@ -135,7 +140,8 @@ if sys.platform == 'win32': EnumVariable('MSVC_VERSION', "Visual C++ to use for building (E.g. 11.0, 9.0)", None, - allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') + allowed_values=('14.0', '12.0', + '11.0', '10.0', '9.0', '8.0', '6.0') ), # We always documented that we handle an install layout, but in fact we @@ -177,8 +183,7 @@ CALLOUT_OKAY = not (env.GetOption('clean') or env.GetO unknown = opts.UnknownVariables() if unknown: - print 'Unknown variables:', ', '.join(unknown.keys()) - Exit(1) + print 'Warning: Used unknown variables:', ', '.join(unknown.keys()) apr = str(env['APR']) apu = str(env['APU']) @@ -210,7 +215,8 @@ incdir = '$PREFIX/include/serf-$MAJOR' # Unfortunately we can't set the .dylib compatibility_version option separately # from current_version, so don't use the PATCH level to avoid that build and # runtime patch levels have to be identical. -env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0) +if sys.platform != 'sunos5': + env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0) LIBNAME = 'libserf-%d' % (MAJOR,) if sys.platform != 'win32': @@ -223,31 +229,43 @@ env.Append(RPATH=libdir, if sys.platform == 'darwin': # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) - env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) + env.Append(LINKFLAGS=['-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)]) if sys.platform != 'win32': - ### gcc only. figure out appropriate test / better way to check these - ### flags, and check for gcc. - env.Append(CFLAGS='-std=c89') + def CheckGnuCC(context): + src = ''' + #ifndef __GNUC__ + oh noes! + #endif + ''' + context.Message('Checking for GNU-compatible C compiler...') + result = context.TryCompile(src, '.c') + context.Result(result) + return result - ### These warnings are not available on Solaris - if sys.platform != 'sunos5': + conf = Configure(env, custom_tests = dict(CheckGnuCC=CheckGnuCC)) + have_gcc = conf.CheckGnuCC() + env = conf.Finish() + + if have_gcc: + env.Append(CFLAGS=['-std=c89']) env.Append(CCFLAGS=['-Wdeclaration-after-statement', '-Wmissing-prototypes', '-Wall']) if debug: - env.Append(CCFLAGS='-g') + env.Append(CCFLAGS=['-g']) env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) else: - env.Append(CCFLAGS='-O2') - env.Append(CPPDEFINES='NDEBUG') + env.Append(CCFLAGS=['-O2']) + env.Append(CPPDEFINES=['NDEBUG']) ### works for Mac OS. probably needs to change env.Append(LIBS=['ssl', 'crypto', 'z', ]) if sys.platform == 'sunos5': - env.Append(LIBS='m') + env.Append(LIBS=['m']) + env.Append(PLATFORM='posix') else: # Warning level 4, no unused argument warnings env.Append(CCFLAGS=['/W4', '/wd4100']) @@ -260,8 +278,8 @@ else: else: # Optimize for speed, use DLL runtime env.Append(CCFLAGS=['/O2', '/MD']) - env.Append(CPPDEFINES='NDEBUG') - env.Append(LINKFLAGS='/RELEASE') + env.Append(CPPDEFINES=['NDEBUG']) + env.Append(LINKFLAGS=['/RELEASE']) # PLAN THE BUILD SHARED_SOURCES = [] @@ -291,6 +309,7 @@ if sys.platform == 'win32': if aprstatic: apr_libs='apr-1.lib' apu_libs='aprutil-1.lib' + env.Append(LIBS=['shell32.lib', 'xml.lib']) else: apr_libs='libapr-1.lib' apu_libs='libaprutil-1.lib' @@ -307,25 +326,25 @@ if sys.platform == 'win32': CPPPATH=['$APR/include', '$APU/include']) # zlib - env.Append(LIBS='zlib.lib') + env.Append(LIBS=['zlib.lib']) if not env.get('SOURCE_LAYOUT', None): - env.Append(CPPPATH='$ZLIB/include', - LIBPATH='$ZLIB/lib') + env.Append(CPPPATH=['$ZLIB/include'], + LIBPATH=['$ZLIB/lib']) else: - env.Append(CPPPATH='$ZLIB', - LIBPATH='$ZLIB') + env.Append(CPPPATH=['$ZLIB'], + LIBPATH=['$ZLIB']) # openssl env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) if not env.get('SOURCE_LAYOUT', None): - env.Append(CPPPATH='$OPENSSL/include/openssl', - LIBPATH='$OPENSSL/lib') + env.Append(CPPPATH=['$OPENSSL/include/openssl'], + LIBPATH=['$OPENSSL/lib']) elif 0: # opensslstatic: - env.Append(CPPPATH='$OPENSSL/inc32', - LIBPATH='$OPENSSL/out32') + env.Append(CPPPATH=['$OPENSSL/inc32'], + LIBPATH=['$OPENSSL/out32']) else: - env.Append(CPPPATH='$OPENSSL/inc32', - LIBPATH='$OPENSSL/out32dll') + env.Append(CPPPATH=['$OPENSSL/inc32'], + LIBPATH=['$OPENSSL/out32dll']) else: if os.path.isdir(apr): apr = os.path.join(apr, 'bin', 'apr-1-config') @@ -351,8 +370,8 @@ else: apr_libs = '' apu_libs = '' - env.Append(CPPPATH='$OPENSSL/include') - env.Append(LIBPATH='$OPENSSL/lib') + env.Append(CPPPATH=['$OPENSSL/include']) + env.Append(LIBPATH=['$OPENSSL/lib']) # If build with gssapi, get its information and define SERF_HAVE_GSSAPI @@ -362,7 +381,7 @@ if gssapi and CALLOUT_OKAY: env['GSSAPI_LIBS'] = cmd.strip() return env.MergeFlags(cmd, unique) env.ParseConfig('$GSSAPI --libs gssapi', parse_libs) - env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') + env.Append(CPPDEFINES=['SERF_HAVE_GSSAPI']) if sys.platform == 'win32': env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) @@ -428,6 +447,12 @@ env.Alias('install', ['install-lib', 'install-inc', 'i tenv = env.Clone() +# MockHTTP requires C99 standard, so use it for the test suite. +cflags = tenv['CFLAGS'] +tenv.Replace(CFLAGS = [f.replace('-std=c89', '-std=c99') for f in cflags]) + +tenv.Append(CPPDEFINES=['MOCKHTTP_OPENSSL']) + TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', 'test_all', 'serf_bwtp' ] if sys.platform == 'win32': @@ -435,13 +460,22 @@ if sys.platform == 'win32': else: TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] -env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', - ENV={'PATH' : os.environ['PATH']})) - # Find the (dynamic) library in this directory tenv.Replace(RPATH=thisdir) tenv.Prepend(LIBS=[LIBNAMESTATIC, ], LIBPATH=[thisdir, ]) + +check_script = env.File('build/check.py').rstr() +test_dir = env.File('test/test_all.c').rfile().get_dir() +src_dir = env.File('serf.h').rfile().get_dir() +test_app = ("%s %s %s %s") % (sys.executable, check_script, test_dir, 'test') + +# Set the library search path for the test programs +test_env = {'PATH' : os.environ['PATH'], + 'srcdir' : src_dir} +if sys.platform != 'win32': + test_env['LD_LIBRARY_PATH'] = ':'.join(tenv.get('LIBPATH', [])) +env.AlwaysBuild(env.Alias('check', TEST_EXES, test_app, ENV=test_env)) testall_files = [ 'test/test_all.c', Modified: projects/openssl111/contrib/serf/auth/auth.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "serf.h" Modified: projects/openssl111/contrib/serf/auth/auth.h ============================================================================== --- projects/openssl111/contrib/serf/auth/auth.h Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth.h Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #ifndef AUTH_H Modified: projects/openssl111/contrib/serf/auth/auth_basic.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_basic.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth_basic.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ /*** Basic authentication ***/ Modified: projects/openssl111/contrib/serf/auth/auth_digest.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_digest.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth_digest.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ /*** Digest authentication ***/ Modified: projects/openssl111/contrib/serf/auth/auth_spnego.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth_spnego.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,17 +1,23 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ + #include "auth_spnego.h" Modified: projects/openssl111/contrib/serf/auth/auth_spnego.h ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego.h Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth_spnego.h Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2010 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #ifndef AUTH_SPNEGO_H Modified: projects/openssl111/contrib/serf/auth/auth_spnego_gss.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego_gss.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth_spnego_gss.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2009 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "serf.h" Modified: projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c ============================================================================== --- projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/auth/auth_spnego_sspi.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2010 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "auth_spnego.h" @@ -138,7 +143,7 @@ serf__spnego_create_sec_context(serf__spnego_context_t else sspi_package = "NTLM"; - sspi_status = AcquireCredentialsHandle( + sspi_status = AcquireCredentialsHandleA( NULL, sspi_package, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &ctx->sspi_credentials, NULL); @@ -247,7 +252,7 @@ serf__spnego_init_sec_context(serf_connection_t *conn, sspi_out_buffer_desc.pBuffers = &sspi_out_buffer; sspi_out_buffer_desc.ulVersion = SECBUFFER_VERSION; - status = InitializeSecurityContext( + status = InitializeSecurityContextA( &ctx->sspi_credentials, ctx->initalized ? &ctx->sspi_context : NULL, ctx->target_name, Modified: projects/openssl111/contrib/serf/buckets/aggregate_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/aggregate_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/aggregate_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include "serf.h" Modified: projects/openssl111/contrib/serf/buckets/allocator.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/allocator.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/allocator.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/barrier_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/barrier_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/barrier_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/bwtp_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/bwtp_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/bwtp_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/chunk_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/chunk_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/chunk_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/dechunk_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/dechunk_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/dechunk_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/deflate_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/deflate_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/deflate_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/file_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/file_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/file_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2002-2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/headers_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/headers_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/headers_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2004 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== */ #include Modified: projects/openssl111/contrib/serf/buckets/iovec_buckets.c ============================================================================== --- projects/openssl111/contrib/serf/buckets/iovec_buckets.c Wed Sep 19 06:56:37 2018 (r338775) +++ projects/openssl111/contrib/serf/buckets/iovec_buckets.c Wed Sep 19 06:59:28 2018 (r338776) @@ -1,16 +1,21 @@ -/* Copyright 2011 Justin Erenkrantz and Greg Stein +/* ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Wed Sep 19 07:01:24 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E5CE1091AA1 for ; Wed, 19 Sep 2018 07:01:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C571174080; Wed, 19 Sep 2018 07:01:23 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C06923A9A; Wed, 19 Sep 2018 07:01:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J71NH2070742; Wed, 19 Sep 2018 07:01:23 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J71Mve070737; Wed, 19 Sep 2018 07:01:22 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190701.w8J71Mve070737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338777 - projects/openssl111/contrib/telnet/libtelnet X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/contrib/telnet/libtelnet X-SVN-Commit-Revision: 338777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:01:24 -0000 Author: jkim Date: Wed Sep 19 07:01:22 2018 New Revision: 338777 URL: https://svnweb.freebsd.org/changeset/base/338777 Log: Make telnet(1) buildable. Modified: projects/openssl111/contrib/telnet/libtelnet/enc_des.c projects/openssl111/contrib/telnet/libtelnet/encrypt.h projects/openssl111/contrib/telnet/libtelnet/kerberos.c projects/openssl111/contrib/telnet/libtelnet/pk.c projects/openssl111/contrib/telnet/libtelnet/pk.h Modified: projects/openssl111/contrib/telnet/libtelnet/enc_des.c ============================================================================== --- projects/openssl111/contrib/telnet/libtelnet/enc_des.c Wed Sep 19 06:59:28 2018 (r338776) +++ projects/openssl111/contrib/telnet/libtelnet/enc_des.c Wed Sep 19 07:01:22 2018 (r338777) @@ -207,9 +207,9 @@ fb64_start(struct fb *fbp, int dir, int server __unuse /* * Create a random feed and send it over. */ - des_random_key((Block *)fbp->temp_feed); - des_ecb_encrypt((Block *)fbp->temp_feed, (Block *)fbp->temp_feed, - fbp->krbdes_sched, 1); + DES_random_key((Block *)fbp->temp_feed); + DES_ecb_encrypt((Block *)fbp->temp_feed, (Block *)fbp->temp_feed, + &fbp->krbdes_sched, 1); p = fbp->fb_feed + 3; *p++ = ENCRYPT_IS; p++; @@ -393,7 +393,7 @@ fb64_session(Session_Key *key, int server, struct fb * fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_ENCRYPT-1]); fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_DECRYPT-1]); - des_key_sched((Block *)fbp->krbdes_key, fbp->krbdes_sched); + DES_key_sched((Block *)fbp->krbdes_key, &fbp->krbdes_sched); /* * Now look to see if krbdes_start() was was waiting for * the key to show up. If so, go ahead an call it now @@ -499,7 +499,7 @@ fb64_stream_iv(Block seed, struct stinfo *stp) memmove((void *)stp->str_iv, (void *)seed, sizeof(Block)); memmove((void *)stp->str_output, (void *)seed, sizeof(Block)); - des_key_sched((Block *)stp->str_ikey, stp->str_sched); + DES_key_sched((Block *)stp->str_ikey, &stp->str_sched); stp->str_index = sizeof(Block); } @@ -508,7 +508,7 @@ void fb64_stream_key(Block key, struct stinfo *stp) { memmove((void *)stp->str_ikey, (void *)key, sizeof(Block)); - des_key_sched((Block *)key, stp->str_sched); + DES_key_sched((Block *)key, &stp->str_sched); memmove((void *)stp->str_output, (void *)stp->str_iv, sizeof(Block)); @@ -547,7 +547,7 @@ cfb64_encrypt(unsigned char *s, int c) while (c-- > 0) { if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_output, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_output, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); idx = 0; } @@ -580,7 +580,7 @@ cfb64_decrypt(int data) idx = stp->str_index++; if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_output, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_output, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); stp->str_index = 1; /* Next time will be 1 */ idx = 0; /* But now use 0 */ @@ -620,7 +620,7 @@ ofb64_encrypt(unsigned char *s, int c) while (c-- > 0) { if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_feed, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_feed, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); idx = 0; } @@ -650,7 +650,7 @@ ofb64_decrypt(int data) idx = stp->str_index++; if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_feed, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_feed, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); stp->str_index = 1; /* Next time will be 1 */ idx = 0; /* But now use 0 */ Modified: projects/openssl111/contrib/telnet/libtelnet/encrypt.h ============================================================================== --- projects/openssl111/contrib/telnet/libtelnet/encrypt.h Wed Sep 19 06:59:28 2018 (r338776) +++ projects/openssl111/contrib/telnet/libtelnet/encrypt.h Wed Sep 19 07:01:22 2018 (r338777) @@ -67,7 +67,7 @@ typedef unsigned char *BlockT; #if 0 typedef struct { Block __; } Schedule[16]; #else -#define Schedule des_key_schedule +#define Schedule DES_key_schedule #endif #define VALIDKEY(key) ( key[0] | key[1] | key[2] | key[3] | \ Modified: projects/openssl111/contrib/telnet/libtelnet/kerberos.c ============================================================================== --- projects/openssl111/contrib/telnet/libtelnet/kerberos.c Wed Sep 19 06:59:28 2018 (r338776) +++ projects/openssl111/contrib/telnet/libtelnet/kerberos.c Wed Sep 19 07:01:22 2018 (r338777) @@ -91,7 +91,7 @@ static char name[ANAME_SZ]; static AUTH_DAT adat = { 0, "", "", "", 0, {}, 0, 0, 0, { 0, "", 0 } }; #ifdef ENCRYPTION static Block session_key = { 0 }; -static des_key_schedule sched; +static DES_key_schedule sched; static Block challenge = { 0 }; #endif /* ENCRYPTION */ @@ -206,10 +206,10 @@ kerberos4_send(Authenticator *ap) if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) { register int i; - des_key_sched(&cred.session, sched); - des_random_key(&session_key); - des_ecb_encrypt(&session_key, &session_key, sched, 0); - des_ecb_encrypt(&session_key, &challenge, sched, 0); + DES_key_sched(&cred.session, sched); + DES_random_key(&session_key); + DES_ecb_encrypt(&session_key, &session_key, sched, 0); + DES_ecb_encrypt(&session_key, &challenge, sched, 0); /* * Increment the challenge by 1, and encrypt it for * later comparison. @@ -221,7 +221,7 @@ kerberos4_send(Authenticator *ap) if (x < 256) /* if no overflow, all done */ break; } - des_ecb_encrypt(&challenge, &challenge, sched, 1); + DES_ecb_encrypt(&challenge, &challenge, sched, 1); } #endif /* ENCRYPTION */ @@ -298,14 +298,14 @@ kerberos4_is(Authenticator *ap, unsigned char *data, i break; } - des_key_sched(&session_key, sched); + DES_key_sched(&session_key, sched); memmove((void *)datablock, (void *)data, sizeof(Block)); /* * Take the received encrypted challenge, and encrypt * it again to get a unique session_key for the * ENCRYPT option. */ - des_ecb_encrypt(&datablock, &session_key, sched, 1); + DES_ecb_encrypt(&datablock, &session_key, sched, 1); skey.type = SK_DES; skey.length = 8; skey.data = session_key; @@ -314,7 +314,7 @@ kerberos4_is(Authenticator *ap, unsigned char *data, i * Now decrypt the received encrypted challenge, * increment by one, re-encrypt it and send it back. */ - des_ecb_encrypt(&datablock, &challenge, sched, 0); + DES_ecb_encrypt(&datablock, &challenge, sched, 0); for (r = 7; r >= 0; r--) { register int t; t = (unsigned int)challenge[r] + 1; @@ -322,7 +322,7 @@ kerberos4_is(Authenticator *ap, unsigned char *data, i if (t < 256) /* if no overflow, all done */ break; } - des_ecb_encrypt(&challenge, &challenge, sched, 1); + DES_ecb_encrypt(&challenge, &challenge, sched, 1); Data(ap, KRB_RESPONSE, challenge, sizeof(challenge)); #endif /* ENCRYPTION */ break; @@ -364,7 +364,7 @@ kerberos4_reply(Authenticator *ap, unsigned char *data #else /* ENCRYPTION */ Data(ap, KRB_CHALLENGE, session_key, sizeof(session_key)); - des_ecb_encrypt(&session_key, &session_key, sched, 1); + DES_ecb_encrypt(&session_key, &session_key, sched, 1); skey.type = SK_DES; skey.length = 8; skey.data = session_key; Modified: projects/openssl111/contrib/telnet/libtelnet/pk.c ============================================================================== --- projects/openssl111/contrib/telnet/libtelnet/pk.c Wed Sep 19 06:59:28 2018 (r338776) +++ projects/openssl111/contrib/telnet/libtelnet/pk.c Wed Sep 19 07:01:22 2018 (r338777) @@ -129,7 +129,7 @@ common_key(char *xsecret, char *xpublic, IdeaData *ide mp_pow(public, secret, modulus, common); extractdeskey(common, deskey); extractideakey(common, ideakey); - des_set_odd_parity(deskey); + DES_set_odd_parity(deskey); mp_mfree(common); mp_mfree(secret); mp_mfree(public); @@ -221,14 +221,14 @@ pk_encode(char *in, char *out, DesData *key) { char buf[256]; DesData i; - des_key_schedule k; + DES_key_schedule k; int l,op,deslen; memset(&i,0,sizeof(i)); memset(buf,0,sizeof(buf)); deslen = ((strlen(in) + 7)/8)*8; - des_key_sched(key, k); - des_cbc_encrypt(in,buf,deslen, k,&i,DES_ENCRYPT); + DES_key_sched(key, &k); + DES_cbc_encrypt(in, buf, deslen, &k, &i, DES_ENCRYPT); for (l=0,op=0;l> 4]; out[op++] = hextab[(buf[l] & 0x0f)]; @@ -242,7 +242,7 @@ pk_decode(char *in, char *out, DesData *key) { char buf[256]; DesData i; - des_key_schedule k; + DES_key_schedule k; int n1,n2,op; size_t l; @@ -259,7 +259,7 @@ pk_decode(char *in, char *out, DesData *key) n2 = in[op+1] - '0'; buf[l] = n1*16 +n2; } - des_key_sched(key, k); - des_cbc_encrypt(buf,out,strlen(in)/2, k,&i,DES_DECRYPT); + DES_key_sched(key, &k); + DES_cbc_encrypt(buf, out, strlen(in) / 2, &k, &i, DES_DECRYPT); out[strlen(in)/2] = '\0'; } Modified: projects/openssl111/contrib/telnet/libtelnet/pk.h ============================================================================== --- projects/openssl111/contrib/telnet/libtelnet/pk.h Wed Sep 19 06:59:28 2018 (r338776) +++ projects/openssl111/contrib/telnet/libtelnet/pk.h Wed Sep 19 07:01:22 2018 (r338777) @@ -32,7 +32,7 @@ /* header for the des routines that we will use */ typedef unsigned char byte, DesData[ 8], IdeaData[16]; -#define DesKeys des_key_schedule +#define DesKeys DES_key_schedule #define DES_DECRYPT 0 #define DES_ENCRYPT 1 From owner-svn-src-projects@freebsd.org Wed Sep 19 07:03:29 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B07411091AD1 for ; Wed, 19 Sep 2018 07:03:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD2C74348; Wed, 19 Sep 2018 07:03:29 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59AAF3AF5; Wed, 19 Sep 2018 07:03:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J73TDo071663; Wed, 19 Sep 2018 07:03:29 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J73TQM071662; Wed, 19 Sep 2018 07:03:29 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190703.w8J73TQM071662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338778 - projects/openssl111/contrib/unbound X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/contrib/unbound X-SVN-Commit-Revision: 338778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:03:29 -0000 Author: jkim Date: Wed Sep 19 07:03:28 2018 New Revision: 338778 URL: https://svnweb.freebsd.org/changeset/base/338778 Log: Make unbound buildable. Modified: projects/openssl111/contrib/unbound/config.h Modified: projects/openssl111/contrib/unbound/config.h ============================================================================== --- projects/openssl111/contrib/unbound/config.h Wed Sep 19 07:01:22 2018 (r338777) +++ projects/openssl111/contrib/unbound/config.h Wed Sep 19 07:03:28 2018 (r338778) @@ -135,7 +135,7 @@ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the `DSA_SIG_set0' function. */ -/* #undef HAVE_DSA_SIG_SET0 */ +#define HAVE_DSA_SIG_SET0 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_ENDIAN_H */ @@ -177,10 +177,10 @@ /* #undef HAVE_EVP_DIGESTVERIFY */ /* Define to 1 if you have the `EVP_dss1' function. */ -#define HAVE_EVP_DSS1 1 +/* #undef HAVE_EVP_DSS1 */ /* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -/* #undef HAVE_EVP_MD_CTX_NEW */ +#define HAVE_EVP_MD_CTX_NEW 1 /* Define to 1 if you have the `EVP_sha1' function. */ #define HAVE_EVP_SHA1 1 From owner-svn-src-projects@freebsd.org Wed Sep 19 07:04:16 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB2AE1091AEB for ; Wed, 19 Sep 2018 07:04:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 901347443E; Wed, 19 Sep 2018 07:04:15 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 855183AF6; Wed, 19 Sep 2018 07:04:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J74Ffu071736; Wed, 19 Sep 2018 07:04:15 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J74FLx071735; Wed, 19 Sep 2018 07:04:15 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190704.w8J74FLx071735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338779 - projects/openssl111/lib/libfetch X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/lib/libfetch X-SVN-Commit-Revision: 338779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:04:16 -0000 Author: jkim Date: Wed Sep 19 07:04:15 2018 New Revision: 338779 URL: https://svnweb.freebsd.org/changeset/base/338779 Log: Make libfetch buildable. Modified: projects/openssl111/lib/libfetch/common.c Modified: projects/openssl111/lib/libfetch/common.c ============================================================================== --- projects/openssl111/lib/libfetch/common.c Wed Sep 19 07:03:28 2018 (r338778) +++ projects/openssl111/lib/libfetch/common.c Wed Sep 19 07:04:15 2018 (r338779) @@ -674,7 +674,11 @@ fetch_ssl_verify_altname(STACK_OF(GENERAL_NAME) *altna #else name = sk_GENERAL_NAME_value(altnames, i); #endif +#if OPENSSL_VERSION_NUMBER < 0x10100000L ns = (const char *)ASN1_STRING_data(name->d.ia5); +#else + ns = (const char *)ASN1_STRING_get0_data(name->d.ia5); +#endif nslen = (size_t)ASN1_STRING_length(name->d.ia5); if (name->type == GEN_DNS && ip == NULL && From owner-svn-src-projects@freebsd.org Wed Sep 19 07:05:32 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78F991091B32 for ; Wed, 19 Sep 2018 07:05:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23A0B74542; Wed, 19 Sep 2018 07:05:32 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F39C83AF8; Wed, 19 Sep 2018 07:05:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J75VXC071838; Wed, 19 Sep 2018 07:05:31 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J75VFP071837; Wed, 19 Sep 2018 07:05:31 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190705.w8J75VFP071837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338780 - projects/openssl111/lib/libmp X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/lib/libmp X-SVN-Commit-Revision: 338780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:05:32 -0000 Author: jkim Date: Wed Sep 19 07:05:31 2018 New Revision: 338780 URL: https://svnweb.freebsd.org/changeset/base/338780 Log: Make libmp(3) buildable. Modified: projects/openssl111/lib/libmp/mpasbn.c Modified: projects/openssl111/lib/libmp/mpasbn.c ============================================================================== --- projects/openssl111/lib/libmp/mpasbn.c Wed Sep 19 07:04:15 2018 (r338779) +++ projects/openssl111/lib/libmp/mpasbn.c Wed Sep 19 07:05:31 2018 (r338780) @@ -144,16 +144,18 @@ _dtom(const char *msg, const char *s) void mp_gcd(const MINT *mp1, const MINT *mp2, MINT *rmp) { - BIGNUM b; + BIGNUM *b; BN_CTX *c; + b = NULL; c = BN_CTX_new(); - if (c == NULL) + if (c != NULL) + b = BN_new(); + if (c == NULL || b == NULL) _bnerr("gcd"); - BN_init(&b); - BN_ERRCHECK("gcd", BN_gcd(&b, mp1->bn, mp2->bn, c)); - _moveb("gcd", &b, rmp); - BN_free(&b); + BN_ERRCHECK("gcd", BN_gcd(b, mp1->bn, mp2->bn, c)); + _moveb("gcd", b, rmp); + BN_free(b); BN_CTX_free(c); } @@ -187,12 +189,14 @@ mp_itom(short n) static void _madd(const char *msg, const MINT *mp1, const MINT *mp2, MINT *rmp) { - BIGNUM b; + BIGNUM *b; - BN_init(&b); - BN_ERRCHECK(msg, BN_add(&b, mp1->bn, mp2->bn)); - _moveb(msg, &b, rmp); - BN_free(&b); + b = BN_new(); + if (b == NULL) + _bnerr(msg); + BN_ERRCHECK(msg, BN_add(b, mp1->bn, mp2->bn)); + _moveb(msg, b, rmp); + BN_free(b); } void @@ -229,15 +233,19 @@ static void _mdiv(const char *msg, const MINT *nmp, const MINT *dmp, MINT *qmp, MINT *rmp, BN_CTX *c) { - BIGNUM q, r; + BIGNUM *q, *r; - BN_init(&r); - BN_init(&q); - BN_ERRCHECK(msg, BN_div(&q, &r, nmp->bn, dmp->bn, c)); - _moveb(msg, &q, qmp); - _moveb(msg, &r, rmp); - BN_free(&q); - BN_free(&r); + q = NULL; + r = BN_new(); + if (r != NULL) + q = BN_new(); + if (r == NULL || q == NULL) + _bnerr(msg); + BN_ERRCHECK(msg, BN_div(q, r, nmp->bn, dmp->bn, c)); + _moveb(msg, q, qmp); + _moveb(msg, r, rmp); + BN_free(q); + BN_free(r); } void @@ -402,12 +410,14 @@ mp_msqrt(const MINT *nmp, MINT *xmp, MINT *rmp) static void _msub(const char *msg, const MINT *mp1, const MINT *mp2, MINT *rmp) { - BIGNUM b; + BIGNUM *b; - BN_init(&b); - BN_ERRCHECK(msg, BN_sub(&b, mp1->bn, mp2->bn)); - _moveb(msg, &b, rmp); - BN_free(&b); + b = BN_new(); + if (b == NULL) + _bnerr(msg); + BN_ERRCHECK(msg, BN_sub(b, mp1->bn, mp2->bn)); + _moveb(msg, b, rmp); + BN_free(b); } void @@ -481,12 +491,14 @@ mp_mtox(const MINT *mp) static void _mult(const char *msg, const MINT *mp1, const MINT *mp2, MINT *rmp, BN_CTX *c) { - BIGNUM b; + BIGNUM *b; - BN_init(&b); - BN_ERRCHECK(msg, BN_mul(&b, mp1->bn, mp2->bn, c)); - _moveb(msg, &b, rmp); - BN_free(&b); + b = BN_new(); + if (b == NULL) + _bnerr(msg); + BN_ERRCHECK(msg, BN_mul(b, mp1->bn, mp2->bn, c)); + _moveb(msg, b, rmp); + BN_free(b); } void @@ -508,16 +520,18 @@ mp_mult(const MINT *mp1, const MINT *mp2, MINT *rmp) void mp_pow(const MINT *bmp, const MINT *emp, const MINT *mmp, MINT *rmp) { - BIGNUM b; + BIGNUM *b; BN_CTX *c; + b = NULL; c = BN_CTX_new(); - if (c == NULL) + if (c != NULL) + b = BN_new(); + if (c == NULL || b == NULL) _bnerr("pow"); - BN_init(&b); - BN_ERRCHECK("pow", BN_mod_exp(&b, bmp->bn, emp->bn, mmp->bn, c)); - _moveb("pow", &b, rmp); - BN_free(&b); + BN_ERRCHECK("pow", BN_mod_exp(b, bmp->bn, emp->bn, mmp->bn, c)); + _moveb("pow", b, rmp); + BN_free(b); BN_CTX_free(c); } @@ -528,18 +542,20 @@ void mp_rpow(const MINT *bmp, short e, MINT *rmp) { MINT *emp; - BIGNUM b; + BIGNUM *b; BN_CTX *c; + b = NULL; c = BN_CTX_new(); - if (c == NULL) + if (c != NULL) + b = BN_new(); + if (c == NULL || b == NULL) _bnerr("rpow"); - BN_init(&b); emp = _itom("rpow", e); - BN_ERRCHECK("rpow", BN_exp(&b, bmp->bn, emp->bn, c)); - _moveb("rpow", &b, rmp); + BN_ERRCHECK("rpow", BN_exp(b, bmp->bn, emp->bn, c)); + _moveb("rpow", b, rmp); _mfree("rpow", emp); - BN_free(&b); + BN_free(b); BN_CTX_free(c); } @@ -551,16 +567,20 @@ _sdiv(const char *msg, const MINT *nmp, short d, MINT BN_CTX *c) { MINT *dmp, *rmp; - BIGNUM q, r; + BIGNUM *q, *r; char *s; - BN_init(&q); - BN_init(&r); + r = NULL; + q = BN_new(); + if (q != NULL) + r = BN_new(); + if (q == NULL || r == NULL) + _bnerr(msg); dmp = _itom(msg, d); rmp = _itom(msg, 0); - BN_ERRCHECK(msg, BN_div(&q, &r, nmp->bn, dmp->bn, c)); - _moveb(msg, &q, qmp); - _moveb(msg, &r, rmp); + BN_ERRCHECK(msg, BN_div(q, r, nmp->bn, dmp->bn, c)); + _moveb(msg, q, qmp); + _moveb(msg, r, rmp); s = _mtox(msg, rmp); errno = 0; *ro = strtol(s, NULL, 16); @@ -569,8 +589,8 @@ _sdiv(const char *msg, const MINT *nmp, short d, MINT free(s); _mfree(msg, dmp); _mfree(msg, rmp); - BN_free(&r); - BN_free(&q); + BN_free(r); + BN_free(q); } void From owner-svn-src-projects@freebsd.org Wed Sep 19 07:06:21 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CEEA1091B4E for ; Wed, 19 Sep 2018 07:06:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2959A74627; Wed, 19 Sep 2018 07:06:21 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20CD63AF9; Wed, 19 Sep 2018 07:06:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J76KnQ071920; Wed, 19 Sep 2018 07:06:20 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J76KSD071919; Wed, 19 Sep 2018 07:06:20 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190706.w8J76KSD071919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338781 - projects/openssl111/lib/libradius X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/lib/libradius X-SVN-Commit-Revision: 338781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:06:21 -0000 Author: jkim Date: Wed Sep 19 07:06:20 2018 New Revision: 338781 URL: https://svnweb.freebsd.org/changeset/base/338781 Log: Make libradius(3) buildable. Modified: projects/openssl111/lib/libradius/radlib.c Modified: projects/openssl111/lib/libradius/radlib.c ============================================================================== --- projects/openssl111/lib/libradius/radlib.c Wed Sep 19 07:05:31 2018 (r338780) +++ projects/openssl111/lib/libradius/radlib.c Wed Sep 19 07:06:20 2018 (r338781) @@ -156,22 +156,21 @@ insert_message_authenticator(struct rad_handle *h, int u_char md[EVP_MAX_MD_SIZE]; u_int md_len; const struct rad_server *srvp; - HMAC_CTX ctx; + HMAC_CTX *ctx; srvp = &h->servers[h->srv]; if (h->authentic_pos != 0) { - HMAC_CTX_init(&ctx); - HMAC_Init(&ctx, srvp->secret, strlen(srvp->secret), EVP_md5()); - HMAC_Update(&ctx, &h->out[POS_CODE], POS_AUTH - POS_CODE); + ctx = HMAC_CTX_new(); + HMAC_Init_ex(ctx, srvp->secret, strlen(srvp->secret), EVP_md5(), NULL); + HMAC_Update(ctx, &h->out[POS_CODE], POS_AUTH - POS_CODE); if (resp) - HMAC_Update(&ctx, &h->in[POS_AUTH], LEN_AUTH); + HMAC_Update(ctx, &h->in[POS_AUTH], LEN_AUTH); else - HMAC_Update(&ctx, &h->out[POS_AUTH], LEN_AUTH); - HMAC_Update(&ctx, &h->out[POS_ATTRS], + HMAC_Update(ctx, &h->out[POS_AUTH], LEN_AUTH); + HMAC_Update(ctx, &h->out[POS_ATTRS], h->out_len - POS_ATTRS); - HMAC_Final(&ctx, md, &md_len); - HMAC_CTX_cleanup(&ctx); - HMAC_cleanup(&ctx); + HMAC_Final(ctx, md, &md_len); + HMAC_CTX_free(ctx); memcpy(&h->out[h->authentic_pos + 2], md, md_len); } #endif @@ -190,7 +189,7 @@ is_valid_response(struct rad_handle *h, int srv, const struct rad_server *srvp; int len; #ifdef WITH_SSL - HMAC_CTX hctx; + HMAC_CTX *hctx; u_char resp[MSGSIZE], md[EVP_MAX_MD_SIZE]; u_int md_len; int pos; @@ -232,31 +231,33 @@ is_valid_response(struct rad_handle *h, int srv, pos = POS_ATTRS; /* Search and verify the Message-Authenticator */ + hctx = HMAC_CTX_new(); while (pos < len - 2) { if (h->in[pos] == RAD_MESSAGE_AUTHENTIC) { /* zero fill the Message-Authenticator */ memset(&resp[pos + 2], 0, MD5_DIGEST_LENGTH); - HMAC_CTX_init(&hctx); - HMAC_Init(&hctx, srvp->secret, - strlen(srvp->secret), EVP_md5()); - HMAC_Update(&hctx, &h->in[POS_CODE], + HMAC_Init_ex(hctx, srvp->secret, + strlen(srvp->secret), EVP_md5(), NULL); + HMAC_Update(hctx, &h->in[POS_CODE], POS_AUTH - POS_CODE); - HMAC_Update(&hctx, &h->out[POS_AUTH], + HMAC_Update(hctx, &h->out[POS_AUTH], LEN_AUTH); - HMAC_Update(&hctx, &resp[POS_ATTRS], + HMAC_Update(hctx, &resp[POS_ATTRS], h->in_len - POS_ATTRS); - HMAC_Final(&hctx, md, &md_len); - HMAC_CTX_cleanup(&hctx); - HMAC_cleanup(&hctx); + HMAC_Final(hctx, md, &md_len); + HMAC_CTX_reset(hctx); if (memcmp(md, &h->in[pos + 2], - MD5_DIGEST_LENGTH) != 0) + MD5_DIGEST_LENGTH) != 0) { + HMAC_CTX_free(hctx); return 0; + } break; } pos += h->in[pos + 1]; } + HMAC_CTX_free(hctx); } #endif return 1; @@ -273,7 +274,7 @@ is_valid_request(struct rad_handle *h) const struct rad_server *srvp; int len; #ifdef WITH_SSL - HMAC_CTX hctx; + HMAC_CTX *hctx; u_char resp[MSGSIZE], md[EVP_MAX_MD_SIZE]; u_int md_len; int pos; @@ -304,6 +305,7 @@ is_valid_request(struct rad_handle *h) #ifdef WITH_SSL /* Search and verify the Message-Authenticator */ pos = POS_ATTRS; + hctx = HMAC_CTX_new(); while (pos < len - 2) { if (h->in[pos] == RAD_MESSAGE_AUTHENTIC) { memcpy(resp, h->in, MSGSIZE); @@ -313,20 +315,21 @@ is_valid_request(struct rad_handle *h) /* zero fill the Message-Authenticator */ memset(&resp[pos + 2], 0, MD5_DIGEST_LENGTH); - HMAC_CTX_init(&hctx); - HMAC_Init(&hctx, srvp->secret, - strlen(srvp->secret), EVP_md5()); - HMAC_Update(&hctx, resp, h->in_len); - HMAC_Final(&hctx, md, &md_len); - HMAC_CTX_cleanup(&hctx); - HMAC_cleanup(&hctx); + HMAC_Init_ex(hctx, srvp->secret, + strlen(srvp->secret), EVP_md5(), NULL); + HMAC_Update(hctx, resp, h->in_len); + HMAC_Final(hctx, md, &md_len); + HMAC_CTX_reset(hctx); if (memcmp(md, &h->in[pos + 2], - MD5_DIGEST_LENGTH) != 0) + MD5_DIGEST_LENGTH) != 0) { + HMAC_CTX_free(hctx); return (0); + } break; } pos += h->in[pos + 1]; } + HMAC_CTX_free(hctx); #endif return (1); } From owner-svn-src-projects@freebsd.org Wed Sep 19 07:07:04 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 495511091BAD for ; Wed, 19 Sep 2018 07:07:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00DA174727; Wed, 19 Sep 2018 07:07:04 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F00663AFB; Wed, 19 Sep 2018 07:07:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J77395071992; Wed, 19 Sep 2018 07:07:03 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J773h6071991; Wed, 19 Sep 2018 07:07:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190707.w8J773h6071991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338782 - projects/openssl111/sbin/decryptcore X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/sbin/decryptcore X-SVN-Commit-Revision: 338782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:07:04 -0000 Author: jkim Date: Wed Sep 19 07:07:03 2018 New Revision: 338782 URL: https://svnweb.freebsd.org/changeset/base/338782 Log: Make decryptcore(8) buildable. Modified: projects/openssl111/sbin/decryptcore/decryptcore.c Modified: projects/openssl111/sbin/decryptcore/decryptcore.c ============================================================================== --- projects/openssl111/sbin/decryptcore/decryptcore.c Wed Sep 19 07:06:20 2018 (r338781) +++ projects/openssl111/sbin/decryptcore/decryptcore.c Wed Sep 19 07:07:03 2018 (r338782) @@ -120,7 +120,7 @@ decrypt(int ofd, const char *privkeyfile, const char * const char *input) { uint8_t buf[KERNELDUMP_BUFFER_SIZE], key[KERNELDUMP_KEY_MAX_SIZE]; - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; const EVP_CIPHER *cipher; FILE *fp; struct kerneldumpkey *kdk; @@ -134,6 +134,7 @@ decrypt(int ofd, const char *privkeyfile, const char * PJDLOG_ASSERT(keyfile != NULL); PJDLOG_ASSERT(input != NULL); + ctx = NULL; privkey = NULL; /* @@ -179,7 +180,9 @@ decrypt(int ofd, const char *privkeyfile, const char * ERR_error_string(ERR_get_error(), NULL)); goto failed; } - EVP_CIPHER_CTX_init(&ctx); + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) + goto failed; kdk = read_key(kfd); close(kfd); @@ -219,8 +222,8 @@ decrypt(int ofd, const char *privkeyfile, const char * RSA_free(privkey); privkey = NULL; - EVP_DecryptInit_ex(&ctx, cipher, NULL, key, kdk->kdk_iv); - EVP_CIPHER_CTX_set_padding(&ctx, 0); + EVP_DecryptInit_ex(ctx, cipher, NULL, key, kdk->kdk_iv); + EVP_CIPHER_CTX_set_padding(ctx, 0); explicit_bzero(key, sizeof(key)); @@ -233,13 +236,13 @@ decrypt(int ofd, const char *privkeyfile, const char * } if (bytes > 0) { - if (EVP_DecryptUpdate(&ctx, buf, &olen, buf, + if (EVP_DecryptUpdate(ctx, buf, &olen, buf, bytes) == 0) { pjdlog_error("Unable to decrypt core."); goto failed; } } else { - if (EVP_DecryptFinal_ex(&ctx, buf, &olen) == 0) { + if (EVP_DecryptFinal_ex(ctx, buf, &olen) == 0) { pjdlog_error("Unable to decrypt core."); goto failed; } @@ -252,13 +255,14 @@ decrypt(int ofd, const char *privkeyfile, const char * } while (bytes > 0); explicit_bzero(buf, sizeof(buf)); - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); exit(0); failed: explicit_bzero(key, sizeof(key)); explicit_bzero(buf, sizeof(buf)); RSA_free(privkey); - EVP_CIPHER_CTX_cleanup(&ctx); + if (ctx != NULL) + EVP_CIPHER_CTX_free(ctx); exit(1); } From owner-svn-src-projects@freebsd.org Wed Sep 19 07:08:05 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC3B41091BD1 for ; Wed, 19 Sep 2018 07:08:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90CD37481E; Wed, 19 Sep 2018 07:08:04 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 853F23AFC; Wed, 19 Sep 2018 07:08:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J7843r072074; Wed, 19 Sep 2018 07:08:04 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J784vO072073; Wed, 19 Sep 2018 07:08:04 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190708.w8J784vO072073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338783 - projects/openssl111/sys/geom/eli X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/sys/geom/eli X-SVN-Commit-Revision: 338783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:08:05 -0000 Author: jkim Date: Wed Sep 19 07:08:04 2018 New Revision: 338783 URL: https://svnweb.freebsd.org/changeset/base/338783 Log: Make geli(8) buildable. Modified: projects/openssl111/sys/geom/eli/g_eli_crypto.c Modified: projects/openssl111/sys/geom/eli/g_eli_crypto.c ============================================================================== --- projects/openssl111/sys/geom/eli/g_eli_crypto.c Wed Sep 19 07:07:03 2018 (r338782) +++ projects/openssl111/sys/geom/eli/g_eli_crypto.c Wed Sep 19 07:08:04 2018 (r338783) @@ -122,7 +122,7 @@ static int g_eli_crypto_cipher(u_int algo, int enc, u_char *data, size_t datasize, const u_char *key, size_t keysize) { - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx; const EVP_CIPHER *type; u_char iv[keysize]; int outsize; @@ -175,27 +175,29 @@ g_eli_crypto_cipher(u_int algo, int enc, u_char *data, return (EINVAL); } - EVP_CIPHER_CTX_init(&ctx); + ctx = EVP_CIPHER_CTX_new(); + if (ctx == NULL) + return (ENOMEM); - EVP_CipherInit_ex(&ctx, type, NULL, NULL, NULL, enc); - EVP_CIPHER_CTX_set_key_length(&ctx, keysize / 8); - EVP_CIPHER_CTX_set_padding(&ctx, 0); + EVP_CipherInit_ex(ctx, type, NULL, NULL, NULL, enc); + EVP_CIPHER_CTX_set_key_length(ctx, keysize / 8); + EVP_CIPHER_CTX_set_padding(ctx, 0); bzero(iv, sizeof(iv)); - EVP_CipherInit_ex(&ctx, NULL, NULL, key, iv, enc); + EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, enc); - if (EVP_CipherUpdate(&ctx, data, &outsize, data, datasize) == 0) { - EVP_CIPHER_CTX_cleanup(&ctx); + if (EVP_CipherUpdate(ctx, data, &outsize, data, datasize) == 0) { + EVP_CIPHER_CTX_free(ctx); return (EINVAL); } assert(outsize == (int)datasize); - if (EVP_CipherFinal_ex(&ctx, data + outsize, &outsize) == 0) { - EVP_CIPHER_CTX_cleanup(&ctx); + if (EVP_CipherFinal_ex(ctx, data + outsize, &outsize) == 0) { + EVP_CIPHER_CTX_free(ctx); return (EINVAL); } assert(outsize == 0); - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_free(ctx); return (0); } #endif /* !_KERNEL */ From owner-svn-src-projects@freebsd.org Wed Sep 19 07:08:28 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15D4D1091BF7 for ; Wed, 19 Sep 2018 07:08:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B883C7490F; Wed, 19 Sep 2018 07:08:27 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1BDA3AFD; Wed, 19 Sep 2018 07:08:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J78R5I072134; Wed, 19 Sep 2018 07:08:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J78RYn072133; Wed, 19 Sep 2018 07:08:27 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190708.w8J78RYn072133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338784 - projects/openssl111/usr.bin/dc X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/usr.bin/dc X-SVN-Commit-Revision: 338784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:08:28 -0000 Author: jkim Date: Wed Sep 19 07:08:27 2018 New Revision: 338784 URL: https://svnweb.freebsd.org/changeset/base/338784 Log: Make dc(1) buildable. Modified: projects/openssl111/usr.bin/dc/bcode.c projects/openssl111/usr.bin/dc/inout.c Modified: projects/openssl111/usr.bin/dc/bcode.c ============================================================================== --- projects/openssl111/usr.bin/dc/bcode.c Wed Sep 19 07:08:04 2018 (r338783) +++ projects/openssl111/usr.bin/dc/bcode.c Wed Sep 19 07:08:27 2018 (r338784) @@ -594,7 +594,7 @@ set_scale(void) warnx("scale must be a nonnegative number"); else { scale = get_ulong(n); - if (scale != BN_MASK2 && scale <= UINT_MAX) + if (scale != ULONG_MAX && scale <= UINT_MAX) bmachine.scale = (u_int)scale; else warnx("scale too large"); @@ -622,7 +622,7 @@ set_obase(void) n = pop_number(); if (n != NULL) { base = get_ulong(n); - if (base != BN_MASK2 && base > 1 && base <= UINT_MAX) + if (base != ULONG_MAX && base > 1 && base <= UINT_MAX) bmachine.obase = (u_int)base; else warnx("output base must be a number greater than 1"); @@ -649,7 +649,7 @@ set_ibase(void) n = pop_number(); if (n != NULL) { base = get_ulong(n); - if (base != BN_MASK2 && 2 <= base && base <= 16) + if (base != ULONG_MAX && 2 <= base && base <= 16) bmachine.ibase = (u_int)base; else warnx("input base must be a number between 2 and 16 " @@ -889,7 +889,7 @@ load_array(void) idx = get_ulong(inumber); if (BN_is_negative(inumber->number)) warnx("negative idx"); - else if (idx == BN_MASK2 || idx > MAX_ARRAY_INDEX) + else if (idx == ULONG_MAX || idx > MAX_ARRAY_INDEX) warnx("idx too big"); else { stack = &bmachine.reg[reg]; @@ -929,7 +929,7 @@ store_array(void) if (BN_is_negative(inumber->number)) { warnx("negative idx"); stack_free_value(value); - } else if (idx == BN_MASK2 || idx > MAX_ARRAY_INDEX) { + } else if (idx == ULONG_MAX || idx > MAX_ARRAY_INDEX) { warnx("idx too big"); stack_free_value(value); } else { @@ -1218,7 +1218,7 @@ bexp(void) b = BN_get_word(p->number); m = max(a->scale, bmachine.scale); rscale = a->scale * (u_int)b; - if (rscale > m || (a->scale > 0 && (b == BN_MASK2 || + if (rscale > m || (a->scale > 0 && (b == ULONG_MAX || b > UINT_MAX))) rscale = m; } @@ -1587,7 +1587,7 @@ quitN(void) return; i = get_ulong(n); free_number(n); - if (i == BN_MASK2 || i == 0) + if (i == ULONG_MAX || i == 0) warnx("Q command requires a number >= 1"); else if (bmachine.readsp < i) warnx("Q command argument exceeded string execution depth"); @@ -1609,7 +1609,7 @@ skipN(void) if (n == NULL) return; i = get_ulong(n); - if (i == BN_MASK2) + if (i == ULONG_MAX) warnx("J command requires a number >= 0"); else if (i > 0 && bmachine.readsp < i) warnx("J command argument exceeded string execution depth"); Modified: projects/openssl111/usr.bin/dc/inout.c ============================================================================== --- projects/openssl111/usr.bin/dc/inout.c Wed Sep 19 07:08:04 2018 (r338783) +++ projects/openssl111/usr.bin/dc/inout.c Wed Sep 19 07:08:27 2018 (r338784) @@ -362,19 +362,21 @@ printnumber(FILE *f, const struct number *b, u_int bas stack_clear(&stack); if (b->scale > 0) { struct number *num_base; - BIGNUM mult, stop; + BIGNUM *mult, *stop; putcharwrap(f, '.'); num_base = new_number(); bn_check(BN_set_word(num_base->number, base)); - BN_init(&mult); - bn_check(BN_one(&mult)); - BN_init(&stop); - bn_check(BN_one(&stop)); - scale_number(&stop, b->scale); + mult = BN_new(); + bn_checkp(mult); + bn_check(BN_one(mult)); + stop = BN_new(); + bn_checkp(stop); + bn_check(BN_one(stop)); + scale_number(stop, b->scale); i = 0; - while (BN_cmp(&mult, &stop) < 0) { + while (BN_cmp(mult, stop) < 0) { u_long rem; if (i && base > 16) @@ -392,11 +394,11 @@ printnumber(FILE *f, const struct number *b, u_int bas int_part->number)); printwrap(f, p); free(p); - bn_check(BN_mul_word(&mult, base)); + bn_check(BN_mul_word(mult, base)); } free_number(num_base); - BN_free(&mult); - BN_free(&stop); + BN_free(mult); + BN_free(stop); } flushwrap(f); free_number(int_part); From owner-svn-src-projects@freebsd.org Wed Sep 19 07:09:10 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AEA81091C2C for ; Wed, 19 Sep 2018 07:09:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4B674A05; Wed, 19 Sep 2018 07:09:10 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 249633AFF; Wed, 19 Sep 2018 07:09:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J79AbD072206; Wed, 19 Sep 2018 07:09:10 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J79A0e072205; Wed, 19 Sep 2018 07:09:10 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190709.w8J79A0e072205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338785 - projects/openssl111/usr.bin/factor X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/usr.bin/factor X-SVN-Commit-Revision: 338785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:09:10 -0000 Author: jkim Date: Wed Sep 19 07:09:09 2018 New Revision: 338785 URL: https://svnweb.freebsd.org/changeset/base/338785 Log: Make factor(6) buildable. Modified: projects/openssl111/usr.bin/factor/factor.c Modified: projects/openssl111/usr.bin/factor/factor.c ============================================================================== --- projects/openssl111/usr.bin/factor/factor.c Wed Sep 19 07:08:27 2018 (r338784) +++ projects/openssl111/usr.bin/factor/factor.c Wed Sep 19 07:09:09 2018 (r338785) @@ -215,8 +215,7 @@ pr_fact(BIGNUM *val) if (!BN_sqr(bnfact, bnfact, ctx)) errx(1, "error in BN_sqr()"); if (BN_cmp(bnfact, val) > 0 || - BN_is_prime(val, PRIME_CHECKS, - NULL, NULL, NULL) == 1) + BN_is_prime_ex(val, PRIME_CHECKS, NULL, NULL) == 1) pr_print(val); else pollard_pminus1(val); @@ -289,8 +288,7 @@ newbase: errx(1, "error in BN_gcd()"); if (!BN_is_one(x)) { - if (BN_is_prime(x, PRIME_CHECKS, NULL, NULL, - NULL) == 1) + if (BN_is_prime_ex(x, PRIME_CHECKS, NULL, NULL) == 1) pr_print(x); else pollard_pminus1(x); @@ -299,7 +297,7 @@ newbase: BN_div(num, NULL, val, x, ctx); if (BN_is_one(num)) return; - if (BN_is_prime(num, PRIME_CHECKS, NULL, NULL, + if (BN_is_prime_ex(num, PRIME_CHECKS, NULL, NULL) == 1) { pr_print(num); fflush(stdout); From owner-svn-src-projects@freebsd.org Wed Sep 19 07:09:56 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55C241091C7E for ; Wed, 19 Sep 2018 07:09:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05DF874B03; Wed, 19 Sep 2018 07:09:56 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3BAB3B01; Wed, 19 Sep 2018 07:09:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J79tXZ072277; Wed, 19 Sep 2018 07:09:55 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J79teC072276; Wed, 19 Sep 2018 07:09:55 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190709.w8J79teC072276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338786 - projects/openssl111/usr.sbin/ppp X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/usr.sbin/ppp X-SVN-Commit-Revision: 338786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:09:56 -0000 Author: jkim Date: Wed Sep 19 07:09:55 2018 New Revision: 338786 URL: https://svnweb.freebsd.org/changeset/base/338786 Log: Make ppp(8) buildable. Modified: projects/openssl111/usr.sbin/ppp/chap_ms.c Modified: projects/openssl111/usr.sbin/ppp/chap_ms.c ============================================================================== --- projects/openssl111/usr.sbin/ppp/chap_ms.c Wed Sep 19 07:09:09 2018 (r338785) +++ projects/openssl111/usr.sbin/ppp/chap_ms.c Wed Sep 19 07:09:55 2018 (r338786) @@ -105,18 +105,18 @@ MakeKey(u_char *key, u_char *des_key) des_key[6] = Get7Bits(key, 42); des_key[7] = Get7Bits(key, 49); - des_set_odd_parity((des_cblock *)des_key); + DES_set_odd_parity((DES_cblock *)des_key); } static void /* IN 8 octets IN 7 octest OUT 8 octets */ DesEncrypt(u_char *clear, u_char *key, u_char *cipher) { - des_cblock des_key; - des_key_schedule key_schedule; + DES_cblock des_key; + DES_key_schedule key_schedule; MakeKey(key, des_key); - des_set_key(&des_key, key_schedule); - des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1); + DES_set_key(&des_key, &key_schedule); + DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, &key_schedule, 1); } static void /* IN 8 octets IN 16 octets OUT 24 octets */ From owner-svn-src-projects@freebsd.org Wed Sep 19 07:10:29 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 590F71091CB9 for ; Wed, 19 Sep 2018 07:10:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F154D74BF7; Wed, 19 Sep 2018 07:10:28 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6C433B05; Wed, 19 Sep 2018 07:10:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J7ASMu072374; Wed, 19 Sep 2018 07:10:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J7AS9L072373; Wed, 19 Sep 2018 07:10:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190710.w8J7AS9L072373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338787 - projects/openssl111/usr.sbin/uefisign X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/usr.sbin/uefisign X-SVN-Commit-Revision: 338787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:10:29 -0000 Author: jkim Date: Wed Sep 19 07:10:28 2018 New Revision: 338787 URL: https://svnweb.freebsd.org/changeset/base/338787 Log: Make uefisign(8) buildable. Modified: projects/openssl111/usr.sbin/uefisign/uefisign.c Modified: projects/openssl111/usr.sbin/uefisign/uefisign.c ============================================================================== --- projects/openssl111/usr.sbin/uefisign/uefisign.c Wed Sep 19 07:09:55 2018 (r338786) +++ projects/openssl111/usr.sbin/uefisign/uefisign.c Wed Sep 19 07:10:28 2018 (r338787) @@ -390,9 +390,9 @@ main(int argc, char **argv) inpath = argv[0]; - OPENSSL_config(NULL); - ERR_load_crypto_strings(); - OpenSSL_add_all_algorithms(); + OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG | + OPENSSL_INIT_LOAD_CRYPTO_STRINGS | + OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); error = pipe(pipefds); if (error != 0) From owner-svn-src-projects@freebsd.org Wed Sep 19 19:13:31 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 000B910A44E1 for ; Wed, 19 Sep 2018 19:13:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 986748E310; Wed, 19 Sep 2018 19:13:30 +0000 (UTC) (envelope-from emaste@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73B5A132EC; Wed, 19 Sep 2018 19:13:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8JJDUd5043703; Wed, 19 Sep 2018 19:13:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JJDTKx043700; Wed, 19 Sep 2018 19:13:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201809191913.w8JJDTKx043700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 19 Sep 2018 19:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338805 - projects/openssl111/crypto/openssh X-SVN-Group: projects X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: projects/openssl111/crypto/openssh X-SVN-Commit-Revision: 338805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 19:13:31 -0000 Author: emaste Date: Wed Sep 19 19:13:29 2018 New Revision: 338805 URL: https://svnweb.freebsd.org/changeset/base/338805 Log: openssh: rename local macro to avoid OpenSSL 1.1.1 conflict Local changes introduced an OPENSSH_VERSION macro, but this conflicts with a macro of the same name introduced with OpenSSL 1.1.1. Modified: projects/openssl111/crypto/openssh/ssh.c projects/openssl111/crypto/openssh/sshd.c projects/openssl111/crypto/openssh/version.h Modified: projects/openssl111/crypto/openssh/ssh.c ============================================================================== --- projects/openssl111/crypto/openssh/ssh.c Wed Sep 19 18:49:37 2018 (r338804) +++ projects/openssl111/crypto/openssh/ssh.c Wed Sep 19 19:13:29 2018 (r338805) @@ -811,10 +811,10 @@ main(int ac, char **av) *options.version_addendum != '\0') fprintf(stderr, "%s %s, %s\n", SSH_RELEASE, options.version_addendum, - OPENSSL_VERSION); + OPENSSL_VERSION_STRING); else fprintf(stderr, "%s, %s\n", SSH_RELEASE, - OPENSSL_VERSION); + OPENSSL_VERSION_STRING); if (opt == 'V') exit(0); break; @@ -1078,7 +1078,7 @@ main(int ac, char **av) if (debug_flag) /* version_addendum is always NULL at this point */ - logit("%s, %s", SSH_RELEASE, OPENSSL_VERSION); + logit("%s, %s", SSH_RELEASE, OPENSSL_VERSION_STRING); /* Parse the configuration files */ process_config_files(host_arg, pw, 0); Modified: projects/openssl111/crypto/openssh/sshd.c ============================================================================== --- projects/openssl111/crypto/openssh/sshd.c Wed Sep 19 18:49:37 2018 (r338804) +++ projects/openssl111/crypto/openssh/sshd.c Wed Sep 19 19:13:29 2018 (r338805) @@ -939,10 +939,10 @@ usage(void) if (options.version_addendum && *options.version_addendum != '\0') fprintf(stderr, "%s %s, %s\n", SSH_RELEASE, - options.version_addendum, OPENSSL_VERSION); + options.version_addendum, OPENSSL_VERSION_STRING); else fprintf(stderr, "%s, %s\n", - SSH_RELEASE, OPENSSL_VERSION); + SSH_RELEASE, OPENSSL_VERSION_STRING); fprintf(stderr, "usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]\n" " [-E log_file] [-f config_file] [-g login_grace_time]\n" Modified: projects/openssl111/crypto/openssh/version.h ============================================================================== --- projects/openssl111/crypto/openssh/version.h Wed Sep 19 18:49:37 2018 (r338804) +++ projects/openssl111/crypto/openssh/version.h Wed Sep 19 19:13:29 2018 (r338805) @@ -9,7 +9,7 @@ #define SSH_VERSION_FREEBSD "FreeBSD-20180909" #ifdef WITH_OPENSSL -#define OPENSSL_VERSION SSLeay_version(SSLEAY_VERSION) +#define OPENSSL_VERSION_STRING SSLeay_version(SSLEAY_VERSION) #else -#define OPENSSL_VERSION "without OpenSSL" +#define OPENSSL_VERSION_STRING "without OpenSSL" #endif From owner-svn-src-projects@freebsd.org Wed Sep 19 21:18:48 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DBF910A7256 for ; Wed, 19 Sep 2018 21:18:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B57EC9287B; Wed, 19 Sep 2018 21:18:47 +0000 (UTC) (envelope-from emaste@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFF901467C; Wed, 19 Sep 2018 21:18:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8JLIl5u006499; Wed, 19 Sep 2018 21:18:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JLIiuf006480; Wed, 19 Sep 2018 21:18:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201809192118.w8JLIiuf006480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 19 Sep 2018 21:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338811 - in projects/openssl111/crypto/openssh: . openbsd-compat regress/unittests/sshkey X-SVN-Group: projects X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in projects/openssl111/crypto/openssh: . openbsd-compat regress/unittests/sshkey X-SVN-Commit-Revision: 338811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 21:18:48 -0000 Author: emaste Date: Wed Sep 19 21:18:44 2018 New Revision: 338811 URL: https://svnweb.freebsd.org/changeset/base/338811 Log: openssh: cherry-pick OpenSSL 1.1.1 compatibility Upstream commits: 482d23bcac upstream: hold our collective noses and use the openssl-1.1.x 48f54b9d12 adapt -portable to OpenSSL 1.1x API 86e0a9f3d2 upstream: use only openssl-1.1.x API here too a3fd8074e2 upstream: missed a bit of openssl-1.0.x API in this unittest cce8cbe0ed Fix openssl-1.1 fallout for --without-openssl. Trivial conflicts in sshkey.c and test_sshkey.c were resolved. Sponsored by: The FreeBSD Foundation Modified: projects/openssl111/crypto/openssh/auth-pam.c projects/openssl111/crypto/openssh/auth2.c projects/openssl111/crypto/openssh/cipher.c projects/openssl111/crypto/openssh/cipher.h projects/openssl111/crypto/openssh/configure.ac projects/openssl111/crypto/openssh/dh.c projects/openssl111/crypto/openssh/dh.h projects/openssl111/crypto/openssh/digest-openssl.c projects/openssl111/crypto/openssh/kexdh.c projects/openssl111/crypto/openssh/kexdhc.c projects/openssl111/crypto/openssh/kexdhs.c projects/openssl111/crypto/openssh/kexgex.c projects/openssl111/crypto/openssh/kexgexc.c projects/openssl111/crypto/openssh/kexgexs.c projects/openssl111/crypto/openssh/monitor.c projects/openssl111/crypto/openssh/openbsd-compat/Makefile.in projects/openssl111/crypto/openssh/openbsd-compat/openssl-compat.h projects/openssl111/crypto/openssh/regress/unittests/sshkey/common.c projects/openssl111/crypto/openssh/regress/unittests/sshkey/common.h projects/openssl111/crypto/openssh/regress/unittests/sshkey/test_file.c projects/openssl111/crypto/openssh/regress/unittests/sshkey/test_sshkey.c projects/openssl111/crypto/openssh/ssh-dss.c projects/openssl111/crypto/openssh/ssh-ecdsa.c projects/openssl111/crypto/openssh/ssh-keygen.c projects/openssl111/crypto/openssh/ssh-pkcs11-client.c projects/openssl111/crypto/openssh/ssh-pkcs11.c projects/openssl111/crypto/openssh/ssh-rsa.c projects/openssl111/crypto/openssh/sshd.c projects/openssl111/crypto/openssh/sshkey.c projects/openssl111/crypto/openssh/sshkey.h Modified: projects/openssl111/crypto/openssh/auth-pam.c ============================================================================== --- projects/openssl111/crypto/openssh/auth-pam.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/auth-pam.c Wed Sep 19 21:18:44 2018 (r338811) @@ -129,6 +129,10 @@ extern u_int utmp_len; typedef pthread_t sp_pthread_t; #else typedef pid_t sp_pthread_t; +#define pthread_exit fake_pthread_exit +#define pthread_create fake_pthread_create +#define pthread_cancel fake_pthread_cancel +#define pthread_join fake_pthread_join #endif struct pam_ctxt { Modified: projects/openssl111/crypto/openssh/auth2.c ============================================================================== --- projects/openssl111/crypto/openssh/auth2.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/auth2.c Wed Sep 19 21:18:44 2018 (r338811) @@ -736,7 +736,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated struct sshkey **tmp, *dup; int r; - if ((r = sshkey_demote(key, &dup)) != 0) + if ((r = sshkey_from_private(key, &dup)) != 0) fatal("%s: copy key: %s", __func__, ssh_err(r)); sshkey_free(authctxt->auth_method_key); authctxt->auth_method_key = dup; @@ -745,7 +745,7 @@ auth2_record_key(Authctxt *authctxt, int authenticated return; /* If authenticated, make sure we don't accept this key again */ - if ((r = sshkey_demote(key, &dup)) != 0) + if ((r = sshkey_from_private(key, &dup)) != 0) fatal("%s: copy key: %s", __func__, ssh_err(r)); if (authctxt->nprev_keys >= INT_MAX || (tmp = recallocarray(authctxt->prev_keys, authctxt->nprev_keys, Modified: projects/openssl111/crypto/openssh/cipher.c ============================================================================== --- projects/openssl111/crypto/openssh/cipher.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/cipher.c Wed Sep 19 21:18:44 2018 (r338811) @@ -446,7 +446,7 @@ cipher_get_keyiv_len(const struct sshcipher_ctx *cc) } int -cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len) +cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, size_t len) { #ifdef WITH_OPENSSL const struct sshcipher *c = cc->cipher; @@ -473,7 +473,7 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, return 0; else if (evplen < 0) return SSH_ERR_LIBCRYPTO_ERROR; - if ((u_int)evplen != len) + if ((size_t)evplen != len) return SSH_ERR_INVALID_ARGUMENT; #ifndef OPENSSL_HAVE_EVPCTR if (c->evptype == evp_aes_128_ctr) @@ -484,14 +484,14 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN, len, iv)) return SSH_ERR_LIBCRYPTO_ERROR; - } else - memcpy(iv, cc->evp->iv, len); + } else if (!EVP_CIPHER_CTX_get_iv(cc->evp, iv, len)) + return SSH_ERR_LIBCRYPTO_ERROR; #endif return 0; } int -cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv) +cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv, size_t len) { #ifdef WITH_OPENSSL const struct sshcipher *c = cc->cipher; @@ -507,6 +507,8 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_cha evplen = EVP_CIPHER_CTX_iv_length(cc->evp); if (evplen <= 0) return SSH_ERR_LIBCRYPTO_ERROR; + if ((size_t)evplen != len) + return SSH_ERR_INVALID_ARGUMENT; #ifndef OPENSSL_HAVE_EVPCTR /* XXX iv arg is const, but ssh_aes_ctr_iv isn't */ if (c->evptype == evp_aes_128_ctr) @@ -518,46 +520,8 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_cha if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_SET_IV_FIXED, -1, (void *)iv)) return SSH_ERR_LIBCRYPTO_ERROR; - } else - memcpy(cc->evp->iv, iv, evplen); + } else if (!EVP_CIPHER_CTX_set_iv(cc->evp, iv, evplen)) + return SSH_ERR_LIBCRYPTO_ERROR; #endif return 0; -} - -#ifdef WITH_OPENSSL -#define EVP_X_STATE(evp) (evp)->cipher_data -#define EVP_X_STATE_LEN(evp) (evp)->cipher->ctx_size -#endif - -int -cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat) -{ -#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4) - const struct sshcipher *c = cc->cipher; - int plen = 0; - - if (c->evptype == EVP_rc4) { - plen = EVP_X_STATE_LEN(cc->evp); - if (dat == NULL) - return (plen); - memcpy(dat, EVP_X_STATE(cc->evp), plen); - } - return (plen); -#else - return 0; -#endif -} - -void -cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat) -{ -#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4) - const struct sshcipher *c = cc->cipher; - int plen; - - if (c->evptype == EVP_rc4) { - plen = EVP_X_STATE_LEN(cc->evp); - memcpy(EVP_X_STATE(cc->evp), dat, plen); - } -#endif } Modified: projects/openssl111/crypto/openssh/cipher.h ============================================================================== --- projects/openssl111/crypto/openssh/cipher.h Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/cipher.h Wed Sep 19 21:18:44 2018 (r338811) @@ -68,8 +68,8 @@ u_int cipher_is_cbc(const struct sshcipher *); u_int cipher_ctx_is_plaintext(struct sshcipher_ctx *); -int cipher_get_keyiv(struct sshcipher_ctx *, u_char *, u_int); -int cipher_set_keyiv(struct sshcipher_ctx *, const u_char *); +int cipher_get_keyiv(struct sshcipher_ctx *, u_char *, size_t); +int cipher_set_keyiv(struct sshcipher_ctx *, const u_char *, size_t); int cipher_get_keyiv_len(const struct sshcipher_ctx *); #endif /* CIPHER_H */ Modified: projects/openssl111/crypto/openssh/configure.ac ============================================================================== --- projects/openssl111/crypto/openssh/configure.ac Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/configure.ac Wed Sep 19 21:18:44 2018 (r338811) @@ -2657,9 +2657,10 @@ if test "x$openssl" = "xyes" ; then AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")]) ;; 100*) ;; # 1.0.x + 101*) ;; # 1.1.x 200*) ;; # LibreSSL *) - AC_MSG_ERROR([OpenSSL >= 1.1.0 is not yet supported (have "$ssl_library_ver")]) + AC_MSG_ERROR([OpenSSL > 1.1.x is not yet supported (have "$ssl_library_ver")]) ;; esac AC_MSG_RESULT([$ssl_library_ver]) @@ -2831,6 +2832,115 @@ if test "x$openssl" = "xyes" ; then AC_SEARCH_LIBS([EVP_CIPHER_CTX_ctrl], [crypto], [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1], [Define if libcrypto has EVP_CIPHER_CTX_ctrl])]) + + # LibreSSL/OpenSSL 1.1x API + AC_SEARCH_LIBS([DH_get0_key], [crypto], + [AC_DEFINE([HAVE_DH_GET0_KEY], [1], + [Define if libcrypto has DH_get0_key])]) + AC_SEARCH_LIBS([DH_get0_pqg], [crypto], + [AC_DEFINE([HAVE_DH_GET0_PQG], [1], + [Define if libcrypto has DH_get0_pqg])]) + AC_SEARCH_LIBS([DH_set0_key], [crypto], + [AC_DEFINE([HAVE_DH_SET0_KEY], [1], + [Define if libcrypto has DH_set0_key])]) + AC_SEARCH_LIBS([DH_set_length], [crypto], + [AC_DEFINE([HAVE_DH_SET_LENGTH], [1], + [Define if libcrypto has DH_set_length])]) + AC_SEARCH_LIBS([DH_set0_pqg], [crypto], + [AC_DEFINE([HAVE_DH_SET0_PQG], [1], + [Define if libcrypto has DH_set0_pqg])]) + + AC_SEARCH_LIBS([DSA_get0_key], [crypto], + [AC_DEFINE([HAVE_DSA_GET0_KEY], [1], + [Define if libcrypto has DSA_get0_key])]) + AC_SEARCH_LIBS([DSA_get0_pqg], [crypto], + [AC_DEFINE([HAVE_DSA_GET0_PQG], [1], + [Define if libcrypto has DSA_get0_pqg])]) + AC_SEARCH_LIBS([DSA_set0_key], [crypto], + [AC_DEFINE([HAVE_DSA_SET0_KEY], [1], + [Define if libcrypto has DSA_set0_key])]) + AC_SEARCH_LIBS([DSA_set0_pqg], [crypto], + [AC_DEFINE([HAVE_DSA_SET0_PQG], [1], + [Define if libcrypto has DSA_set0_pqg])]) + + AC_SEARCH_LIBS([DSA_SIG_get0], [crypto], + [AC_DEFINE([HAVE_DSA_SIG_GET0], [1], + [Define if libcrypto has DSA_SIG_get0])]) + AC_SEARCH_LIBS([DSA_SIG_set0], [crypto], + [AC_DEFINE([HAVE_DSA_SIG_SET0], [1], + [Define if libcrypto has DSA_SIG_set0])]) + + AC_SEARCH_LIBS([ECDSA_SIG_get0], [crypto], + [AC_DEFINE([HAVE_ECDSA_SIG_GET0], [1], + [Define if libcrypto has ECDSA_SIG_get0])]) + AC_SEARCH_LIBS([ECDSA_SIG_set0], [crypto], + [AC_DEFINE([HAVE_ECDSA_SIG_SET0], [1], + [Define if libcrypto has ECDSA_SIG_set0])]) + + AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv], [crypto], + [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV], [1], + [Define if libcrypto has EVP_CIPHER_CTX_iv])]) + AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv_noconst], [crypto], + [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV_NOCONST], [1], + [Define if libcrypto has EVP_CIPHER_CTX_iv_noconst])]) + AC_SEARCH_LIBS([EVP_CIPHER_CTX_get_iv], [crypto], + [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1], + [Define if libcrypto has EVP_CIPHER_CTX_get_iv])]) + AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto], + [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1], + [Define if libcrypto has EVP_CIPHER_CTX_set_iv])]) + + AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto], + [AC_DEFINE([HAVE_RSA_GET0_CRT_PARAMS], [1], + [Define if libcrypto has RSA_get0_crt_params])]) + AC_SEARCH_LIBS([RSA_get0_factors], [crypto], + [AC_DEFINE([HAVE_RSA_GET0_FACTORS], [1], + [Define if libcrypto has RSA_get0_factors])]) + AC_SEARCH_LIBS([RSA_get0_key], [crypto], + [AC_DEFINE([HAVE_RSA_GET0_KEY], [1], + [Define if libcrypto has RSA_get0_key])]) + AC_SEARCH_LIBS([RSA_set0_crt_params], [crypto], + [AC_DEFINE([HAVE_RSA_SET0_CRT_PARAMS], [1], + [Define if libcrypto has RSA_get0_srt_params])]) + AC_SEARCH_LIBS([RSA_set0_factors], [crypto], + [AC_DEFINE([HAVE_RSA_SET0_FACTORS], [1], + [Define if libcrypto has RSA_set0_factors])]) + AC_SEARCH_LIBS([RSA_set0_key], [crypto], + [AC_DEFINE([HAVE_RSA_SET0_KEY], [1], + [Define if libcrypto has RSA_set0_key])]) + + AC_SEARCH_LIBS([RSA_meth_free], [crypto], + [AC_DEFINE([HAVE_RSA_METH_FREE], [1], + [Define if libcrypto has RSA_meth_free])]) + AC_SEARCH_LIBS([RSA_meth_dup], [crypto], + [AC_DEFINE([HAVE_RSA_METH_DUP], [1], + [Define if libcrypto has RSA_meth_dup])]) + AC_SEARCH_LIBS([RSA_meth_set1_name], [crypto], + [AC_DEFINE([HAVE_RSA_METH_SET1_NAME], [1], + [Define if libcrypto has RSA_meth_set1_name])]) + AC_SEARCH_LIBS([RSA_meth_get_finish], [crypto], + [AC_DEFINE([HAVE_RSA_METH_GET_FINISH], [1], + [Define if libcrypto has RSA_meth_get_finish])]) + AC_SEARCH_LIBS([RSA_meth_set_priv_enc], [crypto], + [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_ENC], [1], + [Define if libcrypto has RSA_meth_set_priv_enc])]) + AC_SEARCH_LIBS([RSA_meth_set_priv_dec], [crypto], + [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_DEC], [1], + [Define if libcrypto has RSA_meth_set_priv_dec])]) + AC_SEARCH_LIBS([RSA_meth_set_finish], [crypto], + [AC_DEFINE([HAVE_RSA_METH_SET_FINISH], [1], + [Define if libcrypto has RSA_meth_set_finish])]) + + AC_SEARCH_LIBS([EVP_PKEY_get0_RSA], [crypto], + [AC_DEFINE([HAVE_EVP_PKEY_GET0_RSA], [1], + [Define if libcrypto has EVP_PKEY_get0_RSA])]) + + AC_SEARCH_LIBS([EVP_MD_CTX_new], [crypto], + [AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [1], + [Define if libcrypto has EVP_MD_CTX_new])]) + AC_SEARCH_LIBS([EVP_MD_CTX_free], [crypto], + [AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [1], + [Define if libcrypto has EVP_MD_CTX_free])]) AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) AC_LINK_IFELSE( Modified: projects/openssl111/crypto/openssh/dh.c ============================================================================== --- projects/openssl111/crypto/openssh/dh.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/dh.c Wed Sep 19 21:18:44 2018 (r338811) @@ -43,6 +43,8 @@ #include "misc.h" #include "ssherr.h" +#include "openbsd-compat/openssl-compat.h" + static int parse_prime(int linenum, char *line, struct dhgroup *dhg) { @@ -216,14 +218,17 @@ choose_dh(int min, int wantbits, int max) /* diffie-hellman-groupN-sha1 */ int -dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) +dh_pub_is_valid(const DH *dh, const BIGNUM *dh_pub) { int i; int n = BN_num_bits(dh_pub); int bits_set = 0; BIGNUM *tmp; + const BIGNUM *dh_p; - if (dh_pub->neg) { + DH_get0_pqg(dh, &dh_p, NULL, NULL); + + if (BN_is_negative(dh_pub)) { logit("invalid public DH value: negative"); return 0; } @@ -236,7 +241,7 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) error("%s: BN_new failed", __func__); return 0; } - if (!BN_sub(tmp, dh->p, BN_value_one()) || + if (!BN_sub(tmp, dh_p, BN_value_one()) || BN_cmp(dh_pub, tmp) != -1) { /* pub_exp > p-2 */ BN_clear_free(tmp); logit("invalid public DH value: >= p-1"); @@ -247,14 +252,14 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) for (i = 0; i <= n; i++) if (BN_is_bit_set(dh_pub, i)) bits_set++; - debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p)); + debug2("bits set: %d/%d", bits_set, BN_num_bits(dh_p)); /* * if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */ if (bits_set < 4) { logit("invalid public DH value (%d/%d)", - bits_set, BN_num_bits(dh->p)); + bits_set, BN_num_bits(dh_p)); return 0; } return 1; @@ -264,9 +269,12 @@ int dh_gen_key(DH *dh, int need) { int pbits; + const BIGNUM *dh_p, *pub_key; - if (need < 0 || dh->p == NULL || - (pbits = BN_num_bits(dh->p)) <= 0 || + DH_get0_pqg(dh, &dh_p, NULL, NULL); + + if (need < 0 || dh_p == NULL || + (pbits = BN_num_bits(dh_p)) <= 0 || need > INT_MAX / 2 || 2 * need > pbits) return SSH_ERR_INVALID_ARGUMENT; if (need < 256) @@ -275,13 +283,14 @@ dh_gen_key(DH *dh, int need) * Pollard Rho, Big step/Little Step attacks are O(sqrt(n)), * so double requested need here. */ - dh->length = MINIMUM(need * 2, pbits - 1); - if (DH_generate_key(dh) == 0 || - !dh_pub_is_valid(dh, dh->pub_key)) { - BN_clear_free(dh->priv_key); - dh->priv_key = NULL; + if (!DH_set_length(dh, MINIMUM(need * 2, pbits - 1))) return SSH_ERR_LIBCRYPTO_ERROR; - } + + if (DH_generate_key(dh) == 0) + return SSH_ERR_LIBCRYPTO_ERROR; + DH_get0_key(dh, &pub_key, NULL); + if (!dh_pub_is_valid(dh, pub_key)) + return SSH_ERR_INVALID_FORMAT; return 0; } @@ -289,22 +298,27 @@ DH * dh_new_group_asc(const char *gen, const char *modulus) { DH *dh; + BIGNUM *dh_p = NULL, *dh_g = NULL; if ((dh = DH_new()) == NULL) return NULL; - if (BN_hex2bn(&dh->p, modulus) == 0 || - BN_hex2bn(&dh->g, gen) == 0) { - DH_free(dh); - return NULL; - } - return (dh); + if (BN_hex2bn(&dh_p, modulus) == 0 || + BN_hex2bn(&dh_g, gen) == 0) + goto fail; + if (!DH_set0_pqg(dh, dh_p, NULL, dh_g)) + goto fail; + return dh; + fail: + DH_free(dh); + BN_clear_free(dh_p); + BN_clear_free(dh_g); + return NULL; } /* * This just returns the group, we still need to generate the exchange * value. */ - DH * dh_new_group(BIGNUM *gen, BIGNUM *modulus) { @@ -312,10 +326,12 @@ dh_new_group(BIGNUM *gen, BIGNUM *modulus) if ((dh = DH_new()) == NULL) return NULL; - dh->p = modulus; - dh->g = gen; + if (!DH_set0_pqg(dh, modulus, NULL, gen)) { + DH_free(dh); + return NULL; + } - return (dh); + return dh; } /* rfc2409 "Second Oakley Group" (1024 bits) */ Modified: projects/openssl111/crypto/openssh/dh.h ============================================================================== --- projects/openssl111/crypto/openssh/dh.h Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/dh.h Wed Sep 19 21:18:44 2018 (r338811) @@ -42,7 +42,7 @@ DH *dh_new_group18(void); DH *dh_new_group_fallback(int); int dh_gen_key(DH *, int); -int dh_pub_is_valid(DH *, BIGNUM *); +int dh_pub_is_valid(const DH *, const BIGNUM *); u_int dh_estimate(int); Modified: projects/openssl111/crypto/openssh/digest-openssl.c ============================================================================== --- projects/openssl111/crypto/openssh/digest-openssl.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/digest-openssl.c Wed Sep 19 21:18:44 2018 (r338811) @@ -43,7 +43,7 @@ struct ssh_digest_ctx { int alg; - EVP_MD_CTX mdctx; + EVP_MD_CTX *mdctx; }; struct ssh_digest { @@ -106,7 +106,7 @@ ssh_digest_bytes(int alg) size_t ssh_digest_blocksize(struct ssh_digest_ctx *ctx) { - return EVP_MD_CTX_block_size(&ctx->mdctx); + return EVP_MD_CTX_block_size(ctx->mdctx); } struct ssh_digest_ctx * @@ -118,11 +118,14 @@ ssh_digest_start(int alg) if (digest == NULL || ((ret = calloc(1, sizeof(*ret))) == NULL)) return NULL; ret->alg = alg; - EVP_MD_CTX_init(&ret->mdctx); - if (EVP_DigestInit_ex(&ret->mdctx, digest->mdfunc(), NULL) != 1) { + if ((ret->mdctx = EVP_MD_CTX_new()) == NULL) { free(ret); return NULL; } + if (EVP_DigestInit_ex(ret->mdctx, digest->mdfunc(), NULL) != 1) { + ssh_digest_free(ret); + return NULL; + } return ret; } @@ -132,7 +135,7 @@ ssh_digest_copy_state(struct ssh_digest_ctx *from, str if (from->alg != to->alg) return SSH_ERR_INVALID_ARGUMENT; /* we have bcopy-style order while openssl has memcpy-style */ - if (!EVP_MD_CTX_copy_ex(&to->mdctx, &from->mdctx)) + if (!EVP_MD_CTX_copy_ex(to->mdctx, from->mdctx)) return SSH_ERR_LIBCRYPTO_ERROR; return 0; } @@ -140,7 +143,7 @@ ssh_digest_copy_state(struct ssh_digest_ctx *from, str int ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen) { - if (EVP_DigestUpdate(&ctx->mdctx, m, mlen) != 1) + if (EVP_DigestUpdate(ctx->mdctx, m, mlen) != 1) return SSH_ERR_LIBCRYPTO_ERROR; return 0; } @@ -161,7 +164,7 @@ ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d return SSH_ERR_INVALID_ARGUMENT; if (dlen < digest->digest_len) /* No truncation allowed */ return SSH_ERR_INVALID_ARGUMENT; - if (EVP_DigestFinal_ex(&ctx->mdctx, d, &l) != 1) + if (EVP_DigestFinal_ex(ctx->mdctx, d, &l) != 1) return SSH_ERR_LIBCRYPTO_ERROR; if (l != digest->digest_len) /* sanity */ return SSH_ERR_INTERNAL_ERROR; @@ -171,11 +174,10 @@ ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d void ssh_digest_free(struct ssh_digest_ctx *ctx) { - if (ctx != NULL) { - EVP_MD_CTX_cleanup(&ctx->mdctx); - explicit_bzero(ctx, sizeof(*ctx)); - free(ctx); - } + if (ctx == NULL) + return; + EVP_MD_CTX_free(ctx->mdctx); + freezero(ctx, sizeof(*ctx)); } int Modified: projects/openssl111/crypto/openssh/kexdh.c ============================================================================== --- projects/openssl111/crypto/openssh/kexdh.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/kexdh.c Wed Sep 19 21:18:44 2018 (r338811) @@ -33,6 +33,8 @@ #include +#include "openbsd-compat/openssl-compat.h" + #include "ssh2.h" #include "sshkey.h" #include "cipher.h" Modified: projects/openssl111/crypto/openssh/kexdhc.c ============================================================================== --- projects/openssl111/crypto/openssh/kexdhc.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/kexdhc.c Wed Sep 19 21:18:44 2018 (r338811) @@ -36,6 +36,8 @@ #include #include +#include "openbsd-compat/openssl-compat.h" + #include "sshkey.h" #include "cipher.h" #include "digest.h" @@ -56,6 +58,7 @@ kexdh_client(struct ssh *ssh) { struct kex *kex = ssh->kex; int r; + const BIGNUM *pub_key; /* generate and send 'e', client DH public key */ switch (kex->kex_type) { @@ -81,15 +84,17 @@ kexdh_client(struct ssh *ssh) goto out; } debug("sending SSH2_MSG_KEXDH_INIT"); - if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0 || - (r = sshpkt_start(ssh, SSH2_MSG_KEXDH_INIT)) != 0 || - (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || + if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) + goto out; + DH_get0_key(kex->dh, &pub_key, NULL); + if ((r = sshpkt_start(ssh, SSH2_MSG_KEXDH_INIT)) != 0 || + (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 || (r = sshpkt_send(ssh)) != 0) goto out; #ifdef DEBUG_KEXDH DHparams_print_fp(stderr, kex->dh); fprintf(stderr, "pub= "); - BN_print_fp(stderr, kex->dh->pub_key); + BN_print_fp(stderr, pub_key); fprintf(stderr, "\n"); #endif debug("expecting SSH2_MSG_KEXDH_REPLY"); @@ -104,6 +109,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh) { struct kex *kex = ssh->kex; BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; + const BIGNUM *pub_key; struct sshkey *server_host_key = NULL; u_char *kbuf = NULL, *server_host_key_blob = NULL, *signature = NULL; u_char hash[SSH_DIGEST_MAX_LENGTH]; @@ -168,6 +174,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh) #endif /* calc and verify H */ + DH_get0_key(kex->dh, &pub_key, NULL); hashlen = sizeof(hash); if ((r = kex_dh_hash( kex->hash_alg, @@ -176,7 +183,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh) sshbuf_ptr(kex->my), sshbuf_len(kex->my), sshbuf_ptr(kex->peer), sshbuf_len(kex->peer), server_host_key_blob, sbloblen, - kex->dh->pub_key, + pub_key, dh_server_pub, shared_secret, hash, &hashlen)) != 0) Modified: projects/openssl111/crypto/openssh/kexdhs.c ============================================================================== --- projects/openssl111/crypto/openssh/kexdhs.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/kexdhs.c Wed Sep 19 21:18:44 2018 (r338811) @@ -35,6 +35,8 @@ #include +#include "openbsd-compat/openssl-compat.h" + #include "sshkey.h" #include "cipher.h" #include "digest.h" @@ -95,6 +97,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh { struct kex *kex = ssh->kex; BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; + const BIGNUM *pub_key; struct sshkey *server_host_public, *server_host_private; u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; u_char hash[SSH_DIGEST_MAX_LENGTH]; @@ -121,6 +124,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh r = SSH_ERR_ALLOC_FAIL; goto out; } + DH_get0_key(kex->dh, &pub_key, NULL); if ((r = sshpkt_get_bignum2(ssh, dh_client_pub)) != 0 || (r = sshpkt_get_end(ssh)) != 0) goto out; @@ -130,12 +134,9 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh BN_print_fp(stderr, dh_client_pub); fprintf(stderr, "\n"); debug("bits %d", BN_num_bits(dh_client_pub)); -#endif - -#ifdef DEBUG_KEXDH DHparams_print_fp(stderr, kex->dh); fprintf(stderr, "pub= "); - BN_print_fp(stderr, kex->dh->pub_key); + BN_print_fp(stderr, pub_key); fprintf(stderr, "\n"); #endif if (!dh_pub_is_valid(kex->dh, dh_client_pub)) { @@ -171,7 +172,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh sshbuf_ptr(kex->my), sshbuf_len(kex->my), server_host_key_blob, sbloblen, dh_client_pub, - kex->dh->pub_key, + pub_key, shared_secret, hash, &hashlen)) != 0) goto out; @@ -197,7 +198,7 @@ input_kex_dh_init(int type, u_int32_t seq, struct ssh /* send server hostkey, DH pubkey 'f' and signed H */ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXDH_REPLY)) != 0 || (r = sshpkt_put_string(ssh, server_host_key_blob, sbloblen)) != 0 || - (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */ + (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 || /* f */ (r = sshpkt_put_string(ssh, signature, slen)) != 0 || (r = sshpkt_send(ssh)) != 0) goto out; Modified: projects/openssl111/crypto/openssh/kexgex.c ============================================================================== --- projects/openssl111/crypto/openssh/kexgex.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/kexgex.c Wed Sep 19 21:18:44 2018 (r338811) @@ -33,6 +33,8 @@ #include #include +#include "openbsd-compat/openssl-compat.h" + #include "sshkey.h" #include "cipher.h" #include "kex.h" Modified: projects/openssl111/crypto/openssh/kexgexc.c ============================================================================== --- projects/openssl111/crypto/openssh/kexgexc.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/kexgexc.c Wed Sep 19 21:18:44 2018 (r338811) @@ -37,6 +37,8 @@ #include #include +#include "openbsd-compat/openssl-compat.h" + #include "sshkey.h" #include "cipher.h" #include "digest.h" @@ -93,6 +95,7 @@ input_kex_dh_gex_group(int type, u_int32_t seq, struct { struct kex *kex = ssh->kex; BIGNUM *p = NULL, *g = NULL; + const BIGNUM *pub_key; int r, bits; debug("got SSH2_MSG_KEX_DH_GEX_GROUP"); @@ -118,16 +121,18 @@ input_kex_dh_gex_group(int type, u_int32_t seq, struct p = g = NULL; /* belong to kex->dh now */ /* generate and send 'e', client DH public key */ - if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0 || - (r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_INIT)) != 0 || - (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || + if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) + goto out; + DH_get0_key(kex->dh, &pub_key, NULL); + if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_INIT)) != 0 || + (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 || (r = sshpkt_send(ssh)) != 0) goto out; debug("SSH2_MSG_KEX_DH_GEX_INIT sent"); #ifdef DEBUG_KEXDH DHparams_print_fp(stderr, kex->dh); fprintf(stderr, "pub= "); - BN_print_fp(stderr, kex->dh->pub_key); + BN_print_fp(stderr, pub_key); fprintf(stderr, "\n"); #endif ssh_dispatch_set(ssh, SSH2_MSG_KEX_DH_GEX_GROUP, NULL); @@ -144,6 +149,7 @@ input_kex_dh_gex_reply(int type, u_int32_t seq, struct { struct kex *kex = ssh->kex; BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; + const BIGNUM *pub_key, *dh_p, *dh_g; struct sshkey *server_host_key = NULL; u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; u_char hash[SSH_DIGEST_MAX_LENGTH]; @@ -211,6 +217,8 @@ input_kex_dh_gex_reply(int type, u_int32_t seq, struct kex->min = kex->max = -1; /* calc and verify H */ + DH_get0_key(kex->dh, &pub_key, NULL); + DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); hashlen = sizeof(hash); if ((r = kexgex_hash( kex->hash_alg, @@ -220,8 +228,8 @@ input_kex_dh_gex_reply(int type, u_int32_t seq, struct sshbuf_ptr(kex->peer), sshbuf_len(kex->peer), server_host_key_blob, sbloblen, kex->min, kex->nbits, kex->max, - kex->dh->p, kex->dh->g, - kex->dh->pub_key, + dh_p, dh_g, + pub_key, dh_server_pub, shared_secret, hash, &hashlen)) != 0) Modified: projects/openssl111/crypto/openssh/kexgexs.c ============================================================================== --- projects/openssl111/crypto/openssh/kexgexs.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/kexgexs.c Wed Sep 19 21:18:44 2018 (r338811) @@ -36,6 +36,8 @@ #include +#include "openbsd-compat/openssl-compat.h" + #include "sshkey.h" #include "cipher.h" #include "digest.h" @@ -72,6 +74,7 @@ input_kex_dh_gex_request(int type, u_int32_t seq, stru struct kex *kex = ssh->kex; int r; u_int min = 0, max = 0, nbits = 0; + const BIGNUM *dh_p, *dh_g; debug("SSH2_MSG_KEX_DH_GEX_REQUEST received"); if ((r = sshpkt_get_u32(ssh, &min)) != 0 || @@ -101,9 +104,10 @@ input_kex_dh_gex_request(int type, u_int32_t seq, stru goto out; } debug("SSH2_MSG_KEX_DH_GEX_GROUP sent"); + DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_GROUP)) != 0 || - (r = sshpkt_put_bignum2(ssh, kex->dh->p)) != 0 || - (r = sshpkt_put_bignum2(ssh, kex->dh->g)) != 0 || + (r = sshpkt_put_bignum2(ssh, dh_p)) != 0 || + (r = sshpkt_put_bignum2(ssh, dh_g)) != 0 || (r = sshpkt_send(ssh)) != 0) goto out; @@ -123,6 +127,7 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct { struct kex *kex = ssh->kex; BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; + const BIGNUM *pub_key, *dh_p, *dh_g; struct sshkey *server_host_public, *server_host_private; u_char *kbuf = NULL, *signature = NULL, *server_host_key_blob = NULL; u_char hash[SSH_DIGEST_MAX_LENGTH]; @@ -153,17 +158,17 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct (r = sshpkt_get_end(ssh)) != 0) goto out; + DH_get0_key(kex->dh, &pub_key, NULL); + DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); + #ifdef DEBUG_KEXDH fprintf(stderr, "dh_client_pub= "); BN_print_fp(stderr, dh_client_pub); fprintf(stderr, "\n"); debug("bits %d", BN_num_bits(dh_client_pub)); -#endif - -#ifdef DEBUG_KEXDH DHparams_print_fp(stderr, kex->dh); fprintf(stderr, "pub= "); - BN_print_fp(stderr, kex->dh->pub_key); + BN_print_fp(stderr, pub_key); fprintf(stderr, "\n"); #endif if (!dh_pub_is_valid(kex->dh, dh_client_pub)) { @@ -199,9 +204,9 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct sshbuf_ptr(kex->my), sshbuf_len(kex->my), server_host_key_blob, sbloblen, kex->min, kex->nbits, kex->max, - kex->dh->p, kex->dh->g, + dh_p, dh_g, dh_client_pub, - kex->dh->pub_key, + pub_key, shared_secret, hash, &hashlen)) != 0) goto out; @@ -227,7 +232,7 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct /* send server hostkey, DH pubkey 'f' and signed H */ if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REPLY)) != 0 || (r = sshpkt_put_string(ssh, server_host_key_blob, sbloblen)) != 0 || - (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */ + (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 || /* f */ (r = sshpkt_put_string(ssh, signature, slen)) != 0 || (r = sshpkt_send(ssh)) != 0) goto out; Modified: projects/openssl111/crypto/openssh/monitor.c ============================================================================== --- projects/openssl111/crypto/openssh/monitor.c Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/monitor.c Wed Sep 19 21:18:44 2018 (r338811) @@ -29,7 +29,6 @@ #include #include -#include "openbsd-compat/sys-tree.h" #include #include @@ -60,7 +59,10 @@ #include #endif +#include "openbsd-compat/sys-tree.h" #include "openbsd-compat/sys-queue.h" +#include "openbsd-compat/openssl-compat.h" + #include "atomicio.h" #include "xmalloc.h" #include "ssh.h" @@ -566,6 +568,7 @@ int mm_answer_moduli(int sock, struct sshbuf *m) { DH *dh; + const BIGNUM *dh_p, *dh_g; int r; u_int min, want, max; @@ -590,9 +593,10 @@ mm_answer_moduli(int sock, struct sshbuf *m) return (0); } else { /* Send first bignum */ + DH_get0_pqg(dh, &dh_p, NULL, &dh_g); if ((r = sshbuf_put_u8(m, 1)) != 0 || - (r = sshbuf_put_bignum2(m, dh->p)) != 0 || - (r = sshbuf_put_bignum2(m, dh->g)) != 0) + (r = sshbuf_put_bignum2(m, dh_p)) != 0 || + (r = sshbuf_put_bignum2(m, dh_g)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); DH_free(dh); Modified: projects/openssl111/crypto/openssh/openbsd-compat/Makefile.in ============================================================================== --- projects/openssl111/crypto/openssh/openbsd-compat/Makefile.in Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/openbsd-compat/Makefile.in Wed Sep 19 21:18:44 2018 (r338811) @@ -85,6 +85,7 @@ COMPAT= arc4random.o \ getrrsetbyname-ldns.o \ kludge-fd_set.o \ openssl-compat.o \ + libressl-api-compat.o \ xcrypt.o PORTS= port-aix.o \ Modified: projects/openssl111/crypto/openssh/openbsd-compat/openssl-compat.h ============================================================================== --- projects/openssl111/crypto/openssh/openbsd-compat/openssl-compat.h Wed Sep 19 20:52:47 2018 (r338810) +++ projects/openssl111/crypto/openssh/openbsd-compat/openssl-compat.h Wed Sep 19 21:18:44 2018 (r338811) @@ -24,6 +24,8 @@ #include #include #include +#include +#include int ssh_compatible_openssl(long, long); @@ -95,6 +97,140 @@ void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, s void ssh_OpenSSL_add_all_algorithms(void); #endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */ + +/* LibreSSL/OpenSSL 1.1x API compat */ +#ifndef HAVE_DSA_GET0_PQG +void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, + const BIGNUM **g); +#endif /* HAVE_DSA_GET0_PQG */ + +#ifndef HAVE_DSA_SET0_PQG +int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); +#endif /* HAVE_DSA_SET0_PQG */ + +#ifndef HAVE_DSA_GET0_KEY +void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, + const BIGNUM **priv_key); +#endif /* HAVE_DSA_GET0_KEY */ + +#ifndef HAVE_DSA_SET0_KEY +int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); +#endif /* HAVE_DSA_SET0_KEY */ + +#ifndef HAVE_EVP_CIPHER_CTX_GET_IV +int EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, + unsigned char *iv, size_t len); +#endif /* HAVE_EVP_CIPHER_CTX_GET_IV */ + +#ifndef HAVE_EVP_CIPHER_CTX_SET_IV +int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, + const unsigned char *iv, size_t len); +#endif /* HAVE_EVP_CIPHER_CTX_SET_IV */ + +#ifndef HAVE_RSA_GET0_KEY +void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, + const BIGNUM **d); +#endif /* HAVE_RSA_GET0_KEY */ + +#ifndef HAVE_RSA_SET0_KEY +int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); +#endif /* HAVE_RSA_SET0_KEY */ + +#ifndef HAVE_RSA_GET0_CRT_PARAMS +void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, + const BIGNUM **iqmp); +#endif /* HAVE_RSA_GET0_CRT_PARAMS */ + +#ifndef HAVE_RSA_SET0_CRT_PARAMS +int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); +#endif /* HAVE_RSA_SET0_CRT_PARAMS */ + +#ifndef HAVE_RSA_GET0_FACTORS +void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); +#endif /* HAVE_RSA_GET0_FACTORS */ + +#ifndef HAVE_RSA_SET0_FACTORS +int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); +#endif /* HAVE_RSA_SET0_FACTORS */ + +#ifndef DSA_SIG_GET0 +void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); +#endif /* DSA_SIG_GET0 */ + +#ifndef DSA_SIG_SET0 +int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); +#endif /* DSA_SIG_SET0 */ + +#ifndef HAVE_ECDSA_SIG_GET0 +void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); +#endif /* HAVE_ECDSA_SIG_GET0 */ + +#ifndef HAVE_ECDSA_SIG_SET0 +int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s); +#endif /* HAVE_ECDSA_SIG_SET0 */ + +#ifndef HAVE_DH_GET0_PQG +void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, + const BIGNUM **g); +#endif /* HAVE_DH_GET0_PQG */ + +#ifndef HAVE_DH_SET0_PQG +int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); +#endif /* HAVE_DH_SET0_PQG */ + +#ifndef HAVE_DH_GET0_KEY +void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); +#endif /* HAVE_DH_GET0_KEY */ + +#ifndef HAVE_DH_SET0_KEY +int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); +#endif /* HAVE_DH_SET0_KEY */ + +#ifndef HAVE_DH_SET_LENGTH +int DH_set_length(DH *dh, long length); +#endif /* HAVE_DH_SET_LENGTH */ + +#ifndef HAVE_RSA_METH_FREE +void RSA_meth_free(RSA_METHOD *meth); +#endif /* HAVE_RSA_METH_FREE */ + +#ifndef HAVE_RSA_METH_DUP +RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); +#endif /* HAVE_RSA_METH_DUP */ + +#ifndef HAVE_RSA_METH_SET1_NAME +int RSA_meth_set1_name(RSA_METHOD *meth, const char *name); +#endif /* HAVE_RSA_METH_SET1_NAME */ + +#ifndef HAVE_RSA_METH_GET_FINISH +int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa); +#endif /* HAVE_RSA_METH_GET_FINISH */ + +#ifndef HAVE_RSA_METH_SET_PRIV_ENC +int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, + const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); +#endif /* HAVE_RSA_METH_SET_PRIV_ENC */ + +#ifndef HAVE_RSA_METH_SET_PRIV_DEC +int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, + const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); +#endif /* HAVE_RSA_METH_SET_PRIV_DEC */ + +#ifndef HAVE_RSA_METH_SET_FINISH +int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)); +#endif /* HAVE_RSA_METH_SET_FINISH */ + +#ifndef HAVE_EVP_PKEY_GET0_RSA +RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey); +#endif /* HAVE_EVP_PKEY_GET0_RSA */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Wed Sep 19 22:39:41 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C769C10A9209 for ; Wed, 19 Sep 2018 22:39:41 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B13595ADF; Wed, 19 Sep 2018 22:39:41 +0000 (UTC) (envelope-from rmacklem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AF9B1539D; Wed, 19 Sep 2018 22:39:41 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8JMdf6m047804; Wed, 19 Sep 2018 22:39:41 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JMdeag047800; Wed, 19 Sep 2018 22:39:40 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201809192239.w8JMdeag047800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 19 Sep 2018 22:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338812 - in projects/nfsv42/sys/fs: nfs nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/nfsv42/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 338812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 22:39:42 -0000 Author: rmacklem Date: Wed Sep 19 22:39:40 2018 New Revision: 338812 URL: https://svnweb.freebsd.org/changeset/base/338812 Log: Add the Layout Error operation to the NFSv4.2. server. Modified: projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c projects/nfsv42/sys/fs/nfs/nfs_var.h projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c Modified: projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c Wed Sep 19 21:18:44 2018 (r338811) +++ projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c Wed Sep 19 22:39:40 2018 (r338812) @@ -171,7 +171,7 @@ struct nfsv4_opflag nfsv4_opflag[NFSV42_NOPS] = { { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Copy Notify */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Deallocate */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* IO Advise */ - { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Layout Error */ + { 0, 1, 0, 1, LK_EXCLUSIVE, 1, 0 }, /* Layout Error */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Layout Stats */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Offload Cancel */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Offload Status */ Modified: projects/nfsv42/sys/fs/nfs/nfs_var.h ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfs_var.h Wed Sep 19 21:18:44 2018 (r338811) +++ projects/nfsv42/sys/fs/nfs/nfs_var.h Wed Sep 19 22:39:40 2018 (r338812) @@ -161,6 +161,7 @@ void nfsrv_freealllayoutsanddevids(void); void nfsrv_freefilelayouts(fhandle_t *); int nfsrv_deldsserver(int, char *, NFSPROC_T *); struct nfsdevice *nfsrv_deldsnmp(int, struct nfsmount *, NFSPROC_T *); +int nfsrv_delds(char *, NFSPROC_T *); int nfsrv_createdevids(struct nfsd_nfsd_args *, NFSPROC_T *); int nfsrv_checkdsattr(struct nfsrv_descript *, vnode_t, NFSPROC_T *); int nfsrv_copymr(vnode_t, vnode_t, vnode_t, struct nfsdevice *, @@ -275,6 +276,8 @@ int nfsrvd_getdevinfo(struct nfsrv_descript *, int, int nfsrvd_layoutcommit(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_layoutreturn(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_layouterror(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_teststateid(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c Wed Sep 19 21:18:44 2018 (r338811) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c Wed Sep 19 22:39:40 2018 (r338812) @@ -4654,6 +4654,72 @@ nfsmout: } /* + * nfsv4 layout error service + */ +APPLESTATIC int +nfsrvd_layouterror(struct nfsrv_descript *nd, __unused int isdgram, + vnode_t vp, NFSPROC_T *p, struct nfsexstuff *exp) +{ + uint32_t *tl; + nfsv4stateid_t stateid; + int cnt, error = 0, i, opnum, stat; + char devid[NFSX_V4DEVICEID]; + uint64_t offset, len; + + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { + nd->nd_repstat = NFSERR_WRONGSEC; + goto nfsmout; + } + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_HYPER + NFSX_STATEID + + NFSX_UNSIGNED); + offset = fxdr_hyper(tl); tl += 2; + len = fxdr_hyper(tl); tl += 2; + stateid.seqid = fxdr_unsigned(uint32_t, *tl++); + NFSBCOPY(tl, stateid.other, NFSX_STATEIDOTHER); + tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED); + cnt = fxdr_unsigned(int, *tl); + NFSD_DEBUG(4, "layouterror off=%ju len=%ju cnt=%d\n", (uintmax_t)offset, + (uintmax_t)len, cnt); + /* + * For the special stateid of other all 0s and seqid == 1, set + * the stateid to the current stateid, if it is set. + */ + if (stateid.seqid == 1 && stateid.other[0] == 0 && + stateid.other[1] == 0 && stateid.other[2] == 0) { + if ((nd->nd_flag & ND_CURSTATEID) != 0) { + stateid = nd->nd_curstateid; + stateid.seqid = 0; + } else { + nd->nd_repstat = NFSERR_BADSTATEID; + goto nfsmout; + } + } + + /* + * Ignore offset, len and stateid for now. + */ + for (i = 0; i < cnt; i++) { + NFSM_DISSECT(tl, uint32_t *, NFSX_V4DEVICEID + 2 * + NFSX_UNSIGNED); + NFSBCOPY(tl, devid, NFSX_V4DEVICEID); + tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED); + stat = fxdr_unsigned(int, *tl++); + opnum = fxdr_unsigned(int, *tl); + NFSD_DEBUG(4, "nfsrvd_layouterr op=%d stat=%d\n", opnum, stat); + /* + * Except for NFSERR_ACCES and NFSERR_STALE errors, + * disable the mirror. + */ + if (stat != NFSERR_ACCES && stat != NFSERR_STALE) + nfsrv_delds(devid, p); + } +nfsmout: + vput(vp); + NFSEXITCODE2(error, nd); + return (error); +} + +/* * nfsv4 getdeviceinfo service */ APPLESTATIC int Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c Wed Sep 19 21:18:44 2018 (r338811) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c Wed Sep 19 22:39:40 2018 (r338812) @@ -203,7 +203,7 @@ int (*nfsrv4_ops0[NFSV42_NOPS])(struct nfsrv_descript nfsrvd_notsupp, nfsrvd_notsupp, nfsrvd_notsupp, - nfsrvd_notsupp, + nfsrvd_layouterror, nfsrvd_notsupp, nfsrvd_notsupp, nfsrvd_notsupp, Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c Wed Sep 19 21:18:44 2018 (r338811) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdstate.c Wed Sep 19 22:39:40 2018 (r338812) @@ -213,7 +213,6 @@ static void nfsrv_freealllayouts(void); static void nfsrv_freedevid(struct nfsdevice *ds); static int nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, struct nfsdevice **dsp); -static int nfsrv_delds(char *devid, NFSPROC_T *p); static void nfsrv_deleteds(struct nfsdevice *fndds); static void nfsrv_allocdevid(struct nfsdevice *ds, char *addr, char *dnshost); static void nfsrv_freealldevids(void); @@ -7575,7 +7574,7 @@ nfsrv_deldsnmp(int op, struct nfsmount *nmp, NFSPROC_T * point. * Also, returns an error instead of the nfsdevice found. */ -static int +APPLESTATIC int nfsrv_delds(char *devid, NFSPROC_T *p) { struct nfsdevice *ds, *fndds; From owner-svn-src-projects@freebsd.org Thu Sep 20 00:17:42 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E70810AB44B for ; Thu, 20 Sep 2018 00:17:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 089BA7173E; Thu, 20 Sep 2018 00:17:42 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECEC1163EF; Thu, 20 Sep 2018 00:17:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8K0Hfkc000352; Thu, 20 Sep 2018 00:17:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8K0HfBC000351; Thu, 20 Sep 2018 00:17:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809200017.w8K0HfBC000351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 00:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338815 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 00:17:42 -0000 Author: jkim Date: Thu Sep 20 00:17:41 2018 New Revision: 338815 URL: https://svnweb.freebsd.org/changeset/base/338815 Log: Remove an obsolete compiler option. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Wed Sep 19 23:45:18 2018 (r338814) +++ projects/openssl111/secure/lib/libcrypto/Makefile Thu Sep 20 00:17:41 2018 (r338815) @@ -337,8 +337,6 @@ INCS+= x509v3.h x509v3err.h INCSDIR= ${INCLUDEDIR}/openssl -CSTD= gnu89 - CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes From owner-svn-src-projects@freebsd.org Thu Sep 20 00:20:05 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB46810AB46E for ; Thu, 20 Sep 2018 00:20:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6144B7186D; Thu, 20 Sep 2018 00:20:05 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 582EF163F3; Thu, 20 Sep 2018 00:20:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8K0K5nh000528; Thu, 20 Sep 2018 00:20:05 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8K0K45h000526; Thu, 20 Sep 2018 00:20:04 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809200020.w8K0K45h000526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 00:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111: secure/lib/libcrypto share/mk X-SVN-Commit-Revision: 338816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 00:20:05 -0000 Author: jkim Date: Thu Sep 20 00:20:04 2018 New Revision: 338816 URL: https://svnweb.freebsd.org/changeset/base/338816 Log: Link libcrypto with pthread. Modified: projects/openssl111/secure/lib/libcrypto/Makefile projects/openssl111/share/mk/src.libnames.mk Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Thu Sep 20 00:17:41 2018 (r338815) +++ projects/openssl111/secure/lib/libcrypto/Makefile Thu Sep 20 00:20:04 2018 (r338816) @@ -337,6 +337,8 @@ INCS+= x509v3.h x509v3err.h INCSDIR= ${INCLUDEDIR}/openssl +LIBADD= pthread + CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes Modified: projects/openssl111/share/mk/src.libnames.mk ============================================================================== --- projects/openssl111/share/mk/src.libnames.mk Thu Sep 20 00:17:41 2018 (r338815) +++ projects/openssl111/share/mk/src.libnames.mk Thu Sep 20 00:20:04 2018 (r338816) @@ -217,6 +217,7 @@ _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" _DP_blacklist+= pthread .endif +_DP_crypto= pthread .if ${MK_OPENSSL} != "no" _DP_archive+= crypto .else From owner-svn-src-projects@freebsd.org Thu Sep 20 00:27:27 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DDFA10AB93E for ; Thu, 20 Sep 2018 00:27:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D235072A4F; Thu, 20 Sep 2018 00:27:26 +0000 (UTC) (envelope-from rmacklem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1B191659C; Thu, 20 Sep 2018 00:27:26 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8K0RQp0007250; Thu, 20 Sep 2018 00:27:26 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8K0RPpm007246; Thu, 20 Sep 2018 00:27:25 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201809200027.w8K0RPpm007246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 20 Sep 2018 00:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338817 - in projects/nfsv42/sys/fs: nfs nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/nfsv42/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 338817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 00:27:27 -0000 Author: rmacklem Date: Thu Sep 20 00:27:25 2018 New Revision: 338817 URL: https://svnweb.freebsd.org/changeset/base/338817 Log: Add the Layout stats operation to the NFSv4.2 server. Modified: projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c projects/nfsv42/sys/fs/nfs/nfs_var.h projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c Modified: projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c Thu Sep 20 00:20:04 2018 (r338816) +++ projects/nfsv42/sys/fs/nfs/nfs_commonsubs.c Thu Sep 20 00:27:25 2018 (r338817) @@ -172,7 +172,7 @@ struct nfsv4_opflag nfsv4_opflag[NFSV42_NOPS] = { { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Deallocate */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* IO Advise */ { 0, 1, 0, 1, LK_EXCLUSIVE, 1, 0 }, /* Layout Error */ - { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Layout Stats */ + { 0, 1, 0, 1, LK_EXCLUSIVE, 1, 0 }, /* Layout Stats */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Offload Cancel */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Offload Status */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Read Plus */ Modified: projects/nfsv42/sys/fs/nfs/nfs_var.h ============================================================================== --- projects/nfsv42/sys/fs/nfs/nfs_var.h Thu Sep 20 00:20:04 2018 (r338816) +++ projects/nfsv42/sys/fs/nfs/nfs_var.h Thu Sep 20 00:27:25 2018 (r338817) @@ -279,6 +279,8 @@ int nfsrvd_layoutreturn(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_layouterror(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_layoutstats(struct nfsrv_descript *, int, + vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_teststateid(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_notsupp(struct nfsrv_descript *, int, Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c Thu Sep 20 00:20:04 2018 (r338816) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdserv.c Thu Sep 20 00:27:25 2018 (r338817) @@ -4662,7 +4662,8 @@ nfsrvd_layouterror(struct nfsrv_descript *nd, __unused { uint32_t *tl; nfsv4stateid_t stateid; - int cnt, error = 0, i, opnum, stat; + int cnt, error = 0, i, stat; + int opnum __unused; char devid[NFSX_V4DEVICEID]; uint64_t offset, len; @@ -4713,6 +4714,68 @@ nfsrvd_layouterror(struct nfsrv_descript *nd, __unused if (stat != NFSERR_ACCES && stat != NFSERR_STALE) nfsrv_delds(devid, p); } +nfsmout: + vput(vp); + NFSEXITCODE2(error, nd); + return (error); +} + +/* + * nfsv4 layout stats service + */ +APPLESTATIC int +nfsrvd_layoutstats(struct nfsrv_descript *nd, __unused int isdgram, + vnode_t vp, NFSPROC_T *p, struct nfsexstuff *exp) +{ + uint32_t *tl; + nfsv4stateid_t stateid; + int cnt, error = 0; + int layouttype __unused; + char devid[NFSX_V4DEVICEID] __unused; + uint64_t offset, len, readcount, readbytes, writecount, writebytes + __unused; + + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { + nd->nd_repstat = NFSERR_WRONGSEC; + goto nfsmout; + } + NFSM_DISSECT(tl, uint32_t *, 6 * NFSX_HYPER + NFSX_STATEID + + NFSX_V4DEVICEID + 2 * NFSX_UNSIGNED); + offset = fxdr_hyper(tl); tl += 2; + len = fxdr_hyper(tl); tl += 2; + stateid.seqid = fxdr_unsigned(uint32_t, *tl++); + NFSBCOPY(tl, stateid.other, NFSX_STATEIDOTHER); + tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED); + readcount = fxdr_hyper(tl); tl += 2; + readbytes = fxdr_hyper(tl); tl += 2; + writecount = fxdr_hyper(tl); tl += 2; + writebytes = fxdr_hyper(tl); tl += 2; + NFSBCOPY(tl, devid, NFSX_V4DEVICEID); + tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED); + layouttype = fxdr_unsigned(int, *tl++); + cnt = fxdr_unsigned(int, *tl); + error = nfsm_advance(nd, NFSM_RNDUP(cnt), -1); + if (error != 0) + goto nfsmout; + NFSD_DEBUG(4, "layoutstats cnt=%d\n", cnt); + /* + * For the special stateid of other all 0s and seqid == 1, set + * the stateid to the current stateid, if it is set. + */ + if (stateid.seqid == 1 && stateid.other[0] == 0 && + stateid.other[1] == 0 && stateid.other[2] == 0) { + if ((nd->nd_flag & ND_CURSTATEID) != 0) { + stateid = nd->nd_curstateid; + stateid.seqid = 0; + } else { + nd->nd_repstat = NFSERR_BADSTATEID; + goto nfsmout; + } + } + + /* + * No use for the stats for now. + */ nfsmout: vput(vp); NFSEXITCODE2(error, nd); Modified: projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c Thu Sep 20 00:20:04 2018 (r338816) +++ projects/nfsv42/sys/fs/nfsserver/nfs_nfsdsocket.c Thu Sep 20 00:27:25 2018 (r338817) @@ -204,7 +204,7 @@ int (*nfsrv4_ops0[NFSV42_NOPS])(struct nfsrv_descript nfsrvd_notsupp, nfsrvd_notsupp, nfsrvd_layouterror, - nfsrvd_notsupp, + nfsrvd_layoutstats, nfsrvd_notsupp, nfsrvd_notsupp, nfsrvd_notsupp, From owner-svn-src-projects@freebsd.org Thu Sep 20 10:09:53 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7881510975B1 for ; Thu, 20 Sep 2018 10:09:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 C9AE4860A0; Thu, 20 Sep 2018 10:09:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w8KA9dw5041832 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 20 Sep 2018 13:09:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w8KA9dw5041832 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w8KA9dIn041831; Thu, 20 Sep 2018 13:09:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 20 Sep 2018 13:09:39 +0300 From: Konstantin Belousov To: Jung-uk Kim Cc: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk Message-ID: <20180920100939.GU3161@kib.kiev.ua> References: <201809200020.w8K0K45h000526@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201809200020.w8K0K45h000526@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 10:09:53 -0000 On Thu, Sep 20, 2018 at 12:20:04AM +0000, Jung-uk Kim wrote: > Author: jkim > Date: Thu Sep 20 00:20:04 2018 > New Revision: 338816 > URL: https://svnweb.freebsd.org/changeset/base/338816 > > Log: > Link libcrypto with pthread. Why ? From owner-svn-src-projects@freebsd.org Thu Sep 20 13:16:15 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA8D5109C6EB for ; Thu, 20 Sep 2018 13:16:14 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D8078C8DC; Thu, 20 Sep 2018 13:16:14 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x333.google.com with SMTP id o13-v6so9363332otl.4; Thu, 20 Sep 2018 06:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=COEjSwn3UXy911Up5Un+RC/WeLwuJCvuRVjTlsemzjU=; b=PxfPDOQDCTzfEcLQ7sWWzswHWJK4kgzUqEoJO/Gaw8NDal1V8oq02zX24WIUh2+rCD 0Qb6TSrkNp2C2N+XbDze2vp2SBovs1rN3cjXrF64NcmVzB+stIYeV3psQrI+jxc9Wqtq 1JKsD0FP4yATEW09kvN/mnj7ZsKVZgwYB8f1e/ncKN3d/R8AIx7YPd57iCY2nJEvaoVO hh4OXsArWHUGhG4x8Q8d6UM+WdcVNeP59i8D1ZU/vEiyMyKOU1cnXeVXrU7p39xykbr6 sw1OQIYIIvEVq7ydISvRbypkVzEAu8MpipeFj8W1X6boACPFrL8Moc30Ly7EwE8Erslw idDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=COEjSwn3UXy911Up5Un+RC/WeLwuJCvuRVjTlsemzjU=; b=OV1fotxWQlFc6dIL8eaCm9e5R0kWlSJpbLXl/7Q2bYZSyjD8KIoLhdObkPaVfPq5Yy 0rMid/ovmmqAVKJRFHS9iEsoNCOasN3gy28B/pUgGsn8Dmb1AcLc16bW9dr159EuwCSn IpL7tqEaNsc2USs1A9kAKGU+El2wa5yBkXw6emPIx+DAuHQBiWccG3xLOC9nkvhLHB2J YUNG7X+0mz2xSjgRcM9Mx5ZvHjmYmn+5BKIsYglpilkcQqZWAjRIsyOcqs7iaLTwkTWY ksZJW5Zw0rLJ1FbNc2AIPPp7OZs5zRrlY9YiBGS0kGnLgJy8kymjVF3+ByQLP/g9W6SN UFDA== X-Gm-Message-State: APzg51DlgatRAPhCnkFM791F+xIkdDTtRmjdOQYsy207T9TQPQtGsWFt rE5KT/t/155GUMnJXhU4EERCvxdne7Qy/GYzt8k= X-Google-Smtp-Source: ANB0VdZvnm2fmWHI96uFQIV1CsIfR7dQ4gPV8VoNPny/IJdPA9UoKvxmwLJroqMGtEy8aLN1ZYzlBLlSFAx5T6C8FAA= X-Received: by 2002:a9d:7613:: with SMTP id k19-v6mr21338490otl.297.1537449373709; Thu, 20 Sep 2018 06:16:13 -0700 (PDT) MIME-Version: 1.0 References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> In-Reply-To: <20180920100939.GU3161@kib.kiev.ua> From: Benjamin Kaduk Date: Thu, 20 Sep 2018 08:16:02 -0500 Message-ID: Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk To: Konstantin Belousov Cc: jkim@freebsd.org, svn-src-projects@freebsd.org, src-committers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 13:16:15 -0000 On Thu, Sep 20, 2018 at 5:10 AM Konstantin Belousov wrote: > On Thu, Sep 20, 2018 at 12:20:04AM +0000, Jung-uk Kim wrote: > > Author: jkim > > Date: Thu Sep 20 00:20:04 2018 > > New Revision: 338816 > > URL: https://svnweb.freebsd.org/changeset/base/338816 > > > > Log: > > Link libcrypto with pthread. > Why ? > > It uses pthread_once and pthread locks. -Ben From owner-svn-src-projects@freebsd.org Thu Sep 20 13:20:04 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CA9A109C82E for ; Thu, 20 Sep 2018 13:20:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 93E208CABF; Thu, 20 Sep 2018 13:20:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w8KDJrfG086239 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 20 Sep 2018 16:19:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w8KDJrfG086239 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w8KDJrNO086238; Thu, 20 Sep 2018 16:19:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 20 Sep 2018 16:19:52 +0300 From: Konstantin Belousov To: Benjamin Kaduk Cc: jkim@freebsd.org, svn-src-projects@freebsd.org, src-committers Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk Message-ID: <20180920131952.GZ3161@kib.kiev.ua> References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 13:20:04 -0000 On Thu, Sep 20, 2018 at 08:16:02AM -0500, Benjamin Kaduk wrote: > On Thu, Sep 20, 2018 at 5:10 AM Konstantin Belousov > wrote: > > > On Thu, Sep 20, 2018 at 12:20:04AM +0000, Jung-uk Kim wrote: > > > Author: jkim > > > Date: Thu Sep 20 00:20:04 2018 > > > New Revision: 338816 > > > URL: https://svnweb.freebsd.org/changeset/base/338816 > > > > > > Log: > > > Link libcrypto with pthread. > > Why ? > > > > > It uses pthread_once and pthread locks. So what ? libc provides the stubs. From owner-svn-src-projects@freebsd.org Thu Sep 20 16:39:34 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4370F10A223C for ; Thu, 20 Sep 2018 16:39:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FE53745CF; Thu, 20 Sep 2018 16:39:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 78A8810B774; Thu, 20 Sep 2018 12:39:30 -0400 (EDT) Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk To: Jung-uk Kim , src-committers@freebsd.org, svn-src-projects@freebsd.org References: <201809200020.w8K0K45h000526@repo.freebsd.org> From: John Baldwin Message-ID: <1f252548-4051-b9c0-28ba-a1a9a5676407@FreeBSD.org> Date: Thu, 20 Sep 2018 09:36:35 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <201809200020.w8K0K45h000526@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 20 Sep 2018 12:39:30 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 16:39:34 -0000 On 9/19/18 5:20 PM, Jung-uk Kim wrote: > Author: jkim > Date: Thu Sep 20 00:20:04 2018 > New Revision: 338816 > URL: https://svnweb.freebsd.org/changeset/base/338816 > > Log: > Link libcrypto with pthread. > > Modified: > projects/openssl111/secure/lib/libcrypto/Makefile > projects/openssl111/share/mk/src.libnames.mk I think we probably don't want to do this. I believe Ed might test a hack patch I have to make the pthread_once stub in libc functional to see if that fixes libcrypto. -- John Baldwin                                                                              From owner-svn-src-projects@freebsd.org Thu Sep 20 17:41:33 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E3A810A3A04 for ; Thu, 20 Sep 2018 17:41:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4F03765CC; Thu, 20 Sep 2018 17:41:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B0C5D1EC4E; Thu, 20 Sep 2018 17:41:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk To: Konstantin Belousov , Benjamin Kaduk Cc: svn-src-projects@freebsd.org, src-committers , John Baldwin References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> <20180920131952.GZ3161@kib.kiev.ua> From: Jung-uk Kim Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAHNHkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPsLAfQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9zsBNBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAHCwGUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> Date: Thu, 20 Sep 2018 13:41:26 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <20180920131952.GZ3161@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz" X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 17:41:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz Content-Type: multipart/mixed; boundary="SYCygdmBryqEwtMPxZRQ11jqWZ5oAY3CQ"; protected-headers="v1" From: Jung-uk Kim To: Konstantin Belousov , Benjamin Kaduk Cc: svn-src-projects@freebsd.org, src-committers , John Baldwin Message-ID: <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> <20180920131952.GZ3161@kib.kiev.ua> In-Reply-To: <20180920131952.GZ3161@kib.kiev.ua> --SYCygdmBryqEwtMPxZRQ11jqWZ5oAY3CQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18. 9. 20., Konstantin Belousov wrote: > On Thu, Sep 20, 2018 at 08:16:02AM -0500, Benjamin Kaduk wrote: >> On Thu, Sep 20, 2018 at 5:10 AM Konstantin Belousov >> wrote: >> >>> On Thu, Sep 20, 2018 at 12:20:04AM +0000, Jung-uk Kim wrote: >>>> Author: jkim >>>> Date: Thu Sep 20 00:20:04 2018 >>>> New Revision: 338816 >>>> URL: https://svnweb.freebsd.org/changeset/base/338816 >>>> >>>> Log: >>>> Link libcrypto with pthread. >>> Why ? >>> >>> >> It uses pthread_once and pthread locks. > So what ? libc provides the stubs. Historically, OpenSSL was okay without pthread because native implementation wasn't provided and users had to provide native callback functions instead. https://www.openssl.org/docs/man1.0.2/crypto/threads.html In fact, "objdump -T /lib/libcrypto.so.8 | grep pthread_" returns nothing. dwmalone discovered it and committed r127643 about 14 years ago= =2E https://svnweb.freebsd.org/changeset/base/127643 Now OpenSSL 1.1 actually uses POSIX pthread. Please see the blog post for the rationale: https://www.openssl.org/blog/blog/2017/02/21/threads/ Unfortunately, our stubs are not enough or broken somehow, i.e., some functions malfunction without pthread. FYI, OpenSSL 1.1.1 requires the following functions now: pthread_atfork(3) pthread_equal(3) pthread_getspecific(3) pthread_key_create(3) pthread_key_delete(3) pthread_once(3) pthread_rwlock_destroy(3) pthread_rwlock_init(3) pthread_rwlock_rdlock(3) pthread_rwlock_unlock(3) pthread_rwlock_wrlock(3) pthread_self(3) pthread_setspecific(3) If you have a functional patch for libc stubs, I'll be more than happy to revert it. Jung-uk Kim --SYCygdmBryqEwtMPxZRQ11jqWZ5oAY3CQ-- --5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAluj28wACgkQfJ+WJvzb 8UY2LAf+NKOnKk/IzKJIrxQyLnuidfwOmb8qKobANtit60gCu7uFKFblIY4XUIhX qVNANmEpWaB4kv86suzOjShYLuPdWdAEUCktSt+89HzeBaE2GehU81OBwx5tV4n8 FvCHUNCSbsRC3BLC0UGSu+CdNkflzF5cPjchvdbMNCsZ7kMi9ounzrlmehyAq5bZ uU971wkuAnPHnVuH05gxL7yy5dXOYy3F6ei9tmQ5cUJnfv8NvK3PEzbasrEmmXGn v3pAIcqivrTFynNMgaUd57bnjfhUNe0+xhQ9DMVGdl3v3Jyb612fZSE7SPSmKYdT niZwc8Wy+cRos+6XI+BkdfxZrZKoDQ== =3xF+ -----END PGP SIGNATURE----- --5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz-- From owner-svn-src-projects@freebsd.org Thu Sep 20 18:21:38 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC91A10A47B5 for ; Thu, 20 Sep 2018 18:21:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 4772777DD4; Thu, 20 Sep 2018 18:21:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w8KILQSx056120 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 20 Sep 2018 21:21:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w8KILQSx056120 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w8KILPQM056119; Thu, 20 Sep 2018 21:21:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 20 Sep 2018 21:21:25 +0300 From: Konstantin Belousov To: Jung-uk Kim Cc: Benjamin Kaduk , svn-src-projects@freebsd.org, src-committers , John Baldwin Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk Message-ID: <20180920182125.GF3161@kib.kiev.ua> References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> <20180920131952.GZ3161@kib.kiev.ua> <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 18:21:38 -0000 On Thu, Sep 20, 2018 at 01:41:26PM -0400, Jung-uk Kim wrote: > On 18. 9. 20., Konstantin Belousov wrote: > > On Thu, Sep 20, 2018 at 08:16:02AM -0500, Benjamin Kaduk wrote: > >> On Thu, Sep 20, 2018 at 5:10 AM Konstantin Belousov > >> wrote: > >> > >>> On Thu, Sep 20, 2018 at 12:20:04AM +0000, Jung-uk Kim wrote: > >>>> Author: jkim > >>>> Date: Thu Sep 20 00:20:04 2018 > >>>> New Revision: 338816 > >>>> URL: https://svnweb.freebsd.org/changeset/base/338816 > >>>> > >>>> Log: > >>>> Link libcrypto with pthread. > >>> Why ? > >>> > >>> > >> It uses pthread_once and pthread locks. > > So what ? libc provides the stubs. > > Historically, OpenSSL was okay without pthread because native > implementation wasn't provided and users had to provide native callback > functions instead. > > https://www.openssl.org/docs/man1.0.2/crypto/threads.html > > In fact, "objdump -T /lib/libcrypto.so.8 | grep pthread_" returns > nothing. dwmalone discovered it and committed r127643 about 14 years ago. > > https://svnweb.freebsd.org/changeset/base/127643 > > Now OpenSSL 1.1 actually uses POSIX pthread. Please see the blog post > for the rationale: > > https://www.openssl.org/blog/blog/2017/02/21/threads/ > > Unfortunately, our stubs are not enough or broken somehow, i.e., some > functions malfunction without pthread. > > FYI, OpenSSL 1.1.1 requires the following functions now: > > pthread_atfork(3) > pthread_equal(3) > pthread_getspecific(3) > pthread_key_create(3) > pthread_key_delete(3) > pthread_once(3) > pthread_rwlock_destroy(3) > pthread_rwlock_init(3) > pthread_rwlock_rdlock(3) > pthread_rwlock_unlock(3) > pthread_rwlock_wrlock(3) > pthread_self(3) > pthread_setspecific(3) > > If you have a functional patch for libc stubs, I'll be more than happy > to revert it. >From the list, I think the possible candidates are pthread_once(), pthread_atfork(), pthread_key*/setspecific(). Other should work with stubs as is, key/setspecific currently just fail. pthread_once() and pthread_atfork() silently do nothing, is it your problem ? The story about pthread_once() is known, there are some high-profile programs depending on pthread_once() failing in single-threaded environment (AKA gcc). From owner-svn-src-projects@freebsd.org Thu Sep 20 18:39:02 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB3A010A55C4 for ; Thu, 20 Sep 2018 18:39:02 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C68879705; Thu, 20 Sep 2018 18:39:02 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-ot1-x330.google.com with SMTP id n5-v6so10462672otl.5; Thu, 20 Sep 2018 11:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/SAqThKArF2gNz1hxBWhTIoJQFzBX/onOEgSljEeRtM=; b=GBus5H55sM/sfU8EMJa79Ebt7N5+DBWbkdDtak4qKn1lBeOkFICoNiwIHyzmJ0qZeZ vwXEdp8Wa7oC39mFUeLNL8kpAS/BiVSazMTLnSGs+w68F5CiODua57znhDbCwJ2H1JO7 zshI0yXA4sumP0KFVQmRY+WxFv50/MeCZ04XNNZ5rlz3kAJ6Nj8B5F7DyHL26RtZa2Gq fMEP0HLH8imyrs2Eq8QBn2gb+1HMQhSDUVc/01ZZPu4+J948a95fDJRz4dCYr6Tu6Ubj JlsbTQ+edShGXJSKsAQzf5OgMuA1HQrYyIp5NDA0kS/Vlx7ZUUC4+dvhJWyvpYfzIQp9 OTNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/SAqThKArF2gNz1hxBWhTIoJQFzBX/onOEgSljEeRtM=; b=WihDtk0NLmCWvSTv3+lRI3dYtYAXSZ2/wbwTKTeUXGGbG8NZC8YaikWP2GkIgawaDS Nh5X8ZDqWrP+jxmjM3rQB6U97aANLDCMFmLjV2PC2EPspNVYi5Wqj9S/hH1zVAv9x25/ /GjqBjyjZaRkZkxuD/EZOvDdrsumdG5sTWX4zn7CJTToxyHDn5dkVqOF8P4LsuDbCQMf HU2SzeNYFDI49bvp+pN8FPjVtzT8MO0YNSAftydH9tQ9b6S46ZRQTBQDDoeY+wNqXKGM LJj/VIJcjHJWAqENVtfiBOWid4DMRIigtdt2ssK4d4NmBh9JNPZR1LChGDf6bEP56Tbk uENw== X-Gm-Message-State: APzg51C4G2K53ZAzWqBcwnBiyShgSM21Dgt7X1+dYvLr0AebxaRpd2lp auyxPl+VaWL8BK89ao2fgpMsv74fNHQaVLN59S4= X-Google-Smtp-Source: ANB0VdYfPzYGE3YlmM1xnUmfpyk5ciVJAdXLVgKRTSUrnyhW0BH2nx+QnoYtr+b7Swmrr153kRIY1kymj2zpxpBSfo8= X-Received: by 2002:a9d:5241:: with SMTP id q1-v6mr23955227otg.18.1537468741523; Thu, 20 Sep 2018 11:39:01 -0700 (PDT) MIME-Version: 1.0 References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> <20180920131952.GZ3161@kib.kiev.ua> <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> In-Reply-To: <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> From: Benjamin Kaduk Date: Thu, 20 Sep 2018 13:38:50 -0500 Message-ID: Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk To: Konstantin Belousov Cc: svn-src-projects@freebsd.org, src-committers , John Baldwin , jkim@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 18:39:03 -0000 On Thu, Sep 20, 2018 at 12:41 PM Jung-uk Kim wrote: > On 18. 9. 20., Konstantin Belousov wrote: > > On Thu, Sep 20, 2018 at 08:16:02AM -0500, Benjamin Kaduk wrote: > >> On Thu, Sep 20, 2018 at 5:10 AM Konstantin Belousov < > kostikbel@gmail.com> > >> wrote: > >> > >>> On Thu, Sep 20, 2018 at 12:20:04AM +0000, Jung-uk Kim wrote: > >>>> Author: jkim > >>>> Date: Thu Sep 20 00:20:04 2018 > >>>> New Revision: 338816 > >>>> URL: https://svnweb.freebsd.org/changeset/base/338816 > >>>> > >>>> Log: > >>>> Link libcrypto with pthread. > >>> Why ? > >>> > >>> > >> It uses pthread_once and pthread locks. > > So what ? libc provides the stubs. > > Historically, OpenSSL was okay without pthread because native > implementation wasn't provided and users had to provide native callback > functions instead. > > https://www.openssl.org/docs/man1.0.2/crypto/threads.html > > In fact, "objdump -T /lib/libcrypto.so.8 | grep pthread_" returns > nothing. dwmalone discovered it and committed r127643 about 14 years ago. > > https://svnweb.freebsd.org/changeset/base/127643 > > Now OpenSSL 1.1 actually uses POSIX pthread. Please see the blog post > for the rationale: > > https://www.openssl.org/blog/blog/2017/02/21/threads/ > > Unfortunately, our stubs are not enough or broken somehow, i.e., some > functions malfunction without pthread. > > FYI, OpenSSL 1.1.1 requires the following functions now: > > pthread_atfork(3) > pthread_equal(3) > pthread_getspecific(3) > pthread_key_create(3) > pthread_key_delete(3) > pthread_once(3) > pthread_rwlock_destroy(3) > pthread_rwlock_init(3) > pthread_rwlock_rdlock(3) > pthread_rwlock_unlock(3) > pthread_rwlock_wrlock(3) > pthread_self(3) > pthread_setspecific(3) > > If you have a functional patch for libc stubs, I'll be more than happy > to revert it. > > kib's reply is taking a long time to arrive, so let me just paste in the relevant bits from another source: % From the list, I think the possible candidates are % pthread_once(), % pthread_atfork(), % pthread_key*/setspecific(). % Other should work with stubs as is, key/setspecific currently just fail. % pthread_once() and pthread_atfork() silently do nothing, is it your % problem ? % % The story about pthread_once() is known, there are some high-profile % programs depending on pthread_once() failing in single-threaded environment % (AKA gcc). pthread_atfork() is just used to increment a generation counter for the CSPRNG in the child, but pthread_once() and pthread_key*/setspecific() are heavily used for important functionality. The list of ciphers, digests, error strings, etc., are initialized in pthread_once(). pthread_setspecific() is used to provide per-thread DRBG instances (so the default RNG seems likely to fail if that function is a noop stub). In short, openssl is now a heavy pthread consumer (on Unix). -Ben From owner-svn-src-projects@freebsd.org Thu Sep 20 21:34:07 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D7510AA8C5 for ; Thu, 20 Sep 2018 21:34:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B857F81467; Thu, 20 Sep 2018 21:34:06 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFB302399F; Thu, 20 Sep 2018 21:34:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KLY680063853; Thu, 20 Sep 2018 21:34:06 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KLY6fp063849; Thu, 20 Sep 2018 21:34:06 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809202134.w8KLY6fp063849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 21:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338842 - in projects/openssl111/secure/lib/libcrypto: . i386 X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/secure/lib/libcrypto: . i386 X-SVN-Commit-Revision: 338842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 21:34:07 -0000 Author: jkim Date: Thu Sep 20 21:34:05 2018 New Revision: 338842 URL: https://svnweb.freebsd.org/changeset/base/338842 Log: Regen assembly files for i386. Added: projects/openssl111/secure/lib/libcrypto/i386/cast-586.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/i386/chacha-x86.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/i386/e_padlock-x86.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/i386/ecp_nistz256-x86.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/i386/poly1305-x86.S (contents, props changed) Deleted: projects/openssl111/secure/lib/libcrypto/i386/bf-686.S Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm projects/openssl111/secure/lib/libcrypto/i386/aes-586.S projects/openssl111/secure/lib/libcrypto/i386/aesni-x86.S projects/openssl111/secure/lib/libcrypto/i386/bf-586.S projects/openssl111/secure/lib/libcrypto/i386/bn-586.S projects/openssl111/secure/lib/libcrypto/i386/cmll-x86.S projects/openssl111/secure/lib/libcrypto/i386/co-586.S projects/openssl111/secure/lib/libcrypto/i386/crypt586.S projects/openssl111/secure/lib/libcrypto/i386/des-586.S projects/openssl111/secure/lib/libcrypto/i386/ghash-x86.S projects/openssl111/secure/lib/libcrypto/i386/md5-586.S projects/openssl111/secure/lib/libcrypto/i386/rc4-586.S projects/openssl111/secure/lib/libcrypto/i386/rc5-586.S projects/openssl111/secure/lib/libcrypto/i386/rmd-586.S projects/openssl111/secure/lib/libcrypto/i386/sha1-586.S projects/openssl111/secure/lib/libcrypto/i386/sha256-586.S projects/openssl111/secure/lib/libcrypto/i386/sha512-586.S projects/openssl111/secure/lib/libcrypto/i386/vpaes-x86.S projects/openssl111/secure/lib/libcrypto/i386/wp-mmx.S projects/openssl111/secure/lib/libcrypto/i386/x86-gf2m.S projects/openssl111/secure/lib/libcrypto/i386/x86-mont.S projects/openssl111/secure/lib/libcrypto/i386/x86cpuid.S Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.asm Thu Sep 20 20:32:08 2018 (r338841) +++ projects/openssl111/secure/lib/libcrypto/Makefile.asm Thu Sep 20 21:34:05 2018 (r338842) @@ -59,6 +59,9 @@ sha256-armv8.S: sha512-armv8.pl ${LCRYPTO_SRC}/crypto/whrlpool/asm \ ${LCRYPTO_SRC}/engines/asm +# cpuid +SRCS+= x86_64cpuid.pl + # aes SRCS= aes-x86_64.pl aesni-mb-x86_64.pl aesni-sha1-x86_64.pl \ aesni-sha256-x86_64.pl aesni-x86_64.pl bsaes-x86_64.pl \ @@ -77,9 +80,6 @@ SRCS+= chacha-x86_64.pl # ec SRCS+= ecp_nistz256-x86_64.pl x25519-x86_64.pl -# engines -SRCS+= e_padlock-x86_64.pl - # md5 SRCS+= md5-x86_64.pl @@ -99,8 +99,8 @@ SRCS+= keccak1600-x86_64.pl sha1-mb-x86_64.pl sha1-x86 # whrlpool SRCS+= wp-x86_64.pl -# cpuid -SRCS+= x86_64cpuid.pl +# engines +SRCS+= e_padlock-x86_64.pl SHA_ASM= sha256-x86_64 sha512-x86_64 SHA_SRC= sha512-x86_64.pl @@ -175,22 +175,30 @@ aes-armv4.S: aes-armv4.pl ${LCRYPTO_SRC}/crypto/bf/asm \ ${LCRYPTO_SRC}/crypto/bn/asm \ ${LCRYPTO_SRC}/crypto/camellia/asm \ + ${LCRYPTO_SRC}/crypto/cast/asm \ + ${LCRYPTO_SRC}/crypto/chacha/asm \ ${LCRYPTO_SRC}/crypto/des/asm \ + ${LCRYPTO_SRC}/crypto/ec/asm \ ${LCRYPTO_SRC}/crypto/md5/asm \ ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/poly1305/asm \ ${LCRYPTO_SRC}/crypto/rc4/asm \ ${LCRYPTO_SRC}/crypto/rc5/asm \ ${LCRYPTO_SRC}/crypto/ripemd/asm \ ${LCRYPTO_SRC}/crypto/sha/asm \ - ${LCRYPTO_SRC}/crypto/whrlpool/asm + ${LCRYPTO_SRC}/crypto/whrlpool/asm \ + ${LCRYPTO_SRC}/engines/asm -PERLPATH= -I${LCRYPTO_SRC}/crypto/des/asm -I${LCRYPTO_SRC}/crypto/perlasm +#PERLPATH= -I${LCRYPTO_SRC}/crypto/des/asm -I${LCRYPTO_SRC}/crypto/perlasm +# cpuid +SRCS= x86cpuid.pl + # aes -SRCS= aes-586.pl aesni-x86.pl vpaes-x86.pl +SRCS+= aes-586.pl aesni-x86.pl vpaes-x86.pl # blowfish -SRCS+= bf-586.pl bf-686.pl +SRCS+= bf-586.pl # bn SRCS+= bn-586.pl co-586.pl x86-gf2m.pl x86-mont.pl @@ -198,15 +206,27 @@ SRCS+= bn-586.pl co-586.pl x86-gf2m.pl x86-mont.pl # camellia SRCS+= cmll-x86.pl +# cast +SRCS+= cast-586.pl + +# chacha +SRCS+= chacha-x86.pl + # des SRCS+= crypt586.pl des-586.pl +# ec +SRCS+= ecp_nistz256-x86.pl + # md5 SRCS+= md5-586.pl # modes SRCS+= ghash-x86.pl +# poly1305 +SRCS+= poly1305-x86.pl + # rc4 SRCS+= rc4-586.pl @@ -222,25 +242,26 @@ SRCS+= sha1-586.pl sha256-586.pl sha512-586.pl # whrlpool SRCS+= wp-mmx.pl -# cpuid -SRCS+= x86cpuid.pl +# engines +SRCS+= e_padlock-x86.pl ASM= ${SRCS:R:S/$/.S/} all: ${ASM} -CLEANFILES= ${ASM} +CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} .SUFFIXES: .pl .pl.S: ( echo '/* $$'FreeBSD'$$ */' ;\ echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ echo '#ifdef PIC' ;\ - env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic -DPIC ;\ + env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic -DPIC ${.IMPSRC:R:S/$/.s/} ;\ + cat ${.IMPSRC:R:S/$/.s/} ;\ echo '#else' ;\ - env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ;\ - echo '#endif') |\ - sed -E 's|(\.file[[:blank:]]+)".*"|\1"${.TARGET}"|' > ${.TARGET} + env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ${.IMPSRC:R:S/$/.s/} ;\ + cat ${.IMPSRC:R:S/$/.s/} ;\ + echo '#endif' ) > ${.TARGET} .endif .include Modified: projects/openssl111/secure/lib/libcrypto/i386/aes-586.S ============================================================================== --- projects/openssl111/secure/lib/libcrypto/i386/aes-586.S Thu Sep 20 20:32:08 2018 (r338841) +++ projects/openssl111/secure/lib/libcrypto/i386/aes-586.S Thu Sep 20 21:34:05 2018 (r338842) @@ -1,7 +1,6 @@ /* $FreeBSD$ */ /* Do not modify. This file is auto-generated from aes-586.pl. */ #ifdef PIC -.file "aes-586.S" .text .type _x86_AES_encrypt_compact,@function .align 16 @@ -2999,19 +2998,19 @@ _x86_AES_set_encrypt_key: popl %ebp ret .size _x86_AES_set_encrypt_key,.-_x86_AES_set_encrypt_key -.globl private_AES_set_encrypt_key -.type private_AES_set_encrypt_key,@function +.globl AES_set_encrypt_key +.type AES_set_encrypt_key,@function .align 16 -private_AES_set_encrypt_key: -.L_private_AES_set_encrypt_key_begin: +AES_set_encrypt_key: +.L_AES_set_encrypt_key_begin: call _x86_AES_set_encrypt_key ret -.size private_AES_set_encrypt_key,.-.L_private_AES_set_encrypt_key_begin -.globl private_AES_set_decrypt_key -.type private_AES_set_decrypt_key,@function +.size AES_set_encrypt_key,.-.L_AES_set_encrypt_key_begin +.globl AES_set_decrypt_key +.type AES_set_decrypt_key,@function .align 16 -private_AES_set_decrypt_key: -.L_private_AES_set_decrypt_key_begin: +AES_set_decrypt_key: +.L_AES_set_decrypt_key_begin: call _x86_AES_set_encrypt_key cmpl $0,%eax je .L054proceed @@ -3240,13 +3239,12 @@ private_AES_set_decrypt_key: popl %ebx popl %ebp ret -.size private_AES_set_decrypt_key,.-.L_private_AES_set_decrypt_key_begin +.size AES_set_decrypt_key,.-.L_AES_set_decrypt_key_begin .byte 65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89 .byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 .byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 .comm OPENSSL_ia32cap_P,16,4 #else -.file "aes-586.S" .text .type _x86_AES_encrypt_compact,@function .align 16 @@ -6244,19 +6242,19 @@ _x86_AES_set_encrypt_key: popl %ebp ret .size _x86_AES_set_encrypt_key,.-_x86_AES_set_encrypt_key -.globl private_AES_set_encrypt_key -.type private_AES_set_encrypt_key,@function +.globl AES_set_encrypt_key +.type AES_set_encrypt_key,@function .align 16 -private_AES_set_encrypt_key: -.L_private_AES_set_encrypt_key_begin: +AES_set_encrypt_key: +.L_AES_set_encrypt_key_begin: call _x86_AES_set_encrypt_key ret -.size private_AES_set_encrypt_key,.-.L_private_AES_set_encrypt_key_begin -.globl private_AES_set_decrypt_key -.type private_AES_set_decrypt_key,@function +.size AES_set_encrypt_key,.-.L_AES_set_encrypt_key_begin +.globl AES_set_decrypt_key +.type AES_set_decrypt_key,@function .align 16 -private_AES_set_decrypt_key: -.L_private_AES_set_decrypt_key_begin: +AES_set_decrypt_key: +.L_AES_set_decrypt_key_begin: call _x86_AES_set_encrypt_key cmpl $0,%eax je .L054proceed @@ -6485,7 +6483,7 @@ private_AES_set_decrypt_key: popl %ebx popl %ebp ret -.size private_AES_set_decrypt_key,.-.L_private_AES_set_decrypt_key_begin +.size AES_set_decrypt_key,.-.L_AES_set_decrypt_key_begin .byte 65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89 .byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 .byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 Modified: projects/openssl111/secure/lib/libcrypto/i386/aesni-x86.S ============================================================================== --- projects/openssl111/secure/lib/libcrypto/i386/aesni-x86.S Thu Sep 20 20:32:08 2018 (r338841) +++ projects/openssl111/secure/lib/libcrypto/i386/aesni-x86.S Thu Sep 20 21:34:05 2018 (r338842) @@ -1,7 +1,6 @@ /* $FreeBSD$ */ /* Do not modify. This file is auto-generated from aesni-x86.pl. */ #ifdef PIC -.file "aesni-x86.S" .text .globl aesni_encrypt .type aesni_encrypt,@function @@ -1793,6 +1792,796 @@ aesni_xts_decrypt: popl %ebp ret .size aesni_xts_decrypt,.-.L_aesni_xts_decrypt_begin +.globl aesni_ocb_encrypt +.type aesni_ocb_encrypt,@function +.align 16 +aesni_ocb_encrypt: +.L_aesni_ocb_encrypt_begin: + pushl %ebp + pushl %ebx + pushl %esi + pushl %edi + movl 40(%esp),%ecx + movl 48(%esp),%ebx + movl 20(%esp),%esi + movl 24(%esp),%edi + movl 28(%esp),%eax + movl 32(%esp),%edx + movdqu (%ecx),%xmm0 + movl 36(%esp),%ebp + movdqu (%ebx),%xmm1 + movl 44(%esp),%ebx + movl %esp,%ecx + subl $132,%esp + andl $-16,%esp + subl %esi,%edi + shll $4,%eax + leal -96(%esi,%eax,1),%eax + movl %edi,120(%esp) + movl %eax,124(%esp) + movl %ecx,128(%esp) + movl 240(%edx),%ecx + testl $1,%ebp + jnz .L074odd + bsfl %ebp,%eax + addl $1,%ebp + shll $4,%eax + movdqu (%ebx,%eax,1),%xmm7 + movl %edx,%eax + movdqu (%esi),%xmm2 + leal 16(%esi),%esi + pxor %xmm0,%xmm7 + pxor %xmm2,%xmm1 + pxor %xmm7,%xmm2 + movdqa %xmm1,%xmm6 + movups (%edx),%xmm0 + movups 16(%edx),%xmm1 + leal 32(%edx),%edx + xorps %xmm0,%xmm2 +.L075enc1_loop_15: +.byte 102,15,56,220,209 + decl %ecx + movups (%edx),%xmm1 + leal 16(%edx),%edx + jnz .L075enc1_loop_15 +.byte 102,15,56,221,209 + xorps %xmm7,%xmm2 + movdqa %xmm7,%xmm0 + movdqa %xmm6,%xmm1 + movups %xmm2,-16(%edi,%esi,1) + movl 240(%eax),%ecx + movl %eax,%edx + movl 124(%esp),%eax +.L074odd: + shll $4,%ecx + movl $16,%edi + subl %ecx,%edi + movl %edx,112(%esp) + leal 32(%edx,%ecx,1),%edx + movl %edi,116(%esp) + cmpl %eax,%esi + ja .L076short + jmp .L077grandloop +.align 32 +.L077grandloop: + leal 1(%ebp),%ecx + leal 3(%ebp),%eax + leal 5(%ebp),%edi + addl $6,%ebp + bsfl %ecx,%ecx + bsfl %eax,%eax + bsfl %edi,%edi + shll $4,%ecx + shll $4,%eax + shll $4,%edi + movdqu (%ebx),%xmm2 + movdqu (%ebx,%ecx,1),%xmm3 + movl 116(%esp),%ecx + movdqa %xmm2,%xmm4 + movdqu (%ebx,%eax,1),%xmm5 + movdqa %xmm2,%xmm6 + movdqu (%ebx,%edi,1),%xmm7 + pxor %xmm0,%xmm2 + pxor %xmm2,%xmm3 + movdqa %xmm2,(%esp) + pxor %xmm3,%xmm4 + movdqa %xmm3,16(%esp) + pxor %xmm4,%xmm5 + movdqa %xmm4,32(%esp) + pxor %xmm5,%xmm6 + movdqa %xmm5,48(%esp) + pxor %xmm6,%xmm7 + movdqa %xmm6,64(%esp) + movdqa %xmm7,80(%esp) + movups -48(%edx,%ecx,1),%xmm0 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movdqu 32(%esi),%xmm4 + movdqu 48(%esi),%xmm5 + movdqu 64(%esi),%xmm6 + movdqu 80(%esi),%xmm7 + leal 96(%esi),%esi + pxor %xmm2,%xmm1 + pxor %xmm0,%xmm2 + pxor %xmm3,%xmm1 + pxor %xmm0,%xmm3 + pxor %xmm4,%xmm1 + pxor %xmm0,%xmm4 + pxor %xmm5,%xmm1 + pxor %xmm0,%xmm5 + pxor %xmm6,%xmm1 + pxor %xmm0,%xmm6 + pxor %xmm7,%xmm1 + pxor %xmm0,%xmm7 + movdqa %xmm1,96(%esp) + movups -32(%edx,%ecx,1),%xmm1 + pxor (%esp),%xmm2 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor 64(%esp),%xmm6 + pxor 80(%esp),%xmm7 + movups -16(%edx,%ecx,1),%xmm0 +.byte 102,15,56,220,209 +.byte 102,15,56,220,217 +.byte 102,15,56,220,225 +.byte 102,15,56,220,233 +.byte 102,15,56,220,241 +.byte 102,15,56,220,249 + movl 120(%esp),%edi + movl 124(%esp),%eax + call .L_aesni_encrypt6_enter + movdqa 80(%esp),%xmm0 + pxor (%esp),%xmm2 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor 64(%esp),%xmm6 + pxor %xmm0,%xmm7 + movdqa 96(%esp),%xmm1 + movdqu %xmm2,-96(%edi,%esi,1) + movdqu %xmm3,-80(%edi,%esi,1) + movdqu %xmm4,-64(%edi,%esi,1) + movdqu %xmm5,-48(%edi,%esi,1) + movdqu %xmm6,-32(%edi,%esi,1) + movdqu %xmm7,-16(%edi,%esi,1) + cmpl %eax,%esi + jb .L077grandloop +.L076short: + addl $96,%eax + subl %esi,%eax + jz .L078done + cmpl $32,%eax + jb .L079one + je .L080two + cmpl $64,%eax + jb .L081three + je .L082four + leal 1(%ebp),%ecx + leal 3(%ebp),%eax + bsfl %ecx,%ecx + bsfl %eax,%eax + shll $4,%ecx + shll $4,%eax + movdqu (%ebx),%xmm2 + movdqu (%ebx,%ecx,1),%xmm3 + movl 116(%esp),%ecx + movdqa %xmm2,%xmm4 + movdqu (%ebx,%eax,1),%xmm5 + movdqa %xmm2,%xmm6 + pxor %xmm0,%xmm2 + pxor %xmm2,%xmm3 + movdqa %xmm2,(%esp) + pxor %xmm3,%xmm4 + movdqa %xmm3,16(%esp) + pxor %xmm4,%xmm5 + movdqa %xmm4,32(%esp) + pxor %xmm5,%xmm6 + movdqa %xmm5,48(%esp) + pxor %xmm6,%xmm7 + movdqa %xmm6,64(%esp) + movups -48(%edx,%ecx,1),%xmm0 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movdqu 32(%esi),%xmm4 + movdqu 48(%esi),%xmm5 + movdqu 64(%esi),%xmm6 + pxor %xmm7,%xmm7 + pxor %xmm2,%xmm1 + pxor %xmm0,%xmm2 + pxor %xmm3,%xmm1 + pxor %xmm0,%xmm3 + pxor %xmm4,%xmm1 + pxor %xmm0,%xmm4 + pxor %xmm5,%xmm1 + pxor %xmm0,%xmm5 + pxor %xmm6,%xmm1 + pxor %xmm0,%xmm6 + movdqa %xmm1,96(%esp) + movups -32(%edx,%ecx,1),%xmm1 + pxor (%esp),%xmm2 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor 64(%esp),%xmm6 + movups -16(%edx,%ecx,1),%xmm0 +.byte 102,15,56,220,209 +.byte 102,15,56,220,217 +.byte 102,15,56,220,225 +.byte 102,15,56,220,233 +.byte 102,15,56,220,241 +.byte 102,15,56,220,249 + movl 120(%esp),%edi + call .L_aesni_encrypt6_enter + movdqa 64(%esp),%xmm0 + pxor (%esp),%xmm2 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor %xmm0,%xmm6 + movdqa 96(%esp),%xmm1 + movdqu %xmm2,(%edi,%esi,1) + movdqu %xmm3,16(%edi,%esi,1) + movdqu %xmm4,32(%edi,%esi,1) + movdqu %xmm5,48(%edi,%esi,1) + movdqu %xmm6,64(%edi,%esi,1) + jmp .L078done +.align 16 +.L079one: + movdqu (%ebx),%xmm7 + movl 112(%esp),%edx + movdqu (%esi),%xmm2 + movl 240(%edx),%ecx + pxor %xmm0,%xmm7 + pxor %xmm2,%xmm1 + pxor %xmm7,%xmm2 + movdqa %xmm1,%xmm6 + movl 120(%esp),%edi + movups (%edx),%xmm0 + movups 16(%edx),%xmm1 + leal 32(%edx),%edx + xorps %xmm0,%xmm2 +.L083enc1_loop_16: +.byte 102,15,56,220,209 + decl %ecx + movups (%edx),%xmm1 + leal 16(%edx),%edx + jnz .L083enc1_loop_16 +.byte 102,15,56,221,209 + xorps %xmm7,%xmm2 + movdqa %xmm7,%xmm0 + movdqa %xmm6,%xmm1 + movups %xmm2,(%edi,%esi,1) + jmp .L078done +.align 16 +.L080two: + leal 1(%ebp),%ecx + movl 112(%esp),%edx + bsfl %ecx,%ecx + shll $4,%ecx + movdqu (%ebx),%xmm6 + movdqu (%ebx,%ecx,1),%xmm7 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movl 240(%edx),%ecx + pxor %xmm0,%xmm6 + pxor %xmm6,%xmm7 + pxor %xmm2,%xmm1 + pxor %xmm6,%xmm2 + pxor %xmm3,%xmm1 + pxor %xmm7,%xmm3 + movdqa %xmm1,%xmm5 + movl 120(%esp),%edi + call _aesni_encrypt2 + xorps %xmm6,%xmm2 + xorps %xmm7,%xmm3 + movdqa %xmm7,%xmm0 + movdqa %xmm5,%xmm1 + movups %xmm2,(%edi,%esi,1) + movups %xmm3,16(%edi,%esi,1) + jmp .L078done +.align 16 +.L081three: + leal 1(%ebp),%ecx + movl 112(%esp),%edx + bsfl %ecx,%ecx + shll $4,%ecx + movdqu (%ebx),%xmm5 + movdqu (%ebx,%ecx,1),%xmm6 + movdqa %xmm5,%xmm7 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movdqu 32(%esi),%xmm4 + movl 240(%edx),%ecx + pxor %xmm0,%xmm5 + pxor %xmm5,%xmm6 + pxor %xmm6,%xmm7 + pxor %xmm2,%xmm1 + pxor %xmm5,%xmm2 + pxor %xmm3,%xmm1 + pxor %xmm6,%xmm3 + pxor %xmm4,%xmm1 + pxor %xmm7,%xmm4 + movdqa %xmm1,96(%esp) + movl 120(%esp),%edi + call _aesni_encrypt3 + xorps %xmm5,%xmm2 + xorps %xmm6,%xmm3 + xorps %xmm7,%xmm4 + movdqa %xmm7,%xmm0 + movdqa 96(%esp),%xmm1 + movups %xmm2,(%edi,%esi,1) + movups %xmm3,16(%edi,%esi,1) + movups %xmm4,32(%edi,%esi,1) + jmp .L078done +.align 16 +.L082four: + leal 1(%ebp),%ecx + leal 3(%ebp),%eax + bsfl %ecx,%ecx + bsfl %eax,%eax + movl 112(%esp),%edx + shll $4,%ecx + shll $4,%eax + movdqu (%ebx),%xmm4 + movdqu (%ebx,%ecx,1),%xmm5 + movdqa %xmm4,%xmm6 + movdqu (%ebx,%eax,1),%xmm7 + pxor %xmm0,%xmm4 + movdqu (%esi),%xmm2 + pxor %xmm4,%xmm5 + movdqu 16(%esi),%xmm3 + pxor %xmm5,%xmm6 + movdqa %xmm4,(%esp) + pxor %xmm6,%xmm7 + movdqa %xmm5,16(%esp) + movdqu 32(%esi),%xmm4 + movdqu 48(%esi),%xmm5 + movl 240(%edx),%ecx + pxor %xmm2,%xmm1 + pxor (%esp),%xmm2 + pxor %xmm3,%xmm1 + pxor 16(%esp),%xmm3 + pxor %xmm4,%xmm1 + pxor %xmm6,%xmm4 + pxor %xmm5,%xmm1 + pxor %xmm7,%xmm5 + movdqa %xmm1,96(%esp) + movl 120(%esp),%edi + call _aesni_encrypt4 + xorps (%esp),%xmm2 + xorps 16(%esp),%xmm3 + xorps %xmm6,%xmm4 + movups %xmm2,(%edi,%esi,1) + xorps %xmm7,%xmm5 + movups %xmm3,16(%edi,%esi,1) + movdqa %xmm7,%xmm0 + movups %xmm4,32(%edi,%esi,1) + movdqa 96(%esp),%xmm1 + movups %xmm5,48(%edi,%esi,1) +.L078done: + movl 128(%esp),%edx + pxor %xmm2,%xmm2 + pxor %xmm3,%xmm3 + movdqa %xmm2,(%esp) + pxor %xmm4,%xmm4 + movdqa %xmm2,16(%esp) + pxor %xmm5,%xmm5 + movdqa %xmm2,32(%esp) + pxor %xmm6,%xmm6 + movdqa %xmm2,48(%esp) + pxor %xmm7,%xmm7 + movdqa %xmm2,64(%esp) + movdqa %xmm2,80(%esp) + movdqa %xmm2,96(%esp) + leal (%edx),%esp + movl 40(%esp),%ecx + movl 48(%esp),%ebx + movdqu %xmm0,(%ecx) + pxor %xmm0,%xmm0 + movdqu %xmm1,(%ebx) + pxor %xmm1,%xmm1 + popl %edi + popl %esi + popl %ebx + popl %ebp + ret +.size aesni_ocb_encrypt,.-.L_aesni_ocb_encrypt_begin +.globl aesni_ocb_decrypt +.type aesni_ocb_decrypt,@function +.align 16 +aesni_ocb_decrypt: +.L_aesni_ocb_decrypt_begin: + pushl %ebp + pushl %ebx + pushl %esi + pushl %edi + movl 40(%esp),%ecx + movl 48(%esp),%ebx + movl 20(%esp),%esi + movl 24(%esp),%edi + movl 28(%esp),%eax + movl 32(%esp),%edx + movdqu (%ecx),%xmm0 + movl 36(%esp),%ebp + movdqu (%ebx),%xmm1 + movl 44(%esp),%ebx + movl %esp,%ecx + subl $132,%esp + andl $-16,%esp + subl %esi,%edi + shll $4,%eax + leal -96(%esi,%eax,1),%eax + movl %edi,120(%esp) + movl %eax,124(%esp) + movl %ecx,128(%esp) + movl 240(%edx),%ecx + testl $1,%ebp + jnz .L084odd + bsfl %ebp,%eax + addl $1,%ebp + shll $4,%eax + movdqu (%ebx,%eax,1),%xmm7 + movl %edx,%eax + movdqu (%esi),%xmm2 + leal 16(%esi),%esi + pxor %xmm0,%xmm7 + pxor %xmm7,%xmm2 + movdqa %xmm1,%xmm6 + movups (%edx),%xmm0 + movups 16(%edx),%xmm1 + leal 32(%edx),%edx + xorps %xmm0,%xmm2 +.L085dec1_loop_17: +.byte 102,15,56,222,209 + decl %ecx + movups (%edx),%xmm1 + leal 16(%edx),%edx + jnz .L085dec1_loop_17 +.byte 102,15,56,223,209 + xorps %xmm7,%xmm2 + movaps %xmm6,%xmm1 + movdqa %xmm7,%xmm0 + xorps %xmm2,%xmm1 + movups %xmm2,-16(%edi,%esi,1) + movl 240(%eax),%ecx + movl %eax,%edx + movl 124(%esp),%eax +.L084odd: + shll $4,%ecx + movl $16,%edi + subl %ecx,%edi + movl %edx,112(%esp) + leal 32(%edx,%ecx,1),%edx + movl %edi,116(%esp) + cmpl %eax,%esi + ja .L086short + jmp .L087grandloop +.align 32 +.L087grandloop: + leal 1(%ebp),%ecx + leal 3(%ebp),%eax + leal 5(%ebp),%edi + addl $6,%ebp + bsfl %ecx,%ecx + bsfl %eax,%eax + bsfl %edi,%edi + shll $4,%ecx + shll $4,%eax + shll $4,%edi + movdqu (%ebx),%xmm2 + movdqu (%ebx,%ecx,1),%xmm3 + movl 116(%esp),%ecx + movdqa %xmm2,%xmm4 + movdqu (%ebx,%eax,1),%xmm5 + movdqa %xmm2,%xmm6 + movdqu (%ebx,%edi,1),%xmm7 + pxor %xmm0,%xmm2 + pxor %xmm2,%xmm3 + movdqa %xmm2,(%esp) + pxor %xmm3,%xmm4 + movdqa %xmm3,16(%esp) + pxor %xmm4,%xmm5 + movdqa %xmm4,32(%esp) + pxor %xmm5,%xmm6 + movdqa %xmm5,48(%esp) + pxor %xmm6,%xmm7 + movdqa %xmm6,64(%esp) + movdqa %xmm7,80(%esp) + movups -48(%edx,%ecx,1),%xmm0 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movdqu 32(%esi),%xmm4 + movdqu 48(%esi),%xmm5 + movdqu 64(%esi),%xmm6 + movdqu 80(%esi),%xmm7 + leal 96(%esi),%esi + movdqa %xmm1,96(%esp) + pxor %xmm0,%xmm2 + pxor %xmm0,%xmm3 + pxor %xmm0,%xmm4 + pxor %xmm0,%xmm5 + pxor %xmm0,%xmm6 + pxor %xmm0,%xmm7 + movups -32(%edx,%ecx,1),%xmm1 + pxor (%esp),%xmm2 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor 64(%esp),%xmm6 + pxor 80(%esp),%xmm7 + movups -16(%edx,%ecx,1),%xmm0 +.byte 102,15,56,222,209 +.byte 102,15,56,222,217 +.byte 102,15,56,222,225 +.byte 102,15,56,222,233 +.byte 102,15,56,222,241 +.byte 102,15,56,222,249 + movl 120(%esp),%edi + movl 124(%esp),%eax + call .L_aesni_decrypt6_enter + movdqa 80(%esp),%xmm0 + pxor (%esp),%xmm2 + movdqa 96(%esp),%xmm1 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor 64(%esp),%xmm6 + pxor %xmm0,%xmm7 + pxor %xmm2,%xmm1 + movdqu %xmm2,-96(%edi,%esi,1) + pxor %xmm3,%xmm1 + movdqu %xmm3,-80(%edi,%esi,1) + pxor %xmm4,%xmm1 + movdqu %xmm4,-64(%edi,%esi,1) + pxor %xmm5,%xmm1 + movdqu %xmm5,-48(%edi,%esi,1) + pxor %xmm6,%xmm1 + movdqu %xmm6,-32(%edi,%esi,1) + pxor %xmm7,%xmm1 + movdqu %xmm7,-16(%edi,%esi,1) + cmpl %eax,%esi + jb .L087grandloop +.L086short: + addl $96,%eax + subl %esi,%eax + jz .L088done + cmpl $32,%eax + jb .L089one + je .L090two + cmpl $64,%eax + jb .L091three + je .L092four + leal 1(%ebp),%ecx + leal 3(%ebp),%eax + bsfl %ecx,%ecx + bsfl %eax,%eax + shll $4,%ecx + shll $4,%eax + movdqu (%ebx),%xmm2 + movdqu (%ebx,%ecx,1),%xmm3 + movl 116(%esp),%ecx + movdqa %xmm2,%xmm4 + movdqu (%ebx,%eax,1),%xmm5 + movdqa %xmm2,%xmm6 + pxor %xmm0,%xmm2 + pxor %xmm2,%xmm3 + movdqa %xmm2,(%esp) + pxor %xmm3,%xmm4 + movdqa %xmm3,16(%esp) + pxor %xmm4,%xmm5 + movdqa %xmm4,32(%esp) + pxor %xmm5,%xmm6 + movdqa %xmm5,48(%esp) + pxor %xmm6,%xmm7 + movdqa %xmm6,64(%esp) + movups -48(%edx,%ecx,1),%xmm0 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movdqu 32(%esi),%xmm4 + movdqu 48(%esi),%xmm5 + movdqu 64(%esi),%xmm6 + pxor %xmm7,%xmm7 + movdqa %xmm1,96(%esp) + pxor %xmm0,%xmm2 + pxor %xmm0,%xmm3 + pxor %xmm0,%xmm4 + pxor %xmm0,%xmm5 + pxor %xmm0,%xmm6 + movups -32(%edx,%ecx,1),%xmm1 + pxor (%esp),%xmm2 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor 64(%esp),%xmm6 + movups -16(%edx,%ecx,1),%xmm0 +.byte 102,15,56,222,209 +.byte 102,15,56,222,217 +.byte 102,15,56,222,225 +.byte 102,15,56,222,233 +.byte 102,15,56,222,241 +.byte 102,15,56,222,249 + movl 120(%esp),%edi + call .L_aesni_decrypt6_enter + movdqa 64(%esp),%xmm0 + pxor (%esp),%xmm2 + movdqa 96(%esp),%xmm1 + pxor 16(%esp),%xmm3 + pxor 32(%esp),%xmm4 + pxor 48(%esp),%xmm5 + pxor %xmm0,%xmm6 + pxor %xmm2,%xmm1 + movdqu %xmm2,(%edi,%esi,1) + pxor %xmm3,%xmm1 + movdqu %xmm3,16(%edi,%esi,1) + pxor %xmm4,%xmm1 + movdqu %xmm4,32(%edi,%esi,1) + pxor %xmm5,%xmm1 + movdqu %xmm5,48(%edi,%esi,1) + pxor %xmm6,%xmm1 + movdqu %xmm6,64(%edi,%esi,1) + jmp .L088done +.align 16 +.L089one: + movdqu (%ebx),%xmm7 + movl 112(%esp),%edx + movdqu (%esi),%xmm2 + movl 240(%edx),%ecx + pxor %xmm0,%xmm7 + pxor %xmm7,%xmm2 + movdqa %xmm1,%xmm6 + movl 120(%esp),%edi + movups (%edx),%xmm0 + movups 16(%edx),%xmm1 + leal 32(%edx),%edx + xorps %xmm0,%xmm2 +.L093dec1_loop_18: +.byte 102,15,56,222,209 + decl %ecx + movups (%edx),%xmm1 + leal 16(%edx),%edx + jnz .L093dec1_loop_18 +.byte 102,15,56,223,209 + xorps %xmm7,%xmm2 + movaps %xmm6,%xmm1 + movdqa %xmm7,%xmm0 + xorps %xmm2,%xmm1 + movups %xmm2,(%edi,%esi,1) + jmp .L088done +.align 16 +.L090two: + leal 1(%ebp),%ecx + movl 112(%esp),%edx + bsfl %ecx,%ecx + shll $4,%ecx + movdqu (%ebx),%xmm6 + movdqu (%ebx,%ecx,1),%xmm7 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movl 240(%edx),%ecx + movdqa %xmm1,%xmm5 + pxor %xmm0,%xmm6 + pxor %xmm6,%xmm7 + pxor %xmm6,%xmm2 + pxor %xmm7,%xmm3 + movl 120(%esp),%edi + call _aesni_decrypt2 + xorps %xmm6,%xmm2 + xorps %xmm7,%xmm3 + movdqa %xmm7,%xmm0 + xorps %xmm2,%xmm5 + movups %xmm2,(%edi,%esi,1) + xorps %xmm3,%xmm5 + movups %xmm3,16(%edi,%esi,1) + movaps %xmm5,%xmm1 + jmp .L088done +.align 16 +.L091three: + leal 1(%ebp),%ecx + movl 112(%esp),%edx + bsfl %ecx,%ecx + shll $4,%ecx + movdqu (%ebx),%xmm5 + movdqu (%ebx,%ecx,1),%xmm6 + movdqa %xmm5,%xmm7 + movdqu (%esi),%xmm2 + movdqu 16(%esi),%xmm3 + movdqu 32(%esi),%xmm4 + movl 240(%edx),%ecx + movdqa %xmm1,96(%esp) + pxor %xmm0,%xmm5 + pxor %xmm5,%xmm6 + pxor %xmm6,%xmm7 + pxor %xmm5,%xmm2 + pxor %xmm6,%xmm3 + pxor %xmm7,%xmm4 + movl 120(%esp),%edi + call _aesni_decrypt3 + movdqa 96(%esp),%xmm1 + xorps %xmm5,%xmm2 + xorps %xmm6,%xmm3 + xorps %xmm7,%xmm4 + movups %xmm2,(%edi,%esi,1) + pxor %xmm2,%xmm1 + movdqa %xmm7,%xmm0 + movups %xmm3,16(%edi,%esi,1) + pxor %xmm3,%xmm1 + movups %xmm4,32(%edi,%esi,1) + pxor %xmm4,%xmm1 + jmp .L088done +.align 16 +.L092four: + leal 1(%ebp),%ecx + leal 3(%ebp),%eax + bsfl %ecx,%ecx + bsfl %eax,%eax + movl 112(%esp),%edx + shll $4,%ecx + shll $4,%eax + movdqu (%ebx),%xmm4 + movdqu (%ebx,%ecx,1),%xmm5 + movdqa %xmm4,%xmm6 + movdqu (%ebx,%eax,1),%xmm7 + pxor %xmm0,%xmm4 + movdqu (%esi),%xmm2 + pxor %xmm4,%xmm5 + movdqu 16(%esi),%xmm3 + pxor %xmm5,%xmm6 + movdqa %xmm4,(%esp) + pxor %xmm6,%xmm7 + movdqa %xmm5,16(%esp) + movdqu 32(%esi),%xmm4 + movdqu 48(%esi),%xmm5 + movl 240(%edx),%ecx + movdqa %xmm1,96(%esp) + pxor (%esp),%xmm2 + pxor 16(%esp),%xmm3 + pxor %xmm6,%xmm4 + pxor %xmm7,%xmm5 + movl 120(%esp),%edi + call _aesni_decrypt4 + movdqa 96(%esp),%xmm1 + xorps (%esp),%xmm2 + xorps 16(%esp),%xmm3 + xorps %xmm6,%xmm4 + movups %xmm2,(%edi,%esi,1) + pxor %xmm2,%xmm1 + xorps %xmm7,%xmm5 + movups %xmm3,16(%edi,%esi,1) + pxor %xmm3,%xmm1 + movdqa %xmm7,%xmm0 + movups %xmm4,32(%edi,%esi,1) + pxor %xmm4,%xmm1 + movups %xmm5,48(%edi,%esi,1) + pxor %xmm5,%xmm1 +.L088done: + movl 128(%esp),%edx *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Thu Sep 20 21:36:53 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B1BA10AA98A for ; Thu, 20 Sep 2018 21:36:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 132D98160A; Thu, 20 Sep 2018 21:36:53 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09FC3239A1; Thu, 20 Sep 2018 21:36:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KLaqu5064020; Thu, 20 Sep 2018 21:36:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KLaqg8064019; Thu, 20 Sep 2018 21:36:52 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809202136.w8KLaqg8064019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 21:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338843 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 21:36:53 -0000 Author: jkim Date: Thu Sep 20 21:36:52 2018 New Revision: 338843 URL: https://svnweb.freebsd.org/changeset/base/338843 Log: Connect i386 assembly files to build. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Thu Sep 20 21:34:05 2018 (r338842) +++ projects/openssl111/secure/lib/libcrypto/Makefile Thu Sep 20 21:36:52 2018 (r338843) @@ -21,6 +21,8 @@ SRCS+= mem_dbg.c mem_sec.c o_dir.c o_fips.c o_fopen.c SRCS+= o_time.c threads_pthread.c uid.c .if defined(ASM_amd64) SRCS+= x86_64cpuid.S +.elif defined(ASM_i386) +SRCS+= x86cpuid.S .else SRCS+= mem_clr.c .endif @@ -30,6 +32,8 @@ SRCS+= aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_of .if defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S +.elif defined(ASM_i386) +SRCS+= aes-586.S aesni-x86.S vpaes-x86.S .else SRCS+= aes_cbc.c aes_core.c .endif @@ -54,7 +58,12 @@ SRCS+= x_val.c SRCS+= async.c async_err.c async_posix.c async_wait.c # bf -SRCS+= bf_cfb64.c bf_ecb.c bf_enc.c bf_ofb64.c bf_skey.c +SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c +.if defined(ASM_i386) +SRCS+= bf-586.S +.else +SRCS+= bf_enc.c +.endif # bio SRCS+= b_addr.c b_dump.c b_print.c b_sock.c b_sock2.c bf_buff.c bf_lbuf.c @@ -74,6 +83,8 @@ SRCS+= bn_srp.c bn_word.c bn_x931p.c .if defined(ASM_amd64) SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S SRCS+= x86_64-mont.S x86_64-mont5.S +.elif defined(ASM_i386) +SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S .else SRCS+= bn_asm.c .endif @@ -82,11 +93,13 @@ SRCS+= bn_asm.c SRCS+= buf_err.c buffer.c # camellia -SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_misc.c cmll_ofb.c +SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_ofb.c .if defined(ASM_amd64) -SRCS+= cmll-x86_64.S +SRCS+= cmll-x86_64.S cmll_misc.c +.elif defined(ASM_i386) +SRCS+= cmll-x86.S .else -SRCS+= camellia.c cmll_cbc.c +SRCS+= camellia.c cmll_cbc.c cmll_misc.c .endif # cast @@ -95,6 +108,8 @@ SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c # chacha .if defined(ASM_amd64) SRCS+= chacha-x86_64.S +.elif defined(ASM_i386) +SRCS+= chacha-x86.S .else SRCS+= chacha_enc.c .endif @@ -119,10 +134,14 @@ SRCS+= ct_b64.c ct_err.c ct_log.c ct_oct.c ct_policy.c SRCS+= ct_sct_ctx.c ct_vfy.c ct_x509v3.c # des -SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c des_enc.c -SRCS+= ecb3_enc.c ecb_enc.c fcrypt.c fcrypt_b.c ofb64ede.c ofb64enc.c -SRCS+= ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c set_key.c str2key.c -SRCS+= xcbc_enc.c +SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c +SRCS+= ecb_enc.c fcrypt.c ofb64ede.c ofb64enc.c ofb_enc.c pcbc_enc.c +SRCS+= qud_cksm.c rand_key.c set_key.c str2key.c xcbc_enc.c +.if defined(ASM_i386) +SRCS+= crypt586.S des-586.S +.else +SRCS+= des_enc.c fcrypt_b.c +.endif # dh SRCS+= dh_ameth.c dh_asn1.c dh_check.c dh_depr.c dh_err.c dh_gen.c dh_kdf.c @@ -146,6 +165,8 @@ SRCS+= ecdsa_vrf.c eck_prn.c ecp_mont.c ecp_nist.c ecp SRCS+= ecx_meth.c eddsa.c f_generic.c f_impl.c scalar.c .if defined(ASM_amd64) SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S +.elif defined(ASM_i386) +SRCS+= ecp_nistz256.c ecp_nistz256-x86.S .endif # engine @@ -188,6 +209,8 @@ SRCS+= md4_dgst.c md4_one.c SRCS+= md5_dgst.c md5_one.c .if defined(ASM_amd64) SRCS+= md5-x86_64.S +.elif defined(ASM_i386) +SRCS+= md5-586.S .endif # mdc2 @@ -198,6 +221,8 @@ SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gc SRCS+= ofb128.c wrap128.c xts128.c .if defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S +.elif defined(ASM_i386) +SRCS+= ghash-x86.S .endif # objects @@ -224,6 +249,8 @@ SRCS+= pk7_smime.c pkcs7err.c SRCS+= poly1305.c poly1305_ameth.c poly1305_pmeth.c .if defined(ASM_amd64) SRCS+= poly1305-x86_64.S +.elif defined(ASM_i386) +SRCS+= poly1305-x86.S .endif # rand @@ -235,15 +262,25 @@ SRCS+= rc2_cbc.c rc2_ecb.c rc2_skey.c rc2cfb64.c rc2of # rc4 .if defined(ASM_amd64) SRCS+= rc4-md5-x86_64.S rc4-x86_64.S +.elif defined(ASM_i386) +SRCS+= rc4-586.S .else SRCS+= rc4_enc.c rc4_skey.c .endif # rc5 -SRCS+= rc5_ecb.c rc5_enc.c rc5_skey.c rc5cfb64.c rc5ofb64.c +SRCS+= rc5_ecb.c rc5_skey.c rc5cfb64.c rc5ofb64.c +.if defined(ASM_i386) +SRCS+= rc5-586.S +.else +SRCS+= rc5_enc.c +.endif # ripemd SRCS+= rmd_dgst.c rmd_one.c +.if defined(ASM_i386) +SRCS+= rmd-586.S +.endif # rsa SRCS+= rsa_ameth.c rsa_asn1.c rsa_chk.c rsa_crpt.c rsa_depr.c rsa_err.c @@ -259,8 +296,8 @@ SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c .if defined(ASM_amd64) SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S -.else -SRCS+= keccak1600.c +.elif defined(ASM_i386) +SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S .endif # siphash @@ -300,6 +337,8 @@ SRCS+= ui_err.c ui_lib.c ui_null.c ui_openssl.c ui_uti SRCS+= wp_dgst.c .if defined(ASM_amd64) SRCS+= wp-x86_64.S +.elif defined(ASM_i386) +SRCS+= wp-mmx.S wp_block.c .else SRCS+= wp_block.c .endif From owner-svn-src-projects@freebsd.org Thu Sep 20 21:59:49 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 344AD10AAF99 for ; Thu, 20 Sep 2018 21:59:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA436821B4; Thu, 20 Sep 2018 21:59:48 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFA5823CEC; Thu, 20 Sep 2018 21:59:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KLxmG3075216; Thu, 20 Sep 2018 21:59:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KLxlp9075212; Thu, 20 Sep 2018 21:59:47 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809202159.w8KLxlp9075212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 21:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338844 - in projects/openssl111/secure/lib/libcrypto/engines: . capi lib4758cca libaep libatalla libcapi libchil libcswift libgost libnuron libsureware libubsec padlock X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/secure/lib/libcrypto/engines: . capi lib4758cca libaep libatalla libcapi libchil libcswift libgost libnuron libsureware libubsec padlock X-SVN-Commit-Revision: 338844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 21:59:49 -0000 Author: jkim Date: Thu Sep 20 21:59:47 2018 New Revision: 338844 URL: https://svnweb.freebsd.org/changeset/base/338844 Log: Connect engines to the build. Added: projects/openssl111/secure/lib/libcrypto/engines/capi/ projects/openssl111/secure/lib/libcrypto/engines/capi/Makefile (contents, props changed) projects/openssl111/secure/lib/libcrypto/engines/padlock/ projects/openssl111/secure/lib/libcrypto/engines/padlock/Makefile (contents, props changed) Deleted: projects/openssl111/secure/lib/libcrypto/engines/lib4758cca/ projects/openssl111/secure/lib/libcrypto/engines/libaep/ projects/openssl111/secure/lib/libcrypto/engines/libatalla/ projects/openssl111/secure/lib/libcrypto/engines/libcapi/ projects/openssl111/secure/lib/libcrypto/engines/libchil/ projects/openssl111/secure/lib/libcrypto/engines/libcswift/ projects/openssl111/secure/lib/libcrypto/engines/libgost/ projects/openssl111/secure/lib/libcrypto/engines/libnuron/ projects/openssl111/secure/lib/libcrypto/engines/libsureware/ projects/openssl111/secure/lib/libcrypto/engines/libubsec/ Modified: projects/openssl111/secure/lib/libcrypto/engines/Makefile projects/openssl111/secure/lib/libcrypto/engines/Makefile.inc Modified: projects/openssl111/secure/lib/libcrypto/engines/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/engines/Makefile Thu Sep 20 21:36:52 2018 (r338843) +++ projects/openssl111/secure/lib/libcrypto/engines/Makefile Thu Sep 20 21:59:47 2018 (r338844) @@ -1,6 +1,9 @@ # $FreeBSD$ -#SUBDIR= lib4758cca libaep libatalla libcapi libchil libcswift libgost \ -# libnuron libsureware libubsec +SUBDIR= capi +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +SUBDIR+= padlock +.endif SUBDIR_PARALLEL= + .include Modified: projects/openssl111/secure/lib/libcrypto/engines/Makefile.inc ============================================================================== --- projects/openssl111/secure/lib/libcrypto/engines/Makefile.inc Thu Sep 20 21:36:52 2018 (r338843) +++ projects/openssl111/secure/lib/libcrypto/engines/Makefile.inc Thu Sep 20 21:59:47 2018 (r338844) @@ -1,6 +1,20 @@ # $FreeBSD$ +SHLIBDIR?= /usr/lib/engines + LCRYPTO_SRC= ${SRCTOP}/crypto/openssl -.PATH: ${LCRYPTO_SRC}/engines ${LCRYPTO_SRC}/engines/ccgost -SHLIBDIR?= /usr/lib/engines +CFLAGS+= -I${LCRYPTO_SRC}/engines +CFLAGS+= -I${LCRYPTO_SRC}/include +CFLAGS+= -I${OBJTOP}/secure/lib/libcrypto + +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+= -DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+= -DB_ENDIAN +.endif +CFLAGS+= -DNDEBUG + +.PATH: ${LCRYPTO_SRC}/engines Added: projects/openssl111/secure/lib/libcrypto/engines/capi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/secure/lib/libcrypto/engines/capi/Makefile Thu Sep 20 21:59:47 2018 (r338844) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +SHLIB_NAME?= capi.so + +SRCS= e_capi.c + +.include Added: projects/openssl111/secure/lib/libcrypto/engines/padlock/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/secure/lib/libcrypto/engines/padlock/Makefile Thu Sep 20 21:59:47 2018 (r338844) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +SHLIB_NAME?= padlock.so + +SRCS= e_padlock.c +.if ${MACHINE_CPUARCH} == "amd64" +SRCS+= e_padlock-x86_64.S +.elif ${MACHINE_CPUARCH} == "i386" +SRCS+= e_padlock-x86.S +.endif + +.include + +.PATH: ${.CURDIR:H:H}/${MACHINE_CPUARCH} From owner-svn-src-projects@freebsd.org Thu Sep 20 22:45:43 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52D8D10ABD4D for ; Thu, 20 Sep 2018 22:45:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED1A5837C6; Thu, 20 Sep 2018 22:45:42 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E26F82450B; Thu, 20 Sep 2018 22:45:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KMjgTP000291; Thu, 20 Sep 2018 22:45:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KMjg1R000290; Thu, 20 Sep 2018 22:45:42 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809202245.w8KMjg1R000290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 22:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338845 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 22:45:43 -0000 Author: jkim Date: Thu Sep 20 22:45:42 2018 New Revision: 338845 URL: https://svnweb.freebsd.org/changeset/base/338845 Log: Sort assembly source files for i386. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Thu Sep 20 21:59:47 2018 (r338844) +++ projects/openssl111/secure/lib/libcrypto/Makefile Thu Sep 20 22:45:42 2018 (r338845) @@ -166,7 +166,7 @@ SRCS+= ecx_meth.c eddsa.c f_generic.c f_impl.c scalar. .if defined(ASM_amd64) SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S .elif defined(ASM_i386) -SRCS+= ecp_nistz256.c ecp_nistz256-x86.S +SRCS+= ecp_nistz256-x86.S ecp_nistz256.c .endif # engine From owner-svn-src-projects@freebsd.org Thu Sep 20 22:47:56 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35B2610ABD68 for ; Thu, 20 Sep 2018 22:47:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6C2D838C4; Thu, 20 Sep 2018 22:47:55 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7AD92450C; Thu, 20 Sep 2018 22:47:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KMltR9000427; Thu, 20 Sep 2018 22:47:55 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KMltLa000426; Thu, 20 Sep 2018 22:47:55 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809202247.w8KMltLa000426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 22:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338846 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 22:47:56 -0000 Author: jkim Date: Thu Sep 20 22:47:55 2018 New Revision: 338846 URL: https://svnweb.freebsd.org/changeset/base/338846 Log: Add CFLAGS for i386 assembly files. Modified: projects/openssl111/secure/lib/libcrypto/Makefile.inc Modified: projects/openssl111/secure/lib/libcrypto/Makefile.inc ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.inc Thu Sep 20 22:45:42 2018 (r338845) +++ projects/openssl111/secure/lib/libcrypto/Makefile.inc Thu Sep 20 22:47:55 2018 (r338846) @@ -47,8 +47,21 @@ CFLAGS+= -DRC4_ASM CFLAGS+= -DMD5_ASM CFLAGS+= -DAES_ASM -DVPAES_ASM -DBSAES_ASM CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM +CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_i386) +CFLAGS+= -DOPENSSL_IA32_SSE2 +CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DRC4_ASM +CFLAGS+= -DMD5_ASM +CFLAGS+= -DRMD160_ASM +CFLAGS+= -DAES_ASM -DVPAES_ASM +CFLAGS+= -DWHIRLPOOL_ASM +CFLAGS+= -DGHASH_ASM CFLAGS+= -DECP_NISTZ256_ASM -CFLAGS+= -DX25519_ASM CFLAGS+= -DPADLOCK_ASM CFLAGS+= -DPOLY1305_ASM .endif From owner-svn-src-projects@freebsd.org Thu Sep 20 22:48:35 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2D7110ABD7E for ; Thu, 20 Sep 2018 22:48:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97210839B0; Thu, 20 Sep 2018 22:48:34 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 911FE2450D; Thu, 20 Sep 2018 22:48:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KMmYdj000504; Thu, 20 Sep 2018 22:48:34 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KMmYlr000503; Thu, 20 Sep 2018 22:48:34 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809202248.w8KMmYlr000503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 22:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338847 - projects/openssl111/secure/lib/libcrypto/i386 X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto/i386 X-SVN-Commit-Revision: 338847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 22:48:35 -0000 Author: jkim Date: Thu Sep 20 22:48:34 2018 New Revision: 338847 URL: https://svnweb.freebsd.org/changeset/base/338847 Log: Regen assembly files for i386 after r338846. Modified: projects/openssl111/secure/lib/libcrypto/i386/bn-586.S projects/openssl111/secure/lib/libcrypto/i386/chacha-x86.S projects/openssl111/secure/lib/libcrypto/i386/ecp_nistz256-x86.S projects/openssl111/secure/lib/libcrypto/i386/ghash-x86.S projects/openssl111/secure/lib/libcrypto/i386/poly1305-x86.S projects/openssl111/secure/lib/libcrypto/i386/sha1-586.S projects/openssl111/secure/lib/libcrypto/i386/sha256-586.S projects/openssl111/secure/lib/libcrypto/i386/sha512-586.S projects/openssl111/secure/lib/libcrypto/i386/x86-gf2m.S projects/openssl111/secure/lib/libcrypto/i386/x86-mont.S projects/openssl111/secure/lib/libcrypto/i386/x86cpuid.S Modified: projects/openssl111/secure/lib/libcrypto/i386/bn-586.S ============================================================================== --- projects/openssl111/secure/lib/libcrypto/i386/bn-586.S Thu Sep 20 22:47:55 2018 (r338846) +++ projects/openssl111/secure/lib/libcrypto/i386/bn-586.S Thu Sep 20 22:48:34 2018 (r338847) @@ -7,6 +7,102 @@ .align 16 bn_mul_add_words: .L_bn_mul_add_words_begin: + call .L000PIC_me_up +.L000PIC_me_up: + popl %eax + leal OPENSSL_ia32cap_P-.L000PIC_me_up(%eax),%eax + btl $26,(%eax) + jnc .L001maw_non_sse2 + movl 4(%esp),%eax + movl 8(%esp),%edx + movl 12(%esp),%ecx + movd 16(%esp),%mm0 + pxor %mm1,%mm1 + jmp .L002maw_sse2_entry +.align 16 +.L003maw_sse2_unrolled: + movd (%eax),%mm3 + paddq %mm3,%mm1 + movd (%edx),%mm2 + pmuludq %mm0,%mm2 + movd 4(%edx),%mm4 + pmuludq %mm0,%mm4 + movd 8(%edx),%mm6 + pmuludq %mm0,%mm6 + movd 12(%edx),%mm7 + pmuludq %mm0,%mm7 + paddq %mm2,%mm1 + movd 4(%eax),%mm3 + paddq %mm4,%mm3 + movd 8(%eax),%mm5 + paddq %mm6,%mm5 + movd 12(%eax),%mm4 + paddq %mm4,%mm7 + movd %mm1,(%eax) + movd 16(%edx),%mm2 + pmuludq %mm0,%mm2 + psrlq $32,%mm1 + movd 20(%edx),%mm4 + pmuludq %mm0,%mm4 + paddq %mm3,%mm1 + movd 24(%edx),%mm6 + pmuludq %mm0,%mm6 + movd %mm1,4(%eax) + psrlq $32,%mm1 + movd 28(%edx),%mm3 + addl $32,%edx + pmuludq %mm0,%mm3 + paddq %mm5,%mm1 + movd 16(%eax),%mm5 + paddq %mm5,%mm2 + movd %mm1,8(%eax) + psrlq $32,%mm1 + paddq %mm7,%mm1 + movd 20(%eax),%mm5 + paddq %mm5,%mm4 + movd %mm1,12(%eax) + psrlq $32,%mm1 + paddq %mm2,%mm1 + movd 24(%eax),%mm5 + paddq %mm5,%mm6 + movd %mm1,16(%eax) + psrlq $32,%mm1 + paddq %mm4,%mm1 + movd 28(%eax),%mm5 + paddq %mm5,%mm3 + movd %mm1,20(%eax) + psrlq $32,%mm1 + paddq %mm6,%mm1 + movd %mm1,24(%eax) + psrlq $32,%mm1 + paddq %mm3,%mm1 + movd %mm1,28(%eax) + leal 32(%eax),%eax + psrlq $32,%mm1 + subl $8,%ecx + jz .L004maw_sse2_exit +.L002maw_sse2_entry: + testl $4294967288,%ecx + jnz .L003maw_sse2_unrolled +.align 4 +.L005maw_sse2_loop: + movd (%edx),%mm2 + movd (%eax),%mm3 + pmuludq %mm0,%mm2 + leal 4(%edx),%edx + paddq %mm3,%mm1 + paddq %mm2,%mm1 + movd %mm1,(%eax) + subl $1,%ecx + psrlq $32,%mm1 + leal 4(%eax),%eax + jnz .L005maw_sse2_loop +.L004maw_sse2_exit: + movd %mm1,%eax + emms + ret +.align 16 +.L001maw_non_sse2: pushl %ebp pushl %ebx pushl %esi @@ -19,9 +115,9 @@ bn_mul_add_words: andl $4294967288,%ecx movl 32(%esp),%ebp pushl %ecx - jz .L000maw_finish + jz .L006maw_finish .align 16 -.L001maw_loop: +.L007maw_loop: movl (%ebx),%eax mull %ebp @@ -98,13 +194,13 @@ bn_mul_add_words: subl $8,%ecx leal 32(%ebx),%ebx leal 32(%edi),%edi - jnz .L001maw_loop -.L000maw_finish: + jnz .L007maw_loop +.L006maw_finish: movl 32(%esp),%ecx andl $7,%ecx - jnz .L002maw_finish2 - jmp .L003maw_end -.L002maw_finish2: + jnz .L008maw_finish2 + jmp .L009maw_end +.L008maw_finish2: movl (%ebx),%eax mull %ebp @@ -115,7 +211,7 @@ bn_mul_add_words: decl %ecx movl %eax,(%edi) movl %edx,%esi - jz .L003maw_end + jz .L009maw_end movl 4(%ebx),%eax mull %ebp @@ -126,7 +222,7 @@ bn_mul_add_words: decl %ecx movl %eax,4(%edi) movl %edx,%esi - jz .L003maw_end + jz .L009maw_end movl 8(%ebx),%eax mull %ebp @@ -137,7 +233,7 @@ bn_mul_add_words: decl %ecx movl %eax,8(%edi) movl %edx,%esi - jz .L003maw_end + jz .L009maw_end movl 12(%ebx),%eax mull %ebp @@ -148,7 +244,7 @@ bn_mul_add_words: decl %ecx movl %eax,12(%edi) movl %edx,%esi - jz .L003maw_end + jz .L009maw_end movl 16(%ebx),%eax mull %ebp @@ -159,7 +255,7 @@ bn_mul_add_words: decl %ecx movl %eax,16(%edi) movl %edx,%esi - jz .L003maw_end + jz .L009maw_end movl 20(%ebx),%eax mull %ebp @@ -170,7 +266,7 @@ bn_mul_add_words: decl %ecx movl %eax,20(%edi) movl %edx,%esi - jz .L003maw_end + jz .L009maw_end movl 24(%ebx),%eax mull %ebp @@ -180,7 +276,7 @@ bn_mul_add_words: adcl $0,%edx movl %eax,24(%edi) movl %edx,%esi -.L003maw_end: +.L009maw_end: movl %esi,%eax popl %ecx popl %edi @@ -194,6 +290,33 @@ bn_mul_add_words: .align 16 bn_mul_words: .L_bn_mul_words_begin: + call .L010PIC_me_up +.L010PIC_me_up: + popl %eax + leal OPENSSL_ia32cap_P-.L010PIC_me_up(%eax),%eax + btl $26,(%eax) + jnc .L011mw_non_sse2 + movl 4(%esp),%eax + movl 8(%esp),%edx + movl 12(%esp),%ecx + movd 16(%esp),%mm0 + pxor %mm1,%mm1 +.align 16 +.L012mw_sse2_loop: + movd (%edx),%mm2 + pmuludq %mm0,%mm2 + leal 4(%edx),%edx + paddq %mm2,%mm1 + movd %mm1,(%eax) + subl $1,%ecx + psrlq $32,%mm1 + leal 4(%eax),%eax + jnz .L012mw_sse2_loop + movd %mm1,%eax + emms + ret +.align 16 +.L011mw_non_sse2: pushl %ebp pushl %ebx pushl %esi @@ -205,8 +328,8 @@ bn_mul_words: movl 28(%esp),%ebp movl 32(%esp),%ecx andl $4294967288,%ebp - jz .L004mw_finish -.L005mw_loop: + jz .L013mw_finish +.L014mw_loop: movl (%ebx),%eax mull %ecx @@ -267,14 +390,14 @@ bn_mul_words: addl $32,%ebx addl $32,%edi subl $8,%ebp - jz .L004mw_finish - jmp .L005mw_loop -.L004mw_finish: + jz .L013mw_finish + jmp .L014mw_loop +.L013mw_finish: movl 28(%esp),%ebp andl $7,%ebp - jnz .L006mw_finish2 - jmp .L007mw_end -.L006mw_finish2: + jnz .L015mw_finish2 + jmp .L016mw_end +.L015mw_finish2: movl (%ebx),%eax mull %ecx @@ -283,7 +406,7 @@ bn_mul_words: movl %eax,(%edi) movl %edx,%esi decl %ebp - jz .L007mw_end + jz .L016mw_end movl 4(%ebx),%eax mull %ecx @@ -292,7 +415,7 @@ bn_mul_words: movl %eax,4(%edi) movl %edx,%esi decl %ebp - jz .L007mw_end + jz .L016mw_end movl 8(%ebx),%eax mull %ecx @@ -301,7 +424,7 @@ bn_mul_words: movl %eax,8(%edi) movl %edx,%esi decl %ebp - jz .L007mw_end + jz .L016mw_end movl 12(%ebx),%eax mull %ecx @@ -310,7 +433,7 @@ bn_mul_words: movl %eax,12(%edi) movl %edx,%esi decl %ebp - jz .L007mw_end + jz .L016mw_end movl 16(%ebx),%eax mull %ecx @@ -319,7 +442,7 @@ bn_mul_words: movl %eax,16(%edi) movl %edx,%esi decl %ebp - jz .L007mw_end + jz .L016mw_end movl 20(%ebx),%eax mull %ecx @@ -328,7 +451,7 @@ bn_mul_words: movl %eax,20(%edi) movl %edx,%esi decl %ebp - jz .L007mw_end + jz .L016mw_end movl 24(%ebx),%eax mull %ecx @@ -336,7 +459,7 @@ bn_mul_words: adcl $0,%edx movl %eax,24(%edi) movl %edx,%esi -.L007mw_end: +.L016mw_end: movl %esi,%eax popl %edi popl %esi @@ -349,6 +472,28 @@ bn_mul_words: .align 16 bn_sqr_words: .L_bn_sqr_words_begin: + call .L017PIC_me_up +.L017PIC_me_up: + popl %eax + leal OPENSSL_ia32cap_P-.L017PIC_me_up(%eax),%eax + btl $26,(%eax) + jnc .L018sqr_non_sse2 + movl 4(%esp),%eax + movl 8(%esp),%edx + movl 12(%esp),%ecx +.align 16 +.L019sqr_sse2_loop: + movd (%edx),%mm0 + pmuludq %mm0,%mm0 + leal 4(%edx),%edx + movq %mm0,(%eax) + subl $1,%ecx + leal 8(%eax),%eax + jnz .L019sqr_sse2_loop + emms + ret +.align 16 +.L018sqr_non_sse2: pushl %ebp pushl %ebx pushl %esi @@ -358,8 +503,8 @@ bn_sqr_words: movl 24(%esp),%edi movl 28(%esp),%ebx andl $4294967288,%ebx - jz .L008sw_finish -.L009sw_loop: + jz .L020sw_finish +.L021sw_loop: movl (%edi),%eax mull %eax @@ -404,59 +549,59 @@ bn_sqr_words: addl $32,%edi addl $64,%esi subl $8,%ebx - jnz .L009sw_loop -.L008sw_finish: + jnz .L021sw_loop +.L020sw_finish: movl 28(%esp),%ebx andl $7,%ebx - jz .L010sw_end + jz .L022sw_end movl (%edi),%eax mull %eax movl %eax,(%esi) decl %ebx movl %edx,4(%esi) - jz .L010sw_end + jz .L022sw_end movl 4(%edi),%eax mull %eax movl %eax,8(%esi) decl %ebx movl %edx,12(%esi) - jz .L010sw_end + jz .L022sw_end movl 8(%edi),%eax mull %eax movl %eax,16(%esi) decl %ebx movl %edx,20(%esi) - jz .L010sw_end + jz .L022sw_end movl 12(%edi),%eax mull %eax movl %eax,24(%esi) decl %ebx movl %edx,28(%esi) - jz .L010sw_end + jz .L022sw_end movl 16(%edi),%eax mull %eax movl %eax,32(%esi) decl %ebx movl %edx,36(%esi) - jz .L010sw_end + jz .L022sw_end movl 20(%edi),%eax mull %eax movl %eax,40(%esi) decl %ebx movl %edx,44(%esi) - jz .L010sw_end + jz .L022sw_end movl 24(%edi),%eax mull %eax movl %eax,48(%esi) movl %edx,52(%esi) -.L010sw_end: +.L022sw_end: popl %edi popl %esi popl %ebx @@ -490,8 +635,8 @@ bn_add_words: movl 32(%esp),%ebp xorl %eax,%eax andl $4294967288,%ebp - jz .L011aw_finish -.L012aw_loop: + jz .L023aw_finish +.L024aw_loop: movl (%esi),%ecx movl (%edi),%edx @@ -569,11 +714,11 @@ bn_add_words: addl $32,%edi addl $32,%ebx subl $8,%ebp - jnz .L012aw_loop -.L011aw_finish: + jnz .L024aw_loop +.L023aw_finish: movl 32(%esp),%ebp andl $7,%ebp - jz .L013aw_end + jz .L025aw_end movl (%esi),%ecx movl (%edi),%edx @@ -584,7 +729,7 @@ bn_add_words: adcl $0,%eax decl %ebp movl %ecx,(%ebx) - jz .L013aw_end + jz .L025aw_end movl 4(%esi),%ecx movl 4(%edi),%edx @@ -595,7 +740,7 @@ bn_add_words: adcl $0,%eax decl %ebp movl %ecx,4(%ebx) - jz .L013aw_end + jz .L025aw_end movl 8(%esi),%ecx movl 8(%edi),%edx @@ -606,7 +751,7 @@ bn_add_words: adcl $0,%eax decl %ebp movl %ecx,8(%ebx) - jz .L013aw_end + jz .L025aw_end movl 12(%esi),%ecx movl 12(%edi),%edx @@ -617,7 +762,7 @@ bn_add_words: adcl $0,%eax decl %ebp movl %ecx,12(%ebx) - jz .L013aw_end + jz .L025aw_end movl 16(%esi),%ecx movl 16(%edi),%edx @@ -628,7 +773,7 @@ bn_add_words: adcl $0,%eax decl %ebp movl %ecx,16(%ebx) - jz .L013aw_end + jz .L025aw_end movl 20(%esi),%ecx movl 20(%edi),%edx @@ -639,7 +784,7 @@ bn_add_words: adcl $0,%eax decl %ebp movl %ecx,20(%ebx) - jz .L013aw_end + jz .L025aw_end movl 24(%esi),%ecx movl 24(%edi),%edx @@ -649,7 +794,7 @@ bn_add_words: addl %edx,%ecx adcl $0,%eax movl %ecx,24(%ebx) -.L013aw_end: +.L025aw_end: popl %edi popl %esi popl %ebx @@ -672,8 +817,8 @@ bn_sub_words: movl 32(%esp),%ebp xorl %eax,%eax andl $4294967288,%ebp - jz .L014aw_finish -.L015aw_loop: + jz .L026aw_finish +.L027aw_loop: movl (%esi),%ecx movl (%edi),%edx @@ -751,11 +896,11 @@ bn_sub_words: addl $32,%edi addl $32,%ebx subl $8,%ebp - jnz .L015aw_loop -.L014aw_finish: + jnz .L027aw_loop +.L026aw_finish: movl 32(%esp),%ebp andl $7,%ebp - jz .L016aw_end + jz .L028aw_end movl (%esi),%ecx movl (%edi),%edx @@ -766,7 +911,7 @@ bn_sub_words: adcl $0,%eax decl %ebp movl %ecx,(%ebx) - jz .L016aw_end + jz .L028aw_end movl 4(%esi),%ecx movl 4(%edi),%edx @@ -777,7 +922,7 @@ bn_sub_words: adcl $0,%eax decl %ebp movl %ecx,4(%ebx) - jz .L016aw_end + jz .L028aw_end movl 8(%esi),%ecx movl 8(%edi),%edx @@ -788,7 +933,7 @@ bn_sub_words: adcl $0,%eax decl %ebp movl %ecx,8(%ebx) - jz .L016aw_end + jz .L028aw_end movl 12(%esi),%ecx movl 12(%edi),%edx @@ -799,7 +944,7 @@ bn_sub_words: adcl $0,%eax decl %ebp movl %ecx,12(%ebx) - jz .L016aw_end + jz .L028aw_end movl 16(%esi),%ecx movl 16(%edi),%edx @@ -810,7 +955,7 @@ bn_sub_words: adcl $0,%eax decl %ebp movl %ecx,16(%ebx) - jz .L016aw_end + jz .L028aw_end movl 20(%esi),%ecx movl 20(%edi),%edx @@ -821,7 +966,7 @@ bn_sub_words: adcl $0,%eax decl %ebp movl %ecx,20(%ebx) - jz .L016aw_end + jz .L028aw_end movl 24(%esi),%ecx movl 24(%edi),%edx @@ -831,7 +976,7 @@ bn_sub_words: subl %edx,%ecx adcl $0,%eax movl %ecx,24(%ebx) -.L016aw_end: +.L028aw_end: popl %edi popl %esi popl %ebx @@ -854,8 +999,8 @@ bn_sub_part_words: movl 32(%esp),%ebp xorl %eax,%eax andl $4294967288,%ebp - jz .L017aw_finish -.L018aw_loop: + jz .L029aw_finish +.L030aw_loop: movl (%esi),%ecx movl (%edi),%edx @@ -933,11 +1078,11 @@ bn_sub_part_words: addl $32,%edi addl $32,%ebx subl $8,%ebp - jnz .L018aw_loop -.L017aw_finish: + jnz .L030aw_loop +.L029aw_finish: movl 32(%esp),%ebp andl $7,%ebp - jz .L019aw_end + jz .L031aw_end movl (%esi),%ecx movl (%edi),%edx @@ -951,7 +1096,7 @@ bn_sub_part_words: addl $4,%edi addl $4,%ebx decl %ebp - jz .L019aw_end + jz .L031aw_end movl (%esi),%ecx movl (%edi),%edx @@ -965,7 +1110,7 @@ bn_sub_part_words: addl $4,%edi addl $4,%ebx decl %ebp - jz .L019aw_end + jz .L031aw_end movl (%esi),%ecx movl (%edi),%edx @@ -979,7 +1124,7 @@ bn_sub_part_words: addl $4,%edi addl $4,%ebx decl %ebp - jz .L019aw_end + jz .L031aw_end movl (%esi),%ecx movl (%edi),%edx @@ -993,7 +1138,7 @@ bn_sub_part_words: addl $4,%edi addl $4,%ebx decl %ebp - jz .L019aw_end + jz .L031aw_end movl (%esi),%ecx movl (%edi),%edx @@ -1007,7 +1152,7 @@ bn_sub_part_words: addl $4,%edi addl $4,%ebx decl %ebp - jz .L019aw_end + jz .L031aw_end movl (%esi),%ecx movl (%edi),%edx @@ -1021,7 +1166,7 @@ bn_sub_part_words: addl $4,%edi addl $4,%ebx decl %ebp - jz .L019aw_end + jz .L031aw_end movl (%esi),%ecx movl (%edi),%edx @@ -1034,20 +1179,20 @@ bn_sub_part_words: addl $4,%esi addl $4,%edi addl $4,%ebx -.L019aw_end: +.L031aw_end: cmpl $0,36(%esp) - je .L020pw_end + je .L032pw_end movl 36(%esp),%ebp cmpl $0,%ebp - je .L020pw_end - jge .L021pw_pos + je .L032pw_end + jge .L033pw_pos movl $0,%edx subl %ebp,%edx movl %edx,%ebp andl $4294967288,%ebp - jz .L022pw_neg_finish -.L023pw_neg_loop: + jz .L034pw_neg_finish +.L035pw_neg_loop: movl $0,%ecx movl (%edi),%edx @@ -1124,13 +1269,13 @@ bn_sub_part_words: addl $32,%edi addl $32,%ebx subl $8,%ebp - jnz .L023pw_neg_loop -.L022pw_neg_finish: + jnz .L035pw_neg_loop +.L034pw_neg_finish: movl 36(%esp),%edx movl $0,%ebp subl %edx,%ebp andl $7,%ebp - jz .L020pw_end + jz .L032pw_end movl $0,%ecx movl (%edi),%edx @@ -1141,7 +1286,7 @@ bn_sub_part_words: adcl $0,%eax decl %ebp movl %ecx,(%ebx) - jz .L020pw_end + jz .L032pw_end movl $0,%ecx movl 4(%edi),%edx @@ -1152,7 +1297,7 @@ bn_sub_part_words: adcl $0,%eax decl %ebp movl %ecx,4(%ebx) - jz .L020pw_end + jz .L032pw_end movl $0,%ecx movl 8(%edi),%edx @@ -1163,7 +1308,7 @@ bn_sub_part_words: adcl $0,%eax decl %ebp movl %ecx,8(%ebx) - jz .L020pw_end + jz .L032pw_end movl $0,%ecx movl 12(%edi),%edx @@ -1174,7 +1319,7 @@ bn_sub_part_words: adcl $0,%eax decl %ebp movl %ecx,12(%ebx) - jz .L020pw_end + jz .L032pw_end movl $0,%ecx movl 16(%edi),%edx @@ -1185,7 +1330,7 @@ bn_sub_part_words: adcl $0,%eax decl %ebp movl %ecx,16(%ebx) - jz .L020pw_end + jz .L032pw_end movl $0,%ecx movl 20(%edi),%edx @@ -1196,7 +1341,7 @@ bn_sub_part_words: adcl $0,%eax decl %ebp movl %ecx,20(%ebx) - jz .L020pw_end + jz .L032pw_end movl $0,%ecx movl 24(%edi),%edx @@ -1206,184 +1351,185 @@ bn_sub_part_words: subl %edx,%ecx adcl $0,%eax movl %ecx,24(%ebx) - jmp .L020pw_end -.L021pw_pos: + jmp .L032pw_end +.L033pw_pos: andl $4294967288,%ebp - jz .L024pw_pos_finish -.L025pw_pos_loop: + jz .L036pw_pos_finish +.L037pw_pos_loop: movl (%esi),%ecx subl %eax,%ecx movl %ecx,(%ebx) - jnc .L026pw_nc0 + jnc .L038pw_nc0 movl 4(%esi),%ecx subl %eax,%ecx movl %ecx,4(%ebx) - jnc .L027pw_nc1 + jnc .L039pw_nc1 movl 8(%esi),%ecx subl %eax,%ecx movl %ecx,8(%ebx) - jnc .L028pw_nc2 + jnc .L040pw_nc2 movl 12(%esi),%ecx subl %eax,%ecx movl %ecx,12(%ebx) - jnc .L029pw_nc3 + jnc .L041pw_nc3 movl 16(%esi),%ecx subl %eax,%ecx movl %ecx,16(%ebx) - jnc .L030pw_nc4 + jnc .L042pw_nc4 movl 20(%esi),%ecx subl %eax,%ecx movl %ecx,20(%ebx) - jnc .L031pw_nc5 + jnc .L043pw_nc5 movl 24(%esi),%ecx subl %eax,%ecx movl %ecx,24(%ebx) - jnc .L032pw_nc6 + jnc .L044pw_nc6 movl 28(%esi),%ecx subl %eax,%ecx movl %ecx,28(%ebx) - jnc .L033pw_nc7 + jnc .L045pw_nc7 addl $32,%esi addl $32,%ebx subl $8,%ebp - jnz .L025pw_pos_loop -.L024pw_pos_finish: + jnz .L037pw_pos_loop +.L036pw_pos_finish: movl 36(%esp),%ebp andl $7,%ebp - jz .L020pw_end + jz .L032pw_end movl (%esi),%ecx subl %eax,%ecx movl %ecx,(%ebx) - jnc .L034pw_tail_nc0 + jnc .L046pw_tail_nc0 decl %ebp - jz .L020pw_end + jz .L032pw_end movl 4(%esi),%ecx subl %eax,%ecx movl %ecx,4(%ebx) - jnc .L035pw_tail_nc1 + jnc .L047pw_tail_nc1 decl %ebp - jz .L020pw_end + jz .L032pw_end movl 8(%esi),%ecx subl %eax,%ecx movl %ecx,8(%ebx) - jnc .L036pw_tail_nc2 + jnc .L048pw_tail_nc2 decl %ebp - jz .L020pw_end + jz .L032pw_end movl 12(%esi),%ecx subl %eax,%ecx movl %ecx,12(%ebx) - jnc .L037pw_tail_nc3 + jnc .L049pw_tail_nc3 decl %ebp - jz .L020pw_end + jz .L032pw_end movl 16(%esi),%ecx subl %eax,%ecx movl %ecx,16(%ebx) - jnc .L038pw_tail_nc4 + jnc .L050pw_tail_nc4 decl %ebp - jz .L020pw_end + jz .L032pw_end movl 20(%esi),%ecx subl %eax,%ecx movl %ecx,20(%ebx) - jnc .L039pw_tail_nc5 + jnc .L051pw_tail_nc5 decl %ebp - jz .L020pw_end + jz .L032pw_end movl 24(%esi),%ecx subl %eax,%ecx movl %ecx,24(%ebx) - jnc .L040pw_tail_nc6 + jnc .L052pw_tail_nc6 movl $1,%eax - jmp .L020pw_end -.L041pw_nc_loop: + jmp .L032pw_end +.L053pw_nc_loop: movl (%esi),%ecx movl %ecx,(%ebx) -.L026pw_nc0: +.L038pw_nc0: movl 4(%esi),%ecx movl %ecx,4(%ebx) -.L027pw_nc1: +.L039pw_nc1: movl 8(%esi),%ecx movl %ecx,8(%ebx) -.L028pw_nc2: +.L040pw_nc2: movl 12(%esi),%ecx movl %ecx,12(%ebx) -.L029pw_nc3: +.L041pw_nc3: movl 16(%esi),%ecx movl %ecx,16(%ebx) -.L030pw_nc4: +.L042pw_nc4: movl 20(%esi),%ecx movl %ecx,20(%ebx) -.L031pw_nc5: +.L043pw_nc5: movl 24(%esi),%ecx movl %ecx,24(%ebx) -.L032pw_nc6: +.L044pw_nc6: movl 28(%esi),%ecx movl %ecx,28(%ebx) -.L033pw_nc7: +.L045pw_nc7: addl $32,%esi addl $32,%ebx subl $8,%ebp - jnz .L041pw_nc_loop + jnz .L053pw_nc_loop movl 36(%esp),%ebp andl $7,%ebp - jz .L042pw_nc_end + jz .L054pw_nc_end movl (%esi),%ecx movl %ecx,(%ebx) -.L034pw_tail_nc0: +.L046pw_tail_nc0: decl %ebp - jz .L042pw_nc_end + jz .L054pw_nc_end movl 4(%esi),%ecx movl %ecx,4(%ebx) -.L035pw_tail_nc1: +.L047pw_tail_nc1: decl %ebp - jz .L042pw_nc_end + jz .L054pw_nc_end movl 8(%esi),%ecx movl %ecx,8(%ebx) -.L036pw_tail_nc2: +.L048pw_tail_nc2: decl %ebp - jz .L042pw_nc_end + jz .L054pw_nc_end movl 12(%esi),%ecx movl %ecx,12(%ebx) -.L037pw_tail_nc3: +.L049pw_tail_nc3: decl %ebp *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Thu Sep 20 23:07:01 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E59A910AC1C6 for ; Thu, 20 Sep 2018 23:07:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F598842DF; Thu, 20 Sep 2018 23:07:00 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84A8224843; Thu, 20 Sep 2018 23:07:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KN70Hb010777; Thu, 20 Sep 2018 23:07:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KN70I3010776; Thu, 20 Sep 2018 23:07:00 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809202307.w8KN70I3010776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 20 Sep 2018 23:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338848 - projects/openssl111/secure/usr.bin/openssl X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/usr.bin/openssl X-SVN-Commit-Revision: 338848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 23:07:01 -0000 Author: jkim Date: Thu Sep 20 23:06:59 2018 New Revision: 338848 URL: https://svnweb.freebsd.org/changeset/base/338848 Log: Remove pthread from LIBADD for openssl(1). libcrypto is linked with pthread since r338816. Modified: projects/openssl111/secure/usr.bin/openssl/Makefile Modified: projects/openssl111/secure/usr.bin/openssl/Makefile ============================================================================== --- projects/openssl111/secure/usr.bin/openssl/Makefile Thu Sep 20 22:48:34 2018 (r338847) +++ projects/openssl111/secure/usr.bin/openssl/Makefile Thu Sep 20 23:06:59 2018 (r338848) @@ -2,7 +2,7 @@ PROG= openssl -LIBADD= ssl crypto pthread +LIBADD= ssl crypto .if exists(Makefile.man) .include "Makefile.man" From owner-svn-src-projects@freebsd.org Fri Sep 21 22:26:01 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B8E410A634A for ; Fri, 21 Sep 2018 22:26:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 359227373B; Fri, 21 Sep 2018 22:26:01 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 092681319A; Fri, 21 Sep 2018 22:26:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8LMQ0Vg037795; Fri, 21 Sep 2018 22:26:00 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LMQ0ST037793; Fri, 21 Sep 2018 22:26:00 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809212226.w8LMQ0ST037793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 21 Sep 2018 22:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338870 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2018 22:26:01 -0000 Author: jkim Date: Fri Sep 21 22:26:00 2018 New Revision: 338870 URL: https://svnweb.freebsd.org/changeset/base/338870 Log: Unify opensslconf.h templates. There is no MD macro in this file any more. Added: projects/openssl111/secure/lib/libcrypto/opensslconf.h.in - copied unchanged from r338869, projects/openssl111/secure/lib/libcrypto/opensslconf-x86.h.in Deleted: projects/openssl111/secure/lib/libcrypto/opensslconf-aarch64.h.in projects/openssl111/secure/lib/libcrypto/opensslconf-arm.h.in projects/openssl111/secure/lib/libcrypto/opensslconf-mips.h.in projects/openssl111/secure/lib/libcrypto/opensslconf-powerpc.h.in projects/openssl111/secure/lib/libcrypto/opensslconf-riscv.h.in projects/openssl111/secure/lib/libcrypto/opensslconf-sparc64.h.in projects/openssl111/secure/lib/libcrypto/opensslconf-x86.h.in Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Fri Sep 21 21:56:00 2018 (r338869) +++ projects/openssl111/secure/lib/libcrypto/Makefile Fri Sep 21 22:26:00 2018 (r338870) @@ -406,7 +406,7 @@ openssl/opensslconf.h: opensslconf.h mkdir -p openssl ln -fs ${.OBJDIR}/${.ALLSRC} ${.TARGET} -opensslconf.h: opensslconf-${MACHINE_CPUARCH:C/^(amd64|i386)$/x86/}.h.in +opensslconf.h: opensslconf.h.in .if defined(ASM_${MACHINE_CPUARCH}) sed 's/%%ASM%%//; /%%NO_ASM%%/d' ${.ALLSRC} > ${.TARGET}.tmp .else Copied: projects/openssl111/secure/lib/libcrypto/opensslconf.h.in (from r338869, projects/openssl111/secure/lib/libcrypto/opensslconf-x86.h.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/secure/lib/libcrypto/opensslconf.h.in Fri Sep 21 22:26:00 2018 (r338870, copy of r338869, projects/openssl111/secure/lib/libcrypto/opensslconf-x86.h.in) @@ -0,0 +1,198 @@ +/* $FreeBSD$ */ +/* + * WARNING: do not edit! + * Generated by Makefile from include/openssl/opensslconf.h.in + * + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef OPENSSL_ALGORITHM_DEFINES +# error OPENSSL_ALGORITHM_DEFINES no longer supported +#endif + +/* + * OpenSSL was configured with the following options: + */ + +#ifndef OPENSSL_NO_MD2 +# define OPENSSL_NO_MD2 +#endif +#ifndef OPENSSL_THREADS +# define OPENSSL_THREADS +#endif +#ifndef OPENSSL_RAND_SEED_OS +# define OPENSSL_RAND_SEED_OS +#endif +#ifndef OPENSSL_NO_ASAN +# define OPENSSL_NO_ASAN +#endif +%%NO_ASM%%#ifndef OPENSSL_NO_ASM +%%NO_ASM%%# define OPENSSL_NO_ASM +%%NO_ASM%%#endif +#ifndef OPENSSL_NO_CRYPTO_MDEBUG +# define OPENSSL_NO_CRYPTO_MDEBUG +#endif +#ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE +# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE +#endif +#ifndef OPENSSL_NO_DEVCRYPTOENG +# define OPENSSL_NO_DEVCRYPTOENG +#endif +#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 +# define OPENSSL_NO_EC_NISTP_64_GCC_128 +#endif +#ifndef OPENSSL_NO_EGD +# define OPENSSL_NO_EGD +#endif +#ifndef OPENSSL_NO_EXTERNAL_TESTS +# define OPENSSL_NO_EXTERNAL_TESTS +#endif +#ifndef OPENSSL_NO_FUZZ_AFL +# define OPENSSL_NO_FUZZ_AFL +#endif +#ifndef OPENSSL_NO_FUZZ_LIBFUZZER +# define OPENSSL_NO_FUZZ_LIBFUZZER +#endif +#ifndef OPENSSL_NO_HEARTBEATS +# define OPENSSL_NO_HEARTBEATS +#endif +#ifndef OPENSSL_NO_MSAN +# define OPENSSL_NO_MSAN +#endif +#ifndef OPENSSL_NO_SCTP +# define OPENSSL_NO_SCTP +#endif +#ifndef OPENSSL_NO_SSL_TRACE +# define OPENSSL_NO_SSL_TRACE +#endif +#ifndef OPENSSL_NO_UBSAN +# define OPENSSL_NO_UBSAN +#endif +#ifndef OPENSSL_NO_UNIT_TEST +# define OPENSSL_NO_UNIT_TEST +#endif +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS +# define OPENSSL_NO_WEAK_SSL_CIPHERS +#endif +#ifndef OPENSSL_NO_STATIC_ENGINE +# define OPENSSL_NO_STATIC_ENGINE +#endif +#ifndef OPENSSL_NO_AFALGENG +# define OPENSSL_NO_AFALGENG +#endif + + +/* + * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers + * don't like that. This will hopefully silence them. + */ +#define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy; + +/* + * Applications should use -DOPENSSL_API_COMPAT= to suppress the + * declarations of functions deprecated in or before . Otherwise, they + * still won't see them if the library has been built to disable deprecated + * functions. + */ +#ifndef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f; +# ifdef __GNUC__ +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) +# undef DECLARE_DEPRECATED +# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); +# endif +# endif +#endif + +#ifndef OPENSSL_FILE +# ifdef OPENSSL_NO_FILENAMES +# define OPENSSL_FILE "" +# define OPENSSL_LINE 0 +# else +# define OPENSSL_FILE __FILE__ +# define OPENSSL_LINE __LINE__ +# endif +#endif + +#ifndef OPENSSL_MIN_API +# define OPENSSL_MIN_API 0 +#endif + +#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API +# undef OPENSSL_API_COMPAT +# define OPENSSL_API_COMPAT OPENSSL_MIN_API +#endif + +/* + * Do not deprecate things to be deprecated in version 1.2.0 before the + * OpenSSL version number matches. + */ +#if OPENSSL_VERSION_NUMBER < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) f; +#elif OPENSSL_API_COMPAT < 0x10200000L +# define DEPRECATEDIN_1_2_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_2_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x10100000L +# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_1_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x10000000L +# define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_1_0_0(f) +#endif + +#if OPENSSL_API_COMPAT < 0x00908000L +# define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f) +#else +# define DEPRECATEDIN_0_9_8(f) +#endif + +/* Generate 80386 code? */ +#undef I386_ONLY + +#undef OPENSSL_UNISTD +#define OPENSSL_UNISTD + +#undef OPENSSL_EXPORT_VAR_AS_FUNCTION + +/* + * The following are cipher-specific, but are part of the public API. + */ +#if !defined(OPENSSL_SYS_UEFI) +#ifdef __LP64__ +# undef BN_LLONG +/* Only one for the following should be defined */ +# define SIXTY_FOUR_BIT_LONG +# undef SIXTY_FOUR_BIT +# undef THIRTY_TWO_BIT +#else +# define BN_LLONG +/* Only one for the following should be defined */ +# undef SIXTY_FOUR_BIT_LONG +# undef SIXTY_FOUR_BIT +# define THIRTY_TWO_BIT +#endif +#endif + +#define RC4_INT unsigned int + +#ifdef __cplusplus +} +#endif From owner-svn-src-projects@freebsd.org Sat Sep 22 02:23:42 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C477B10AC93B for ; Sat, 22 Sep 2018 02:23:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EB6E7B625; Sat, 22 Sep 2018 02:23:42 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6997B15A4C; Sat, 22 Sep 2018 02:23:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M2NgWT062865; Sat, 22 Sep 2018 02:23:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M2Ng2P062864; Sat, 22 Sep 2018 02:23:42 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220223.w8M2Ng2P062864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 02:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338876 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 02:23:43 -0000 Author: jkim Date: Sat Sep 22 02:23:42 2018 New Revision: 338876 URL: https://svnweb.freebsd.org/changeset/base/338876 Log: Connect assembly files for aarch64 to build. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 02:23:03 2018 (r338875) +++ projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 02:23:42 2018 (r338876) @@ -19,7 +19,9 @@ NO_LINT= SRCS= cpt_err.c cryptlib.c ctype.c cversion.c ex_data.c init.c mem.c SRCS+= mem_dbg.c mem_sec.c o_dir.c o_fips.c o_fopen.c o_init.c o_str.c SRCS+= o_time.c threads_pthread.c uid.c -.if defined(ASM_amd64) +.if defined(ARM_aarch64) +SRCS+= arm64cpuid.S armcap.c +.elif defined(ASM_amd64) SRCS+= x86_64cpuid.S .elif defined(ASM_i386) SRCS+= x86cpuid.S @@ -29,7 +31,9 @@ SRCS+= mem_clr.c # aes SRCS+= aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= aes_cbc.c aes_core.c aesv8-armx.S vpaes-armv8.S +.elif defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S .elif defined(ASM_i386) @@ -80,7 +84,9 @@ SRCS+= bn_err.c bn_exp.c bn_exp2.c bn_gcd.c bn_gf2m.c SRCS+= bn_lib.c bn_mod.c bn_mont.c bn_mpi.c bn_mul.c bn_nist.c bn_prime.c SRCS+= bn_print.c bn_rand.c bn_recp.c bn_shift.c bn_sqr.c bn_sqrt.c SRCS+= bn_srp.c bn_word.c bn_x931p.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= armv8-mont.S bn_asm.c +.elif defined(ASM_amd64) SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S SRCS+= x86_64-mont.S x86_64-mont5.S .elif defined(ASM_i386) @@ -106,7 +112,9 @@ SRCS+= camellia.c cmll_cbc.c cmll_misc.c SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c # chacha -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= chacha-armv8.S +.elif defined(ASM_amd64) SRCS+= chacha-x86_64.S .elif defined(ASM_i386) SRCS+= chacha-x86.S @@ -163,7 +171,9 @@ SRCS+= ec_key.c ec_kmeth.c ec_lib.c ec_mult.c ec_oct.c SRCS+= ec_print.c ecdh_kdf.c ecdh_ossl.c ecdsa_ossl.c ecdsa_sign.c SRCS+= ecdsa_vrf.c eck_prn.c ecp_mont.c ecp_nist.c ecp_oct.c ecp_smpl.c SRCS+= ecx_meth.c eddsa.c f_generic.c f_impl.c scalar.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c +.elif defined(ASM_amd64) SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S .elif defined(ASM_i386) SRCS+= ecp_nistz256-x86.S ecp_nistz256.c @@ -219,7 +229,9 @@ SRCS+= mdc2_one.c mdc2dgst.c # modes SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gcm128.c ocb128.c SRCS+= ofb128.c wrap128.c xts128.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= ghashv8-armx.S +.elif defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S .elif defined(ASM_i386) SRCS+= ghash-x86.S @@ -293,7 +305,9 @@ SRCS+= seed.c seed_cbc.c seed_cfb.c seed_ecb.c seed_of # sha SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= keccak1600-armv8.S sha1-armv8.S sha256-armv8.S sha512-armv8.S +.elif defined(ASM_amd64) SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S .elif defined(ASM_i386) From owner-svn-src-projects@freebsd.org Sat Sep 22 02:23:04 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D76010AC8D1 for ; Sat, 22 Sep 2018 02:23:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30F767B500; Sat, 22 Sep 2018 02:23:04 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25CB315A4A; Sat, 22 Sep 2018 02:23:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M2N4OU062800; Sat, 22 Sep 2018 02:23:04 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M2N3d6062796; Sat, 22 Sep 2018 02:23:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220223.w8M2N3d6062796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 02:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338875 - in projects/openssl111/secure/lib/libcrypto: . aarch64 X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/secure/lib/libcrypto: . aarch64 X-SVN-Commit-Revision: 338875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 02:23:05 -0000 Author: jkim Date: Sat Sep 22 02:23:03 2018 New Revision: 338875 URL: https://svnweb.freebsd.org/changeset/base/338875 Log: Regen assemply files for aarch64. Added: projects/openssl111/secure/lib/libcrypto/aarch64/armv8-mont.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/aarch64/chacha-armv8.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/aarch64/ecp_nistz256-armv8.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/aarch64/keccak1600-armv8.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/aarch64/poly1305-armv8.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/aarch64/vpaes-armv8.S (contents, props changed) Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm projects/openssl111/secure/lib/libcrypto/aarch64/aesv8-armx.S projects/openssl111/secure/lib/libcrypto/aarch64/ghashv8-armx.S projects/openssl111/secure/lib/libcrypto/aarch64/sha1-armv8.S projects/openssl111/secure/lib/libcrypto/aarch64/sha256-armv8.S projects/openssl111/secure/lib/libcrypto/aarch64/sha512-armv8.S Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.asm Sat Sep 22 01:24:30 2018 (r338874) +++ projects/openssl111/secure/lib/libcrypto/Makefile.asm Sat Sep 22 02:23:03 2018 (r338875) @@ -10,19 +10,35 @@ .PATH: ${LCRYPTO_SRC}/crypto \ ${LCRYPTO_SRC}/crypto/aes/asm \ + ${LCRYPTO_SRC}/crypto/bn/asm \ + ${LCRYPTO_SRC}/crypto/chacha/asm \ + ${LCRYPTO_SRC}/crypto/ec/asm \ ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/poly1305/asm \ ${LCRYPTO_SRC}/crypto/sha/asm PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm # aes -SRCS= aesv8-armx.pl +SRCS= aesv8-armx.pl vpaes-armv8.pl +# bn +SRCS+= armv8-mont.pl + +# chacha +SRCS+= chacha-armv8.pl + +# ec +SRCS+= ecp_nistz256-armv8.pl + # modes SRCS+= ghashv8-armx.pl +# poly1305 +SRCS+= poly1305-armv8.pl + # sha -SRCS+= sha1-armv8.pl sha512-armv8.pl +SRCS+= keccak1600-armv8.pl sha1-armv8.pl sha512-armv8.pl ASM= ${SRCS:R:S/$/.S/} sha256-armv8.S @@ -32,13 +48,13 @@ CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} sha256-armv8.s .SUFFIXES: .pl sha256-armv8.S: sha512-armv8.pl - env CC=cc perl ${.ALLSRC} 64 ${.TARGET:R:S/$/.s/} + env CC=cc perl ${.ALLSRC} linux64 ${.TARGET:R:S/$/.s/} ( echo '/* $$'FreeBSD'$$ */' ;\ echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} .pl.S: - env CC=cc perl ${.IMPSRC} 64 ${.TARGET:R:S/$/.s/} + env CC=cc perl ${.IMPSRC} linux64 ${.TARGET:R:S/$/.s/} ( echo '/* $$'FreeBSD'$$ */' ;\ echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T:R:S/$/.pl/}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} @@ -160,10 +176,10 @@ CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} aes-armv4.S: aes-armv4.pl ( echo '/* $$'FreeBSD'$$ */' ;\ echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ - env CC=cc perl ${.ALLSRC} elf ) > ${.TARGET} + env CC=cc perl ${.ALLSRC} linux32 ) > ${.TARGET} .pl.S: - env CC=cc perl ${.IMPSRC} elf ${.TARGET:R:S/$/.s/} + env CC=cc perl ${.IMPSRC} linux32 ${.TARGET:R:S/$/.s/} ( echo '/* $$'FreeBSD'$$ */' ;\ echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T:R:S/$/.pl/}. */' ;\ cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} Modified: projects/openssl111/secure/lib/libcrypto/aarch64/aesv8-armx.S ============================================================================== --- projects/openssl111/secure/lib/libcrypto/aarch64/aesv8-armx.S Sat Sep 22 01:24:30 2018 (r338874) +++ projects/openssl111/secure/lib/libcrypto/aarch64/aesv8-armx.S Sat Sep 22 02:23:03 2018 (r338875) @@ -5,7 +5,7 @@ #if __ARM_MAX_ARCH__>=7 .text .align 5 -rcon: +.Lrcon: .long 0x01,0x01,0x01,0x01 .long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d // rotate-n-splat .long 0x1b,0x1b,0x1b,0x1b @@ -30,7 +30,7 @@ aes_v8_set_encrypt_key: tst w1,#0x3f b.ne .Lenc_key_abort - adr x3,rcon + adr x3,.Lrcon cmp w1,#192 eor v0.16b,v0.16b,v0.16b @@ -54,7 +54,7 @@ aes_v8_set_encrypt_key: ext v5.16b,v0.16b,v5.16b,#12 eor v3.16b,v3.16b,v5.16b ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b + eor v6.16b,v6.16b,v1.16b eor v3.16b,v3.16b,v5.16b shl v1.16b,v1.16b,#1 eor v3.16b,v3.16b,v6.16b @@ -71,7 +71,7 @@ aes_v8_set_encrypt_key: ext v5.16b,v0.16b,v5.16b,#12 eor v3.16b,v3.16b,v5.16b ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b + eor v6.16b,v6.16b,v1.16b eor v3.16b,v3.16b,v5.16b shl v1.16b,v1.16b,#1 eor v3.16b,v3.16b,v6.16b @@ -85,7 +85,7 @@ aes_v8_set_encrypt_key: ext v5.16b,v0.16b,v5.16b,#12 eor v3.16b,v3.16b,v5.16b ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b + eor v6.16b,v6.16b,v1.16b eor v3.16b,v3.16b,v5.16b eor v3.16b,v3.16b,v6.16b st1 {v3.4s},[x2] @@ -116,7 +116,7 @@ aes_v8_set_encrypt_key: dup v5.4s,v3.s[3] eor v5.16b,v5.16b,v4.16b - eor v6.16b,v6.16b,v1.16b + eor v6.16b,v6.16b,v1.16b ext v4.16b,v0.16b,v4.16b,#12 shl v1.16b,v1.16b,#1 eor v4.16b,v4.16b,v5.16b @@ -147,7 +147,7 @@ aes_v8_set_encrypt_key: ext v5.16b,v0.16b,v5.16b,#12 eor v3.16b,v3.16b,v5.16b ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b + eor v6.16b,v6.16b,v1.16b eor v3.16b,v3.16b,v5.16b shl v1.16b,v1.16b,#1 eor v3.16b,v3.16b,v6.16b @@ -291,13 +291,13 @@ aes_v8_cbc_encrypt: ld1 {v6.16b},[x4] ld1 {v0.16b},[x0],x8 - ld1 {v16.4s-v17.4s},[x3] // load key schedule... + ld1 {v16.4s,v17.4s},[x3] // load key schedule... sub w5,w5,#6 add x7,x3,x5,lsl#4 // pointer to last 7 round keys sub w5,w5,#2 - ld1 {v18.4s-v19.4s},[x7],#32 - ld1 {v20.4s-v21.4s},[x7],#32 - ld1 {v22.4s-v23.4s},[x7],#32 + ld1 {v18.4s,v19.4s},[x7],#32 + ld1 {v20.4s,v21.4s},[x7],#32 + ld1 {v22.4s,v23.4s},[x7],#32 ld1 {v7.4s},[x7] add x7,x3,#32 @@ -309,7 +309,7 @@ aes_v8_cbc_encrypt: eor v5.16b,v16.16b,v7.16b b.eq .Lcbc_enc128 - ld1 {v2.4s-v3.4s},[x7] + ld1 {v2.4s,v3.4s},[x7] add x7,x3,#16 add x6,x3,#16*4 add x12,x3,#16*5 @@ -323,7 +323,7 @@ aes_v8_cbc_encrypt: .Loop_cbc_enc: aese v0.16b,v16.16b aesmc v0.16b,v0.16b - st1 {v6.16b},[x1],#16 + st1 {v6.16b},[x1],#16 .Lenter_cbc_enc: aese v0.16b,v17.16b aesmc v0.16b,v0.16b @@ -347,21 +347,21 @@ aes_v8_cbc_encrypt: .Lcbc_enc192: aese v0.16b,v16.16b aesmc v0.16b,v0.16b - subs x2,x2,#16 + subs x2,x2,#16 aese v0.16b,v17.16b aesmc v0.16b,v0.16b - csel x8,xzr,x8,eq + csel x8,xzr,x8,eq aese v0.16b,v18.16b aesmc v0.16b,v0.16b aese v0.16b,v19.16b aesmc v0.16b,v0.16b - ld1 {v16.16b},[x0],x8 + ld1 {v16.16b},[x0],x8 aese v0.16b,v20.16b aesmc v0.16b,v0.16b - eor v16.16b,v16.16b,v5.16b + eor v16.16b,v16.16b,v5.16b aese v0.16b,v21.16b aesmc v0.16b,v0.16b - ld1 {v17.4s},[x7] // re-pre-load rndkey[1] + ld1 {v17.4s},[x7] // re-pre-load rndkey[1] aese v0.16b,v22.16b aesmc v0.16b,v0.16b aese v0.16b,v23.16b @@ -373,35 +373,35 @@ aes_v8_cbc_encrypt: .align 5 .Lcbc_enc128: - ld1 {v2.4s-v3.4s},[x7] + ld1 {v2.4s,v3.4s},[x7] aese v0.16b,v16.16b aesmc v0.16b,v0.16b b .Lenter_cbc_enc128 .Loop_cbc_enc128: aese v0.16b,v16.16b aesmc v0.16b,v0.16b - st1 {v6.16b},[x1],#16 + st1 {v6.16b},[x1],#16 .Lenter_cbc_enc128: aese v0.16b,v17.16b aesmc v0.16b,v0.16b - subs x2,x2,#16 + subs x2,x2,#16 aese v0.16b,v2.16b aesmc v0.16b,v0.16b - csel x8,xzr,x8,eq + csel x8,xzr,x8,eq aese v0.16b,v3.16b aesmc v0.16b,v0.16b aese v0.16b,v18.16b aesmc v0.16b,v0.16b aese v0.16b,v19.16b aesmc v0.16b,v0.16b - ld1 {v16.16b},[x0],x8 + ld1 {v16.16b},[x0],x8 aese v0.16b,v20.16b aesmc v0.16b,v0.16b aese v0.16b,v21.16b aesmc v0.16b,v0.16b aese v0.16b,v22.16b aesmc v0.16b,v0.16b - eor v16.16b,v16.16b,v5.16b + eor v16.16b,v16.16b,v5.16b aese v0.16b,v23.16b eor v6.16b,v0.16b,v7.16b b.hs .Loop_cbc_enc128 @@ -448,58 +448,58 @@ aes_v8_cbc_encrypt: aesimc v1.16b,v1.16b aesd v18.16b,v16.16b aesimc v18.16b,v18.16b - eor v4.16b,v6.16b,v7.16b - subs x2,x2,#0x30 - eor v5.16b,v2.16b,v7.16b - csel x6,x2,x6,lo // x6, w6, is zero at this point + eor v4.16b,v6.16b,v7.16b + subs x2,x2,#0x30 + eor v5.16b,v2.16b,v7.16b + csel x6,x2,x6,lo // x6, w6, is zero at this point aesd v0.16b,v17.16b aesimc v0.16b,v0.16b aesd v1.16b,v17.16b aesimc v1.16b,v1.16b aesd v18.16b,v17.16b aesimc v18.16b,v18.16b - eor v17.16b,v3.16b,v7.16b - add x0,x0,x6 // x0 is adjusted in such way that + eor v17.16b,v3.16b,v7.16b + add x0,x0,x6 // x0 is adjusted in such way that // at exit from the loop v1.16b-v18.16b // are loaded with last "words" - orr v6.16b,v19.16b,v19.16b - mov x7,x3 + orr v6.16b,v19.16b,v19.16b + mov x7,x3 aesd v0.16b,v20.16b aesimc v0.16b,v0.16b aesd v1.16b,v20.16b aesimc v1.16b,v1.16b aesd v18.16b,v20.16b aesimc v18.16b,v18.16b - ld1 {v2.16b},[x0],#16 + ld1 {v2.16b},[x0],#16 aesd v0.16b,v21.16b aesimc v0.16b,v0.16b aesd v1.16b,v21.16b aesimc v1.16b,v1.16b aesd v18.16b,v21.16b aesimc v18.16b,v18.16b - ld1 {v3.16b},[x0],#16 + ld1 {v3.16b},[x0],#16 aesd v0.16b,v22.16b aesimc v0.16b,v0.16b aesd v1.16b,v22.16b aesimc v1.16b,v1.16b aesd v18.16b,v22.16b aesimc v18.16b,v18.16b - ld1 {v19.16b},[x0],#16 + ld1 {v19.16b},[x0],#16 aesd v0.16b,v23.16b aesd v1.16b,v23.16b aesd v18.16b,v23.16b - ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0] - add w6,w5,#2 + ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0] + add w6,w5,#2 eor v4.16b,v4.16b,v0.16b eor v5.16b,v5.16b,v1.16b eor v18.16b,v18.16b,v17.16b - ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1] + ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1] st1 {v4.16b},[x1],#16 - orr v0.16b,v2.16b,v2.16b + orr v0.16b,v2.16b,v2.16b st1 {v5.16b},[x1],#16 - orr v1.16b,v3.16b,v3.16b + orr v1.16b,v3.16b,v3.16b st1 {v18.16b},[x1],#16 - orr v18.16b,v19.16b,v19.16b + orr v18.16b,v19.16b,v19.16b b.hs .Loop3x_cbc_dec cmn x2,#0x30 @@ -532,30 +532,30 @@ aes_v8_cbc_encrypt: aesimc v1.16b,v1.16b aesd v18.16b,v20.16b aesimc v18.16b,v18.16b - cmn x2,#0x20 + cmn x2,#0x20 aesd v1.16b,v21.16b aesimc v1.16b,v1.16b aesd v18.16b,v21.16b aesimc v18.16b,v18.16b - eor v5.16b,v6.16b,v7.16b + eor v5.16b,v6.16b,v7.16b aesd v1.16b,v22.16b aesimc v1.16b,v1.16b aesd v18.16b,v22.16b aesimc v18.16b,v18.16b - eor v17.16b,v3.16b,v7.16b + eor v17.16b,v3.16b,v7.16b aesd v1.16b,v23.16b aesd v18.16b,v23.16b b.eq .Lcbc_dec_one eor v5.16b,v5.16b,v1.16b eor v17.16b,v17.16b,v18.16b - orr v6.16b,v19.16b,v19.16b + orr v6.16b,v19.16b,v19.16b st1 {v5.16b},[x1],#16 st1 {v17.16b},[x1],#16 b .Lcbc_done .Lcbc_dec_one: eor v5.16b,v5.16b,v18.16b - orr v6.16b,v19.16b,v19.16b + orr v6.16b,v19.16b,v19.16b st1 {v5.16b},[x1],#16 .Lcbc_done: @@ -568,181 +568,181 @@ aes_v8_cbc_encrypt: .type aes_v8_ctr32_encrypt_blocks,%function .align 5 aes_v8_ctr32_encrypt_blocks: - stp x29,x30,[sp,#-16]! - add x29,sp,#0 - ldr w5,[x3,#240] + stp x29,x30,[sp,#-16]! + add x29,sp,#0 + ldr w5,[x3,#240] - ldr w8, [x4, #12] - ld1 {v0.4s},[x4] + ldr w8, [x4, #12] + ld1 {v0.4s},[x4] - ld1 {v16.4s-v17.4s},[x3] // load key schedule... - sub w5,w5,#4 - mov x12,#16 - cmp x2,#2 - add x7,x3,x5,lsl#4 // pointer to last 5 round keys - sub w5,w5,#2 - ld1 {v20.4s-v21.4s},[x7],#32 - ld1 {v22.4s-v23.4s},[x7],#32 - ld1 {v7.4s},[x7] - add x7,x3,#32 - mov w6,w5 + ld1 {v16.4s,v17.4s},[x3] // load key schedule... + sub w5,w5,#4 + mov x12,#16 + cmp x2,#2 + add x7,x3,x5,lsl#4 // pointer to last 5 round keys + sub w5,w5,#2 + ld1 {v20.4s,v21.4s},[x7],#32 + ld1 {v22.4s,v23.4s},[x7],#32 + ld1 {v7.4s},[x7] + add x7,x3,#32 + mov w6,w5 csel x12,xzr,x12,lo #ifndef __ARMEB__ - rev w8, w8 + rev w8, w8 #endif - orr v1.16b,v0.16b,v0.16b - add w10, w8, #1 - orr v18.16b,v0.16b,v0.16b - add w8, w8, #2 - orr v6.16b,v0.16b,v0.16b - rev w10, w10 - mov v1.s[3],w10 - b.ls .Lctr32_tail - rev w12, w8 - sub x2,x2,#3 // bias - mov v18.s[3],w12 - b .Loop3x_ctr32 + orr v1.16b,v0.16b,v0.16b + add w10, w8, #1 + orr v18.16b,v0.16b,v0.16b + add w8, w8, #2 + orr v6.16b,v0.16b,v0.16b + rev w10, w10 + mov v1.s[3],w10 + b.ls .Lctr32_tail + rev w12, w8 + sub x2,x2,#3 // bias + mov v18.s[3],w12 + b .Loop3x_ctr32 .align 4 .Loop3x_ctr32: - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - aese v1.16b,v16.16b - aesmc v1.16b,v1.16b - aese v18.16b,v16.16b - aesmc v18.16b,v18.16b - ld1 {v16.4s},[x7],#16 - subs w6,w6,#2 - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - aese v1.16b,v17.16b - aesmc v1.16b,v1.16b - aese v18.16b,v17.16b - aesmc v18.16b,v18.16b - ld1 {v17.4s},[x7],#16 - b.gt .Loop3x_ctr32 + aese v0.16b,v16.16b + aesmc v0.16b,v0.16b + aese v1.16b,v16.16b + aesmc v1.16b,v1.16b + aese v18.16b,v16.16b + aesmc v18.16b,v18.16b + ld1 {v16.4s},[x7],#16 + subs w6,w6,#2 + aese v0.16b,v17.16b + aesmc v0.16b,v0.16b + aese v1.16b,v17.16b + aesmc v1.16b,v1.16b + aese v18.16b,v17.16b + aesmc v18.16b,v18.16b + ld1 {v17.4s},[x7],#16 + b.gt .Loop3x_ctr32 - aese v0.16b,v16.16b - aesmc v4.16b,v0.16b - aese v1.16b,v16.16b - aesmc v5.16b,v1.16b - ld1 {v2.16b},[x0],#16 - orr v0.16b,v6.16b,v6.16b - aese v18.16b,v16.16b - aesmc v18.16b,v18.16b - ld1 {v3.16b},[x0],#16 - orr v1.16b,v6.16b,v6.16b - aese v4.16b,v17.16b - aesmc v4.16b,v4.16b - aese v5.16b,v17.16b - aesmc v5.16b,v5.16b - ld1 {v19.16b},[x0],#16 - mov x7,x3 - aese v18.16b,v17.16b - aesmc v17.16b,v18.16b - orr v18.16b,v6.16b,v6.16b - add w9,w8,#1 - aese v4.16b,v20.16b - aesmc v4.16b,v4.16b - aese v5.16b,v20.16b - aesmc v5.16b,v5.16b - eor v2.16b,v2.16b,v7.16b - add w10,w8,#2 - aese v17.16b,v20.16b - aesmc v17.16b,v17.16b - eor v3.16b,v3.16b,v7.16b - add w8,w8,#3 - aese v4.16b,v21.16b - aesmc v4.16b,v4.16b - aese v5.16b,v21.16b - aesmc v5.16b,v5.16b - eor v19.16b,v19.16b,v7.16b - rev w9,w9 - aese v17.16b,v21.16b - aesmc v17.16b,v17.16b - mov v0.s[3], w9 - rev w10,w10 - aese v4.16b,v22.16b - aesmc v4.16b,v4.16b - aese v5.16b,v22.16b - aesmc v5.16b,v5.16b - mov v1.s[3], w10 - rev w12,w8 - aese v17.16b,v22.16b - aesmc v17.16b,v17.16b - mov v18.s[3], w12 - subs x2,x2,#3 - aese v4.16b,v23.16b - aese v5.16b,v23.16b - aese v17.16b,v23.16b + aese v0.16b,v16.16b + aesmc v4.16b,v0.16b + aese v1.16b,v16.16b + aesmc v5.16b,v1.16b + ld1 {v2.16b},[x0],#16 + orr v0.16b,v6.16b,v6.16b + aese v18.16b,v16.16b + aesmc v18.16b,v18.16b + ld1 {v3.16b},[x0],#16 + orr v1.16b,v6.16b,v6.16b + aese v4.16b,v17.16b + aesmc v4.16b,v4.16b + aese v5.16b,v17.16b + aesmc v5.16b,v5.16b + ld1 {v19.16b},[x0],#16 + mov x7,x3 + aese v18.16b,v17.16b + aesmc v17.16b,v18.16b + orr v18.16b,v6.16b,v6.16b + add w9,w8,#1 + aese v4.16b,v20.16b + aesmc v4.16b,v4.16b + aese v5.16b,v20.16b + aesmc v5.16b,v5.16b + eor v2.16b,v2.16b,v7.16b + add w10,w8,#2 + aese v17.16b,v20.16b + aesmc v17.16b,v17.16b + eor v3.16b,v3.16b,v7.16b + add w8,w8,#3 + aese v4.16b,v21.16b + aesmc v4.16b,v4.16b + aese v5.16b,v21.16b + aesmc v5.16b,v5.16b + eor v19.16b,v19.16b,v7.16b + rev w9,w9 + aese v17.16b,v21.16b + aesmc v17.16b,v17.16b + mov v0.s[3], w9 + rev w10,w10 + aese v4.16b,v22.16b + aesmc v4.16b,v4.16b + aese v5.16b,v22.16b + aesmc v5.16b,v5.16b + mov v1.s[3], w10 + rev w12,w8 + aese v17.16b,v22.16b + aesmc v17.16b,v17.16b + mov v18.s[3], w12 + subs x2,x2,#3 + aese v4.16b,v23.16b + aese v5.16b,v23.16b + aese v17.16b,v23.16b - eor v2.16b,v2.16b,v4.16b - ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0] - st1 {v2.16b},[x1],#16 - eor v3.16b,v3.16b,v5.16b - mov w6,w5 - st1 {v3.16b},[x1],#16 - eor v19.16b,v19.16b,v17.16b - ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1] - st1 {v19.16b},[x1],#16 - b.hs .Loop3x_ctr32 + eor v2.16b,v2.16b,v4.16b + ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0] + st1 {v2.16b},[x1],#16 + eor v3.16b,v3.16b,v5.16b + mov w6,w5 + st1 {v3.16b},[x1],#16 + eor v19.16b,v19.16b,v17.16b + ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1] + st1 {v19.16b},[x1],#16 + b.hs .Loop3x_ctr32 - adds x2,x2,#3 - b.eq .Lctr32_done - cmp x2,#1 - mov x12,#16 + adds x2,x2,#3 + b.eq .Lctr32_done + cmp x2,#1 + mov x12,#16 csel x12,xzr,x12,eq .Lctr32_tail: - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - aese v1.16b,v16.16b - aesmc v1.16b,v1.16b - ld1 {v16.4s},[x7],#16 - subs w6,w6,#2 - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - aese v1.16b,v17.16b - aesmc v1.16b,v1.16b - ld1 {v17.4s},[x7],#16 - b.gt .Lctr32_tail + aese v0.16b,v16.16b + aesmc v0.16b,v0.16b + aese v1.16b,v16.16b + aesmc v1.16b,v1.16b + ld1 {v16.4s},[x7],#16 + subs w6,w6,#2 + aese v0.16b,v17.16b + aesmc v0.16b,v0.16b + aese v1.16b,v17.16b + aesmc v1.16b,v1.16b + ld1 {v17.4s},[x7],#16 + b.gt .Lctr32_tail - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - aese v1.16b,v16.16b - aesmc v1.16b,v1.16b - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - aese v1.16b,v17.16b - aesmc v1.16b,v1.16b - ld1 {v2.16b},[x0],x12 - aese v0.16b,v20.16b - aesmc v0.16b,v0.16b - aese v1.16b,v20.16b - aesmc v1.16b,v1.16b - ld1 {v3.16b},[x0] - aese v0.16b,v21.16b - aesmc v0.16b,v0.16b - aese v1.16b,v21.16b - aesmc v1.16b,v1.16b - eor v2.16b,v2.16b,v7.16b - aese v0.16b,v22.16b - aesmc v0.16b,v0.16b - aese v1.16b,v22.16b - aesmc v1.16b,v1.16b - eor v3.16b,v3.16b,v7.16b - aese v0.16b,v23.16b - aese v1.16b,v23.16b + aese v0.16b,v16.16b + aesmc v0.16b,v0.16b + aese v1.16b,v16.16b + aesmc v1.16b,v1.16b + aese v0.16b,v17.16b + aesmc v0.16b,v0.16b + aese v1.16b,v17.16b + aesmc v1.16b,v1.16b + ld1 {v2.16b},[x0],x12 + aese v0.16b,v20.16b + aesmc v0.16b,v0.16b + aese v1.16b,v20.16b + aesmc v1.16b,v1.16b + ld1 {v3.16b},[x0] + aese v0.16b,v21.16b + aesmc v0.16b,v0.16b + aese v1.16b,v21.16b + aesmc v1.16b,v1.16b + eor v2.16b,v2.16b,v7.16b + aese v0.16b,v22.16b + aesmc v0.16b,v0.16b + aese v1.16b,v22.16b + aesmc v1.16b,v1.16b + eor v3.16b,v3.16b,v7.16b + aese v0.16b,v23.16b + aese v1.16b,v23.16b - cmp x2,#1 - eor v2.16b,v2.16b,v0.16b - eor v3.16b,v3.16b,v1.16b - st1 {v2.16b},[x1],#16 - b.eq .Lctr32_done - st1 {v3.16b},[x1] + cmp x2,#1 + eor v2.16b,v2.16b,v0.16b + eor v3.16b,v3.16b,v1.16b + st1 {v2.16b},[x1],#16 + b.eq .Lctr32_done + st1 {v3.16b},[x1] .Lctr32_done: - ldr x29,[sp],#16 + ldr x29,[sp],#16 ret .size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks #endif Added: projects/openssl111/secure/lib/libcrypto/aarch64/armv8-mont.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/secure/lib/libcrypto/aarch64/armv8-mont.S Sat Sep 22 02:23:03 2018 (r338875) @@ -0,0 +1,1406 @@ +/* $FreeBSD$ */ +/* Do not modify. This file is auto-generated from armv8-mont.pl. */ +.text + +.globl bn_mul_mont +.type bn_mul_mont,%function +.align 5 +bn_mul_mont: + tst x5,#7 + b.eq __bn_sqr8x_mont + tst x5,#3 + b.eq __bn_mul4x_mont +.Lmul_mont: + stp x29,x30,[sp,#-64]! + add x29,sp,#0 + stp x19,x20,[sp,#16] + stp x21,x22,[sp,#32] + stp x23,x24,[sp,#48] + + ldr x9,[x2],#8 // bp[0] + sub x22,sp,x5,lsl#3 + ldp x7,x8,[x1],#16 // ap[0..1] + lsl x5,x5,#3 + ldr x4,[x4] // *n0 + and x22,x22,#-16 // ABI says so + ldp x13,x14,[x3],#16 // np[0..1] + + mul x6,x7,x9 // ap[0]*bp[0] + sub x21,x5,#16 // j=num-2 + umulh x7,x7,x9 + mul x10,x8,x9 // ap[1]*bp[0] + umulh x11,x8,x9 + + mul x15,x6,x4 // "tp[0]"*n0 + mov sp,x22 // alloca + + // (*) mul x12,x13,x15 // np[0]*m1 + umulh x13,x13,x15 + mul x16,x14,x15 // np[1]*m1 + // (*) adds x12,x12,x6 // discarded + // (*) As for removal of first multiplication and addition + // instructions. The outcome of first addition is + // guaranteed to be zero, which leaves two computationally + // significant outcomes: it either carries or not. Then + // question is when does it carry? Is there alternative + // way to deduce it? If you follow operations, you can + // observe that condition for carry is quite simple: + // x6 being non-zero. So that carry can be calculated + // by adding -1 to x6. That's what next instruction does. + subs xzr,x6,#1 // (*) + umulh x17,x14,x15 + adc x13,x13,xzr + cbz x21,.L1st_skip + +.L1st: + ldr x8,[x1],#8 + adds x6,x10,x7 + sub x21,x21,#8 // j-- + adc x7,x11,xzr + + ldr x14,[x3],#8 + adds x12,x16,x13 + mul x10,x8,x9 // ap[j]*bp[0] + adc x13,x17,xzr + umulh x11,x8,x9 + + adds x12,x12,x6 + mul x16,x14,x15 // np[j]*m1 + adc x13,x13,xzr + umulh x17,x14,x15 + str x12,[x22],#8 // tp[j-1] + cbnz x21,.L1st + +.L1st_skip: + adds x6,x10,x7 + sub x1,x1,x5 // rewind x1 + adc x7,x11,xzr + + adds x12,x16,x13 + sub x3,x3,x5 // rewind x3 + adc x13,x17,xzr + + adds x12,x12,x6 + sub x20,x5,#8 // i=num-1 + adcs x13,x13,x7 + + adc x19,xzr,xzr // upmost overflow bit + stp x12,x13,[x22] + +.Louter: + ldr x9,[x2],#8 // bp[i] + ldp x7,x8,[x1],#16 + ldr x23,[sp] // tp[0] + add x22,sp,#8 + + mul x6,x7,x9 // ap[0]*bp[i] + sub x21,x5,#16 // j=num-2 + umulh x7,x7,x9 + ldp x13,x14,[x3],#16 + mul x10,x8,x9 // ap[1]*bp[i] + adds x6,x6,x23 + umulh x11,x8,x9 + adc x7,x7,xzr + + mul x15,x6,x4 + sub x20,x20,#8 // i-- + + // (*) mul x12,x13,x15 // np[0]*m1 + umulh x13,x13,x15 + mul x16,x14,x15 // np[1]*m1 + // (*) adds x12,x12,x6 + subs xzr,x6,#1 // (*) + umulh x17,x14,x15 + cbz x21,.Linner_skip + +.Linner: + ldr x8,[x1],#8 + adc x13,x13,xzr + ldr x23,[x22],#8 // tp[j] + adds x6,x10,x7 + sub x21,x21,#8 // j-- + adc x7,x11,xzr + + adds x12,x16,x13 + ldr x14,[x3],#8 + adc x13,x17,xzr + + mul x10,x8,x9 // ap[j]*bp[i] + adds x6,x6,x23 + umulh x11,x8,x9 + adc x7,x7,xzr + + mul x16,x14,x15 // np[j]*m1 + adds x12,x12,x6 + umulh x17,x14,x15 + str x12,[x22,#-16] // tp[j-1] + cbnz x21,.Linner + +.Linner_skip: + ldr x23,[x22],#8 // tp[j] + adc x13,x13,xzr + adds x6,x10,x7 + sub x1,x1,x5 // rewind x1 + adc x7,x11,xzr + + adds x12,x16,x13 + sub x3,x3,x5 // rewind x3 + adcs x13,x17,x19 + adc x19,xzr,xzr + + adds x6,x6,x23 + adc x7,x7,xzr + + adds x12,x12,x6 + adcs x13,x13,x7 + adc x19,x19,xzr // upmost overflow bit + stp x12,x13,[x22,#-16] + + cbnz x20,.Louter + + // Final step. We see if result is larger than modulus, and + // if it is, subtract the modulus. But comparison implies + // subtraction. So we subtract modulus, see if it borrowed, + // and conditionally copy original value. + ldr x23,[sp] // tp[0] + add x22,sp,#8 + ldr x14,[x3],#8 // np[0] + subs x21,x5,#8 // j=num-1 and clear borrow + mov x1,x0 +.Lsub: + sbcs x8,x23,x14 // tp[j]-np[j] + ldr x23,[x22],#8 + sub x21,x21,#8 // j-- + ldr x14,[x3],#8 + str x8,[x1],#8 // rp[j]=tp[j]-np[j] + cbnz x21,.Lsub + + sbcs x8,x23,x14 + sbcs x19,x19,xzr // did it borrow? + str x8,[x1],#8 // rp[num-1] + + ldr x23,[sp] // tp[0] + add x22,sp,#8 + ldr x8,[x0],#8 // rp[0] + sub x5,x5,#8 // num-- + nop +.Lcond_copy: + sub x5,x5,#8 // num-- + csel x14,x23,x8,lo // did it borrow? + ldr x23,[x22],#8 + ldr x8,[x0],#8 + str xzr,[x22,#-16] // wipe tp + str x14,[x0,#-16] + cbnz x5,.Lcond_copy + + csel x14,x23,x8,lo + str xzr,[x22,#-8] // wipe tp + str x14,[x0,#-8] + + ldp x19,x20,[x29,#16] + mov sp,x29 + ldp x21,x22,[x29,#32] + mov x0,#1 + ldp x23,x24,[x29,#48] + ldr x29,[sp],#64 + ret +.size bn_mul_mont,.-bn_mul_mont +.type __bn_sqr8x_mont,%function +.align 5 +__bn_sqr8x_mont: + cmp x1,x2 + b.ne __bn_mul4x_mont +.Lsqr8x_mont: + stp x29,x30,[sp,#-128]! + add x29,sp,#0 + stp x19,x20,[sp,#16] + stp x21,x22,[sp,#32] + stp x23,x24,[sp,#48] + stp x25,x26,[sp,#64] + stp x27,x28,[sp,#80] + stp x0,x3,[sp,#96] // offload rp and np + + ldp x6,x7,[x1,#8*0] + ldp x8,x9,[x1,#8*2] + ldp x10,x11,[x1,#8*4] + ldp x12,x13,[x1,#8*6] + + sub x2,sp,x5,lsl#4 + lsl x5,x5,#3 + ldr x4,[x4] // *n0 + mov sp,x2 // alloca + sub x27,x5,#8*8 + b .Lsqr8x_zero_start + +.Lsqr8x_zero: + sub x27,x27,#8*8 + stp xzr,xzr,[x2,#8*0] + stp xzr,xzr,[x2,#8*2] + stp xzr,xzr,[x2,#8*4] + stp xzr,xzr,[x2,#8*6] +.Lsqr8x_zero_start: + stp xzr,xzr,[x2,#8*8] + stp xzr,xzr,[x2,#8*10] + stp xzr,xzr,[x2,#8*12] + stp xzr,xzr,[x2,#8*14] + add x2,x2,#8*16 + cbnz x27,.Lsqr8x_zero + + add x3,x1,x5 + add x1,x1,#8*8 + mov x19,xzr + mov x20,xzr + mov x21,xzr + mov x22,xzr + mov x23,xzr + mov x24,xzr + mov x25,xzr + mov x26,xzr + mov x2,sp + str x4,[x29,#112] // offload n0 + + // Multiply everything but a[i]*a[i] +.align 4 +.Lsqr8x_outer_loop: + // a[1]a[0] (i) + // a[2]a[0] + // a[3]a[0] + // a[4]a[0] + // a[5]a[0] + // a[6]a[0] + // a[7]a[0] + // a[2]a[1] (ii) + // a[3]a[1] + // a[4]a[1] + // a[5]a[1] + // a[6]a[1] + // a[7]a[1] + // a[3]a[2] (iii) + // a[4]a[2] + // a[5]a[2] + // a[6]a[2] + // a[7]a[2] + // a[4]a[3] (iv) + // a[5]a[3] + // a[6]a[3] + // a[7]a[3] + // a[5]a[4] (v) + // a[6]a[4] + // a[7]a[4] + // a[6]a[5] (vi) + // a[7]a[5] + // a[7]a[6] (vii) + + mul x14,x7,x6 // lo(a[1..7]*a[0]) (i) + mul x15,x8,x6 + mul x16,x9,x6 + mul x17,x10,x6 + adds x20,x20,x14 // t[1]+lo(a[1]*a[0]) + mul x14,x11,x6 + adcs x21,x21,x15 + mul x15,x12,x6 + adcs x22,x22,x16 + mul x16,x13,x6 + adcs x23,x23,x17 + umulh x17,x7,x6 // hi(a[1..7]*a[0]) + adcs x24,x24,x14 + umulh x14,x8,x6 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Sep 22 02:42:53 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 355CA10AD6BF for ; Sat, 22 Sep 2018 02:42:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD8737C102; Sat, 22 Sep 2018 02:42:52 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D841215D85; Sat, 22 Sep 2018 02:42:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M2gqam072773; Sat, 22 Sep 2018 02:42:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M2gqQR072768; Sat, 22 Sep 2018 02:42:52 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220242.w8M2gqQR072768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 02:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338877 - in projects/openssl111/secure/lib/libcrypto: . arm X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/secure/lib/libcrypto: . arm X-SVN-Commit-Revision: 338877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 02:42:53 -0000 Author: jkim Date: Sat Sep 22 02:42:51 2018 New Revision: 338877 URL: https://svnweb.freebsd.org/changeset/base/338877 Log: Regen assembly files for arm. Added: projects/openssl111/secure/lib/libcrypto/arm/chacha-armv4.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/arm/ecp_nistz256-armv4.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/arm/keccak1600-armv4.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/arm/poly1305-armv4.S (contents, props changed) Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm projects/openssl111/secure/lib/libcrypto/arm/aes-armv4.S projects/openssl111/secure/lib/libcrypto/arm/aesv8-armx.S projects/openssl111/secure/lib/libcrypto/arm/armv4-gf2m.S projects/openssl111/secure/lib/libcrypto/arm/armv4-mont.S projects/openssl111/secure/lib/libcrypto/arm/bsaes-armv7.S projects/openssl111/secure/lib/libcrypto/arm/ghash-armv4.S projects/openssl111/secure/lib/libcrypto/arm/ghashv8-armx.S projects/openssl111/secure/lib/libcrypto/arm/sha1-armv4-large.S projects/openssl111/secure/lib/libcrypto/arm/sha256-armv4.S projects/openssl111/secure/lib/libcrypto/arm/sha512-armv4.S Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.asm Sat Sep 22 02:23:42 2018 (r338876) +++ projects/openssl111/secure/lib/libcrypto/Makefile.asm Sat Sep 22 02:42:51 2018 (r338877) @@ -149,22 +149,34 @@ ${s}.S: ${s}.s .PATH: ${LCRYPTO_SRC}/crypto \ ${LCRYPTO_SRC}/crypto/aes/asm \ ${LCRYPTO_SRC}/crypto/bn/asm \ + ${LCRYPTO_SRC}/crypto/chacha/asm \ + ${LCRYPTO_SRC}/crypto/ec/asm \ ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/poly1305/asm \ ${LCRYPTO_SRC}/crypto/sha/asm PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm # aes -SRCS= aesv8-armx.pl bsaes-armv7.pl +SRCS= aes-armv4.pl aesv8-armx.pl bsaes-armv7.pl # bn SRCS+= armv4-mont.pl armv4-gf2m.pl +# chacha +SRCS+= chacha-armv4.pl + +# ec +SRCS+= ecp_nistz256-armv4.pl + # modes SRCS+= ghash-armv4.pl ghashv8-armx.pl +# poly1305 +SRCS+= poly1305-armv4.pl + # sha -SRCS+= sha1-armv4-large.pl sha256-armv4.pl sha512-armv4.pl +SRCS+= keccak1600-armv4.pl sha1-armv4-large.pl sha256-armv4.pl sha512-armv4.pl ASM= aes-armv4.S ${SRCS:R:S/$/.S/} Modified: projects/openssl111/secure/lib/libcrypto/arm/aes-armv4.S ============================================================================== --- projects/openssl111/secure/lib/libcrypto/arm/aes-armv4.S Sat Sep 22 02:23:42 2018 (r338876) +++ projects/openssl111/secure/lib/libcrypto/arm/aes-armv4.S Sat Sep 22 02:42:51 2018 (r338877) @@ -1,6 +1,13 @@ /* $FreeBSD$ */ /* Do not modify. This file is auto-generated from aes-armv4.pl. */ +@ Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved. +@ +@ Licensed under the OpenSSL license (the "License"). You may not use +@ this file except in compliance with the License. You can obtain a copy +@ in the file LICENSE in the source distribution or at +@ https://www.openssl.org/source/license.html + @ ==================================================================== @ Written by Andy Polyakov for the OpenSSL @ project. The module is, however, dual licensed under OpenSSL and @@ -40,15 +47,12 @@ #endif .text -#if __ARM_ARCH__<7 -.code 32 -#else +#if defined(__thumb2__) && !defined(__APPLE__) .syntax unified -# ifdef __thumb2__ .thumb -# else +#else .code 32 -# endif +#undef __thumb2__ #endif .type AES_Te,%object @@ -159,19 +163,23 @@ AES_Te: @ void AES_encrypt(const unsigned char *in, unsigned char *out, @ const AES_KEY *key) { -.global AES_encrypt -.type AES_encrypt,%function +.globl AES_encrypt +.type AES_encrypt,%function .align 5 AES_encrypt: -#if __ARM_ARCH__<7 +#ifndef __thumb2__ sub r3,pc,#8 @ AES_encrypt #else adr r3,. #endif - stmdb sp!,{r1,r4-r12,lr} + stmdb sp!,{r1,r4-r12,lr} +#if defined(__thumb2__) || defined(__APPLE__) + adr r10,AES_Te +#else + sub r10,r3,#AES_encrypt-AES_Te @ Te +#endif mov r12,r0 @ inp mov r11,r2 - sub r10,r3,#AES_encrypt-AES_Te @ Te #if __ARM_ARCH__<7 ldrb r0,[r12,#3] @ load input data in endian-neutral ldrb r4,[r12,#2] @ manner... @@ -258,20 +266,20 @@ AES_encrypt: strb r3,[r12,#15] #endif #if __ARM_ARCH__>=5 - ldmia sp!,{r4-r12,pc} + ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} #else - ldmia sp!,{r4-r12,lr} + ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet - .word 0xe12fff1e @ interoperable with Thumb ISA:-) +.word 0xe12fff1e @ interoperable with Thumb ISA:-) #endif .size AES_encrypt,.-AES_encrypt -.type _armv4_AES_encrypt,%function +.type _armv4_AES_encrypt,%function .align 2 _armv4_AES_encrypt: str lr,[sp,#-4]! @ push lr - ldmia r11!,{r4-r7} + ldmia r11!,{r4,r5,r6,r7} eor r0,r0,r4 ldr r12,[r11,#240-16] eor r1,r1,r5 @@ -404,24 +412,24 @@ _armv4_AES_encrypt: ldr pc,[sp],#4 @ pop and return .size _armv4_AES_encrypt,.-_armv4_AES_encrypt -.global private_AES_set_encrypt_key -.type private_AES_set_encrypt_key,%function +.globl AES_set_encrypt_key +.type AES_set_encrypt_key,%function .align 5 -private_AES_set_encrypt_key: +AES_set_encrypt_key: _armv4_AES_set_encrypt_key: -#if __ARM_ARCH__<7 +#ifndef __thumb2__ sub r3,pc,#8 @ AES_set_encrypt_key #else adr r3,. #endif teq r0,#0 -#if __ARM_ARCH__>=7 +#ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif moveq r0,#-1 beq .Labrt teq r2,#0 -#if __ARM_ARCH__>=7 +#ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif moveq r0,#-1 @@ -432,19 +440,23 @@ _armv4_AES_set_encrypt_key: teq r1,#192 beq .Lok teq r1,#256 -#if __ARM_ARCH__>=7 +#ifdef __thumb2__ itt ne @ Thumb2 thing, sanity check in ARM #endif movne r0,#-1 bne .Labrt -.Lok: stmdb sp!,{r4-r12,lr} - sub r10,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4 - +.Lok: stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} mov r12,r0 @ inp mov lr,r1 @ bits mov r11,r2 @ key +#if defined(__thumb2__) || defined(__APPLE__) + adr r10,AES_Te+1024 @ Te4 +#else + sub r10,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4 +#endif + #if __ARM_ARCH__<7 ldrb r0,[r12,#3] @ load input data in endian-neutral ldrb r4,[r12,#2] @ manner... @@ -589,7 +601,7 @@ _armv4_AES_set_encrypt_key: str r2,[r11,#-16] subs r12,r12,#1 str r3,[r11,#-12] -#if __ARM_ARCH__>=7 +#ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif subeq r2,r11,#216 @@ -661,7 +673,7 @@ _armv4_AES_set_encrypt_key: str r2,[r11,#-24] subs r12,r12,#1 str r3,[r11,#-20] -#if __ARM_ARCH__>=7 +#ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif subeq r2,r11,#256 @@ -695,21 +707,21 @@ _armv4_AES_set_encrypt_key: .align 2 .Ldone: mov r0,#0 - ldmia sp!,{r4-r12,lr} + ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} .Labrt: #if __ARM_ARCH__>=5 bx lr @ .word 0xe12fff1e #else tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet - .word 0xe12fff1e @ interoperable with Thumb ISA:-) +.word 0xe12fff1e @ interoperable with Thumb ISA:-) #endif -.size private_AES_set_encrypt_key,.-private_AES_set_encrypt_key +.size AES_set_encrypt_key,.-AES_set_encrypt_key -.global private_AES_set_decrypt_key -.type private_AES_set_decrypt_key,%function +.globl AES_set_decrypt_key +.type AES_set_decrypt_key,%function .align 5 -private_AES_set_decrypt_key: +AES_set_decrypt_key: str lr,[sp,#-4]! @ push lr bl _armv4_AES_set_encrypt_key teq r0,#0 @@ -719,20 +731,20 @@ private_AES_set_decrypt_key: mov r0,r2 @ AES_set_encrypt_key preserves r2, mov r1,r2 @ which is AES_KEY *key b _armv4_AES_set_enc2dec_key -.size private_AES_set_decrypt_key,.-private_AES_set_decrypt_key +.size AES_set_decrypt_key,.-AES_set_decrypt_key @ void AES_set_enc2dec_key(const AES_KEY *inp,AES_KEY *out) -.global AES_set_enc2dec_key +.globl AES_set_enc2dec_key .type AES_set_enc2dec_key,%function .align 5 AES_set_enc2dec_key: _armv4_AES_set_enc2dec_key: - stmdb sp!,{r4-r12,lr} + stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} ldr r12,[r0,#240] mov r7,r0 @ input add r8,r0,r12,lsl#4 - mov r11,r1 @ ouput + mov r11,r1 @ output add r10,r1,r12,lsl#4 str r12,[r1,#240] @@ -809,12 +821,12 @@ _armv4_AES_set_enc2dec_key: mov r0,#0 #if __ARM_ARCH__>=5 - ldmia sp!,{r4-r12,pc} + ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} #else - ldmia sp!,{r4-r12,lr} + ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet - .word 0xe12fff1e @ interoperable with Thumb ISA:-) +.word 0xe12fff1e @ interoperable with Thumb ISA:-) #endif .size AES_set_enc2dec_key,.-AES_set_enc2dec_key @@ -922,19 +934,23 @@ AES_Td: @ void AES_decrypt(const unsigned char *in, unsigned char *out, @ const AES_KEY *key) { -.global AES_decrypt -.type AES_decrypt,%function +.globl AES_decrypt +.type AES_decrypt,%function .align 5 AES_decrypt: -#if __ARM_ARCH__<7 +#ifndef __thumb2__ sub r3,pc,#8 @ AES_decrypt #else adr r3,. #endif - stmdb sp!,{r1,r4-r12,lr} + stmdb sp!,{r1,r4-r12,lr} +#if defined(__thumb2__) || defined(__APPLE__) + adr r10,AES_Td +#else + sub r10,r3,#AES_decrypt-AES_Td @ Td +#endif mov r12,r0 @ inp mov r11,r2 - sub r10,r3,#AES_decrypt-AES_Td @ Td #if __ARM_ARCH__<7 ldrb r0,[r12,#3] @ load input data in endian-neutral ldrb r4,[r12,#2] @ manner... @@ -1021,20 +1037,20 @@ AES_decrypt: strb r3,[r12,#15] #endif #if __ARM_ARCH__>=5 - ldmia sp!,{r4-r12,pc} + ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} #else - ldmia sp!,{r4-r12,lr} + ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet - .word 0xe12fff1e @ interoperable with Thumb ISA:-) +.word 0xe12fff1e @ interoperable with Thumb ISA:-) #endif .size AES_decrypt,.-AES_decrypt -.type _armv4_AES_decrypt,%function +.type _armv4_AES_decrypt,%function .align 2 _armv4_AES_decrypt: str lr,[sp,#-4]! @ push lr - ldmia r11!,{r4-r7} + ldmia r11!,{r4,r5,r6,r7} eor r0,r0,r4 ldr r12,[r11,#240-16] eor r1,r1,r5 @@ -1175,5 +1191,6 @@ _armv4_AES_decrypt: sub r10,r10,#1024 ldr pc,[sp],#4 @ pop and return .size _armv4_AES_decrypt,.-_armv4_AES_decrypt -.asciz "AES for ARMv4, CRYPTOGAMS by " +.byte 65,69,83,32,102,111,114,32,65,82,77,118,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 +.align 2 .align 2 Modified: projects/openssl111/secure/lib/libcrypto/arm/aesv8-armx.S ============================================================================== --- projects/openssl111/secure/lib/libcrypto/arm/aesv8-armx.S Sat Sep 22 02:23:42 2018 (r338876) +++ projects/openssl111/secure/lib/libcrypto/arm/aesv8-armx.S Sat Sep 22 02:42:51 2018 (r338877) @@ -4,11 +4,12 @@ #if __ARM_MAX_ARCH__>=7 .text -.arch armv7-a +.arch armv7-a @ don't confuse not-so-latest binutils with argv8 :-) .fpu neon .code 32 +#undef __thumb2__ .align 5 -rcon: +.Lrcon: .long 0x01,0x01,0x01,0x01 .long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d @ rotate-n-splat .long 0x1b,0x1b,0x1b,0x1b @@ -31,7 +32,7 @@ aes_v8_set_encrypt_key: tst r1,#0x3f bne .Lenc_key_abort - adr r3,rcon + adr r3,.Lrcon cmp r1,#192 veor q0,q0,q0 @@ -49,14 +50,14 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q3},d5 vext.8 q9,q0,q3,#12 vst1.32 {q3},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 +.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 subs r1,r1,#1 veor q3,q3,q9 vext.8 q9,q0,q9,#12 veor q3,q3,q9 vext.8 q9,q0,q9,#12 - veor q10,q10,q1 + veor q10,q10,q1 veor q3,q3,q9 vshl.u8 q1,q1,#1 veor q3,q3,q10 @@ -68,13 +69,13 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q3},d5 vext.8 q9,q0,q3,#12 vst1.32 {q3},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 +.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 veor q3,q3,q9 vext.8 q9,q0,q9,#12 veor q3,q3,q9 vext.8 q9,q0,q9,#12 - veor q10,q10,q1 + veor q10,q10,q1 veor q3,q3,q9 vshl.u8 q1,q1,#1 veor q3,q3,q10 @@ -83,13 +84,13 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q3},d5 vext.8 q9,q0,q3,#12 vst1.32 {q3},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 +.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 veor q3,q3,q9 vext.8 q9,q0,q9,#12 veor q3,q3,q9 vext.8 q9,q0,q9,#12 - veor q10,q10,q1 + veor q10,q10,q1 veor q3,q3,q9 veor q3,q3,q10 vst1.32 {q3},[r2] @@ -110,7 +111,7 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q8},d5 vext.8 q9,q0,q3,#12 vst1.32 {d16},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 +.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 subs r1,r1,#1 veor q3,q3,q9 @@ -121,7 +122,7 @@ aes_v8_set_encrypt_key: vdup.32 q9,d7[1] veor q9,q9,q8 - veor q10,q10,q1 + veor q10,q10,q1 vext.8 q8,q0,q8,#12 vshl.u8 q1,q1,#1 veor q8,q8,q9 @@ -146,14 +147,14 @@ aes_v8_set_encrypt_key: vtbl.8 d21,{q8},d5 vext.8 q9,q0,q3,#12 vst1.32 {q8},[r2]! - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 +.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 subs r1,r1,#1 veor q3,q3,q9 vext.8 q9,q0,q9,#12 veor q3,q3,q9 vext.8 q9,q0,q9,#12 - veor q10,q10,q1 + veor q10,q10,q1 veor q3,q3,q9 vshl.u8 q1,q1,#1 veor q3,q3,q10 @@ -162,7 +163,7 @@ aes_v8_set_encrypt_key: vdup.32 q10,d7[1] vext.8 q9,q0,q8,#12 - .byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 +.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 veor q8,q8,q9 vext.8 q9,q0,q9,#12 @@ -179,7 +180,7 @@ aes_v8_set_encrypt_key: .Lenc_key_abort: mov r0,r3 @ return value - + bx lr .size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key @@ -205,15 +206,15 @@ aes_v8_set_decrypt_key: .Loop_imc: vld1.32 {q0},[r2] vld1.32 {q1},[r0] - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 vst1.32 {q0},[r0],r4 vst1.32 {q1},[r2]! cmp r0,r2 bhi .Loop_imc vld1.32 {q0},[r2] - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 vst1.32 {q0},[r0] eor r0,r0,r0 @ return value @@ -231,19 +232,19 @@ aes_v8_encrypt: vld1.32 {q1},[r2]! .Loop_enc: - .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 - .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 +.byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 +.byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 vld1.32 {q0},[r2]! subs r3,r3,#2 - .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 - .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 +.byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 +.byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 vld1.32 {q1},[r2]! bgt .Loop_enc - .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 - .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 +.byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 +.byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 vld1.32 {q0},[r2] - .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 +.byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 veor q2,q2,q0 vst1.8 {q2},[r1] @@ -260,19 +261,19 @@ aes_v8_decrypt: vld1.32 {q1},[r2]! .Loop_dec: - .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 - .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 +.byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 +.byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 vld1.32 {q0},[r2]! subs r3,r3,#2 - .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 - .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 +.byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 +.byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 vld1.32 {q1},[r2]! bgt .Loop_dec - .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 - .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 +.byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 +.byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 vld1.32 {q0},[r2] - .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 +.byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 veor q2,q2,q0 vst1.8 {q2},[r1] @@ -283,9 +284,9 @@ aes_v8_decrypt: .align 5 aes_v8_cbc_encrypt: mov ip,sp - stmdb sp!,{r4-r8,lr} - vstmdb sp!,{d8-d15} @ ABI specification says so - ldmia ip,{r4-r5} @ load remaining args + stmdb sp!,{r4,r5,r6,r7,r8,lr} + vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specification says so + ldmia ip,{r4,r5} @ load remaining args subs r2,r2,#16 mov r8,#16 blo .Lcbc_abort @@ -297,13 +298,13 @@ aes_v8_cbc_encrypt: vld1.8 {q6},[r4] vld1.8 {q0},[r0],r8 - vld1.32 {q8-q9},[r3] @ load key schedule... + vld1.32 {q8,q9},[r3] @ load key schedule... sub r5,r5,#6 add r7,r3,r5,lsl#4 @ pointer to last 7 round keys sub r5,r5,#2 - vld1.32 {q10-q11},[r7]! - vld1.32 {q12-q13},[r7]! - vld1.32 {q14-q15},[r7]! + vld1.32 {q10,q11},[r7]! + vld1.32 {q12,q13},[r7]! + vld1.32 {q14,q15},[r7]! vld1.32 {q7},[r7] add r7,r3,#32 @@ -315,62 +316,62 @@ aes_v8_cbc_encrypt: veor q5,q8,q7 beq .Lcbc_enc128 - vld1.32 {q2-q3},[r7] + vld1.32 {q2,q3},[r7] add r7,r3,#16 add r6,r3,#16*4 add r12,r3,#16*5 - .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 add r14,r3,#16*6 add r3,r3,#16*7 b .Lenter_cbc_enc .align 4 .Loop_cbc_enc: - .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vst1.8 {q6},[r1]! +.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + vst1.8 {q6},[r1]! .Lenter_cbc_enc: - .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - .byte 0x04,0x03,0xb0,0xf3 @ aese q0,q2 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x04,0x03,0xb0,0xf3 @ aese q0,q2 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 vld1.32 {q8},[r6] cmp r5,#4 - .byte 0x06,0x03,0xb0,0xf3 @ aese q0,q3 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x06,0x03,0xb0,0xf3 @ aese q0,q3 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 vld1.32 {q9},[r12] beq .Lcbc_enc192 - .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 vld1.32 {q8},[r14] - .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 vld1.32 {q9},[r3] nop .Lcbc_enc192: - .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - subs r2,r2,#16 - .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - moveq r8,#0 - .byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - .byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.8 {q8},[r0],r8 - .byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - veor q8,q8,q5 - .byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.32 {q9},[r7] @ re-pre-load rndkey[1] - .byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - .byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15 +.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + subs r2,r2,#16 +.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + moveq r8,#0 +.byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + vld1.8 {q8},[r0],r8 +.byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + veor q8,q8,q5 +.byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + vld1.32 {q9},[r7] @ re-pre-load rndkey[1] +.byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15 veor q6,q0,q7 bhs .Loop_cbc_enc @@ -379,36 +380,36 @@ aes_v8_cbc_encrypt: .align 5 .Lcbc_enc128: - vld1.32 {q2-q3},[r7] - .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + vld1.32 {q2,q3},[r7] +.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 b .Lenter_cbc_enc128 .Loop_cbc_enc128: - .byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vst1.8 {q6},[r1]! +.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + vst1.8 {q6},[r1]! .Lenter_cbc_enc128: - .byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - subs r2,r2,#16 - .byte 0x04,0x03,0xb0,0xf3 @ aese q0,q2 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - moveq r8,#0 - .byte 0x06,0x03,0xb0,0xf3 @ aese q0,q3 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - .byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - .byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.8 {q8},[r0],r8 - .byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - .byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - .byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14 - .byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - veor q8,q8,q5 - .byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15 +.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + subs r2,r2,#16 +.byte 0x04,0x03,0xb0,0xf3 @ aese q0,q2 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + moveq r8,#0 +.byte 0x06,0x03,0xb0,0xf3 @ aese q0,q3 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + vld1.8 {q8},[r0],r8 +.byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 +.byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14 +.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 + veor q8,q8,q5 +.byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15 veor q6,q0,q7 bhs .Loop_cbc_enc128 @@ -431,81 +432,81 @@ aes_v8_cbc_encrypt: vorr q11,q10,q10 .Loop3x_cbc_dec: - .byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8 - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 +.byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 vld1.32 {q8},[r7]! subs r6,r6,#2 - .byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9 - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 +.byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 vld1.32 {q9},[r7]! bgt .Loop3x_cbc_dec - .byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8 - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q4,q6,q7 - subs r2,r2,#0x30 - veor q5,q2,q7 - movlo r6,r2 @ r6, r6, is zero at this point - .byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9 - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q9,q3,q7 - add r0,r0,r6 @ r0 is adjusted in such way that +.byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + veor q4,q6,q7 + subs r2,r2,#0x30 + veor q5,q2,q7 + movlo r6,r2 @ r6, r6, is zero at this point +.byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + veor q9,q3,q7 + add r0,r0,r6 @ r0 is adjusted in such way that @ at exit from the loop q1-q10 @ are loaded with last "words" - vorr q6,q11,q11 - mov r7,r3 - .byte 0x68,0x03,0xb0,0xf3 @ aesd q0,q12 - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.8 {q2},[r0]! - .byte 0x6a,0x03,0xb0,0xf3 @ aesd q0,q13 - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.8 {q3},[r0]! - .byte 0x6c,0x03,0xb0,0xf3 @ aesd q0,q14 - .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - .byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.8 {q11},[r0]! - .byte 0x6e,0x03,0xb0,0xf3 @ aesd q0,q15 - .byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15 - .byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15 - vld1.32 {q8},[r7]! @ re-pre-load rndkey[0] - add r6,r5,#2 + vorr q6,q11,q11 + mov r7,r3 +.byte 0x68,0x03,0xb0,0xf3 @ aesd q0,q12 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + vld1.8 {q2},[r0]! +.byte 0x6a,0x03,0xb0,0xf3 @ aesd q0,q13 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + vld1.8 {q3},[r0]! +.byte 0x6c,0x03,0xb0,0xf3 @ aesd q0,q14 +.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 +.byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + vld1.8 {q11},[r0]! +.byte 0x6e,0x03,0xb0,0xf3 @ aesd q0,q15 +.byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15 +.byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15 + vld1.32 {q8},[r7]! @ re-pre-load rndkey[0] + add r6,r5,#2 veor q4,q4,q0 veor q5,q5,q1 veor q10,q10,q9 - vld1.32 {q9},[r7]! @ re-pre-load rndkey[1] + vld1.32 {q9},[r7]! @ re-pre-load rndkey[1] vst1.8 {q4},[r1]! - vorr q0,q2,q2 + vorr q0,q2,q2 vst1.8 {q5},[r1]! - vorr q1,q3,q3 + vorr q1,q3,q3 vst1.8 {q10},[r1]! - vorr q10,q11,q11 + vorr q10,q11,q11 bhs .Loop3x_cbc_dec cmn r2,#0x30 @@ -513,244 +514,244 @@ aes_v8_cbc_encrypt: nop .Lcbc_dec_tail: - .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 +.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 vld1.32 {q8},[r7]! subs r6,r6,#2 - .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 +.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 vld1.32 {q9},[r7]! bgt .Lcbc_dec_tail - .byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - .byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - .byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - cmn r2,#0x20 - .byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q5,q6,q7 - .byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14 - .byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - .byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14 - .byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q9,q3,q7 - .byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15 - .byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15 +.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 +.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 +.byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + cmn r2,#0x20 +.byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + veor q5,q6,q7 +.byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14 +.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 +.byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14 +.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 + veor q9,q3,q7 +.byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15 +.byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15 beq .Lcbc_dec_one veor q5,q5,q1 veor q9,q9,q10 - vorr q6,q11,q11 + vorr q6,q11,q11 vst1.8 {q5},[r1]! vst1.8 {q9},[r1]! b .Lcbc_done .Lcbc_dec_one: veor q5,q5,q10 - vorr q6,q11,q11 + vorr q6,q11,q11 vst1.8 {q5},[r1]! .Lcbc_done: vst1.8 {q6},[r4] .Lcbc_abort: - vldmia sp!,{d8-d15} - ldmia sp!,{r4-r8,pc} + vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} + ldmia sp!,{r4,r5,r6,r7,r8,pc} .size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt .globl aes_v8_ctr32_encrypt_blocks .type aes_v8_ctr32_encrypt_blocks,%function .align 5 aes_v8_ctr32_encrypt_blocks: - mov ip,sp - stmdb sp!,{r4-r10,lr} - vstmdb sp!,{d8-d15} @ ABI specification says so - ldr r4, [ip] @ load remaining arg - ldr r5,[r3,#240] + mov ip,sp + stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,lr} + vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specification says so + ldr r4, [ip] @ load remaining arg + ldr r5,[r3,#240] - ldr r8, [r4, #12] - vld1.32 {q0},[r4] + ldr r8, [r4, #12] + vld1.32 {q0},[r4] - vld1.32 {q8-q9},[r3] @ load key schedule... - sub r5,r5,#4 - mov r12,#16 - cmp r2,#2 - add r7,r3,r5,lsl#4 @ pointer to last 5 round keys *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Sep 22 02:43:25 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A27510AD726 for ; Sat, 22 Sep 2018 02:43:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 408EC7C21B; Sat, 22 Sep 2018 02:43:25 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B9AF15D87; Sat, 22 Sep 2018 02:43:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M2hPEf072844; Sat, 22 Sep 2018 02:43:25 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M2hP94072843; Sat, 22 Sep 2018 02:43:25 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220243.w8M2hP94072843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 02:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338878 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 02:43:25 -0000 Author: jkim Date: Sat Sep 22 02:43:24 2018 New Revision: 338878 URL: https://svnweb.freebsd.org/changeset/base/338878 Log: Connect assembly files for arm to build. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 02:42:51 2018 (r338877) +++ projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 02:43:24 2018 (r338878) @@ -19,10 +19,12 @@ NO_LINT= SRCS= cpt_err.c cryptlib.c ctype.c cversion.c ex_data.c init.c mem.c SRCS+= mem_dbg.c mem_sec.c o_dir.c o_fips.c o_fopen.c o_init.c o_str.c SRCS+= o_time.c threads_pthread.c uid.c -.if defined(ARM_aarch64) +.if defined(ASM_aarch64) SRCS+= arm64cpuid.S armcap.c .elif defined(ASM_amd64) SRCS+= x86_64cpuid.S +.elif defined(ASM_arm) +SRCS+= armv4cpuid.S armcap.c .elif defined(ASM_i386) SRCS+= x86cpuid.S .else @@ -36,6 +38,8 @@ SRCS+= aes_cbc.c aes_core.c aesv8-armx.S vpaes-armv8.S .elif defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S +.elif defined(ASM_arm) +SRCS+= aes-armv4.S aes_cbc.c aesv8-armx.S bsaes-armv7.S .elif defined(ASM_i386) SRCS+= aes-586.S aesni-x86.S vpaes-x86.S .else @@ -89,6 +93,8 @@ SRCS+= armv8-mont.S bn_asm.c .elif defined(ASM_amd64) SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S SRCS+= x86_64-mont.S x86_64-mont5.S +.elif defined(ASM_arm) +SRCS+= armv4-gf2m.S armv4-mont.S bn_asm.c .elif defined(ASM_i386) SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S .else @@ -116,6 +122,8 @@ SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c SRCS+= chacha-armv8.S .elif defined(ASM_amd64) SRCS+= chacha-x86_64.S +.elif defined(ASM_arm) +SRCS+= chacha-armv4.S .elif defined(ASM_i386) SRCS+= chacha-x86.S .else @@ -175,6 +183,8 @@ SRCS+= ecx_meth.c eddsa.c f_generic.c f_impl.c scalar. SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c .elif defined(ASM_amd64) SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S +.elif defined(ASM_arm) +SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c .elif defined(ASM_i386) SRCS+= ecp_nistz256-x86.S ecp_nistz256.c .endif @@ -233,6 +243,8 @@ SRCS+= ofb128.c wrap128.c xts128.c SRCS+= ghashv8-armx.S .elif defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S +.elif defined(ASM_arm) +SRCS+= ghash-armv4.S ghashv8-armx.S .elif defined(ASM_i386) SRCS+= ghash-x86.S .endif @@ -261,6 +273,8 @@ SRCS+= pk7_smime.c pkcs7err.c SRCS+= poly1305.c poly1305_ameth.c poly1305_pmeth.c .if defined(ASM_amd64) SRCS+= poly1305-x86_64.S +.elif defined(ASM_arm) +SRCS+= poly1305-armv4.S .elif defined(ASM_i386) SRCS+= poly1305-x86.S .endif @@ -310,6 +324,8 @@ SRCS+= keccak1600-armv8.S sha1-armv8.S sha256-armv8.S .elif defined(ASM_amd64) SRCS+= keccak1600-x86_64.S sha1-mb-x86_64.S sha1-x86_64.S SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_64.S +.elif defined(ASM_arm) +SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S .elif defined(ASM_i386) SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S .endif From owner-svn-src-projects@freebsd.org Sat Sep 22 03:54:42 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FBA810AFF23 for ; Sat, 22 Sep 2018 03:54:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E775E7F66F; Sat, 22 Sep 2018 03:54:41 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2AD9169E3; Sat, 22 Sep 2018 03:54:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M3sfCm009671; Sat, 22 Sep 2018 03:54:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M3sftb009668; Sat, 22 Sep 2018 03:54:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220354.w8M3sftb009668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 03:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338879 - in projects/openssl111/secure/lib/libcrypto: . aarch64 arm X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in projects/openssl111/secure/lib/libcrypto: . aarch64 arm X-SVN-Commit-Revision: 338879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 03:54:42 -0000 Author: jkim Date: Sat Sep 22 03:54:40 2018 New Revision: 338879 URL: https://svnweb.freebsd.org/changeset/base/338879 Log: Regen cpuid assembly files for aarch64 and arm. Added: projects/openssl111/secure/lib/libcrypto/aarch64/arm64cpuid.S (contents, props changed) projects/openssl111/secure/lib/libcrypto/arm/armv4cpuid.S (contents, props changed) Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm Modified: projects/openssl111/secure/lib/libcrypto/Makefile.asm ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.asm Sat Sep 22 02:43:24 2018 (r338878) +++ projects/openssl111/secure/lib/libcrypto/Makefile.asm Sat Sep 22 03:54:40 2018 (r338879) @@ -19,8 +19,11 @@ PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm +# cpuid +SRCS= arm64cpuid.pl + # aes -SRCS= aesv8-armx.pl vpaes-armv8.pl +SRCS+= aesv8-armx.pl vpaes-armv8.pl # bn SRCS+= armv8-mont.pl @@ -157,8 +160,11 @@ ${s}.S: ${s}.s PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm +# cpuid +SRCS= armv4cpuid.pl + # aes -SRCS= aes-armv4.pl aesv8-armx.pl bsaes-armv7.pl +SRCS+= aes-armv4.pl aesv8-armx.pl bsaes-armv7.pl # bn SRCS+= armv4-mont.pl armv4-gf2m.pl Added: projects/openssl111/secure/lib/libcrypto/aarch64/arm64cpuid.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/secure/lib/libcrypto/aarch64/arm64cpuid.S Sat Sep 22 03:54:40 2018 (r338879) @@ -0,0 +1,124 @@ +/* $FreeBSD$ */ +/* Do not modify. This file is auto-generated from arm64cpuid.pl. */ +#include "arm_arch.h" + +.text +.arch armv8-a+crypto + +.align 5 +.globl _armv7_neon_probe +.type _armv7_neon_probe,%function +_armv7_neon_probe: + orr v15.16b, v15.16b, v15.16b + ret +.size _armv7_neon_probe,.-_armv7_neon_probe + +.globl _armv7_tick +.type _armv7_tick,%function +_armv7_tick: +#ifdef __APPLE__ + mrs x0, CNTPCT_EL0 +#else + mrs x0, CNTVCT_EL0 +#endif + ret +.size _armv7_tick,.-_armv7_tick + +.globl _armv8_aes_probe +.type _armv8_aes_probe,%function +_armv8_aes_probe: + aese v0.16b, v0.16b + ret +.size _armv8_aes_probe,.-_armv8_aes_probe + +.globl _armv8_sha1_probe +.type _armv8_sha1_probe,%function +_armv8_sha1_probe: + sha1h s0, s0 + ret +.size _armv8_sha1_probe,.-_armv8_sha1_probe + +.globl _armv8_sha256_probe +.type _armv8_sha256_probe,%function +_armv8_sha256_probe: + sha256su0 v0.4s, v0.4s + ret +.size _armv8_sha256_probe,.-_armv8_sha256_probe + +.globl _armv8_pmull_probe +.type _armv8_pmull_probe,%function +_armv8_pmull_probe: + pmull v0.1q, v0.1d, v0.1d + ret +.size _armv8_pmull_probe,.-_armv8_pmull_probe + +.globl _armv8_sha512_probe +.type _armv8_sha512_probe,%function +_armv8_sha512_probe: +.long 0xcec08000 // sha512su0 v0.2d,v0.2d + ret +.size _armv8_sha512_probe,.-_armv8_sha512_probe + +.globl OPENSSL_cleanse +.type OPENSSL_cleanse,%function +.align 5 +OPENSSL_cleanse: + cbz x1,.Lret // len==0? + cmp x1,#15 + b.hi .Lot // len>15 + nop +.Little: + strb wzr,[x0],#1 // store byte-by-byte + subs x1,x1,#1 + b.ne .Little +.Lret: ret + +.align 4 +.Lot: tst x0,#7 + b.eq .Laligned // inp is aligned + strb wzr,[x0],#1 // store byte-by-byte + sub x1,x1,#1 + b .Lot + +.align 4 +.Laligned: + str xzr,[x0],#8 // store word-by-word + sub x1,x1,#8 + tst x1,#-8 + b.ne .Laligned // len>=8 + cbnz x1,.Little // len!=0? + ret +.size OPENSSL_cleanse,.-OPENSSL_cleanse + +.globl CRYPTO_memcmp +.type CRYPTO_memcmp,%function +.align 4 +CRYPTO_memcmp: + eor w3,w3,w3 + cbz x2,.Lno_data // len==0? + cmp x2,#16 + b.ne .Loop_cmp + ldp x8,x9,[x0] + ldp x10,x11,[x1] + eor x8,x8,x10 + eor x9,x9,x11 + orr x8,x8,x9 + mov x0,#1 + cmp x8,#0 + csel x0,xzr,x0,eq + ret + +.align 4 +.Loop_cmp: + ldrb w4,[x0],#1 + ldrb w5,[x1],#1 + eor w4,w4,w5 + orr w3,w3,w4 + subs x2,x2,#1 + b.ne .Loop_cmp + +.Lno_data: + neg w0,w3 + lsr w0,w0,#31 + ret +.size CRYPTO_memcmp,.-CRYPTO_memcmp Added: projects/openssl111/secure/lib/libcrypto/arm/armv4cpuid.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/openssl111/secure/lib/libcrypto/arm/armv4cpuid.S Sat Sep 22 03:54:40 2018 (r338879) @@ -0,0 +1,273 @@ +/* $FreeBSD$ */ +/* Do not modify. This file is auto-generated from armv4cpuid.pl. */ +#include "arm_arch.h" + +.text +#if defined(__thumb2__) && !defined(__APPLE__) +.syntax unified +.thumb +#else +.code 32 +#undef __thumb2__ +#endif + +.align 5 +.globl OPENSSL_atomic_add +.type OPENSSL_atomic_add,%function +OPENSSL_atomic_add: +#if __ARM_ARCH__>=6 +.Ladd: ldrex r2,[r0] + add r3,r2,r1 + strex r2,r3,[r0] + cmp r2,#0 + bne .Ladd + mov r0,r3 + bx lr +#else + stmdb sp!,{r4,r5,r6,lr} + ldr r2,.Lspinlock + adr r3,.Lspinlock + mov r4,r0 + mov r5,r1 + add r6,r3,r2 @ &spinlock + b .+8 +.Lspin: bl sched_yield + mov r0,#-1 + swp r0,r0,[r6] + cmp r0,#0 + bne .Lspin + + ldr r2,[r4] + add r2,r2,r5 + str r2,[r4] + str r0,[r6] @ release spinlock + ldmia sp!,{r4,r5,r6,lr} + tst lr,#1 + moveq pc,lr +.word 0xe12fff1e @ bx lr +#endif +.size OPENSSL_atomic_add,.-OPENSSL_atomic_add + +.globl OPENSSL_cleanse +.type OPENSSL_cleanse,%function +OPENSSL_cleanse: + eor ip,ip,ip + cmp r1,#7 +#ifdef __thumb2__ + itt hs +#endif + subhs r1,r1,#4 + bhs .Lot + cmp r1,#0 + beq .Lcleanse_done +.Little: + strb ip,[r0],#1 + subs r1,r1,#1 + bhi .Little + b .Lcleanse_done + +.Lot: tst r0,#3 + beq .Laligned + strb ip,[r0],#1 + sub r1,r1,#1 + b .Lot +.Laligned: + str ip,[r0],#4 + subs r1,r1,#4 + bhs .Laligned + adds r1,r1,#4 + bne .Little +.Lcleanse_done: +#if __ARM_ARCH__>=5 + bx lr +#else + tst lr,#1 + moveq pc,lr +.word 0xe12fff1e @ bx lr +#endif +.size OPENSSL_cleanse,.-OPENSSL_cleanse + +.globl CRYPTO_memcmp +.type CRYPTO_memcmp,%function +.align 4 +CRYPTO_memcmp: + eor ip,ip,ip + cmp r2,#0 + beq .Lno_data + stmdb sp!,{r4,r5} + +.Loop_cmp: + ldrb r4,[r0],#1 + ldrb r5,[r1],#1 + eor r4,r4,r5 + orr ip,ip,r4 + subs r2,r2,#1 + bne .Loop_cmp + + ldmia sp!,{r4,r5} +.Lno_data: + rsb r0,ip,#0 + mov r0,r0,lsr#31 +#if __ARM_ARCH__>=5 + bx lr +#else + tst lr,#1 + moveq pc,lr +.word 0xe12fff1e @ bx lr +#endif +.size CRYPTO_memcmp,.-CRYPTO_memcmp + +#if __ARM_MAX_ARCH__>=7 +.arch armv7-a +.fpu neon + +.align 5 +.globl _armv7_neon_probe +.type _armv7_neon_probe,%function +_armv7_neon_probe: + vorr q0,q0,q0 + bx lr +.size _armv7_neon_probe,.-_armv7_neon_probe + +.globl _armv7_tick +.type _armv7_tick,%function +_armv7_tick: +#ifdef __APPLE__ + mrrc p15,0,r0,r1,c14 @ CNTPCT +#else + mrrc p15,1,r0,r1,c14 @ CNTVCT +#endif + bx lr +.size _armv7_tick,.-_armv7_tick + +.globl _armv8_aes_probe +.type _armv8_aes_probe,%function +_armv8_aes_probe: +#if defined(__thumb2__) && !defined(__APPLE__) +.byte 0xb0,0xff,0x00,0x03 @ aese.8 q0,q0 +#else +.byte 0x00,0x03,0xb0,0xf3 @ aese.8 q0,q0 +#endif + bx lr +.size _armv8_aes_probe,.-_armv8_aes_probe + +.globl _armv8_sha1_probe +.type _armv8_sha1_probe,%function +_armv8_sha1_probe: +#if defined(__thumb2__) && !defined(__APPLE__) +.byte 0x00,0xef,0x40,0x0c @ sha1c.32 q0,q0,q0 +#else +.byte 0x40,0x0c,0x00,0xf2 @ sha1c.32 q0,q0,q0 +#endif + bx lr +.size _armv8_sha1_probe,.-_armv8_sha1_probe + +.globl _armv8_sha256_probe +.type _armv8_sha256_probe,%function +_armv8_sha256_probe: +#if defined(__thumb2__) && !defined(__APPLE__) +.byte 0x00,0xff,0x40,0x0c @ sha256h.32 q0,q0,q0 +#else +.byte 0x40,0x0c,0x00,0xf3 @ sha256h.32 q0,q0,q0 +#endif + bx lr +.size _armv8_sha256_probe,.-_armv8_sha256_probe +.globl _armv8_pmull_probe +.type _armv8_pmull_probe,%function +_armv8_pmull_probe: +#if defined(__thumb2__) && !defined(__APPLE__) +.byte 0xa0,0xef,0x00,0x0e @ vmull.p64 q0,d0,d0 +#else +.byte 0x00,0x0e,0xa0,0xf2 @ vmull.p64 q0,d0,d0 +#endif + bx lr +.size _armv8_pmull_probe,.-_armv8_pmull_probe +#endif + +.globl OPENSSL_wipe_cpu +.type OPENSSL_wipe_cpu,%function +OPENSSL_wipe_cpu: +#if __ARM_MAX_ARCH__>=7 + ldr r0,.LOPENSSL_armcap + adr r1,.LOPENSSL_armcap + ldr r0,[r1,r0] +#ifdef __APPLE__ + ldr r0,[r0] +#endif +#endif + eor r2,r2,r2 + eor r3,r3,r3 + eor ip,ip,ip +#if __ARM_MAX_ARCH__>=7 + tst r0,#1 + beq .Lwipe_done + veor q0, q0, q0 + veor q1, q1, q1 + veor q2, q2, q2 + veor q3, q3, q3 + veor q8, q8, q8 + veor q9, q9, q9 + veor q10, q10, q10 + veor q11, q11, q11 + veor q12, q12, q12 + veor q13, q13, q13 + veor q14, q14, q14 + veor q15, q15, q15 +.Lwipe_done: +#endif + mov r0,sp +#if __ARM_ARCH__>=5 + bx lr +#else + tst lr,#1 + moveq pc,lr +.word 0xe12fff1e @ bx lr +#endif +.size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu + +.globl OPENSSL_instrument_bus +.type OPENSSL_instrument_bus,%function +OPENSSL_instrument_bus: + eor r0,r0,r0 +#if __ARM_ARCH__>=5 + bx lr +#else + tst lr,#1 + moveq pc,lr +.word 0xe12fff1e @ bx lr +#endif +.size OPENSSL_instrument_bus,.-OPENSSL_instrument_bus + +.globl OPENSSL_instrument_bus2 +.type OPENSSL_instrument_bus2,%function +OPENSSL_instrument_bus2: + eor r0,r0,r0 +#if __ARM_ARCH__>=5 + bx lr +#else + tst lr,#1 + moveq pc,lr +.word 0xe12fff1e @ bx lr +#endif +.size OPENSSL_instrument_bus2,.-OPENSSL_instrument_bus2 + +.align 5 +#if __ARM_MAX_ARCH__>=7 +.LOPENSSL_armcap: +.word OPENSSL_armcap_P-. +#endif +#if __ARM_ARCH__>=6 +.align 5 +#else +.Lspinlock: +.word atomic_add_spinlock-.Lspinlock +.align 5 + +.data +.align 2 +atomic_add_spinlock: +.word 0 +#endif + +.comm OPENSSL_armcap_P,4,4 +.hidden OPENSSL_armcap_P From owner-svn-src-projects@freebsd.org Sat Sep 22 04:32:45 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B598010B0C22 for ; Sat, 22 Sep 2018 04:32:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6317A80D96; Sat, 22 Sep 2018 04:32:45 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5BF2D170D4; Sat, 22 Sep 2018 04:32:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M4WjY6030583; Sat, 22 Sep 2018 04:32:45 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M4Wjbc030582; Sat, 22 Sep 2018 04:32:45 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220432.w8M4Wjbc030582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 04:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338880 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 04:32:45 -0000 Author: jkim Date: Sat Sep 22 04:32:44 2018 New Revision: 338880 URL: https://svnweb.freebsd.org/changeset/base/338880 Log: Add another include directory for aarch64 and arm. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 03:54:40 2018 (r338879) +++ projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 04:32:44 2018 (r338880) @@ -408,6 +408,7 @@ INCSDIR= ${INCLUDEDIR}/openssl LIBADD= pthread +CFLAGS+= -I${LCRYPTO_SRC}/crypto CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448 CFLAGS+= -I${LCRYPTO_SRC}/crypto/ec/curve448/arch_32 CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes From owner-svn-src-projects@freebsd.org Sat Sep 22 05:16:07 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C82E10B1A76 for ; Sat, 22 Sep 2018 05:16:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D82C181F2C; Sat, 22 Sep 2018 05:16:06 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD95B17767; Sat, 22 Sep 2018 05:16:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M5G6Lv051258; Sat, 22 Sep 2018 05:16:06 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M5G66l051257; Sat, 22 Sep 2018 05:16:06 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220516.w8M5G66l051257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 05:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338881 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 05:16:07 -0000 Author: jkim Date: Sat Sep 22 05:16:06 2018 New Revision: 338881 URL: https://svnweb.freebsd.org/changeset/base/338881 Log: Add CFLAGS for aarch64/arm assembly files. Modified: projects/openssl111/secure/lib/libcrypto/Makefile.inc Modified: projects/openssl111/secure/lib/libcrypto/Makefile.inc ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.inc Sat Sep 22 04:32:44 2018 (r338880) +++ projects/openssl111/secure/lib/libcrypto/Makefile.inc Sat Sep 22 05:16:06 2018 (r338881) @@ -36,11 +36,16 @@ ASM_${MACHINE_CPUARCH}= .if defined(ASM_${MACHINE_CPUARCH}) CFLAGS+= -DOPENSSL_CPUID_OBJ .if defined(ASM_aarch64) +CFLAGS+= -OPENSSL_BN_ASM_MONT CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DVPAES_ASM +CFLAGS+= -DECP_NISTZ256_ASM +CFLAGS+= -DPOLY1305_ASM .elif defined(ASM_amd64) CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 \ - -DOPENSSL_BN_ASM_GF2m +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 +CFLAGS+= -DOPENSSL_BN_ASM_GF2m CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM CFLAGS+= -DKECCAK1600_ASM CFLAGS+= -DRC4_ASM @@ -49,6 +54,14 @@ CFLAGS+= -DAES_ASM -DVPAES_ASM -DBSAES_ASM CFLAGS+= -DGHASH_ASM CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM CFLAGS+= -DPADLOCK_ASM +CFLAGS+= -DPOLY1305_ASM +.elif defined(ASM_arm) +CFLAGS+= -OPENSSL_BN_ASM_MONT -OPENSSL_BN_ASM_GF2m +CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +CFLAGS+= -DKECCAK1600_ASM +CFLAGS+= -DAES_ASM -DBSAES_ASM +CFLAGS+= -DGHASH_ASM +CFLAGS+= -DECP_NISTZ256_ASM CFLAGS+= -DPOLY1305_ASM .elif defined(ASM_i386) CFLAGS+= -DOPENSSL_IA32_SSE2 From owner-svn-src-projects@freebsd.org Sat Sep 22 05:30:56 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFDBE10B1DF0 for ; Sat, 22 Sep 2018 05:30:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76EB682437; Sat, 22 Sep 2018 05:30:56 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71F5217A1A; Sat, 22 Sep 2018 05:30:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M5UuHc061183; Sat, 22 Sep 2018 05:30:56 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M5UurA061182; Sat, 22 Sep 2018 05:30:56 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220530.w8M5UurA061182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 05:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338882 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 05:30:56 -0000 Author: jkim Date: Sat Sep 22 05:30:55 2018 New Revision: 338882 URL: https://svnweb.freebsd.org/changeset/base/338882 Log: Add a missing source file for SHA. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 05:16:06 2018 (r338881) +++ projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 05:30:55 2018 (r338882) @@ -328,6 +328,8 @@ SRCS+= sha256-mb-x86_64.S sha256-x86_64.S sha512-x86_6 SRCS+= keccak1600-armv4.S sha1-armv4-large.S sha256-armv4.S sha512-armv4.S .elif defined(ASM_i386) SRCS+= keccak1600.c sha1-586.S sha256-586.S sha512-586.S +.else +SRCS+= keccak1600.c .endif # siphash From owner-svn-src-projects@freebsd.org Sat Sep 22 05:59:44 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C89D10B2564 for ; Sat, 22 Sep 2018 05:59:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 023D983119; Sat, 22 Sep 2018 05:59:44 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED48E17DFD; Sat, 22 Sep 2018 05:59:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M5xh9O072940; Sat, 22 Sep 2018 05:59:43 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M5xhkL072939; Sat, 22 Sep 2018 05:59:43 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220559.w8M5xhkL072939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 05:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338883 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 05:59:44 -0000 Author: jkim Date: Sat Sep 22 05:59:43 2018 New Revision: 338883 URL: https://svnweb.freebsd.org/changeset/base/338883 Log: Fix typos in the previous commit. Modified: projects/openssl111/secure/lib/libcrypto/Makefile.inc Modified: projects/openssl111/secure/lib/libcrypto/Makefile.inc ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile.inc Sat Sep 22 05:30:55 2018 (r338882) +++ projects/openssl111/secure/lib/libcrypto/Makefile.inc Sat Sep 22 05:59:43 2018 (r338883) @@ -36,7 +36,7 @@ ASM_${MACHINE_CPUARCH}= .if defined(ASM_${MACHINE_CPUARCH}) CFLAGS+= -DOPENSSL_CPUID_OBJ .if defined(ASM_aarch64) -CFLAGS+= -OPENSSL_BN_ASM_MONT +CFLAGS+= -DOPENSSL_BN_ASM_MONT CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM CFLAGS+= -DKECCAK1600_ASM CFLAGS+= -DVPAES_ASM @@ -56,7 +56,7 @@ CFLAGS+= -DECP_NISTZ256_ASM -DX25519_ASM CFLAGS+= -DPADLOCK_ASM CFLAGS+= -DPOLY1305_ASM .elif defined(ASM_arm) -CFLAGS+= -OPENSSL_BN_ASM_MONT -OPENSSL_BN_ASM_GF2m +CFLAGS+= -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m CFLAGS+= -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM CFLAGS+= -DKECCAK1600_ASM CFLAGS+= -DAES_ASM -DBSAES_ASM From owner-svn-src-projects@freebsd.org Sat Sep 22 06:50:56 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA6A010B37E7 for ; Sat, 22 Sep 2018 06:50:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9103785202; Sat, 22 Sep 2018 06:50:56 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BFC818660; Sat, 22 Sep 2018 06:50:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M6ouGK099361; Sat, 22 Sep 2018 06:50:56 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M6ouaU099360; Sat, 22 Sep 2018 06:50:56 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809220650.w8M6ouaU099360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 06:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338884 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 06:50:57 -0000 Author: jkim Date: Sat Sep 22 06:50:56 2018 New Revision: 338884 URL: https://svnweb.freebsd.org/changeset/base/338884 Log: Add missing ACFLAGS for aarch64. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 05:59:43 2018 (r338883) +++ projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 06:50:56 2018 (r338884) @@ -21,6 +21,7 @@ SRCS+= mem_dbg.c mem_sec.c o_dir.c o_fips.c o_fopen.c SRCS+= o_time.c threads_pthread.c uid.c .if defined(ASM_aarch64) SRCS+= arm64cpuid.S armcap.c +ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto .elif defined(ASM_amd64) SRCS+= x86_64cpuid.S .elif defined(ASM_arm) @@ -35,6 +36,7 @@ SRCS+= mem_clr.c SRCS+= aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c .if defined(ASM_aarch64) SRCS+= aes_cbc.c aes_core.c aesv8-armx.S vpaes-armv8.S +ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto .elif defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S SRCS+= aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S @@ -241,6 +243,7 @@ SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gc SRCS+= ofb128.c wrap128.c xts128.c .if defined(ASM_aarch64) SRCS+= ghashv8-armx.S +ACFLAGS.ghashv8-armx.S= -march=armv8-a+crypto .elif defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S .elif defined(ASM_arm) From owner-svn-src-projects@freebsd.org Sat Sep 22 23:02:46 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B770B10A64FA for ; Sat, 22 Sep 2018 23:02:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D625861DC; Sat, 22 Sep 2018 23:02:46 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 680CB225A3; Sat, 22 Sep 2018 23:02:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8MN2kxZ008767; Sat, 22 Sep 2018 23:02:46 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MN2ktf008766; Sat, 22 Sep 2018 23:02:46 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809222302.w8MN2ktf008766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 22 Sep 2018 23:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338894 - projects/openssl111/secure/lib/libcrypto X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/secure/lib/libcrypto X-SVN-Commit-Revision: 338894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2018 23:02:46 -0000 Author: jkim Date: Sat Sep 22 23:02:45 2018 New Revision: 338894 URL: https://svnweb.freebsd.org/changeset/base/338894 Log: Connect an assembly file for aarch64 to build. Modified: projects/openssl111/secure/lib/libcrypto/Makefile Modified: projects/openssl111/secure/lib/libcrypto/Makefile ============================================================================== --- projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 20:58:43 2018 (r338893) +++ projects/openssl111/secure/lib/libcrypto/Makefile Sat Sep 22 23:02:45 2018 (r338894) @@ -274,7 +274,9 @@ SRCS+= pk7_smime.c pkcs7err.c # poly1305 SRCS+= poly1305.c poly1305_ameth.c poly1305_pmeth.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= poly1305-armv8.S +.elif defined(ASM_amd64) SRCS+= poly1305-x86_64.S .elif defined(ASM_arm) SRCS+= poly1305-armv4.S