daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/bin/bash
  2.  
  3. NSSDB=$HOME/.pki/nssdb
  4. MODUTIL="/usr/bin/modutil -force -dbdir sql:$NSSDB"
  5. CERTUTIL="/usr/bin/certutil -d sql:$NSSDB"
  6. LIBFILE=/usr/local/AWP/lib/libOcsPKCS11Wrapper.so
  7.  
  8. if [ -n "`which apt-get`" ];
  9. then
  10.     sudo apt-get -y install libnss3-tools 2>/dev/null
  11. fi
  12. if [ -n "`which yum`" ];
  13. then
  14.     sudo yum install libnss3-tools 2>/dev/null
  15. fi
  16.        
  17. echo "Adding smartcard support in Google Chrome ..."
  18.  
  19. if [ ! -f $NSSDB/cert9.db ]; then
  20.     echo "Initializing new database"
  21.     sudo -i -u $SUDO_USER mkdir -p $HOME/.pki
  22.     sudo -i -u $SUDO_USER mkdir -p $NSSDB
  23.     sudo -i -u $SUDO_USER $CERTUTIL -N --empty-password
  24. fi
  25.  
  26. if [ -f $LIBFILE ]; then
  27.         sudo -i -u $SUDO_USER $MODUTIL -delete idemia-pkcs11 2>/dev/null
  28.         sudo -i -u $SUDO_USER $MODUTIL -add idemia-pkcs11 -libfile $LIBFILE -mechanisms FRIENDLY 2>/dev/null
  29.     exit
  30. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top