Hi.

   Attached patch fixes broken OPENSSL_NO_FP_API macro support in 
openssl/crypto/pem/pem.h by adding missing alternatives for several 
macros in case of a NO_FP_API build.

   Detected with OpenSSL 0.9.8j. Older versions have not been checked 
but the same fix is needed in the current CVS HEAD sources.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić


  OPENSSL_NO_FP_API macro support is broken in pem.h and does not provide
alternatives for all the needed macros in case of a NO_FP_API build. This patch
adds all such missing alternatives.

--- pem.orig.h  2008-11-11 13:42:32.000000000 +-0100
+++ pem.h       2009-01-29 16:58:20.000000000 +-0100
@@ -212,13 +212,15 @@
  */
 
 #ifdef OPENSSL_NO_FP_API
 
 #define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/
 #define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/
+#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/
 #define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/
+#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/
 
 #else
 
 #define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \
 type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\
 { \
@@ -352,12 +354,13 @@
 /* These are the same except they are for the declarations */
 
 #if defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_NO_FP_API)
 
 #define DECLARE_PEM_read_fp(name, type) /**/
 #define DECLARE_PEM_write_fp(name, type) /**/
+#define DECLARE_PEM_write_fp_const(name, type) /**/
 #define DECLARE_PEM_write_cb_fp(name, type) /**/
 
 #else
 
 #define DECLARE_PEM_read_fp(name, type) \
        type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);
@@ -389,12 +392,13 @@
             unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
 
 #else
 
 #define DECLARE_PEM_read_bio(name, type) /**/
 #define DECLARE_PEM_write_bio(name, type) /**/
+#define DECLARE_PEM_write_bio_const(name, type) /**/
 #define DECLARE_PEM_write_cb_bio(name, type) /**/
 
 #endif
 
 #define DECLARE_PEM_write(name, type) \
        DECLARE_PEM_write_bio(name, type) \

Reply via email to