This is really a very small issue, but it bothers us for quite a while.


The x509.h file contains the prototype for two RSA-related functions,
RSAPublicKey_dup() and RSAPrivateKey_dup(). Being included into the
source file with the rsa.h header, the double definition clashes with
the one defined in rsa.h, which creates a problem if the codebase for
external project is supposed to be compiled with -Werror and additional
prototype checking (which is quite paranoid, but such is life).

I am not sure whether the proposed change (to remove these declarations
from x509.h) is safe enough to be considered (from the perspective of
breaking compatibility with some existing software), but it seems to
be a small step into right direction.


=== cut === --- ./crypto/x509/x509.h Tue Nov 11 15:36:17 2003 +++ ./crypto/x509/x509.h Tue Nov 11 15:35:50 2003 @@ -810,9 +810,11 @@ X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); X509_NAME *X509_NAME_dup(X509_NAME *xn); X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); +#if 0 /* Redundant declarations: <openssl/rsa.h> already has it. */ #ifndef OPENSSL_NO_RSA RSA *RSAPublicKey_dup(RSA *rsa); RSA *RSAPrivateKey_dup(RSA *rsa); +#endif /* OPENSSL_NO_RSA */ #endif

 #endif /* !SSLEAY_MACROS */
--- ./include/openssl/x509.h    Mon Nov 10 12:41:34 2003
+++ ./include/openssl/x509.h    Mon Nov 10 12:34:54 2003
@@ -810,9 +810,11 @@
 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
 X509_NAME *X509_NAME_dup(X509_NAME *xn);
 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
+#if 0  /* Redundant declarations: <openssl/rsa.h> already has it. */
 #ifndef OPENSSL_NO_RSA
 RSA *RSAPublicKey_dup(RSA *rsa);
 RSA *RSAPrivateKey_dup(RSA *rsa);
+#endif /* OPENSSL_NO_RSA */
 #endif

 #endif /* !SSLEAY_MACROS */
=== cut ===


-- Lev Walkin [EMAIL PROTECTED]

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

Reply via email to