mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-06 10:34:09 +00:00
1. Updated ALPN support to work better with NodeJS 6.0.0
2. Added servername property on tls.socket
This commit is contained in:
@@ -443,6 +443,10 @@ void* ILibAsyncServerSocket_GetSSL_CTX(ILibAsyncServerSocket_ServerModule ILibAs
|
||||
{
|
||||
return(((struct ILibAsyncServerSocketModule*)ILibAsyncSocketModule)->ssl_ctx);
|
||||
}
|
||||
void* ILibAsyncServerSocket_GetSSL(ILibAsyncServerSocket_ConnectionToken connectiontoken)
|
||||
{
|
||||
return(ILibAsyncSocket_GetSSL(connectiontoken));
|
||||
}
|
||||
#ifdef MICROSTACK_TLS_DETECT
|
||||
void ILibAsyncServerSocket_SetSSL_CTX(ILibAsyncServerSocket_ServerModule ILibAsyncSocketModule, void *ssl_ctx, int enableTLSDetect)
|
||||
#else
|
||||
|
||||
@@ -128,6 +128,7 @@ void ILibAsyncServerSocket_SetTag2(ILibAsyncServerSocket_ServerModule ILibAsyncS
|
||||
#ifndef MICROSTACK_NOTLS
|
||||
typedef void(*ILibAsyncServerSocket_OnSSL)(ILibAsyncServerSocket_ServerModule AsyncServerSocketModule, void* ConnectionToken, SSL* ctx, void **user);
|
||||
void ILibAsyncServerSocket_SSL_SetSink(ILibAsyncServerSocket_ServerModule AsyncServerSocketModule, ILibAsyncServerSocket_OnSSL handler);
|
||||
void* ILibAsyncServerSocket_GetSSL(ILibAsyncServerSocket_ConnectionToken connectiontoken);
|
||||
void* ILibAsyncServerSocket_GetSSL_CTX(ILibAsyncServerSocket_ServerModule ILibAsyncSocketModule);
|
||||
#ifdef MICROSTACK_TLS_DETECT
|
||||
void ILibAsyncServerSocket_SetSSL_CTX(ILibAsyncServerSocket_ServerModule ILibAsyncSocketModule, void *ssl_ctx, int enableTLSDetect);
|
||||
|
||||
@@ -2256,6 +2256,10 @@ SSL_CTX *ILibAsyncSocket_GetSSLContext(ILibAsyncSocket_SocketModule socketModule
|
||||
struct ILibAsyncSocketModule* module = (struct ILibAsyncSocketModule*)socketModule;
|
||||
return module->ssl_ctx;
|
||||
}
|
||||
SSL* ILibAsyncSocket_GetSSL(ILibAsyncSocket_SocketModule socketModule)
|
||||
{
|
||||
return(((ILibAsyncSocketModule*)socketModule)->ssl);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -217,6 +217,7 @@ typedef enum ILibAsyncSocket_TLS_Mode
|
||||
SSL* ILibAsyncSocket_SetSSLContextEx(ILibAsyncSocket_SocketModule socketModule, SSL_CTX *ssl_ctx, ILibAsyncSocket_TLS_Mode server, char *hostname);
|
||||
#define ILibAsyncSocket_SetSSLContext(socketModule, ssl_ctx, tlsMode) ILibAsyncSocket_SetSSLContextEx(socketModule, ssl_ctx, tlsMode, NULL)
|
||||
SSL_CTX *ILibAsyncSocket_GetSSLContext(ILibAsyncSocket_SocketModule socketModule);
|
||||
SSL* ILibAsyncSocket_GetSSL(ILibAsyncSocket_SocketModule socketModule);
|
||||
#endif
|
||||
|
||||
void ILibAsyncSocket_SetRemoteAddress(ILibAsyncSocket_SocketModule socketModule, struct sockaddr *remoteAddress);
|
||||
|
||||
Reference in New Issue
Block a user