]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: Specific OpenSSL trick for FD<=>socket equivalence
authorserassio <>
Sat, 2 Sep 2006 21:40:03 +0000 (21:40 +0000)
committerserassio <>
Sat, 2 Sep 2006 21:40:03 +0000 (21:40 +0000)
src/ssl_support.h

index 959399dfba89160c4ae741193a8b1de3907c1c1d..643a20deb21389882bc420c2749675bdbd834818 100644 (file)
@@ -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 */