From: serassio <> Date: Sat, 2 Sep 2006 21:40:03 +0000 (+0000) Subject: Windows port: Specific OpenSSL trick for FD<=>socket equivalence X-Git-Tag: SQUID_3_0_PRE5~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d73543d9eacf85ff6298061f2938ee7c6611651;p=thirdparty%2Fsquid.git Windows port: Specific OpenSSL trick for FD<=>socket equivalence --- diff --git a/src/ssl_support.h b/src/ssl_support.h index 959399dfba..643a20deb2 100644 --- a/src/ssl_support.h +++ b/src/ssl_support.h @@ -1,6 +1,6 @@ /* - * $Id: ssl_support.h,v 1.12 2005/03/18 17:17:51 hno Exp $ + * $Id: ssl_support.h,v 1.13 2006/09/02 15:40:03 serassio Exp $ * * AUTHOR: Benno Rice * @@ -59,4 +59,28 @@ SSLGETATTRIBUTE sslGetCAAttribute; const char *sslGetUserCertificatePEM(SSL *ssl); const char *sslGetUserCertificateChainPEM(SSL *ssl); +#ifdef _SQUID_MSWIN_ + +#ifdef __cplusplus + +namespace Squid { + +inline +int SSL_set_fd(SSL *ssl, int fd) +{ + return ::SSL_set_fd(ssl, _get_osfhandle(fd)); +} + +#define SSL_set_fd(ssl,fd) Squid::SSL_set_fd(ssl,fd) + +} /* namespace Squid */ + +#else + +#define SSL_set_fd(s,f) (SSL_set_fd(s, _get_osfhandle(f))) + +#endif /* __cplusplus */ + +#endif /* _SQUID_MSWIN_ */ + #endif /* SQUID_SSL_SUPPORT_H */