Skip to content

Commit

Permalink
tls_mgm: set the TLS session id context with the proper length
Browse files Browse the repository at this point in the history
Fixes Coverity CID #207904

(cherry picked from commit 4a18ce8)
  • Loading branch information
rvlad-patrascu committed Jul 21, 2020
1 parent 37c2d0c commit 44b21ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/tls_mgm/tls.h
Expand Up @@ -45,7 +45,7 @@
#include "tls_helper.h"
#include "../../locking.h"

#define OS_SSL_SESS_ID ((unsigned char*)NAME "-" VERSION)
#define OS_SSL_SESS_ID (NAME "-" VERSION)
#define OS_SSL_SESS_ID_LEN (sizeof(OS_SSL_SESS_ID)-1)

#if OPENSSL_VERSION_NUMBER < 0x00908000L
Expand Down
2 changes: 1 addition & 1 deletion modules/tls_mgm/tls_mgm.c
Expand Up @@ -1308,7 +1308,7 @@ static int init_tls_dom(struct tls_domain *d)

//SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_SERVER );
SSL_CTX_set_session_cache_mode(d->ctx[i], SSL_SESS_CACHE_OFF );
SSL_CTX_set_session_id_context(d->ctx[i], OS_SSL_SESS_ID,
SSL_CTX_set_session_id_context(d->ctx[i], (unsigned char*)OS_SSL_SESS_ID,
OS_SSL_SESS_ID_LEN );

/* install callback for SNI */
Expand Down

0 comments on commit 44b21ad

Please sign in to comment.