Don Badrak <[EMAIL PROTECTED]>:
> Bodo Moeller:

>>         It appears that either your copy of pem.h or your C
>> preprocessor is broken ...

> It is probably an irix64-gcc vs irix-gcc thing.  I'll have to look deeper
> at the differences between the two.  I don't believe the gcc preprocessor
> is broken, since it's worked for everything else.  But, maybe it's not
> using it.

It's very unlikely that any preprocessor would be so broken as to
cause the problem you had.  The duplicate definition of
EVP_MAX_MD_SIZE that your compiler complained about should never be
read because it is protected by #ifndef HEADER_ENVELOPE_H, and the
previous #include "evp.h" defines HEADER_ENVELOPE_H.  But pem.h is an
automatically generated header file, and your problems may have to
do with that.  (Or maybe your header file search path contains some
other file called evp.h, e.g. from an older version of SSLeay.)

This automatically generated part is totally superfluous, as evp.h is
#included anyway (if this wasn't the case, pem.h would define dummy
structure types struct evp_.../enp_... that have the correct size, but
consist just of one component of type char[EVP_..._SIZE] -- these
don't necessarily have the correct alignment, so this is rubbish in
every respect).  One of the automatically generated macros
(EVP_MAX_MD_SIZE) is even wrong -- evp.h now uses 16+20, while the
unused definition in pem.h is automatically generated to be the
maximum of MD2_DIGEST_LEN, MD5_DIGEST_LEN, and SHA_DIGEST_LEN,
i.e. 20).  The SSL library still assumes that EVP_MAX_MD_SIZE is 20;
I'm not sure if there was a specific reason for increasing its value
(in earlier versions, it was consistent).


After once more pointing out what nightmare of inconsistencies is
caused by the approach of automatically generating lots of bits and
pieces, let me suggest changes:

  -  Scrap crypto/pem/ctx_size.c and crypto/pem/pem.org (with
     appropriate changes to the Makefile);

  -  remove the "#ifndef HEADER_ENVELOPE_H"-part of pem.h;

  -  and change the comments inside pem.h (the first line shouldn't
     call it "pem.org" any longer, and the warning that the file is
     automatically generated no longer applies).
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to