mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-29 04:09:31 +03:00
Public API: added new data type for TLS sessions
This commit is contained in:
@@ -9708,6 +9708,35 @@ enum MHD_FIXED_ENUM_MHD_SET_ MHD_TlsVersion
|
||||
MHD_TLS_VERSION_UNKNOWN = 1999
|
||||
};
|
||||
|
||||
/**
|
||||
* Connection TLS session information.
|
||||
* Only one member is valid. Use #MHD_DAEMON_INFO_FIXED_TLS_TYPE to find out
|
||||
* which member should be used.
|
||||
*/
|
||||
union MHD_ConnInfoDynamicTlsSess
|
||||
{
|
||||
/* Include <gnutls/gnutls.h> before this header to get a better type safety */
|
||||
/**
|
||||
* GnuTLS session handle, of type "gnutls_session_t".
|
||||
*/
|
||||
#if defined(GNUTLS_VERSION_MAJOR) && GNUTLS_VERSION_MAJOR >= 3
|
||||
gnutls_session_t v_gnutls_session;
|
||||
#else
|
||||
void * /* gnutls_session_t */ v_gnutls_session;
|
||||
#endif
|
||||
|
||||
/* Include <openssl/types.h> or <openssl/crypto.h> before this header to get
|
||||
a better type safety */
|
||||
/**
|
||||
* OpenSSL session handle, of type "SSL*".
|
||||
*/
|
||||
#if defined(OPENSSL_TYPES_H) && OPENSSL_VERSION_MAJOR >= 3
|
||||
SSL *v_openssl_session;
|
||||
#else
|
||||
void /* SSL */ *v_openssl_session;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* Information about a connection.
|
||||
*/
|
||||
@@ -9738,16 +9767,12 @@ union MHD_ConnectionInfoDynamicData
|
||||
*/
|
||||
enum MHD_TlsVersion v_tls_ver;
|
||||
|
||||
/* Include <gnutls/gnutls.h> before this header to get a better type safety */
|
||||
/**
|
||||
* GnuTLS session handle, of type "gnutls_session_t".
|
||||
* Connection TLS session information.
|
||||
* Only one member is valid. Use #MHD_DAEMON_INFO_FIXED_TLS_TYPE to find out
|
||||
* which member should be used.
|
||||
*/
|
||||
#if defined(GNUTLS_VERSION_MAJOR) && GNUTLS_VERSION_MAJOR >= 3
|
||||
gnutls_session_t
|
||||
#else
|
||||
void * /* gnutls_session_t */
|
||||
#endif
|
||||
v_gnutls_session;
|
||||
union MHD_ConnInfoDynamicTlsSess v_tls_session;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -5086,6 +5086,35 @@ enum MHD_FIXED_ENUM_MHD_SET_ MHD_TlsVersion
|
||||
MHD_TLS_VERSION_UNKNOWN = 1999
|
||||
};
|
||||
|
||||
/**
|
||||
* Connection TLS session information.
|
||||
* Only one member is valid. Use #MHD_DAEMON_INFO_FIXED_TLS_TYPE to find out
|
||||
* which member should be used.
|
||||
*/
|
||||
union MHD_ConnInfoDynamicTlsSess
|
||||
{
|
||||
/* Include <gnutls/gnutls.h> before this header to get a better type safety */
|
||||
/**
|
||||
* GnuTLS session handle, of type "gnutls_session_t".
|
||||
*/
|
||||
#if defined(GNUTLS_VERSION_MAJOR) && GNUTLS_VERSION_MAJOR >= 3
|
||||
gnutls_session_t v_gnutls_session;
|
||||
#else
|
||||
void * /* gnutls_session_t */ v_gnutls_session;
|
||||
#endif
|
||||
|
||||
/* Include <openssl/types.h> or <openssl/crypto.h> before this header to get
|
||||
a better type safety */
|
||||
/**
|
||||
* OpenSSL session handle, of type "SSL*".
|
||||
*/
|
||||
#if defined(OPENSSL_TYPES_H) && OPENSSL_VERSION_MAJOR >= 3
|
||||
SSL *v_openssl_session;
|
||||
#else
|
||||
void /* SSL */ *v_openssl_session;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* Information about a connection.
|
||||
*/
|
||||
@@ -5116,16 +5145,12 @@ union MHD_ConnectionInfoDynamicData
|
||||
*/
|
||||
enum MHD_TlsVersion v_tls_ver;
|
||||
|
||||
/* Include <gnutls/gnutls.h> before this header to get a better type safety */
|
||||
/**
|
||||
* GnuTLS session handle, of type "gnutls_session_t".
|
||||
* Connection TLS session information.
|
||||
* Only one member is valid. Use #MHD_DAEMON_INFO_FIXED_TLS_TYPE to find out
|
||||
* which member should be used.
|
||||
*/
|
||||
#if defined(GNUTLS_VERSION_MAJOR) && GNUTLS_VERSION_MAJOR >= 3
|
||||
gnutls_session_t
|
||||
#else
|
||||
void * /* gnutls_session_t */
|
||||
#endif
|
||||
v_gnutls_session;
|
||||
union MHD_ConnInfoDynamicTlsSess v_tls_session;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user