diff options
Diffstat (limited to 'app-crypt/p11-kit/files')
-rw-r--r-- | app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch | 39 | ||||
-rw-r--r-- | app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch | 22 |
2 files changed, 0 insertions, 61 deletions
diff --git a/app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch b/app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch deleted file mode 100644 index b3b411c33bdc..000000000000 --- a/app-crypt/p11-kit/files/p11-kit-0.25.0-fix-C_GetInterface.patch +++ /dev/null @@ -1,39 +0,0 @@ -https://github.com/p11-glue/p11-kit/commit/d1d4b0ac316a27c739ff91e6c4153f1154e96e5a - -From d1d4b0ac316a27c739ff91e6c4153f1154e96e5a Mon Sep 17 00:00:00 2001 -From: Xi Ruoyao <xry111@xry111.site> -Date: Thu, 27 Jul 2023 12:18:15 +0800 -Subject: [PATCH] Fix probing of C_GetInterface - -`p11_dl_symbol (dl, "C_GetInterface")` uses dlsym() to find -C_GetInterface in the loaded pkcs11 module. For legacy (pre-3.0) pkcs11 -modules, C_GetInterface is not defined in the module. But according to -the documentation of dlsym(): - - The search performed by dlsym() is breadth first through the - dependency tree of these shared objects. - -So if a pkcs11 module links to libp11-kit.so, the C_GetInterface -implementation in libp11-kit.so itself will be found. This -C_GetInterface will return the metadata of p11-kit-proxy.so, causing -"Refuse to load the p11-kit-proxy.so as a registered module". - -To solve the issue, if p11_dl_symbol() returns the C_GetInterface in -libp11-kit.so itself, we should ignore it and continue trying -C_GetFunctionList. ---- a/p11-kit/modules.c -+++ b/p11-kit/modules.c -@@ -383,6 +383,12 @@ dlopen_and_get_function_list (Module *mod, - mod->loaded_module = dl; - - gi = p11_dl_symbol (dl, "C_GetInterface"); -+ -+#ifndef OS_WIN32 -+ if (gi == C_GetInterface) -+ gi = NULL; -+#endif -+ - if (gi) { - /* Get the default standard interface */ - rv = gi ((unsigned char *)"PKCS 11", NULL, &interface, 0); - diff --git a/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch b/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch deleted file mode 100644 index b97a71396e26..000000000000 --- a/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch +++ /dev/null @@ -1,22 +0,0 @@ -https://github.com/p11-glue/p11-kit/commit/cdc4720d29466e717aa694a85a7aee86ebb94172 - -From cdc4720d29466e717aa694a85a7aee86ebb94172 Mon Sep 17 00:00:00 2001 -From: Erdem Meydanli <meydanli@amazon.com> -Date: Thu, 26 Oct 2023 15:18:24 +0000 -Subject: [PATCH] fix: improper comparison - -Compare the return value of the readpassphrase function to NULL. - -Signed-off-by: Erdem Meydanli <meydanli@amazon.com> ---- a/p11-kit/tty.c -+++ b/p11-kit/tty.c -@@ -66,7 +66,7 @@ p11_pin_tty_callback (const char *pin_source, - if (asprintf (&prompt, "%s: ", pin_description) < 0) - return NULL; - -- if (readpassphrase (prompt, buf, sizeof(buf), 0) < 0) -+ if (readpassphrase (prompt, buf, sizeof(buf), 0) == NULL) - goto cleanup; - - pin = p11_kit_pin_new_for_string (buf); - |