pike.git / lib / modules / SSL.pmod / Context.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Context.pike:1002:    s->ffdhe_groups = ffdhe_groups;       return s;   }      //! Add a session to the cache (if caching is enabled).   void record_session(Session s)   {    if (use_cache && s->identity)    { +  if( sizeof(session_cache) > max_sessions ) +  {    forget_old_sessions();    int to_delete = sizeof(session_cache)-max_sessions;    foreach(session_cache; string id;)    {    // Randomly delete sessions to keep within the limit.    if( to_delete-- < 0 ) break;    SSL3_DEBUG_MSG("SSL.Context->record_session: "    "garbing session %O due to max_sessions limit\n", id);    m_delete (session_cache, id);    } -  +  }    SSL3_DEBUG_MSG("SSL.Context->record_session: caching session %O\n",    s->identity);    session_cache[s->identity] = s;    }   }      //! Invalidate a session for resumption and remove it from the cache.   void purge_session(Session s)   {    SSL3_DEBUG_MSG("SSL.Context->purge_session: %O\n", s->identity || "");