mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
GnuTLS: correctly pass sockets on W32 x64
This commit is contained in:
@@ -2646,7 +2646,7 @@ new_connection_prepare_ (struct MHD_Daemon *daemon,
|
||||
#else /* GnuTLS before 3.1.9 or Win x64 */
|
||||
gnutls_transport_set_ptr (connection->tls_session,
|
||||
(gnutls_transport_ptr_t) (intptr_t) (client_socket));
|
||||
#endif /* GnuTLS before 3.1.9 */
|
||||
#endif /* GnuTLS before 3.1.9 or Win x64 */
|
||||
#ifdef MHD_TLSLIB_NEED_PUSH_FUNC
|
||||
gnutls_transport_set_push_function (connection->tls_session,
|
||||
MHD_tls_push_func_);
|
||||
|
||||
@@ -235,12 +235,12 @@ wr_create_tls_sckt (void)
|
||||
GNUTLS_CRD_CERTIFICATE,
|
||||
s->tls_crd))
|
||||
{
|
||||
#if GNUTLS_VERSION_NUMBER + 0 >= 0x030109
|
||||
#if (GNUTLS_VERSION_NUMBER + 0 >= 0x030109) && ! defined(_WIN64)
|
||||
gnutls_transport_set_int (s->tls_s, (int) (s->fd));
|
||||
#else /* GnuTLS before 3.1.9 */
|
||||
#else /* GnuTLS before 3.1.9 or Win x64 */
|
||||
gnutls_transport_set_ptr (s->tls_s,
|
||||
(gnutls_transport_ptr_t) (intptr_t) (s->fd));
|
||||
#endif /* GnuTLS before 3.1.9 */
|
||||
#endif /* GnuTLS before 3.1.9 or Win x64 */
|
||||
return s;
|
||||
}
|
||||
gnutls_certificate_free_credentials (s->tls_crd);
|
||||
|
||||
@@ -400,12 +400,12 @@ wr_create_tls_sckt (void)
|
||||
GNUTLS_CRD_CERTIFICATE,
|
||||
s->tls_crd))
|
||||
{
|
||||
#if GNUTLS_VERSION_NUMBER + 0 >= 0x030109
|
||||
#if (GNUTLS_VERSION_NUMBER + 0 >= 0x030109) && ! defined(_WIN64)
|
||||
gnutls_transport_set_int (s->tls_s, (int) (s->fd));
|
||||
#else /* GnuTLS before 3.1.9 */
|
||||
#else /* GnuTLS before 3.1.9 or Win x64 */
|
||||
gnutls_transport_set_ptr (s->tls_s,
|
||||
(gnutls_transport_ptr_t) (intptr_t) (s->fd));
|
||||
#endif /* GnuTLS before 3.1.9 */
|
||||
#endif /* GnuTLS before 3.1.9 or Win x64 */
|
||||
return s;
|
||||
}
|
||||
gnutls_certificate_free_credentials (s->tls_crd);
|
||||
|
||||
Reference in New Issue
Block a user