home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / httpd / support / auth / pgp-dec.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1995-05-09  |  1019 b   |  41 lines

  1. #!/bin/sh
  2. # This script currently doesn't recover from errors too well.
  3.  
  4. # Set this to the password to your secret key
  5. PGPPASS=mypassword
  6. # Set this to the location of your keyrings and config files
  7. PGPPATH=/X11/robm/httpd/support/auth/pgp-keys
  8. # Set this to your user name, the name on your secret key
  9. PGPUSER=webmaster@hoohoo.ncsa.uiuc.edu
  10. # Set this to the full path to the PGP binary on your system
  11. PGPBIN=/usr/local/bin/pgp
  12.  
  13.  
  14. # You shouldn't need to look at the rest of this mess
  15.  
  16. export PGPPASS
  17. export PGPPATH
  18.  
  19. # Since PGP doesn't seem to have any options for using a specific public key
  20. # file, we'll trick it.
  21.  
  22. mkdir /tmp/pgp.$$
  23.  
  24. cat > /tmp/pgp.$$/request
  25.  
  26. for i in secring.pgp config.txt language.txt randseed.bin; do
  27.     cp $PGPPATH/$i /tmp/pgp.$$
  28. done
  29.  
  30. $PGPBIN -kx $* /tmp/pgp.$$/pubring.pgp $PGPPATH/pubring.pgp > /dev/null 2>&1
  31.  
  32. PGPPATH=/tmp/pgp.$$
  33. export PGPPATH
  34.  
  35. # Make sure PGP doesn't try to make temp files in /
  36. cd /tmp
  37.  
  38. $PGPBIN -f -u $PGPUSER < /tmp/pgp.$$/request 2> /dev/null
  39.  
  40. /bin/rm -rf /tmp/pgp.$$
  41.