Subject: Re: OpenSSL is not compatible with C++?
To: Ian Zagorskih <>
From: Martin Husemann <>
List: tech-userlevel
Date: 09/06/2005 14:58:06
On Tue, Sep 06, 2005 at 07:03:15PM +0700, Ian Zagorskih wrote:
> ---pem.h---
> #define PEM_write_bio_SSL_SESSION(bp,x) \
> 		PEM_ASN1_write_bio((int (*)())i2d_SSL_SESSION, \
> ........
> int	PEM_ASN1_write_bio(int (*i2d)(),const char *name,BIO *bp,char *x,
> 			   const EVP_CIPHER *enc,unsigned char *kstr,int klen,
> 			   pem_password_cb *cb, void *u);

Wow - now look up the declaration of i2d_SSL_SESSION and the horror continues.

I seriously think all those prototypes/nested macros should be fixed to
include all the arguments, and then a patch be fed back to the openssl
folks (not that they have incorporated suggestions in the past - maybe we 
should switch to something sane (TM))