From nobody Fri May 06 20:25:03 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 67B421AC5E72; Fri, 6 May 2022 20:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kw29q2N2zz3NTt; Fri, 6 May 2022 20:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651868703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bxWlMR5WwRKmLvwXQucV4o/2H5UlJqrwKf3ex0QGWs=; b=p9bC8Hm/0ujeePe+WGQ0FkKmcikQfo4FuORl+GmD5pMJRr9QltyS+lZ8y+EYC2BrrMzCj/ +LwE99eOzmM2W2sSxVfH/9FA6x1goYf52y7ag4FbX8Gjs0u+JhrYF/4925o9ZLC9+bBReE id3s/VmqvAAHFZM3+iKKj4Re+TODTfhLo+MYqlmsrK4wW4wCiZbySGQHx6vaWRoyemYTmd ZMR4U2xSdIN3+qabNq8juGy4DVGlHm1LnV4SeuC0iqiwkdnpYyJ5VXo25365zXmpkx+5GX ygLnLjocnbL10akSnAh/Tv7fD80hzwRE12ffSl+TsJccbYLfK3ePPpDx9H0Iqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3325322B8A; Fri, 6 May 2022 20:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 246KP3bR030034; Fri, 6 May 2022 20:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 246KP3Gk030033; Fri, 6 May 2022 20:25:03 GMT (envelope-from git) Date: Fri, 6 May 2022 20:25:03 GMT Message-Id: <202205062025.246KP3Gk030033@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Hiroki Sato Subject: git: 29c7d4a9f835 - main - security/xmlsec1: fix build when using libressl List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hrs X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29c7d4a9f83548fee47722fcc60ad33bbdfa9f87 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651868703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+bxWlMR5WwRKmLvwXQucV4o/2H5UlJqrwKf3ex0QGWs=; b=LzKVgqtiwbbOEDVfUr9H6gHD3xwC6j9aPy6omXJM3EpUzQXR2JSXDtkVfH4H1ZZN3rQ+BT xSa16kz1SD59q74jLIi85d+dlu5d+vOTE57RStkOkwRgFEyyrq5rOo7XoOzdW7VoW+J7Nl OwkE6CFzprA8ZJYOxUDKhYvUL5vL9YpeE15mxlQmZWzE8XYyZjedomVjbP+fW4bsv4Gw4R PIEgJzuQkX79mD0qtXddM9nPeK8aJwZnaydGhi8Hii5hSjz3VZ/0Dl0s8lvAm7KU3yLeHP gr4Qkpb379VcisJDwurbnm/K5VoaslWbD3OBPN4+qc3FMIZdoeADjprS5DEqtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651868703; a=rsa-sha256; cv=none; b=qcR0IYuiPvH8R+PeynV8XetSMOmLHg2aSG1jVq0dKdvPrDIZQ+L9lqm1PNqFrkLL+IkMkT GZqNKfwMxOQVW5TubHu2Fc0LzSdN4hcAaGAF5EQumZ19ZYCp2MpMCqiB6oYxb6gP6LSAET ghTPSErbsiX7QF25Gq7HnIIIFz5cyg2DsZReIr9ooBHsxi9A8lDUtImrFiLJbMvP1COvFy 2h0quJD5LZ1IZPvVRUa7MtFr7hSyCuWdk3SbV4cnknE9pOx50uSi7dlzpidtU80Q7pZVVs qEqVBd5DamD/bIaoYeeBxRLXcUwA+/qnneBovOnY1lf62/ThUTv9XaOQ/ii+Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hrs: URL: https://cgit.FreeBSD.org/ports/commit/?id=29c7d4a9f83548fee47722fcc60ad33bbdfa9f87 commit 29c7d4a9f83548fee47722fcc60ad33bbdfa9f87 Author: Hiroki Sato AuthorDate: 2022-05-06 20:23:19 +0000 Commit: Hiroki Sato CommitDate: 2022-05-06 20:24:48 +0000 security/xmlsec1: fix build when using libressl PR: 263826 --- security/xmlsec1/files/patch-src-openssl-app.c | 70 ++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/security/xmlsec1/files/patch-src-openssl-app.c b/security/xmlsec1/files/patch-src-openssl-app.c new file mode 100644 index 000000000000..c723cad64dad --- /dev/null +++ b/security/xmlsec1/files/patch-src-openssl-app.c @@ -0,0 +1,70 @@ +--- src/openssl/app.c.orig 2022-05-03 23:36:17.000000000 +0900 ++++ src/openssl/app.c 2022-05-07 05:18:46.065103000 +0900 +@@ -43,6 +43,29 @@ + + #include "openssl_compat.h" + ++#if defined(XMLSEC_OPENSSL_API_110) && defined(LIBRESSL_VERSION_NUMBER) ++static UI_METHOD * ++ui_null_create(void) ++{ ++ return (UI_create_method("OpenSSL NULL UI")); ++} ++static void ++ui_null_destroy(UI_METHOD *ui) ++{ ++ UI_destroy_method(ui); ++} ++#else ++static const UI_METHOD * ++ui_null_create(void) ++{ ++ return (UI_null()); ++} ++static void ++ui_null_destroy(const UI_METHOD *ui) ++{ ++} ++#endif ++ + static int xmlSecOpenSSLAppLoadRANDFile (const char *filename); + static int xmlSecOpenSSLAppSaveRANDFile (const char *filename); + static int xmlSecOpenSSLDefaultPasswordCallback (char *buf, +@@ -415,6 +438,11 @@ + EVP_PKEY* pKey = NULL; + int engineInit = 0; + int ret; ++#if defined(XMLSEC_OPENSSL_API_110) && defined(LIBRESSL_VERSION_NUMBER) ++ UI_METHOD *ui_null = ui_null_create(); ++#else ++ const UI_METHOD *ui_null = ui_null_create(); ++#endif + + #ifndef OPENSSL_NO_ENGINE + xmlSecAssert2(engineName != NULL, NULL); +@@ -437,7 +465,7 @@ + } + } + +- if(ENGINE_ctrl_cmd(engine, "SET_USER_INTERFACE", 0, (void *)UI_null(), 0, 1) < 0) { ++ if(ENGINE_ctrl_cmd(engine, "SET_USER_INTERFACE", 0, (void *)ui_null, 0, 1) < 0) { + xmlSecOpenSSLError("ENGINE_ctrl_cmd_string(SET_USER_INTERFACE)", NULL); + goto done; + } +@@ -453,7 +481,7 @@ + + /* load private key */ + pKey = ENGINE_load_private_key(engine, engineKeyId, +- (UI_METHOD *)UI_null(), ++ (UI_METHOD *)ui_null, + NULL); + if(pKey == NULL) { + xmlSecOpenSSLError("ENGINE_load_private_key", NULL); +@@ -484,6 +512,7 @@ + data = NULL; + + done: ++ ui_null_destroy(ui_null); + /* cleanup */ + if(pKey != NULL) { + EVP_PKEY_free(pKey);