Skip to content

Installation

bef edited this page Oct 28, 2016 · 3 revisions

Install dependencies

This software depends on the following packages and libraries:

  • GnuPG version 2 (version 1 is not supported)
  • GnuPG's smart card daemon (scdaemon)
  • libassuan to connect to gpg-agent
  • libgcrypt to parse S-expressions returned by scdaemon
  • libgpg-error for proper error strings
  • libssl (openssl or libressl) to extract CN, issuer and serial from X.509 certificate in DER format

Debian/Ubuntu:

apt install gnupg2 scdaemon libassuan-dev libgcrypt11-dev libgpg-error-dev libssl-dev

macOS/OSX/Homebrew:

Assuming GPGTools (MacGPG) is already installed. Otherwise install gnupg2 and gpg-agent packages, too.

brew install libassuan libgcrypt libgpg-error libressl

Compile and install the module

./configure
make
make install

Setup gpg-agent socket

SCD-PKCS#11 tries to find the gpg-agent socket in the following order:

  1. If set, use $GPG_AGENT_INFO
  2. If set, use $GNUPGHOME and add /S.gpg-agent
  3. Use ~/.gnupg/S.gpg-agent

Starting from GnuPG version 2.1 the GPG_AGENT_INFO is no longer used with GnuPG. If your gpg-agent socket is not in any of the places listed above, please set GPG_AGENT_INFO manually, e.g. in /etc/X11/Xsession.d/90gpg-agent:

agent_sock=$(gpgconf --list-dirs | grep ^agent-socket: | cut -d: -f2)
export GPG_AGENT_INFO=${agent_sock}:0:1

Check your path using

gpgconf --list-dirs |grep agent-socket
Clone this wiki locally