diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2022-05-06 20:23:19 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2022-05-06 20:24:48 +0000 |
commit | 29c7d4a9f83548fee47722fcc60ad33bbdfa9f87 (patch) | |
tree | ad6f35a78492f8e095969ae32b48fe9797b7fd3f /security/xmlsec1 | |
parent | 8583bcdcde4bcbdba6d2ddbbc438c72e3ca9aee8 (diff) | |
download | ports-29c7d4a9f83548fee47722fcc60ad33bbdfa9f87.tar.gz ports-29c7d4a9f83548fee47722fcc60ad33bbdfa9f87.zip |
security/xmlsec1: fix build when using libressl
PR: 263826
Diffstat (limited to 'security/xmlsec1')
-rw-r--r-- | security/xmlsec1/files/patch-src-openssl-app.c | 70 |
1 files changed, 70 insertions, 0 deletions
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); |