[Skip to Content]
gpgAuth-php : Server Setup

Requirements:
    (These requirements and this PHP implementation is based Linux and Apache, but the PHP code should be basically the same)
    Apache
    PHP
    PHP PECL gnupg package

To install the gnupg package in debian:

apt-get install php5-dev php-pear libgpgme11-dev libgpgme11

Then

pecl install gnupg

Then you must add the following to your php.ini file:

extension=gnupg.so

Once that is finished, you will need to create a GnuPG keystore accessible to your apache user (usually, www-data). (/var/www/.gnupg for example.). This is where the public keys for your users will be stored, and if you use symmetric gpgAuth, your servers private key. If you do not want to provide symmetric gpgAuth, you can skip the key-gen part. The easy way to do this is become the apache user, in my case 'www-data', and then create a key, like so:
su into the root user:

sudo su

then su into the user your web sever runs under (in my case, www-data):

su www-data

Then, as the web server user, create a key with:

gpg --gen-key

Answer the questions, and when it asks for your Real Name, enter the domain name you will be using this key for. This will become your server key, the key that users will encrypt tokens to.

<< 1 : Introduction
INDEX
2.1 : Flat file example >>
 
mod_python  gpgAuth Enabled