41a6c3
diff --git a/docs/manual/mod/mod_ssl.html.en b/docs/manual/mod/mod_ssl.html.en
41a6c3
index ca178ab..4580f1c 100644
41a6c3
--- a/docs/manual/mod/mod_ssl.html.en
41a6c3
+++ b/docs/manual/mod/mod_ssl.html.en
41a6c3
@@ -57,6 +57,7 @@ to provide the cryptography engine.

41a6c3
 
  • SSLCertificateKeyFile
  • 41a6c3
     
  • SSLCipherSuite
  • 41a6c3
     
  • SSLCompression
  • 41a6c3
    +
  • SSLSessionTickets
  • 41a6c3
     
  • SSLCryptoDevice
  • 41a6c3
     
  • SSLEngine
  • 41a6c3
     
  • SSLFIPS
  • 41a6c3
    @@ -797,6 +798,26 @@ CRIME attack).

    41a6c3
     
    41a6c3
     
    41a6c3
     
    41a6c3
    +
    41a6c3
    +
    top
    41a6c3
    +
    41a6c3
    +
    41a6c3
    +Description:Enable or disable use of TLS session tickets
    41a6c3
    +Syntax:SSLSessionTickets on|off
    41a6c3
    +Default:SSLCompression on
    41a6c3
    +Context:server config, virtual host
    41a6c3
    +Status:Extension
    41a6c3
    +Module:mod_ssl
    41a6c3
    +Compatibility:Available.
    41a6c3
    +
    41a6c3
    +

    This directive allows to enable or disable the use of TLS session tickets(RFC 5077).

    41a6c3
    +
    41a6c3
    +

    TLS session tickets are enabled by default. Using them without restarting

    41a6c3
    +the web server with an appropriate frequency (e.g. daily) compromises perfect
    41a6c3
    +forward secrecy.

    41a6c3
    +
    41a6c3
    +
    41a6c3
    +
    41a6c3
     
    top
    41a6c3
     
    41a6c3
     
    41a6c3
    diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
    41a6c3
    index bbe1d20..4a8b661 100644
    41a6c3
    --- a/modules/ssl/mod_ssl.c
    41a6c3
    +++ b/modules/ssl/mod_ssl.c
    41a6c3
    @@ -141,6 +141,9 @@ static const command_rec ssl_config_cmds[] = {
    41a6c3
         SSL_CMD_SRV(Compression, FLAG,
    41a6c3
                     "Enable SSL level compression"
    41a6c3
                     "(`on', `off')")
    41a6c3
    +    SSL_CMD_SRV(SessionTickets, FLAG,
    41a6c3
    +                "Enable or disable TLS session tickets"
    41a6c3
    +                "(`on', `off')")
    41a6c3
         SSL_CMD_SRV(InsecureRenegotiation, FLAG,
    41a6c3
                     "Enable support for insecure renegotiation")
    41a6c3
         SSL_CMD_ALL(UserName, TAKE1,
    41a6c3
    diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
    41a6c3
    index 9530fcc..86a7f0f 100644
    41a6c3
    --- a/modules/ssl/ssl_engine_config.c
    41a6c3
    +++ b/modules/ssl/ssl_engine_config.c
    41a6c3
    @@ -216,6 +216,7 @@ static SSLSrvConfigRec *ssl_config_server_new(apr_pool_t *p)
    41a6c3
     #ifndef OPENSSL_NO_COMP
    41a6c3
         sc->compression            = UNSET;
    41a6c3
     #endif
    41a6c3
    +    sc->session_tickets        = UNSET;
    41a6c3
     
    41a6c3
         modssl_ctx_init_proxy(sc, p);
    41a6c3
     
    41a6c3
    @@ -346,6 +347,7 @@ void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv)
    41a6c3
     #ifndef OPENSSL_NO_COMP
    41a6c3
         cfgMergeBool(compression);
    41a6c3
     #endif
    41a6c3
    +    cfgMergeBool(session_tickets);
    41a6c3
     
    41a6c3
         modssl_ctx_cfg_merge_proxy(base->proxy, add->proxy, mrg->proxy);
    41a6c3
     
    41a6c3
    @@ -720,6 +722,17 @@ const char *ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag)
    41a6c3
     #endif
    41a6c3
     }
    41a6c3
     
    41a6c3
    +const char *ssl_cmd_SSLSessionTickets(cmd_parms *cmd, void *dcfg, int flag)
    41a6c3
    +{
    41a6c3
    +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
    41a6c3
    +#ifndef SSL_OP_NO_TICKET
    41a6c3
    +    return "This version of OpenSSL does not support using "
    41a6c3
    +           "SSLSessionTickets.";
    41a6c3
    +#endif
    41a6c3
    +    sc->session_tickets = flag ? TRUE : FALSE;
    41a6c3
    +    return NULL;
    41a6c3
    +}
    41a6c3
    +
    41a6c3
     const char *ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag)
    41a6c3
     {
    41a6c3
     #ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
    41a6c3
    diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
    41a6c3
    index 568627f..672760c 100644
    41a6c3
    --- a/modules/ssl/ssl_engine_init.c
    41a6c3
    +++ b/modules/ssl/ssl_engine_init.c
    41a6c3
    @@ -566,6 +566,16 @@ static void ssl_init_ctx_protocol(server_rec *s,
    41a6c3
         }
    41a6c3
     #endif
    41a6c3
     
    41a6c3
    +#ifdef SSL_OP_NO_TICKET
    41a6c3
    +    /*
    41a6c3
    +     * Configure using RFC 5077 TLS session tickets
    41a6c3
    +     * for session resumption.
    41a6c3
    +     */
    41a6c3
    +    if (sc->session_tickets == FALSE) {
    41a6c3
    +        SSL_CTX_set_options(ctx, SSL_OP_NO_TICKET);
    41a6c3
    +    }
    41a6c3
    +#endif
    41a6c3
    +
    41a6c3
     #ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
    41a6c3
         if (sc->insecure_reneg == TRUE) {
    41a6c3
             SSL_CTX_set_options(ctx, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION);
    41a6c3
    diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h
    41a6c3
    index 0cc6d3f..b601316 100644
    41a6c3
    --- a/modules/ssl/ssl_private.h
    41a6c3
    +++ b/modules/ssl/ssl_private.h
    41a6c3
    @@ -701,6 +701,7 @@ struct SSLSrvConfigRec {
    41a6c3
     #ifndef OPENSSL_NO_COMP
    41a6c3
         BOOL             compression;
    41a6c3
     #endif
    41a6c3
    +    BOOL             session_tickets;
    41a6c3
     };
    41a6c3
     
    41a6c3
     /**
    41a6c3
    @@ -756,6 +757,7 @@ const char  *ssl_cmd_SSLCARevocationFile(cmd_parms *, void *, const char *);
    41a6c3
     const char  *ssl_cmd_SSLCARevocationCheck(cmd_parms *, void *, const char *);
    41a6c3
     const char  *ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag);
    41a6c3
     const char  *ssl_cmd_SSLCompression(cmd_parms *, void *, int flag);
    41a6c3
    +const char  *ssl_cmd_SSLSessionTickets(cmd_parms *, void *, int flag);
    41a6c3
     const char  *ssl_cmd_SSLVerifyClient(cmd_parms *, void *, const char *);
    41a6c3
     const char  *ssl_cmd_SSLVerifyDepth(cmd_parms *, void *, const char *);
    41a6c3
     const char  *ssl_cmd_SSLSessionCache(cmd_parms *, void *, const char *);