Hi,
  Does anyone know how to set ssl session timeout in nss3.8.
  I use SSL_ConfigMPServerSIDCache set my SSL3 session timeout,but it can't
work.My code as follow:
  SSL_ConfigMPServerSIDCache(256, 6, 6, NULL);

After 6 second of first shakehand,server already use old session,can't begin
a new exchangekey process.
I check the source code,and find SSL_ConfigMPServerSIDCache code as follow:

(In sslsnce.c line 970-980)
 if (ssl3_timeout) {
 if (ssl3_timeout > MAX_SSL3_TIMEOUT) {
     ssl3_timeout = MAX_SSL3_TIMEOUT;
 }
 if (ssl3_timeout < MIN_SSL3_TIMEOUT) {
     ssl3_timeout = MIN_SSL3_TIMEOUT;
 }
 cache->ssl3Timeout = ssl3_timeout;
    } else {
 cache->ssl3Timeout = DEF_SSL3_TIMEOUT;
    }

After first handshake,it call ssl3_HandleFinished in ssl3con.c and increase
sid expirationtime like this:
sid->expirationTime     = sid->creationTime + ssl3_sid_timeout;(line 7786)

but it seems ssl3_sid_timeout is a constant value =24 hour.


_______________________________________________
mozilla-crypto mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-crypto

Reply via email to