コード例 #1
0
void SSLSessionCacheManager::onGetSuccess(
    SSLCacheProvider::CacheContext* cacheCtx,
    const std::string& value) {
    const uint8_t* cp = (uint8_t*)value.data();
    cacheCtx->session = d2i_SSL_SESSION(nullptr, &cp, value.length());
    restartSSLAccept(cacheCtx);

    /* Insert in the LRU after restarting all clients.  The stats logic
     * in getSession would treat this as a local hit otherwise.
     */
    localCache_->storeSession(cacheCtx->sessionId, cacheCtx->session, stats_);
    delete cacheCtx;
}
コード例 #2
0
void SSLSessionCacheManager::restoreSession(
    SSLCacheProvider::CacheContext* cacheCtx,
    const uint8_t* data,
    size_t length) {
  cacheCtx->session = d2i_SSL_SESSION(nullptr, &data, length);
  restartSSLAccept(cacheCtx);

  /* Insert in the LRU after restarting all clients.  The stats logic
   * in getSession would treat this as a local hit otherwise.
   */
  localCache_->storeSession(cacheCtx->sessionId, cacheCtx->session, stats_);
  delete cacheCtx;
}
コード例 #3
0
void SSLSessionCacheManager::onGetFailure(
    SSLCacheProvider::CacheContext* cacheCtx) {
    restartSSLAccept(cacheCtx);
    delete cacheCtx;
}