コード例 #1
0
nsX509CertValidity::nsX509CertValidity(const mozilla::UniqueCERTCertificate& cert)
  : mNotBefore(0)
  , mNotAfter(0)
  , mTimesInitialized(false)
{
  MOZ_ASSERT(cert);
  if (!cert) {
    return;
  }

  if (CERT_GetCertTimes(cert.get(), &mNotBefore, &mNotAfter) == SECSuccess) {
    mTimesInitialized = true;
  }
}
コード例 #2
0
nsX509CertValidity::nsX509CertValidity(const mozilla::UniqueCERTCertificate& cert)
  : mTimesInitialized(false)
{
  MOZ_ASSERT(cert);
  if (!cert) {
    return;
  }

  nsNSSShutDownPreventionLock locker;
  if (isAlreadyShutDown()) {
    return;
  }

  if (CERT_GetCertTimes(cert.get(), &mNotBefore, &mNotAfter) == SECSuccess) {
    mTimesInitialized = true;
  }
}