src/net/cert_net/nss_ocsp.cc
// OCSP Http Client functions.
// Our Http Client functions operate in blocking mode.
OCSP Http Client functions.
Our Http Client functions operate in blocking mode.
OCSP Http Client functions . Our Http Client functions operate in blocking mode .
SECStatus OCSPCreateSession(const char* host, PRUint16 portnum,
                            SEC_HTTP_SERVER_SESSION* pSession) {
  VLOG(1) << "OCSP create session: host=" << host << " port=" << portnum;
  pthread_mutex_lock(&g_request_session_delegate_factory_lock);
  bool factory_configured = GetRequestSessionDelegateFactoryPtr() != nullptr;
  pthread_mutex_unlock(&g_request_session_delegate_factory_lock);
  if (!factory_configured) {
    LOG(ERROR)
        << "No OCSPRequestSessionDelegateFactory for NSS HTTP handler. host: "
        << host;
    PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
    return SECFailure;
  }
  *pSession = new OCSPServerSession(host, portnum);
  return SECSuccess;
}
SECStatus OCSPCreateSession ( const char * host , PRUint16 portnum , SEC_HTTP_SERVER_SESSION * pSession ) { VLOG ( 1 ) << " " << host << " " << portnum ; pthread_mutex_lock ( & g_request_session_delegate_factory_lock ) ; bool factory_configured = GetRequestSessionDelegateFactoryPtr ( ) != nullptr ; pthread_mutex_unlock ( & g_request_session_delegate_factory_lock ) ; if ( ! factory_configured ) { LOG ( ERROR ) << " " << host ; PORT_SetError ( PR_NOT_IMPLEMENTED_ERROR ) ; return SECFailure ; } * pSession = new OCSPServerSession ( host , portnum ) ; return SECSuccess ; }
OCSP Http Client functions.
OCSP Http Client functions .
// The application failed to call SetOCSPRequestSessionDelegateFactory or // has already called SetOCSPRequestSessionDelegateFactory(nullptr). // PR_NOT_IMPLEMENTED_ERROR is not an accurate error code for these error // conditions, but is close enough.