コード例 #1
0
ファイル: matrixSsl.c プロジェクト: Mirocow/balancer
/*
    Generic session option control for changing already connected sessions.
    (ie. rehandshake control).  arg param is future for options that may
    require a value.
*/
void matrixSslSetSessionOption(ssl_t *ssl, int32 option, void *arg)
{
    if (option == SSL_OPTION_DELETE_SESSION) {
#ifdef USE_SERVER_SIDE_SSL
        if (ssl->flags & SSL_FLAGS_SERVER) {
            matrixClearSession(ssl, 1);
        }
#endif /* USE_SERVER_SIDE_SSL */
        ssl->sessionIdLen = 0;
        memset(ssl->sessionId, 0x0, SSL_MAX_SESSION_ID_SIZE);
    }
}
コード例 #2
0
ファイル: matrixSsl.c プロジェクト: Mirocow/balancer
/*
    Rehandshake. Free any allocated sec members that will be repopulated
*/
void sslResetContext(ssl_t *ssl)
{
#ifdef USE_SERVER_SIDE_SSL
    if (ssl->flags & SSL_FLAGS_SERVER) {
/*
        Clear the inUse flag of the current session so it may be found again
        if client attempts to reuse session id
*/
        matrixClearSession(ssl, 0);
    }
#endif /* USE_SERVER_SIDE_SSL */

}
コード例 #3
0
ファイル: matrixssl.c プロジェクト: sunfirefox/packages-2
/*
	Rehandshake. Free any allocated sec members that will be repopulated
*/
void sslResetContext(ssl_t *ssl)
{
	ssl->sec.anon = 0;
#ifdef USE_SERVER_SIDE_SSL
	if (ssl->flags & SSL_FLAGS_SERVER) {
		matrixClearSession(ssl, 0);
	}
#endif /* USE_SERVER_SIDE_SSL */



	ssl->bFlags = 0;  /* Reset buffer control */
}
コード例 #4
0
ファイル: matrixssl.c プロジェクト: sunfirefox/packages-2
/*
	Generic session option control for changing already connected sessions.
	(ie. rehandshake control).  arg param is future for options that may
	require a value.
*/
void matrixSslSetSessionOption(ssl_t *ssl, int32 option, void *arg)
{
	if (option == SSL_OPTION_FULL_HANDSHAKE) {
#ifdef USE_SERVER_SIDE_SSL
		if (ssl->flags & SSL_FLAGS_SERVER) {
			matrixClearSession(ssl, 1);
		}
#endif /* USE_SERVER_SIDE_SSL */
		ssl->sessionIdLen = 0;
		memset(ssl->sessionId, 0x0, SSL_MAX_SESSION_ID_SIZE);
	}
		
#if defined(USE_CLIENT_AUTH) && defined(USE_SERVER_SIDE_SSL) 
	if (ssl->flags & SSL_FLAGS_SERVER) {
		if (option == SSL_OPTION_DISABLE_CLIENT_AUTH) {
			ssl->flags &= ~SSL_FLAGS_CLIENT_AUTH;
		} else if (option == SSL_OPTION_ENABLE_CLIENT_AUTH) {
			ssl->flags |= SSL_FLAGS_CLIENT_AUTH;
			matrixClearSession(ssl, 1);
		}
	}
#endif /* USE_CLIENT_AUTH && USE_SERVER_SIDE_SSL */
}