Skip to content

Instantly share code, notes, and snippets.

@fovtran
Created June 18, 2013 11:53
Show Gist options
  • Save fovtran/5804750 to your computer and use it in GitHub Desktop.
Save fovtran/5804750 to your computer and use it in GitHub Desktop.
pkcs11 pam login setup
#!/bin/sh
#
wget -c http://www.opensc-project.org/files/pam_pkcs11/pam_pkcs11-0.6.3.tar.gz
wget -c http://curl.haxx.se/download/curl-7.21.7.tar.bz2
wget -c http://www.dit.upm.es/~jantonio/pam-pkcs11/downloads/pkcs11_login-0.5.1.tar.gz
tar xvzf curl-7.21.7.tar.bz2
cd curl-7.21.7
./configure --prefix=/usr --without-ssl \
--disable-ldap --disable-telnet \
--disable-dict --disable-gopher \
--disable-debug \
--enable-nonblocking --enable-thread
make
sudo make install
cd ..
tar xvzf pkcs11_login-0.5.1.tar.gz
cd pkcs11_login-0.5.1
# If you want to enable downloading CRLs try ./configure --with-curl
./configure --prefix=/usr --with-curl
make
sudo make install
cd ..
tar xvzf pam_pkcs11-0.6.3.tar.gz
cd pam_pkcs11-0.6.3
./configure --prefix=/usr
make
sudo make install
cd ..
wget -c http://www.opensc-project.org/files/engine_pkcs11/engine_pkcs11-0.1.8.tar.gz
tar xfvz engine_pkcs11-0.1.8.tar.gz
cd engine_pkcs11-0.1.8
./configure --prefix=/usr/
make
make install
# http://www.opensc-project.org/files/libp11/libp11-0.2.8.tar.gz
# http://www.opensc-project.org/files/openct/openct-0.6.20.tar.gz
# http://www.opensc-project.org/files/opensc-java/opensc-PKCS11-Linux-amd64-0.1.1.zip
# http://www.opensc-project.org/files/opensc-java/opensc-PKCS11-src-0.1.1.zip
# http://www.opensc-project.org/files/pam_p11/pam_p11-0.1.5.tar.gz
# Next, you have to create the needed openssl-hash-links.
make_hash_link.sh <path to the directory with the CA certificates>
make_hash_link.sh <path to the directory with the CRLs>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment