Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52486 closed enhancement (fixed)

p11-kit @0.23.2: should build p11-kit-proxy.so library

Reported by: mouse07410 (Mouse) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: lbschenkel (Leonardo Brondani Schenkel)
Port: p11-kit

Description (last modified by larryv (Lawrence Velázquez))

This port does not build p11-kit-proxy.so library, which makes it impossible to use different modules that load different PKCS#11 libraries (such as OpenSC for the generic PKCS#11 support, and YKCS11 specifically for YubiKey tokens).

Attachments (1)

p11-kit.patch (1.4 KB) - added by lbschenkel (Leonardo Brondani Schenkel) 8 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by larryv (Lawrence Velázquez)

Cc: leonardo.schenkel@… added; devans@… removed
Description: modified (diff)
Owner: changed from macports-tickets@… to devans@…
Summary: Does not build p11-kit-proxy.so libraryp11-kit @0.23.2: should build p11-kit-proxy.so library
Type: defectenhancement

comment:2 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Well, it actually does (although it may not be in the desired way): libp11-kit.dylib as built by the port is both the p11-kit library and the PKCS#11 proxy module. It is confusing, though, since it does not match the docs nor how it is built in other platforms.

comment:3 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

I compiled from source and it does not build the separate p11-kit-proxy.so either; I checked the Makefile and the proxy is supposed to be a link to the lib. I verified on Ubuntu and I confirmed that it is a symlink there. I think there's a bug in the upstream Makefile:

install-exec-hook:
        $(LN_S) -f `readlink $(DESTDIR)$(libdir)/libp11-kit.so` $(DESTDIR)$(libdir)/p11-kit-proxy.so

It assumes that the library will end in .so (but on Mac it'll end in .dylib), so the first path resolves to empty and the destination path becomes the source path in the command and the symlink is created in the working directory instead and never gets installed.

Last edited 8 years ago by lbschenkel (Leonardo Brondani Schenkel) (previous) (diff)

comment:4 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

The following patch fixes it, btw:

diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am
--- a/p11-kit/Makefile.am
+++ b/p11-kit/Makefile.am
@@ -87,7 +87,7 @@
 
 # Proxy module is actually same as library, so install a link
 install-exec-hook:
-	$(LN_S) -f `readlink $(DESTDIR)$(libdir)/libp11-kit.so` $(DESTDIR)$(libdir)/p11-kit-proxy.so
+	$(LN_S) -f `readlink $(DESTDIR)$(libdir)/libp11-kit.{so,dylib}` $(DESTDIR)$(libdir)/p11-kit-proxy.so
 	$(MKDIR_P) $(DESTDIR)$(p11_package_config_modules)
 
 endif

Maybe there's a more elegant way (I'm no autotools expert by any means). I have reported this to upstream at https://bugs.freedesktop.org/show_bug.cgi?id=98022

comment:5 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

The fix has been merged in upstream: https://cgit.freedesktop.org/p11-glue/p11-kit/commit/?id=6923e8fb56692b20d24398d4746d2399490acdc1

So I presume that it should be safe to take my patch and apply to the port — or bump the port to that commit because there have been some additional fixes since the last official release.

Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Attachment: p11-kit.patch added

comment:6 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

I have attached a patch for the Portfile that introduces a new revision of the port that now includes the p11-kit-proxy.so symlink.

comment:7 Changed 8 years ago by mouse07410 (Mouse)

Also, maybe related to how p11-kit-proxy.dylib behaves (strange weird complaints that I can't find the source/cause for):

$ p11-kit list-modules
p11-kit-trust: p11-kit-trust.so
    library-description: PKCS#11 Kit Trust Module
    library-manufacturer: PKCS#11 Kit
    library-version: 0.23
    token: Default Trust
        manufacturer: PKCS#11 Kit
        model: p11-kit-trust
        serial-number: 1
        hardware-version: 0.23
        flags:
               write-protected
               token-initialized
    token: System Trust
        manufacturer: PKCS#11 Kit
        model: p11-kit-trust
        serial-number: 1
        hardware-version: 0.23
        flags:
               write-protected
               token-initialized
pkcs11: /Library/OpenSC/lib/opensc-pkcs11.dylib
    library-description: OpenSC smartcard framework
    library-manufacturer: OpenSC Project
    library-version: 0.16
ykcs11: /usr/local/lib/libykcs11.dylib
    library-description: PKCS#11 PIV Library (SP-800-73)
    library-manufacturer: Yubico (www.yubico.com)
    library-version: 1.42
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
p11-kit: couldn't load module info: The specified slot ID is not valid
$ 

comment:8 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

I compiled yubico-piv-tool from source and I'm experiencing the same thing as you are. I'm not sure if it's a problem in libykcs11 because opensc-pkcs11 does not cause issues with p11-kit but on the other hand, when I use pkcs11-tool --module libykcs11 -L I only see a single slot without all those warnings.

I presume to get to the bottom of it we would need to contact both Yubico and p11-kit, but we're getting off-topic now.

comment:9 Changed 8 years ago by mf2k (Frank Schima)

So do you still want your patch committed?

comment:10 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Yes, please!

comment:11 Changed 8 years ago by mf2k (Frank Schima)

Keywords: haspatch maintainer added
Resolution: fixed
Status: newclosed
Version: 2.3.4

comment:12 Changed 8 years ago by mf2k (Frank Schima)

Keywords: maintainer removed

comment:13 Changed 8 years ago by dbevans (David B. Evans)

Build fix committed in r153514, need to use autoreconf after patching p11-kit/Makefile.am.

Note: See TracTickets for help on using tickets.