| 
   
 
 
  
   
  Home 
      
FrontPage Hosting 
        
mySQL Hosting 
      
Dedicated Servers 
      
Managed Services 
        
Domain Parking 
 | 
    
 
 
 
  
    
Search our FrontPage Support Area 
FrontPage Support Area Site Map 
     
   
 
 
    How to use PGP to send encrypted email
    
      
     
    
    - Purchase the appropriate server version of PGP.
 
      - FTP the "pgp" file in binary mode to your cgi directory.
 
      - Change the permission of "pgp" to 755.
 
      - Create a symbolic link from "pgp" to "pgpe" in the same directory.
 
      - Have the merchant create their private and public PGP key (they will need to have their
        own, local, license of PGP; some programs like Eudora
        Pro come with this license and GUI-based tools to make using PGP locally easy).
 
      - FTP (publish) the merchant's pubring.pkr file in binary mode to the cgi directory.
 
      - Create an ASCII (notepad will do) "pgp.cfg" file containing the line below,
        and FTP this file to the server in ASCII mode to the cgi directory:
 
     
    
      Pubring="FULL PATH TO CGI DIRECTORY/pubring.pkr" 
     
    
      Example: 
      
        Pubring="/u/web/someid/cgi-local/pubring.pkr" 
       
     
    
      - Develop a CGI/ASP script using the following logic:
 
     
    
      #!/usr/bin/perl 
      # Tests the operation of PGP 5.0 from a Perl script 
      $| = 1; 
      print "Content-type: text/plain\n\n"; 
      # This should be changed to your PGP path and desired recipient 
      # recipient tells pgp which key to use for the encryption 
      # Lose the 2>&1 if you don't want to see the PGP messages 
      $pgpcmd = 'u/web/username/pgp_dir/pgpe -r recipient@domain.com -aft 2>&1'; 
       
      # We need a library function 
      use IPC::Open2; 
       
      # Open the PGP program for bi-directional I/O 
      $pid = open2(\*READPGP, \*WRITEPGP, $pgpcmd); 
       
      # Send text to be encrypted to PGP 
      print WRITEPGP "This is a test of PGP 5.0 in a Perl script\n\n"; 
      print WRITEPGP "This is a test of PGP 5.0 in a Perl script\n\n"; 
      print WRITEPGP "This is a test of PGP 5.0 in a Perl script\n\n"; 
      print WRITEPGP "This is a test of PGP 5.0 in a Perl script\n\n"; 
      print WRITEPGP "This is a test of PGP 5.0 in a Perl script\n\n"; 
      print WRITEPGP "This is a test of PGP 5.0 in a Perl script\n\n"; 
       
      # Encrypt the data 
      close(WRITEPGP); 
       
      # Get the encrypted data from PGP 
      @pgptext = <READPGP>; 
      close(READPGP); 
       
      # Return information to user 
      print @pgptext; 
     
    Peter Abraham  |