Permalink
Browse files

Fixes #975

When virtualservers have a longer than SSL_MAX_SSL_SESSION_ID_LENGTH we limit the session_id length to that value, instead of the full virualserver name.
  • Loading branch information...
1 parent 6658351 commit f29a690d5555c76c3aaf5f46b9365f147916dbb8 @skinkie skinkie committed Jul 27, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 cherokee/cryptor_libssl.c
@@ -528,7 +528,7 @@ _vserver_new (cherokee_cryptor_t *cryp,
*/
rc = SSL_CTX_set_session_id_context (n->context,
(unsigned char *) vsrv->name.buf,
- (unsigned int) vsrv->name.len);
+ MIN(SSL_MAX_SSL_SESSION_ID_LENGTH, (unsigned int) vsrv->name.len));
if (rc != 1) {
OPENSSL_LAST_ERROR(error);
LOG_ERROR (CHEROKEE_ERROR_SSL_SESSION_ID, vsrv->name.buf, error);

0 comments on commit f29a690

Please sign in to comment.