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

version» Context lines:

pike.git/lib/modules/SSL.pmod/Context.pike:775:   int session_number; /* Incremented for each session, and used when    * constructing the session id */      // Remove sessions older than @[session_lifetime] from the session cache.   void forget_old_sessions()   {    int t = time() - session_lifetime;    array pair;    while ( (pair = [array]active_sessions->peek())    && (pair[0] < t)) { -  SSL3_DEBUG_MSG("SSL.context->forget_old_sessions: " +  SSL3_DEBUG_MSG("SSL.Context->forget_old_sessions: "    "garbing session %O due to session_lifetime limit\n",    pair[1]);    m_delete (session_cache, [string]([array]active_sessions->get())[1]);    }   }      //! Lookup a session identifier in the cache. Returns the   //! corresponding session, or zero if it is not found or caching is   //! disabled.   Session lookup_session(string id)
pike.git/lib/modules/SSL.pmod/Context.pike:811:    return s;   }      //! Add a session to the cache (if caching is enabled).   void record_session(Session s)   {    if (use_cache && s->identity)    {    while (sizeof (active_sessions) >= max_sessions) {    array pair = [array] active_sessions->get(); -  SSL3_DEBUG_MSG("SSL.context->record_session: " +  SSL3_DEBUG_MSG("SSL.Context->record_session: "    "garbing session %O due to max_sessions limit\n", pair[1]);    m_delete (session_cache, [string]pair[1]);    }    forget_old_sessions(); -  SSL3_DEBUG_MSG("SSL.context->record_session: caching session %O\n", +  SSL3_DEBUG_MSG("SSL.Context->record_session: caching session %O\n",    s->identity);    active_sessions->put( ({ time(1), s->identity }) );    session_cache[s->identity] = s;    }   }      //! Remove a session from the cache.   void purge_session(Session s)   { -  SSL3_DEBUG_MSG("SSL.context->purge_session: %O\n", s->identity || ""); +  SSL3_DEBUG_MSG("SSL.Context->purge_session: %O\n", s->identity || "");    if (s->identity)    m_delete (session_cache, s->identity);    /* There's no need to remove the id from the active_sessions queue */   }      protected void create()   { -  SSL3_DEBUG_MSG("SSL.context->create\n"); +  SSL3_DEBUG_MSG("SSL.Context->create\n");       /* Backwards compatibility */    preferred_suites = get_suites(128, 1);   }      // update the cached decoded authorities list   private void update_authorities()   {    authorities_cache = ({});    foreach(authorities, string a)
pike.git/lib/modules/SSL.pmod/Context.pike:1145:   //!   //! @param min_keylength   //! Minimum acceptable key length in bits.   //!   //! @seealso   //! @[dhe_dss_mode()], @[filter_weak_suites()]   //!   //! @deprecated get_suites   __deprecated__ void rsa_mode(int(0..)|void min_keylength)   { -  SSL3_DEBUG_MSG("SSL.context: rsa_mode()\n"); +  SSL3_DEBUG_MSG("SSL.Context: rsa_mode()\n");    preferred_suites = get_suites(min_keylength, 1);   }      //! Set @[preferred_suites] to DSS based methods.   //!   //! @param min_keylength   //! Minimum acceptable key length in bits.   //!   //! @seealso   //! @[rsa_mode()], @[filter_weak_suites()]   //!   //! @deprecated get_suites   __deprecated__ void dhe_dss_mode(int(0..)|void min_keylength)   { -  SSL3_DEBUG_MSG("SSL.context: dhe_dss_mode()\n"); +  SSL3_DEBUG_MSG("SSL.Context: dhe_dss_mode()\n");    preferred_suites = get_suites(min_keylength, 1);   }