Hi openssl-dev and [EMAIL PROTECTED], Please see attached for a portability patch that enables OpenSSL 0.9.6-beta2 to run on the HP MPE/iX OS. Am I in time to get this incorporated into what will become 0.9.6? I hurried as soon as I saw yesterday's announcement that US contributions would now be accepted. Woohoo!!! - Mark Bixby HP CSY MPE/iX R&D Lab Internet & Interoperability Team email: [EMAIL PROTECTED]
diff -ru openssl-0.9.6-beta2/Configure openssl-0.9.6-beta2-mpe/Configure --- openssl-0.9.6-beta2/Configure Sun Sep 17 13:25:59 2000 +++ openssl-0.9.6-beta2-mpe/Configure Wed Sep 20 14:15:41 2000 @@ -256,6 +256,9 @@ #"hpux11-64bit-cc","cc:+DA2.0W -g -D_HPUX_SOURCE -Aa -Ae +ESlit::-D_REENTRANT::SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT :::", # Use unified settings above instead. +#### HP MPE/iX http://jazz.external.hp.com/src/openssl/ +"MPE/iX-gcc", "gcc:-D_ENDIAN -DBN_DIV2W -O3 -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE +-I/SYSLOG/PUB::(unknown):-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR +DES_UNROLL DES_RISC1:::", + # Dec Alpha, OSF/1 - the alpha164-cc is the flags for a 21164A with # the new compiler # For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version diff -ru openssl-0.9.6-beta2/apps/s_socket.c openssl-0.9.6-beta2-mpe/apps/s_socket.c --- openssl-0.9.6-beta2/apps/s_socket.c Mon Sep 11 05:42:00 2000 +++ openssl-0.9.6-beta2-mpe/apps/s_socket.c Wed Sep 20 09:20:30 2000 @@ -209,9 +209,11 @@ s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL); if (s == INVALID_SOCKET) { perror("socket"); return(0); } +#ifndef MPE i=0; i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); if (i < 0) { perror("keepalive"); return(0); } +#endif if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1) { close(s); perror("connect"); return(0); } diff -ru openssl-0.9.6-beta2/apps/speed.c openssl-0.9.6-beta2-mpe/apps/speed.c --- openssl-0.9.6-beta2/apps/speed.c Sun Sep 17 13:26:09 2000 +++ openssl-0.9.6-beta2-mpe/apps/speed.c Wed Sep 20 10:09:25 2000 @@ -87,7 +87,7 @@ #elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) # define TIMES #endif -#if !defined(_UNICOS) && !defined(__OpenBSD__) +#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(MPE) # define TIMEB #endif diff -ru openssl-0.9.6-beta2/config openssl-0.9.6-beta2-mpe/config --- openssl-0.9.6-beta2/config Sun Sep 17 13:26:02 2000 +++ openssl-0.9.6-beta2-mpe/config Wed Sep 20 09:20:30 2000 @@ -71,6 +71,10 @@ # Now we simply scan though... In most cases, the SYSTEM info is enough # case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in + MPE/iX:*) + MACHINE=`echo "$MACHINE" | sed -e 's/-/_/g'` + echo "parisc-hp-MPE/iX"; exit 0 + ;; A/UX:*) echo "m68k-apple-aux3"; exit 0 ;; diff -ru openssl-0.9.6-beta2/crypto/bio/bss_conn.c openssl-0.9.6-beta2-mpe/crypto/bio/bss_conn.c --- openssl-0.9.6-beta2/crypto/bio/bss_conn.c Mon Sep 11 05:42:16 2000 +++ openssl-0.9.6-beta2-mpe/crypto/bio/bss_conn.c Wed Sep 20 09:20:30 2000 @@ -236,7 +236,7 @@ } c->state=BIO_CONN_S_CONNECT; -#ifdef SO_KEEPALIVE +#if defined(SO_KEEPALIVE) && !defined(MPE) i=1; i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); if (i < 0) diff -ru openssl-0.9.6-beta2/crypto/des/read_pwd.c openssl-0.9.6-beta2-mpe/crypto/des/read_pwd.c --- openssl-0.9.6-beta2/crypto/des/read_pwd.c Mon Sep 11 05:42:23 2000 +++ openssl-0.9.6-beta2-mpe/crypto/des/read_pwd.c Wed Sep 20 09:25:35 2000 @@ -271,7 +271,9 @@ #elif defined(MAC_OS_pre_X) tty=stdin; #else +#ifndef MPE if ((tty=fopen("/dev/tty","r")) == NULL) +#endif tty=stdin; #endif @@ -312,7 +314,11 @@ #if defined(TTY_set) && !defined(VMS) if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1)) +#ifdef MPE + ; /* MPE lies -- echo really has been disabled */ +#else return(-1); +#endif #endif #ifdef VMS tty_new[0] = tty_orig[0]; diff -ru openssl-0.9.6-beta2/e_os.h openssl-0.9.6-beta2-mpe/e_os.h --- openssl-0.9.6-beta2/e_os.h Sat Mar 11 16:34:43 2000 +++ openssl-0.9.6-beta2-mpe/e_os.h Wed Sep 20 09:20:31 2000 @@ -275,6 +275,9 @@ # define NO_SYS_PARAM_H # else /* !defined VMS */ +# ifdef MPE +# define NO_SYS_PARAM_H +# endif # ifdef OPENSSL_UNISTD # include OPENSSL_UNISTD # else @@ -344,7 +347,9 @@ # ifndef NO_SYS_PARAM_H # include <sys/param.h> # endif -# include <sys/time.h> /* Needed under linux for FD_XXX */ +# ifndef MPE +# include <sys/time.h> /* Needed under linux for FD_XXX */ +# endif # include <netdb.h> # if defined(VMS) && !defined(__DECC) diff -ru openssl-0.9.6-beta2/ssl/ssl2.h openssl-0.9.6-beta2-mpe/ssl/ssl2.h --- openssl-0.9.6-beta2/ssl/ssl2.h Sun Feb 20 15:04:05 2000 +++ openssl-0.9.6-beta2-mpe/ssl/ssl2.h Wed Sep 20 09:20:31 2000 @@ -133,7 +133,11 @@ /* Upper/Lower Bounds */ #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 +#ifdef MPE +#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)29998 +#else #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)32767 +#endif #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /**/ #define SSL2_CHALLENGE_LENGTH 16