4 07-FEB-2001 picked up gnupg-1.0.4 from ftp.gnupg.org unpacked it  built it on Linux (intel) with  [ % ./configure --disable-asm --disable-dynload --with-included-zlib --enable-static-rnd=unix  % make | tee make_vms.com   F compared that make_vms.com with that from 1.0.2.  Very similar, minor E changes.  Copied over all files I created from that previous version.   J There was a security patch for 1.0.4.  Applied it to the Unix distribution' and then copied over the changed files.   E Apply changes to keygen.c and ttyio.c from 1.0.2.  Other changes are   already in source.  
 Try to build:   5   #error BYTES_PER_MPI_LIMB does not match any C type  ...^G %CC-E-ERRORMESSAGE, #error BYTES_PER_MPI_LIMB does not match any C type T at line number 51 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_4.INCLUDE]MPI.H;1  O Which is because there's no such thing as MPI in DEC C.  modified VMS_G10DEFS.H  to have   1 #define BYTES_PER_MPI_LIMB (SIZEOF_UNSIGNED_LONG)   - Bunch of warnings in dynload.c, as for 1.0.2.   C Build completed, tests at bottom ran. Although with the ubiquitous:   C   gpg: Please note that you don't have secure memory on this system   : message.  Pass it on to those who have been asking for it.      F **********************************************************************4 29-AUG-2000 picked up gnupg-1.0.2 from www.gnupg.org   unpacked it. built it on Linux with    Z % ./configure --disable-asm -disable-dynload --with-included-zlib --enable-static-rnd=unix % make | tee make_vms.com   ! copied make_vms.com to VMS system 1 copied config.h     to VMS system as vms_config.h  edited vms_config.h   G There are 3 logicals associated with this program which must be defined J (or not, unclear if/when they are ever used.)  The MAKE_VMS.COM lists them during the build.   # used nedit.h to modify make_vms.com    Build...   A zillion of these:   +         for(p=buffer, s=string; *s; s++ ) {  ......................^ J %CC-W-PTRMISMATCH1, In this statement, the referenced type of the pointer C value "string" is "const char", which is not compatible with "const A unsigned char" because they differ by signed/unsigned attribute.  W at line number 364 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.UTIL]STRGUTIL.C;1   L Is this a header difference or just crappy programming?  In this particular ! error the functino is defined as:    char *$ native_to_utf8( const char *string ) {    and s as       const byte *s;  I so where does "byte" come from?  [.include]types.h sets byte as unsigned  I char.  So this is just crappy programming, assigning signed values to an  0 unsigned one.  Disable the PTRMISMATCH1 warning.    "     if( !(fp = fdopen(fd, mode)) ) ..........................^ J %CC-W-NOTCONSTQUAL, In this statement, the referenced type of the pointer : value "mode" is const, but the referenced type of the targ et of this assignment is not. T at line number 618 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.UTIL]IOBUF.C;1  J Ignore the warning, it's due to a bug in the prototype for fdopen in this I version of Compaq C.  mode is declared as char * when it should be const   char *.   ,         if( !link(h->tname, h->lockname) ) { .............^K %CC-I-IMPLICITFUNC, In this statement, the identifier "link" is implicitly   declared as a function. V at line number 223 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.UTIL]DOTLOCK.C;1  I That's not good, what is this doing?    If HAVE_DOSISH_SYSTEM is defined  6 then it bypasses most of this.  Go that route for now.  K $ mycc/define=HAVE_CONFIG_H/include=([],[-],[-.include],[-.intl]) dynload.c   #             *r_get_info = ctx->sym; 
 ............^ H %CC-W-PTRMISMATCH, In this statement, the referenced type of the pointerH value "ctx->sym" is "void", which is not compatible with "function (int,H pointer to unsigned int, pointer to pointer to unsigned char, pointer toE int, pointer to int, pointer to pointer to function (pointer to void) K returning void, pointer to pointer to function (pointer to void, pointer to - unsigned char, u". at line number 382 in file > PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.CIPHER]DYNLOAD.C;1   G Do we need dynload?  I thought I told it not to use that?  It seems to  J revolve around register_cipher_extension() which is only ever called from L g10.c.  There's also register_internal_cipher_extension() which is too long.  C #define reg_int_cipher_extension register_internal_cipher_extension     J Created a RNVMS.C module.  It's based on Dave Jones's SSH server.  It may 7 not return enough random information, but it's a start.   L $ link/exe=bftest     bftest.obj,[-.cipher]libcipher/lib,[-.mpi]libmpi/lib,  - ' [-.util]libutil/lib,[-.zlib]libzlib/lib $ %LINK-W-WRNERS, compilation warningsJ         in module DYNLOAD file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2. CIPHER]LIBCIPHER.OLB;1$ %LINK-W-WRNERS, compilation warningsI         in module RMD160 file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.  CIPHER]LIBCIPHER.OLB;1$ %LINK-W-WRNERS, compilation warningsJ         in module TWOFISH file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2. CIPHER]LIBCIPHER.OLB;1$ %LINK-W-WRNERS, compilation warningsF         in module MD5 file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2. CIPHER]LIBCIPHER.OLB;1$ %LINK-W-WRNERS, compilation warningsG         in module SHA1 file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.  CIPHER]LIBCIPHER.OLB;1% %LINK-W-NUDFSYMS, 1 undefined symbol: , %LINK-I-UDFSYM,         RNDLINUX_CONSTRUCTORB %LINK-W-USEUNDEF, undefined symbol RNDLINUX_CONSTRUCTOR referenced)         in psect $LINK$ offset %X00000030 b         in module CONSTRUCT file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.CIPHER]LIBCIPHER.OLB;1  7 Maybe it doesn't need SHA1 or TIGER?  Comment them out.   C Nope, now construct wants SHA1 and RNDLINUX_CONSTRUCTOR.  See what  I construct.c is up to.  Ah, yet another #($&#($&(#*$& configure generated  0 file.  Modify it, change the build instructions.   In packet.h at    B         PKT_COMMENT       =61,  /* new comment packet (private) */  G trailing comma.  Generates a lot of annoying informationals.  Fixed it.     W $ mycc/define=HAVE_CONFIG_H/include=([],[-],[-.include],[-.intl],[-.zlib]) passphrase.c   %                 assert( count >= 0 );  ................^ J %CC-I-QUESTCOMPARE, In this statement, the unsigned expression "count" is : being compared with a relational operator to a constant whI ose value is not greater than zero.  This might not be what you intended. X at line number 282 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]PASSPHRASE.C;1  H This is a BUG, but a fairly complex one since the code seems to require  count to be unsigned.   K $ mycc/define=HAVE_CONFIG_H/include=([],[-],[-.include],[-.intl],[-.zlib])   encr-data.c            if( n == -1 ) n = 0;
 ............^ G %CC-I-QUESTCOMPARE1, In this statement, the unsigned expression "n" is  < being compared with an equality operator to a constant whose8 value is negative.  This might not be what you intended.J at line number 240 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]
 ENCR-DATA.C;1    Bug.  Fixed it by   # $ diff encr-data.c encr-data.c_dist  ************A File PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]ENCR-DATA.C;3 +   234   /*    size_t n, size = *ret_len; */ #   235       size_t size = *ret_len;    236       int n;   237       int rc = 0;  ******F File PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]ENCR-DATA.C_DIST;1&   234       size_t n, size = *ret_len;   235       int rc = 0;   F **********************************************************************   static RETSIGTYPE  ^ B %CC-W-MISSINGRETURN, Non-void function "got_fatal_signal" does not5 contain a return statement. at line number 52 in file : PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]SIGNAL.C;1    static RETSIGTYPE  ^ @ %CC-W-MISSINGRETURN, Non-void function "got_usr_signal" does not5 contain a return statement. at line number 82 in file : PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]SIGNAL.C;1   '     nact.sa_handler = got_fatal_signal;  ....^ @ %CC-W-PTRMISMATCH, In this statement, the referenced type of theD pointer value "got_fatal_signal" is "function (int) returning int", E which is not compatible with "function (int) returning void". at line M number 106 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]SIGNAL.C;1    %     nact.sa_handler = got_usr_signal;  ....^ @ %CC-W-PTRMISMATCH, In this statement, the referenced type of theC pointer value "got_usr_signal" is "function (int) returning int", w D hich is not compatible with "function (int) returning void". at lineM number 115 in file PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]SIGNAL.C;1    F RETSIGTYPE is int, make it void.  (Don't see how it could be otherwise$ given the way the code is written.)   Q *********************************************************************************     9             if( (time_t)((ulong)(curtime+interval)) < 0 )  ................^ > %CC-I-QUESTCOMPARE, In this statement, the unsigned expressionE "(time_t)((ulong)(curtime+interval))" is being compared with a relati B onal operator to a constant whose value is not greater than zero. ? This might not be what you intended. at line number 732 in file : PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]KEYGEN.C;1   D time_t on VMS is an unsigned long int.  Replace time_t by "long int"$ in the code and it compiles cleanly.    Q *********************************************************************************   E have to search code for "HAVE_DRIVE_LETTERS" because stuff like this   abounds there:         #ifdef HAVE_DRIVE_LETTERS  	opt.homedir = "c:/gnupg";       #else  	opt.homedir = "~/.gnupg";       #endif  
 Occurs in:  6 PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]G10.C;1)   get gnupg directory to /SYS$LOGIN/GNUPG ; PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]OPENFILE.C;1 &   ok IF HAVE_DRIVE_LETTERS not defined; PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.G10]RINGEDIT.C;1 G    they use gnupg-ring:foo to specify that foo is a gnupg-ring.  Blech. E    should be ok though as they change the name to snip off the prefix G    which would otherwise have been seen as a logical.  What the heck is )    wrong with normal suffix file types??? < PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.UTIL]FILEUTIL.C;1A    Used in make_basename.  Should be ok so long as we stick with      unix path/file name syntax.B PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.UTIL]SIMPLE-GETTEXT.C;1    Not used.   Ok, rebuild and try again.  @ Clean.  Examples work.  Create a document VMS_INSTALL.TXT which 5 describes how to overlay the VMS port onto GPG 1.0.2.    Done (sort of).   F **********************************************************************  # smithp01@MCRC16.MED.NYU.EDU reports   :   The program doesn't automatically create [.gnupg]options   to do that manually do:    $ set def sys$login  $ create/dir [.gnupg] K $ search/remainder/out=options.. gnupgdata:options.skel "Options for GnuPG"   F **********************************************************************  K When it tries to create a key it fails to open /dev/tty.   That's hardcoded M into [.UTIL]TTYIO.C.  Changed the code to put in TERMDEVICE where "/dev/tty"  - was and modified vms_config.h to define this.    $ gnupg --gen-key   J is working now, but passphrase gets echoed in clear text - minor security  problem.   Oops, I spoke too soon;   V +++>++++++++++.........................................>+++++.<+++++.............+++++) gpg: md_enable: algorithm 2 not available ) gpg: md_enable: algorithm 2 not available   d gpg: Ohhhh jeeee: you found a bug ... (PRGDISK:[SHARED.PROGRAMS.GNUPG.GNUPG-1_0_2.CIPHER]MD.C;1:377)> secmem usage: 1760/6624 bytes in 6/9 blocks of pool 6656/16384W %SYSTEM-F-OPCCUS, opcode reserved to customer fault at PC=FFFFFFFF80A21E04, PS=0000001B / %TRACE-F-TRACEBACK, symbolic stack dump follows J   image    module    routine             line      rel PC           abs PCO                                             0 FFFFFFFF80A21E04 FFFFFFFF80A21E04 O                                             0 FFFFFFFF8098F248 FFFFFFFF8098F248 O  GPG  LOGGER  g10_log_bug                4758 0000000000000818 00000000000C85C8 O  GPG  MD  md_read                        5385 0000000000000C98 000000000009B9A8 O  GPG  KEYID  keyid_from_sk               7148 0000000000000940 0000000000075180 O  GPG  SIGN  make_keysig_packet           7620 00000000000026A0 0000000000063A30 O  GPG  KEYGEN  write_selfsig              6971 00000000000003C8 0000000000076218 O  GPG  KEYGEN  do_generate_keypair        8371 0000000000004064 0000000000079EB4 O  GPG  KEYGEN  proc_parameter_file        7988 0000000000002E80 0000000000078CD0 O  GPG  KEYGEN  generate_keypair           8274 0000000000003BDC 0000000000079A2C O  GPG  G10  set_debug                     8801 0000000000002D78 0000000000052D78 O  GPG  G10  main                          8484 0000000000000000 0000000000000000 O  GPG  G10  __main                           0 0000000000000070 0000000000050070 O                                             0 FFFFFFFF850E93F4 FFFFFFFF850E93F4   L Presumably the real problem is that md_enable, algorithm 2 wasn't available.   Doesn't matter if I select       (1) DSA and ElGamal (default)    (2) DSA (sign only)!    (4) ElGamal (sign and encrypt)   ; 1 or 4 from this.  Although in the latter case it gives the   +   gpg: md_enable: algorithm 2 not available    message only once.  < Email to gnupg maintainer asking how md_load works (since it seems not to on OpenVMS)  ? In the meantime. DUh, found it.  Left out a couple of lines in  - vms_construct.c and needed to compile sha1.c.    Now it gets to:   H gpg: /SYS$LOGIN/gnupg/pubring.gpg.tmp: can't create: file specification  syntax error, gpg: can't write public key: file open error& Key generation failed: file open error  D Typical Unix/vms filename bug.  These are hardcoded into RINGEDIT.C.. (Didn't these guys ever hear of header files?)  2 Can disable this with USE_ONLY_8DOT3 definition.     Hey key generation worked!  H Hmm.  But USE_ONLY_8DOT3 still causes versions to build up, and it keepsB a separate .BAK when the older version would do.  Probably best toA just do a set file/version=2 and disable the .BAK stuff entirely.   F **********************************************************************  A modified build procedure to eliminte the "may dump core" warning. D modified vms_config.h and g10.c so that the subdirectory will create automatically.