Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p11-kit module file not installed #230

Closed
dwmw2 opened this issue Aug 31, 2016 · 12 comments
Closed

p11-kit module file not installed #230

dwmw2 opened this issue Aug 31, 2016 · 12 comments
Milestone

Comments

@dwmw2
Copy link
Contributor

dwmw2 commented Aug 31, 2016

On systems with p11-kit (which should be all modern Linux distributions), PKCS#11 provider modules should be installing a module file which registers the provider with the system and automatically makes it available to well-behaved applications (which includes GnuTLS and the OpenSSL engine_pkcs11, and will soon include NSS too).

Please ensure that running make install installs an appropriate module file into the directory indicated by pkg-config --variable p11_module_configs p11-kit-1

@jariq
Copy link
Contributor

jariq commented Aug 31, 2016

IMO this is packaging related recommendation that needs to be considered by individual package creators. If included in standard build procedure what would be the correct approach with more than one build of SoftHSM? I guess that distribution package would create /etc/pkcs11/modules/softhsm2.conf file and what file would you expect to be created by a local build installed in /usr/local directory?

@pspacek
Copy link

pspacek commented Sep 1, 2016

Maybe I'm missing something, but ... IMHO the build should generate appropriate file for that particular version (with paths used by "configure" script). That way distros can simply use the file (assuming that distro allows to install only 1 version of library at time, which holds e.g. for all Fedora/RHEL/CentOS...).

@dwmw2
Copy link
Contributor Author

dwmw2 commented Sep 1, 2016

@pspacek Yes, that's fairly much how I imagined it would work.

dwmw2 pushed a commit to dwmw2/SoftHSMv2 that referenced this issue Sep 9, 2016
In order for well-behaved applications to discover and use the PKCS#11
provider module, we should install a p11-kit module file for it.
dwmw2 pushed a commit to dwmw2/SoftHSMv2 that referenced this issue Sep 9, 2016
In order for well-behaved applications to discover and use the PKCS#11
provider module, we should install a p11-kit module file for it.
dwmw2 pushed a commit to dwmw2/SoftHSMv2 that referenced this issue Sep 9, 2016
In order for well-behaved applications to discover and use the PKCS#11
provider module, we should install a p11-kit module file for it.
@jariq
Copy link
Contributor

jariq commented Sep 9, 2016

@pspacek I am not sure I understand. Are you saying that if I first build SoftHSM with Botan crypto backend and /usr/local/softhsm-botan/ prefix and right after that I build SoftHSM with OpenSSL crypto backend and /usr/local/softhsm-openssl/ prefix then I should end with a single p11-kit module file pointing to the PKCS#11 library that was installed as the last one (library in /usr/local/softhsm-openssl/ in this case) ?

@dwmw2
Copy link
Contributor Author

dwmw2 commented Sep 10, 2016

Yes. That is typically how things like this work, when they install/register themselves as "plugins" to be found automatically by another piece of software.

@jariq
Copy link
Contributor

jariq commented Sep 10, 2016

So if your patch gets included and generated module file will be adopted by distributions then every local build will mess with the file created by the distribution package?

@dwmw2
Copy link
Contributor Author

dwmw2 commented Sep 10, 2016

Yes. Just like when I have a plugin for something like Pidgin, it installs itself to the correct directory so it gets used. And if I eschew the distribution's provided version of that plugin and rebuild my own for some reason, it installs over the distribution's one.

We can make it optional though, if you prefer.

@jariq
Copy link
Contributor

jariq commented Sep 10, 2016

Great idea. Please make it optional if you can.

dwmw2 pushed a commit to dwmw2/SoftHSMv2 that referenced this issue Sep 10, 2016
In order for well-behaved applications to discover and use the PKCS#11
provider module, we should install a p11-kit module file for it.

Allow this to be disabled by configuring with --disable-p11-kit
@dwmw2
Copy link
Contributor Author

dwmw2 commented Sep 10, 2016

Now with --disable-p11-kit to turn it off. Of course now it's optional perhaps I should look at also making it install the module to the system's configured p11_module_path (e.g. /usr/lib64/pkcs11 on Fedora) and even setting DEFAULT_PKCS11_LIB to be the p11-kit proxy module, so the system's configured PKCS#11 modules are automatically visible? Perhaps later... :)

@bellgrim bellgrim added this to the 2.2.0 milestone Sep 12, 2016
@bellgrim
Copy link
Contributor

Thank you for the patch. Should it also be possible to configure / override the p11_module_path? E.g. if you want to install in another location than the one given by p11-kit.

dwmw2 pushed a commit to dwmw2/SoftHSMv2 that referenced this issue Sep 13, 2016
In order for well-behaved applications to discover and use the PKCS#11
provider module, we should install a p11-kit module file for it.

Allow this to be disabled by configuring with --disable-p11-kit, and do
so in the Jenkins builds since they run as an unprivileged user and
can't install to the standard p11-kit module directory.
bellgrim added a commit that referenced this issue Sep 30, 2016
Issue #230: Install p11-kit module file
bellgrim added a commit to bellgrim/SoftHSMv2 that referenced this issue Sep 30, 2016
bellgrim added a commit to bellgrim/SoftHSMv2 that referenced this issue Sep 30, 2016
bellgrim added a commit to bellgrim/SoftHSMv2 that referenced this issue Sep 30, 2016
bellgrim added a commit to bellgrim/SoftHSMv2 that referenced this issue Sep 30, 2016
bellgrim added a commit that referenced this issue Sep 30, 2016
Issue #230: Move configuration to an M4 script and update documentation
@bellgrim
Copy link
Contributor

Fixed with #233 and #248

@dwmw2
Copy link
Contributor Author

dwmw2 commented Sep 30, 2016

Should it also be possible to configure / override the p11_module_path? E.g. if you want to install in another location than the one given by p11-kit.

There's not a lot of point in installing to a location where p11-kit isn't going to find it :)

I suppose p11-kit will look in $HOME/.config/pkcs11/modules/ too, and perhaps it makes a little bit of sense to put module files there? But that is user configuration, and I'm not sure that make install, even when run as a given user, should be doing that automatically.

Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue Jan 8, 2018
- See also
  opendnssec/SoftHSMv2#230

PR:		212518
Submitted by:	jaap@NLnetLabs.nl (maintainer)
Reported by:	dwmw2@infradead.org
Tested by:	w.schwarzenfeld@utanet.at


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@458409 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Jan 8, 2018
- See also
  opendnssec/SoftHSMv2#230

PR:		212518
Submitted by:	jaap@NLnetLabs.nl (maintainer)
Reported by:	dwmw2@infradead.org
Tested by:	w.schwarzenfeld@utanet.at


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@458409 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Jan 8, 2018
- See also
  opendnssec/SoftHSMv2#230

PR:		212518
Submitted by:	jaap@NLnetLabs.nl (maintainer)
Reported by:	dwmw2@infradead.org
Tested by:	w.schwarzenfeld@utanet.at
swills pushed a commit to swills/freebsd-ports that referenced this issue Jan 19, 2018
- See also
  opendnssec/SoftHSMv2#230

PR:		212518
Submitted by:	jaap@NLnetLabs.nl (maintainer)
Reported by:	dwmw2@infradead.org
Tested by:	w.schwarzenfeld@utanet.at


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@458409 35697150-7ecd-e111-bb59-0022644237b5
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this issue Jan 10, 2024
- See also
  opendnssec/SoftHSMv2#230

PR:		212518
Submitted by:	jaap@NLnetLabs.nl (maintainer)
Reported by:	dwmw2@infradead.org
Tested by:	w.schwarzenfeld@utanet.at
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants