On Wed, Jan 16, 2008 at 05:33:13PM -0600, travis+ml-openssl@subspacefield.org wrote:

> So this is from 0.9.8g's pem.h:
>
> #define PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \
> (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,( char **)x,cb,u)
>
> And so is this:
>
> void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
> pem_password_cb *cb, void *u);
>
> Anyone notice a problem here?
>
> That first argument to PEM_ASN1_read will never, ever be the right type.
>
> char * != void *
>


No actual problem, in ANSI C pointers can be freely converted between
(type *) and (void *) and back.

--
Viktor.
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org