Innovative Logic Corp.   Corporate Philosophy Consulting Services Software Products Our Expert Staff Contact Us
Web Site Creation Intranet Design Multimedia Services Graphic Design Custom Software
----------

Building PGP Under OS/2

With PM Mail 1.9 now available, there is a lot of interest amoung OS/2 users regarding PGP within the United States and Canada. For those of you who are unaware, there are a large number of links on the net which point to PGP resources, 99% of which allow you to download only the international version of PGP. To the best of our knowlege, no one outside of the U.S. has built an OS/2 version and posted it anywhere to be legally used within the U.S.

With that in mind, we are providing some instructions on how to "build your own" version. It's quite simple actually, once you get the right tools.

You need...

  1. Get InfoZip!
  2. EMX 0.9c from ftp://hobbes.nmsu.edu/unix/emx09c/
  3. GNU Make from ftp://hobbes.nmsu.edu/unix/gnumake.zip
  4. PATCH from ftp://hobbes.nmsu.edu/unix/gnupatch.zip
  5. pgp263is.zip from http://www.ifi.uio.no/~staalesc/PGP/download.shtml
  6. rsaref.zip from http://bs.mit.edu:8001/pgp-form.html
    (rsaref.zip is located inside the pgp262s.zip file that you can get from that site.)

Steps...

  1. Save this article in a file, article.txt
  2. Install EMX per it's directions
  3. Put PATCH.EXE and MAKE-OS2.EXE in your path somewhere.
  4. Create a directory to work in. Change to that directory.
    C:\PGP263 will be used as an example
  5. unzip <path>\pgp262s rsaref.zip
  6. unzip rsaref
  7. unzip <path&glt;\pgp263is
  8. patch -p0 -s < article.txt
  9. cd rsaref\install\unix
  10. make-os2
  11. cd C:\PGP263\SRC
  12. make-os2 os2

Now, for your own safety, read the manual! There's a good bit of documentation on how to use PGP there. You will have a PGP version 2.6.3a executable from this process which you can use for your own. You can put the PGP.EXE file where you like, but it needs access to its manuals. It's in the docs. :)

For USA only...

DO NOT MAKE IT AVAILABLE BY FTP. You risk SERIOUS penalties and possibly jail time if you export it. You MUST use the patch as is. Removing the -DUSA violates U.S. patent laws and violates licences, etc.

International...

There is a compiled version of PGP available off the web site listed in #4. If you want to build it yourself, you should patch the PGP make file manually changing the references to CC, LINK and the OS/2 lines.

Have fun!!

-- patch file below --

 
- --- src\makefile.orig	Thu Jan 18 11:42:36 1996
+++ src\makefile	Tue Feb  4 16:27:12 1997
@@ -55,8 +55,8 @@
 # must set byte order for targets "sysv" and "bsd"
 # BYTEORDER= -DHIGHFIRST
 
- -CC      = cc
- -LD      = cc            # Link command
+CC      = gcc
+LD      = link           # Link command
 LDFLAGS = 
 CPP     = $(CC) -E
 DBG     = -O
@@ -97,18 +97,18 @@
 all: $(PROJ)
 
 # For a pure MPILIB version, uncomment the following lines
- -RSALIBS =
- -RSAOBJS = rsaglue1.o
+#RSALIBS =
+#RSAOBJS = rsaglue1.o
 
 # For an RSAREF version, uncomment the following lines
- -#RSADIR = ../rsaref
- -#RSALIBDIR = $(RSADIR)/install/unix
- -#RSAINCDIR = -I$(RSADIR)/source -I$(RSADIR)/test $(USEMPILIB)
- -#RSALIBS = $(RSALIBDIR)/rsaref.a
- -#RSAOBJS = rsaglue2.o
+RSADIR = ../rsaref
+RSALIBDIR = $(RSADIR)/install/unix
+RSAINCDIR = -I$(RSADIR)/source -I$(RSADIR)/test $(USEMPILIB)
+RSALIBS = $(RSALIBDIR)/rsaref.a
+RSAOBJS = rsaglue2.o
 
 # If you want to use MPILIB as a back end to RSAREF, uncomment this line:
- -#USEMPILIB = -DUSEMPILIB
+USEMPILIB = -DUSEMPILIB
 
 # Assembly-language subroutine dependencies
 
@@ -562,7 +562,7 @@
 # Requires emx 0.8h (i.e. gcc 2.5.7 or later) and GNU make 3.71 for OS/2
 os2:
 	$(MAKE) all PROJ=pgp.exe RM=del OBJS_EXT="_80386.o _zmatch.o" \
- -	CC="gcc -Zomf" CFLAGS="$(RSAINCDIR) -O -DOS2 -DASM -DIDEA32" \
+	CC="gcc -Zomf" CFLAGS="$(RSAINCDIR) -O -DOS2 -DUSA -DASM -DIDEA32" \
 	ASM="gcc -Zomf -c" LD="gcc -Zomf -Zsys" LDFLAGS="-s pgp.def"
 
 
- --- rsaref\install\unix\makefile.orig	Sun Sep  4 20:14:14 1994
+++ rsaref\install\unix\makefile	Tue Feb  4 16:21:40 1997
@@ -14,12 +14,12 @@
 #
 
 # extension for object files
- -O = o
+O = obj
 
 # commands
- -CC = gcc
- -RANLIB = ranlib
- -LIB = ar
+CC = gcc 
+RANLIB = 
+LIB = emxomfar
 ASM = masm
 PROTOTYPES = 1
 
@@ -36,7 +36,7 @@
 PROG = rdemo
 
 # Normal GCC flags.
- -CFLAGS = $(INCL) -O -c -DPROTOTYPES=$(PROTOTYPES) -DUSEMPILIB
+CFLAGS = $(INCL) -Zomf -O -c -DPROTOTYPES=$(PROTOTYPES) -DUSEMPILIB
 MFLAGS = -I. -I$(SRCDIR)
 
 # The location of the common source directory.
@@ -46,16 +46,16 @@
 # The location of the demo source directory.
 RDEMODIR = ../../rdemo/
 
- -all : $(SRCLIB)
+all : $(SRCLIB) 
 
 rdemo : rdemo.$(O) $(SRCLIB)
- -	$(CC) -o $@ rdemo.$(O) $(SRCLIB)
+	$(CC) -Zomf -o $@ rdemo.$(O) $(SRCLIB)
 
 $(SRCLIB) : desc.$(O) digit.$(O) md2c.$(O) md5c.$(O) nn.$(O) prime.$(O)\
   rsa.$(O) r_encode.$(O) r_enhanc.$(O) r_keygen.$(O) r_random.$(O)\
   r_stdlib.$(O)
 	$(LIB) r $@ $?
- -	$(RANLIB) $@
+#	$(RANLIB) $@
 
 rdemo.$(O) : $(RDEMODIR)rdemo.c global.h $(SRCDIR)rsaref.h
 	$(CC) $(CFLAGS) $(RDEMODIR)rdemo.c

PM Mail is copyright © SouthSoft, Inc.

---------
Report any access issues to our webmaster.
homepage
Last modified: 17-Sep-2004 01:04PM.
Material copyright ©1996-1997, Innovative Logic Corp.
Design copyright ©1996-1997, Innovative Web Creations.
All rights reserved.