It is example code, rather than turnkey retail, with most programmers preferring to hack out, or in, the bits they need.
In addition to the above modules, the following are also required from The Systemics Software Archive :
$ gunzip < Cryptix-1.1.tar.gz | tar -xf -
$ cd Cryptix-1.1
$ chmod 755 Makefile.PL
$ ./Makefile.PL
$ make
$ make test
$ make install
...
You will also need a working browser, configured for Systemics WebFunds. Contact us to get access to WebFunds.
$ cd admin
$ ./test_key
which will appear in the admin/test directory. You
can examine this using PGP.
Because the key generation is a complex process, this command may take a minute or so to complete.
$ ./config 'test/secring.pgp' 'secret'
where the location of the keyring and the passphrase are as printed
by test_key.
This will create a directory keys, containing a copy of the secring.pgp (and maybe pubring.pgp if it is found). Two other directories, info and accounts, will also be created.
Also created are two Perl modules, shop_khid.pm and shop_pass.pm. The former holds all the public details, and is accessed by all programs and the CGI scripts.
The later file, shop_pass.pm, holds only the passphrase, and is only for the backend. It should be kept secure (although the test key with passphrase 'secret' is known to all).
$ ./shop_backend
After displaying the shop ID, the program will attempt to communicate with the Issuer. If all is successful, the program should display
Waiting for requests
and the test of the shop backend is complete.
You can now hit ^C to kill the test shop.
$ cd admin
$ ./config /tmp/secring.pgp passphrase
As above, this will create directories keys,
info, and accounts, and the Perl modules
shop_khid.pm and shop_pass.pm.
$ ./update_examples
This updates the hard-coded HTML files (the YUGO shop)
and copies into the CGI bin directory the necessary
shop_khid.pm module for scripts.
$ nohup ./shop_backend > shop.out &
The progress of this process can be monitored using
$ tail -f shop.out
echo -n "Starting SOX shops:"
perl -e '$>=1079; system "/var/httpd/shops/backends/start";'
Where start is a script that sets up your environment
and does the above nohup command.
To reduce risk, large amounts of funds should be swept regularly from the shop KHID to another KHID. This would be treating the shop backend as merely a shop till, and the second KHID as the back room safe.
The following should be placed in the web servers httpd.conf file (assuming that the Apache http server is being used - other servers will differ):
ScriptAlias /SOX/ /your web home/cgi-bin/SOX/
The web server will need restarting before this change takes effect.
The shop file cgi-bin/SOX should be installed into the cgi-bin directory on the web server. Be sure to check that this file is executable by the web server.
In order to test that this script is installed and working, simply request the /cgi-bin/SOX/anything URL using any browser. If all is well an, error page will be displayed informing the user that their browser is not SOX compatible.
$ export WEB_HOME=my_web_dir
$ cp cgi-bin/shop_khid.pm $WEB_HOME/cgi-bin/shop_khid.pm
$ chmod 555 $WEB_HOME/cgi-bin/shop_khid.pm
where WEB_HOME is set to the location of your WWW directory,
(this is assumed below only for documentation purposes).
There is a simple (optional) index as well:
$ mkdir $WEB_HOME/htdocs
$ cp htdocs/index.html $WEB_HOME/htdocs
$ chmod +r $WEB_HOME/htdocs/index.html
To install the Yugo Shop, do the following:
$ cp cgi-bin/pay-per-view.cgi $WEB_HOME/cgi-bin/pay-per-view.cgi
$ chmod 555 $WEB_HOME/cgi-bin/pay-per-view.cgi
$ cp -R cgi-bin/yugos $WEB_HOME/cgi-bin/yugos
If for some reason the yugos directory must be
located elsewhere, then it will be necessary to modify the
pay-per-view.cgi
script so that the
PICTURE_DIR
variable contains the
yugos
directory.
$ mkdir $WEB_HOME/htdocs
$ cp htdocs/pay-per-view.html $WEB_HOME/htdocs
$ chmod +r $WEB_HOME/htdocs/pay-per-view.html
To test the shop, you will need a WebFunds user (but not the one used above for the shop). Once up and going, and loaded up with some Systemics Playdough, browse to the following URL of the HTML script (in the above, htdocs/pay-per-view.html ).
To install, copy the CGI scripts, and the books.pm file, from the cgi-bin directory to the web servers cgi-bin directory.
$ cp cgi-bin/*book* $CGI_BIN
where CGI_BIN is set to the location of your cgi bin.
Also, you will need the web page:
$ cp -R htdocs/books.html $WEB_HOME/htdocs
$ chmod +r $WEB_HOME/htdocs/books.html
Now browse to the URL of htdocs/books.html assuming the above organisation. When the order is complete, if successful, you will be sent a mail message containing the purchase order.
Failed to create key ring entry (Missing trust packet ())or
Cannot restore from undefined data!indicates that an intermediate version of PGP was installed. Upgrade to PGP V0.09.
Can't locate SOX/ServerInfo.pm in @INC at ./shop_backend line 10. BEGIN failed--compilation aborted at ./shop_backend line 10.means that the perl cannot find the shop libraries. Check the environment settings and the locations where the libraries are expected.
Early versions of WebFunds (about 0.22) silently carried on even if they had the wrong cash, making this difficult to debug.
Use of uninitialized value at /usr/local/lib/perl5/File/Copy.pm line 84.
it appears to be nothing to worry about. An early version of Perl (?) or
Copy (?) is saving a variable that isn't defined for later restoration.