Hi Henrik,
Il 23.49 26/08/2006 Henrik Nordstrom ha scritto:
lör 2006-08-26 klockan 17:58 +0200 skrev Guido Serassio:
> /* Write out the SSL session details.. actually the call below, but
> * OpenSSL headers do strange typecasts confusing GCC.. */
> /* PEM_write_SSL_SESSION(debug_log, SSL_get_session(ssl)); */
>
> For testing, I have replaced PEM_ASN1_write() call with the
> PEM_write_SSL_SESSION() macro, and this seems to fix all the errors
> that I have listed in bug #1716.
It depends on the version of OpenSSL I think. And maybe GCC warning
flags...
Which version of OpenSSL are you using?
A mix of OpenSSL 0.9.7b, 0.9.7d, 0.9.7e and
0.9.7g with a mix of gcc 3.4.2, 3.4.3, and 3.3.5.
All on different platforms: Solaris x86 9 & 10,
OpenBDS 3.8, FreeBSD 5.3, Irix 6.5, HP Tru64 and Debian Linux 3.1.
If I do this here then I get the following errors:
squid-2.6/src/client_side.c: In function 'clientNegotiateSSL':
squid-2.6/src/client_side.c:4616: warning:
function declaration isn't a prototype
squid-3/src/client_side.cc: In function 'void clientNegotiateSSL(int, void*)':
squid-3/src/client_side.cc:2933: error: invalid
conversion from 'int (*)()' to 'int (*)(void*, unsigned char**)'
squid-3/src/client_side.cc:2933:
error: initializing argument 1 of 'int
PEM_ASN1_write(int (*)(void*, unsigned char**),
const char*, FILE*, char*, const EVP_CIPHER*,
unsigned char*, int, int (*)(char*, int, int, void*), void*)'
This will make me crazy .... :-(
It seems that it works only with OpenSSL 0.9.7.
Fedora Core 5 Linux on x86_64
OpenSSL 0.9.8a-5.2
gcc-4.1.1-1.fc5
I'm just configuring now a Fedora Core 5 Linux
x86 virtual machine for testing purpose.
Tomorrow morning I will try to define a complete
test suite, still I don't have found a rule of
how this diabolic function prototype "works" ... :-)
Regards
Guido
-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: [EMAIL PROTECTED]
WWW: http://www.acmeconsulting.it/