Hello!

---Dr Stephen Henson <[EMAIL PROTECTED]> wrote:
> Have you tried the HP-UX stuff? You might want to try manually running
> configure with hp-kr-cc and see if you get any further.

Was that hpux-kr-cc?

Thought I might give Openssl another shot today on HPUX 10.20 with
(this time) 
hpux-kr-cc

===============================================
Snap    : openssl-SNAP-19990310-1530
OS      : HPUX 10.20 on Stratus
Compiler: brain-dead cc (aka KR cc)
===============================================

<snip>

bud2 32: perl Configure hp-kr-cc
IsWindows=0
CC            =cc
CFLAG         =-DB_ENDIAN -DNOCONST -DNOPROTO -D_HPUX_SOURCE
EX_LIBS       =
BN_ASM        =asm/pa-risc2.o
DES_ENC       =des_enc.o fcrypt_b.o
BF_ENC        =bf_enc.o
CAST_ENC      =c_enc.o
RC4_ENC       =rc4_enc.o
RC5_ENC       =rc5_enc.o
MD5_OBJ_ASM   =
SHA1_OBJ_ASM  =
RMD160_OBJ_ASM=
THIRTY_TWO_BIT mode
DES_PTR used
DES_UNROLL used
Makefile => Makefile.ssl
e_os.h => include/e_os.h
making links in crypto...
    <snip OK stuff>
>evp.h => ../../include/evp.h
making links in crypto/asn1...
Makefile => Makefile.ssl
asn1.h => ../../include/asn1.h
asn1_mac.h => ../../include/asn1_mac.h
making links in crypto/pem...
        cc -I.. -I../../include -g -c ctx_size.c
(Bundled) cc: warning 480: The -g option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: "../../include/md2.h", line 90: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/md2.h", line 91: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/md2.h", line 92: error 1000: Unexpected
symbol: "MD2_CTX".
(Bundled) cc: "../../include/md5.h", line 82: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/md5.h", line 83: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/md5.h", line 83: warning 5: "const" will
become a keyword.
(Bundled) cc: "../../include/md5.h", line 83: error 1000: Unexpected
symbol: "void".
(Bundled) cc: "../../include/md5.h", line 84: error 1000: Unexpected
symbol: "MD5_CTX".
(Bundled) cc: "../../include/md5.h", line 86: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/sha.h", line 82: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/sha.h", line 83: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/sha.h", line 84: error 1000: Unexpected
symbol: "SHA_CTX".
(Bundled) cc: "../../include/sha.h", line 86: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/sha.h", line 87: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/sha.h", line 88: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/sha.h", line 89: error 1000: Unexpected
symbol: "SHA_CTX".
(Bundled) cc: "../../include/sha.h", line 91: error 1000: Unexpected
symbol: "*".
(Bundled) cc: "../../include/ripemd.h", line 82: error 1000:
Unexpected symbol: "*".
  <ETC>

The problem with md2.h is that the NOPROTO is not defined when 
"cc" is launched! Somewhere from the root to crypto/pem the makefiles
are broken,
and the configured defines don't get passed along. Either that, or it
is 
not a good idea to have "perl Configure <system>" perform the "make"
as well.
Which is what happens on my system.

So I compensated by compiling by hand. Here is what came next:
 bud2 45: cc -I.. -I../../include -g -c ctx_size.c -DB_ENDIAN
-DNOCONST -DNOPROTO -D_HPUX_SOURCE
 (Bundled) cc: warning 480: The -g option is available only with the
C/ANSI C product; ignored.
 (Bundled) cc: "../../include/evp.h", line 768: error 1000: Unexpected
symbol: "*".
 (Bundled) cc: "../../include/evp.h", line 768: error 1000: Unexpected
symbol: ")".
 (Bundled) cc: "../../include/evp.h", line 769: error 1616: Unable to
open intrinsic file  
 "/usr/local/lib/sysintr".
 (Bundled) cc: "../../include/evp.h", line 769: error 1000: Unexpected
symbol: "*".
 (Bundled) cc: "../../include/evp.h", line 769: error 1000: Unexpected
symbol: ")".
 (Bundled) cc: "../../include/evp.h", line 771: error 1616: Unable to
open intrinsic file  
 "/usr/local/lib/sysintr".
 bud2 46: 

Someone has clearly messed with the NOPROTO section of evp.h:
   765  int EVP_PKEY_save_parameters();
   766  int EVP_PKEY_cmp_parameters();
   767
   768  int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE
*type);
   769  int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE
*type);
   770
   771  int EVP_CIPHER_set_asn1_iv();

Fixing lines 768 and 769, one obtains:
 bud2 47: cc -I.. -I../../include -g -c ctx_size.c -DB_ENDIAN
-DNOCONST -DNOPROTO -D_HPUX_SOURCE
 (Bundled) cc: warning 480: The -g option is available only with the
C/ANSI C product; ignored.
 bud2 48: 

Much better. But what is wrong with those makefiles?
.../crypto/pem/Makefile.ssl:
     1  #
     2  # SSLeay/crypto/pem/Makefile
     3  #
     4
     5  DIR=    pem
     6  TOP=    ../..
     7  CC=     cc
     8  INCLUDES= -I.. -I../../include
     9  CFLAG=-g
    10  INSTALLTOP=/usr/local/ssl
    11  MAKE=           make -f Makefile.ssl

.../crypto/Makefile.ssl:
     1  #
     2  # SSLeay/crypto/Makefile
     3  #
     4
     5  DIR=            crypto
     6  TOP=            ..
     7  CC=             cc
     8  INCLUDE=        -I. -I../include
     9  INCLUDES=       -I.. -I../../include
    10  CFLAG=          -g
    11  INSTALLTOP=     /usr/local/ssl
    12  MAKE=           make -f Makefile.ssl
    13  MAKEDEPEND=     $(TOP)/util/domd $(TOP)
    14  MAKEFILE=       Makefile.ssl

.../Makefile.ssl after Configure ran on it:
    65  CC= cc
    66  #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486
-Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
    67  CFLAG= -DB_ENDIAN -DNOCONST -DNOPROTO -D_HPUX_SOURCE
    68  PEX_LIBS= -L. -L.. -L../.. -L../../..
    69  EX_LIBS=
    70  AR=ar r
 
   187  all: Makefile.ssl
   188          @for i in $(DIRS) ;\
   189          do \
   190          (cd $$i && echo "making all in $$i..." && \
<line 191: hand-broken>
   191          $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}'
CFLAG='${CFLAG}' 
  INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}'
EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' 
  DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}'
RC4_ENC='${RC4_ENC}' 
  RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}'
MD5_ASM_OBJ='${MD5_ASM_OBJ}' 
  RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}'
  all ) || exit 1; \
   192          done;

Maybe my make does not work correctly? So I hacked it up to echo the
commands when building 
stuff:

 bud2 63: make -f Makefile.ssl
 making all in crypto...
 make -f Makefile.ssl CC='cc' PLATFORM='hpux-kr-cc' CFLAG='-DB_ENDIAN
-DNOCONST -DNOPROTO  -D_HPUX_SOURCE' INSTALLTOP='/usr/local/ssl'
PEX_LIBS='-L. -L.. -L../.. -L../../..' EX_LIBS='' 
BN_ASM='asm/pa-risc2.o' DES_ENC='des_enc.o fcrypt_b.o'
BF_ENC='bf_enc.o' CAST_ENC='c_enc.o'  RC4_ENC='rc4_enc.o'
RC5_ENC='rc5_enc.o' SHA1_ASM_OBJ='' MD5_ASM_OBJ='' RMD160_ASM_OBJ='' 
SDIRS='md2 md5 sha mdc2 hmac ripemd  des rc2 rc4 rc5 idea bf cast  bn
rsa dsa dh  buffer bio stack  lhash rand err objects  evp asn1 pem
x509 x509v3 conf txt_db pkcs7 comp' AR='ar r' all ) 
         echo "#define DATE      \"`date`\"" >date.h
         cc -I. -I../include -DB_ENDIAN -DNOCONST -DNOPROTO
-D_HPUX_SOURCE -DCFLAGS="\"cc  -DB_ENDIAN -DNOCONST -DNOPROTO
-D_HPUX_SOURCE\"" -DPLATFORM="\"hpux-kr-cc\"" -c cryptlib.c
         cc -I. -I../include -DB_ENDIAN -DNOCONST -DNOPROTO
-D_HPUX_SOURCE -DCFLAGS="\"cc  -DB_ENDIAN -DNOCONST -DNOPROTO
-D_HPUX_SOURCE\"" -DPLATFORM="\"hpux-kr-cc\"" -c mem.c

So now it compiles all right (because of perl Configure launching the
compilation process???)
until it hits 
        cc -I.. -I../../include -DB_ENDIAN -DNOCONST -DNOPROTO
-D_HPUX_SOURCE -c supp.c
        cc -I.. -I../../include -DB_ENDIAN -DNOCONST -DNOPROTO
-D_HPUX_SOURCE -c ede_cbcm_enc.c
 (Bundled) cc: "ede_cbcm_enc.c", line 75: error 1000: Unexpected
symbol: "des_key_schedule".
 (Bundled) cc: "ede_cbcm_enc.c", line 75: error 1000: Unexpected
symbol: "ks2".
 (Bundled) cc: "ede_cbcm_enc.c", line 77: error 1000: Unexpected
symbol: "ivec1".
 (Bundled) cc: "ede_cbcm_enc.c", line 73: error 1705: Function
prototypes are an ANSI feature.
 (Bundled) cc: "ede_cbcm_enc.c", line 77: error 1573: Type of "ivec2"
is undefined due to an  illegal declaration.
 (Bundled) cc: "ede_cbcm_enc.c", line 82: error 1588: "length"
undefined.
 (Bundled) cc: "ede_cbcm_enc.c", line 82: error 1600: Type clash on
initialization.
 (Bundled) cc: "ede_cbcm_enc.c", line 86: error 1588: "ivec1" undefined.
 (Bundled) cc: "ede_cbcm_enc.c", line 99: error 1588: "ks3" undefined.
 (Bundled) cc: "ede_cbcm_enc.c", line 105: error 1588: "in" undefined.
 (Bundled) cc: "ede_cbcm_enc.c", line 105: error 1549: Modifiable
lvalue required for assignment  operator.
 (Bundled) cc: "ede_cbcm_enc.c", line 105: error 1560: Modifiable
lvalue required with operator  "--".
 (Bundled) cc: "ede_cbcm_enc.c", line 105: error 1561: Increment and
decrement operators take 
 scalar operand.

The culprit, ./crypto/des/ede_cbcm_enc.c:
     1  /* ede_cbcm_enc.c */
     2  /* Written by Ben Laurie <[EMAIL PROTECTED]> for the OpenSSL
     3   * project 13 Feb 1999.
     4   */
   ...
    73  void des_ede3_cbcm_encrypt(const unsigned char *in,unsigned
char *out,
    74                             long length,
    75                             des_key_schedule
ks1,des_key_schedule ks2,
    76                             des_key_schedule ks3,
    77                             des_cblock ivec1,des_cblock ivec2,
    78                             int enc)
    79      {
    80      register DES_LONG tin0,tin1;

Ben Laurie, it's your turn...


Cheers!

Ulrich Kroener

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to