2014-02-03 09:21:00 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-05-14 17:37:25 +04:00
|
|
|
/* This code is made available to you under your choice of the following sets
|
|
|
|
* of licensing terms:
|
|
|
|
*/
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
/* Copyright 2013 Mozilla Contributors
|
2014-02-03 09:21:00 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2014-03-21 01:29:21 +04:00
|
|
|
#include "pkix/pkix.h"
|
2014-02-03 09:21:00 +04:00
|
|
|
|
|
|
|
#include "pkixcheck.h"
|
2014-07-19 09:30:51 +04:00
|
|
|
#include "pkixutil.h"
|
2014-02-03 09:21:00 +04:00
|
|
|
|
2014-03-21 01:29:21 +04:00
|
|
|
namespace mozilla { namespace pkix {
|
2014-02-03 09:21:00 +04:00
|
|
|
|
|
|
|
static Result BuildForward(TrustDomain& trustDomain,
|
2014-07-04 03:59:42 +04:00
|
|
|
const BackCert& subject,
|
2014-08-02 19:49:12 +04:00
|
|
|
Time time,
|
2014-06-19 11:13:20 +04:00
|
|
|
KeyUsage requiredKeyUsageIfPresent,
|
2014-05-14 12:02:34 +04:00
|
|
|
KeyPurposeId requiredEKUIfPresent,
|
2014-05-16 05:59:52 +04:00
|
|
|
const CertPolicyId& requiredPolicy,
|
2014-07-31 23:17:31 +04:00
|
|
|
/*optional*/ const Input* stapledOCSPResponse,
|
2014-07-07 02:55:38 +04:00
|
|
|
unsigned int subCACount);
|
2014-02-03 09:21:00 +04:00
|
|
|
|
2014-07-03 03:15:16 +04:00
|
|
|
TrustDomain::IssuerChecker::IssuerChecker() { }
|
|
|
|
TrustDomain::IssuerChecker::~IssuerChecker() { }
|
|
|
|
|
|
|
|
// The implementation of TrustDomain::IssuerTracker is in a subclass only to
|
|
|
|
// hide the implementation from external users.
|
|
|
|
class PathBuildingStep : public TrustDomain::IssuerChecker
|
2014-07-03 02:03:58 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
PathBuildingStep(TrustDomain& trustDomain, const BackCert& subject,
|
2014-08-02 19:49:12 +04:00
|
|
|
Time time, KeyPurposeId requiredEKUIfPresent,
|
2014-07-03 02:03:58 +04:00
|
|
|
const CertPolicyId& requiredPolicy,
|
2014-07-31 23:17:31 +04:00
|
|
|
/*optional*/ const Input* stapledOCSPResponse,
|
2014-08-14 23:02:55 +04:00
|
|
|
unsigned int subCACount, Result deferredSubjectError)
|
2014-07-03 02:03:58 +04:00
|
|
|
: trustDomain(trustDomain)
|
|
|
|
, subject(subject)
|
|
|
|
, time(time)
|
|
|
|
, requiredEKUIfPresent(requiredEKUIfPresent)
|
|
|
|
, requiredPolicy(requiredPolicy)
|
|
|
|
, stapledOCSPResponse(stapledOCSPResponse)
|
|
|
|
, subCACount(subCACount)
|
2014-08-14 23:02:55 +04:00
|
|
|
, deferredSubjectError(deferredSubjectError)
|
2014-07-18 22:48:49 +04:00
|
|
|
, result(Result::FATAL_ERROR_LIBRARY_FAILURE)
|
2014-07-03 02:03:58 +04:00
|
|
|
, resultWasSet(false)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-07-31 23:17:31 +04:00
|
|
|
Result Check(Input potentialIssuerDER,
|
|
|
|
/*optional*/ const Input* additionalNameConstraints,
|
2014-07-18 22:48:49 +04:00
|
|
|
/*out*/ bool& keepGoing);
|
2014-07-03 02:03:58 +04:00
|
|
|
|
|
|
|
Result CheckResult() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
TrustDomain& trustDomain;
|
|
|
|
const BackCert& subject;
|
2014-08-02 19:49:12 +04:00
|
|
|
const Time time;
|
2014-07-03 02:03:58 +04:00
|
|
|
const KeyPurposeId requiredEKUIfPresent;
|
|
|
|
const CertPolicyId& requiredPolicy;
|
2014-07-31 23:17:31 +04:00
|
|
|
/*optional*/ Input const* const stapledOCSPResponse;
|
2014-07-03 02:03:58 +04:00
|
|
|
const unsigned int subCACount;
|
2014-08-14 23:02:55 +04:00
|
|
|
const Result deferredSubjectError;
|
2014-07-03 02:03:58 +04:00
|
|
|
|
2014-07-18 22:48:49 +04:00
|
|
|
Result RecordResult(Result currentResult, /*out*/ bool& keepGoing);
|
|
|
|
Result result;
|
2014-07-03 02:03:58 +04:00
|
|
|
bool resultWasSet;
|
|
|
|
|
|
|
|
PathBuildingStep(const PathBuildingStep&) /*= delete*/;
|
|
|
|
void operator=(const PathBuildingStep&) /*= delete*/;
|
|
|
|
};
|
|
|
|
|
2014-07-18 22:48:49 +04:00
|
|
|
Result
|
|
|
|
PathBuildingStep::RecordResult(Result newResult, /*out*/ bool& keepGoing)
|
2014-07-03 02:03:58 +04:00
|
|
|
{
|
2014-07-18 22:48:49 +04:00
|
|
|
if (newResult == Result::ERROR_UNTRUSTED_CERT) {
|
|
|
|
newResult = Result::ERROR_UNTRUSTED_ISSUER;
|
2014-08-02 10:16:21 +04:00
|
|
|
} else if (newResult == Result::ERROR_EXPIRED_CERTIFICATE) {
|
|
|
|
newResult = Result::ERROR_EXPIRED_ISSUER_CERTIFICATE;
|
2014-07-03 02:03:58 +04:00
|
|
|
}
|
2014-07-18 22:48:49 +04:00
|
|
|
|
2014-07-03 02:03:58 +04:00
|
|
|
if (resultWasSet) {
|
2014-07-18 22:48:49 +04:00
|
|
|
if (result == Success) {
|
2014-08-04 05:24:35 +04:00
|
|
|
return NotReached("RecordResult called after finding a chain",
|
|
|
|
Result::FATAL_ERROR_INVALID_STATE);
|
2014-07-03 02:03:58 +04:00
|
|
|
}
|
|
|
|
// If every potential issuer has the same problem (e.g. expired) and/or if
|
|
|
|
// there is only one bad potential issuer, then return a more specific
|
|
|
|
// error. Otherwise, punt on trying to decide which error should be
|
2014-07-18 22:48:49 +04:00
|
|
|
// returned by returning the generic Result::ERROR_UNKNOWN_ISSUER error.
|
|
|
|
if (newResult != Success && newResult != result) {
|
|
|
|
newResult = Result::ERROR_UNKNOWN_ISSUER;
|
2014-07-03 02:03:58 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
result = newResult;
|
|
|
|
resultWasSet = true;
|
2014-07-18 22:48:49 +04:00
|
|
|
keepGoing = result != Success;
|
|
|
|
return Success;
|
2014-07-03 02:03:58 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
Result
|
|
|
|
PathBuildingStep::CheckResult() const
|
|
|
|
{
|
|
|
|
if (!resultWasSet) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return Result::ERROR_UNKNOWN_ISSUER;
|
2014-07-03 02:03:58 +04:00
|
|
|
}
|
2014-07-18 22:48:49 +04:00
|
|
|
return result;
|
2014-07-03 02:03:58 +04:00
|
|
|
}
|
|
|
|
|
2014-02-03 09:21:00 +04:00
|
|
|
// The code that executes in the inner loop of BuildForward
|
2014-07-18 22:48:49 +04:00
|
|
|
Result
|
2014-07-31 23:17:31 +04:00
|
|
|
PathBuildingStep::Check(Input potentialIssuerDER,
|
|
|
|
/*optional*/ const Input* additionalNameConstraints,
|
2014-07-19 09:30:51 +04:00
|
|
|
/*out*/ bool& keepGoing)
|
2014-02-03 09:21:00 +04:00
|
|
|
{
|
2014-07-09 00:04:17 +04:00
|
|
|
BackCert potentialIssuer(potentialIssuerDER, EndEntityOrCA::MustBeCA,
|
|
|
|
&subject);
|
2014-07-04 03:59:42 +04:00
|
|
|
Result rv = potentialIssuer.Init();
|
2014-02-03 09:21:00 +04:00
|
|
|
if (rv != Success) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return RecordResult(rv, keepGoing);
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
// RFC5280 4.2.1.1. Authority Key Identifier
|
|
|
|
// RFC5280 4.2.1.2. Subject Key Identifier
|
|
|
|
|
|
|
|
// Loop prevention, done as recommended by RFC4158 Section 5.2
|
|
|
|
// TODO: this doesn't account for subjectAltNames!
|
|
|
|
// TODO(perf): This probably can and should be optimized in some way.
|
|
|
|
bool loopDetected = false;
|
2014-07-04 03:59:42 +04:00
|
|
|
for (const BackCert* prev = potentialIssuer.childCert;
|
2014-02-03 09:21:00 +04:00
|
|
|
!loopDetected && prev != nullptr; prev = prev->childCert) {
|
2014-07-31 23:17:31 +04:00
|
|
|
if (InputsAreEqual(potentialIssuer.GetSubjectPublicKeyInfo(),
|
|
|
|
prev->GetSubjectPublicKeyInfo()) &&
|
|
|
|
InputsAreEqual(potentialIssuer.GetSubject(), prev->GetSubject())) {
|
2014-07-03 02:03:58 +04:00
|
|
|
// XXX: error code
|
2014-07-18 22:48:49 +04:00
|
|
|
return RecordResult(Result::ERROR_UNKNOWN_ISSUER, keepGoing);
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-11 09:38:59 +04:00
|
|
|
if (potentialIssuer.GetNameConstraints()) {
|
|
|
|
rv = CheckNameConstraints(*potentialIssuer.GetNameConstraints(),
|
|
|
|
subject, requiredEKUIfPresent);
|
|
|
|
if (rv != Success) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return RecordResult(rv, keepGoing);
|
2014-07-11 09:38:59 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (additionalNameConstraints) {
|
|
|
|
rv = CheckNameConstraints(*additionalNameConstraints, subject,
|
|
|
|
requiredEKUIfPresent);
|
|
|
|
if (rv != Success) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return RecordResult(rv, keepGoing);
|
2014-07-11 09:38:59 +04:00
|
|
|
}
|
2014-02-11 03:25:23 +04:00
|
|
|
}
|
|
|
|
|
2014-06-19 11:13:20 +04:00
|
|
|
// RFC 5280, Section 4.2.1.3: "If the keyUsage extension is present, then the
|
|
|
|
// subject public key MUST NOT be used to verify signatures on certificates
|
|
|
|
// or CRLs unless the corresponding keyCertSign or cRLSign bit is set."
|
2014-07-09 00:04:17 +04:00
|
|
|
rv = BuildForward(trustDomain, potentialIssuer, time, KeyUsage::keyCertSign,
|
|
|
|
requiredEKUIfPresent, requiredPolicy, nullptr, subCACount);
|
2014-02-03 09:21:00 +04:00
|
|
|
if (rv != Success) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return RecordResult(rv, keepGoing);
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-10-07 20:35:42 +04:00
|
|
|
rv = WrappedVerifySignedData(trustDomain, subject.GetSignedData(),
|
|
|
|
potentialIssuer.GetSubjectPublicKeyInfo());
|
2014-07-18 22:48:49 +04:00
|
|
|
if (rv != Success) {
|
|
|
|
return RecordResult(rv, keepGoing);
|
2014-07-04 03:59:42 +04:00
|
|
|
}
|
|
|
|
|
2014-08-14 23:02:55 +04:00
|
|
|
// We avoid doing revocation checking for expired certificates because OCSP
|
|
|
|
// responders are allowed to forget about expired certificates, and many OCSP
|
|
|
|
// responders return an error when asked for the status of an expired
|
|
|
|
// certificate.
|
|
|
|
if (deferredSubjectError != Result::ERROR_EXPIRED_CERTIFICATE) {
|
|
|
|
CertID certID(subject.GetIssuer(), potentialIssuer.GetSubjectPublicKeyInfo(),
|
|
|
|
subject.GetSerialNumber());
|
|
|
|
rv = trustDomain.CheckRevocation(subject.endEntityOrCA, certID, time,
|
|
|
|
stapledOCSPResponse,
|
|
|
|
subject.GetAuthorityInfoAccess());
|
|
|
|
if (rv != Success) {
|
|
|
|
return RecordResult(rv, keepGoing);
|
|
|
|
}
|
2014-07-02 23:21:41 +04:00
|
|
|
}
|
|
|
|
|
2014-07-18 22:48:49 +04:00
|
|
|
return RecordResult(Success, keepGoing);
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-02-11 12:46:05 +04:00
|
|
|
// Recursively build the path from the given subject certificate to the root.
|
|
|
|
//
|
|
|
|
// Be very careful about changing the order of checks. The order is significant
|
|
|
|
// because it affects which error we return when a certificate or certificate
|
|
|
|
// chain has multiple problems. See the error ranking documentation in
|
2014-03-21 01:29:21 +04:00
|
|
|
// pkix/pkix.h.
|
2014-02-03 09:21:00 +04:00
|
|
|
static Result
|
|
|
|
BuildForward(TrustDomain& trustDomain,
|
2014-07-04 03:59:42 +04:00
|
|
|
const BackCert& subject,
|
2014-08-02 19:49:12 +04:00
|
|
|
Time time,
|
2014-06-19 11:13:20 +04:00
|
|
|
KeyUsage requiredKeyUsageIfPresent,
|
2014-05-14 12:02:34 +04:00
|
|
|
KeyPurposeId requiredEKUIfPresent,
|
2014-05-16 05:59:52 +04:00
|
|
|
const CertPolicyId& requiredPolicy,
|
2014-07-31 23:17:31 +04:00
|
|
|
/*optional*/ const Input* stapledOCSPResponse,
|
2014-07-07 02:55:38 +04:00
|
|
|
unsigned int subCACount)
|
2014-02-03 09:21:00 +04:00
|
|
|
{
|
2014-02-17 06:09:06 +04:00
|
|
|
Result rv;
|
|
|
|
|
2014-04-26 03:29:26 +04:00
|
|
|
TrustLevel trustLevel;
|
2014-04-08 20:49:36 +04:00
|
|
|
// If this is an end-entity and not a trust anchor, we defer reporting
|
|
|
|
// any error found here until after attempting to find a valid chain.
|
|
|
|
// See the explanation of error prioritization in pkix.h.
|
2014-02-17 06:09:06 +04:00
|
|
|
rv = CheckIssuerIndependentProperties(trustDomain, subject, time,
|
2014-06-19 11:13:20 +04:00
|
|
|
requiredKeyUsageIfPresent,
|
2014-02-25 00:37:45 +04:00
|
|
|
requiredEKUIfPresent, requiredPolicy,
|
2014-07-20 22:06:26 +04:00
|
|
|
subCACount, trustLevel);
|
2014-07-18 22:48:49 +04:00
|
|
|
Result deferredEndEntityError = Success;
|
2014-02-07 06:13:20 +04:00
|
|
|
if (rv != Success) {
|
2014-07-09 00:04:17 +04:00
|
|
|
if (subject.endEntityOrCA == EndEntityOrCA::MustBeEndEntity &&
|
2014-04-26 03:29:26 +04:00
|
|
|
trustLevel != TrustLevel::TrustAnchor) {
|
2014-07-18 22:48:49 +04:00
|
|
|
deferredEndEntityError = rv;
|
2014-04-08 20:49:36 +04:00
|
|
|
} else {
|
2014-02-11 12:46:05 +04:00
|
|
|
return rv;
|
|
|
|
}
|
2014-02-07 06:13:20 +04:00
|
|
|
}
|
|
|
|
|
2014-04-26 03:29:26 +04:00
|
|
|
if (trustLevel == TrustLevel::TrustAnchor) {
|
2014-06-04 12:28:44 +04:00
|
|
|
// End of the recursion.
|
2014-02-06 02:49:10 +04:00
|
|
|
|
2014-07-07 02:55:38 +04:00
|
|
|
NonOwningDERArray chain;
|
2014-07-04 03:59:42 +04:00
|
|
|
for (const BackCert* cert = &subject; cert; cert = cert->childCert) {
|
2014-07-18 22:48:49 +04:00
|
|
|
rv = chain.Append(cert->GetDER());
|
2014-07-07 02:55:38 +04:00
|
|
|
if (rv != Success) {
|
2014-08-04 05:24:35 +04:00
|
|
|
return NotReached("NonOwningDERArray::SetItem failed.", rv);
|
2014-02-06 02:49:10 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-04 12:28:44 +04:00
|
|
|
// This must be done here, after the chain is built but before any
|
|
|
|
// revocation checks have been done.
|
2014-09-25 22:18:56 +04:00
|
|
|
return trustDomain.IsChainValid(chain, time);
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-07-09 00:04:17 +04:00
|
|
|
if (subject.endEntityOrCA == EndEntityOrCA::MustBeCA) {
|
2014-06-01 03:32:58 +04:00
|
|
|
// Avoid stack overflows and poor performance by limiting cert chain
|
|
|
|
// length.
|
|
|
|
static const unsigned int MAX_SUBCA_COUNT = 6;
|
2014-07-07 02:55:38 +04:00
|
|
|
static_assert(1/*end-entity*/ + MAX_SUBCA_COUNT + 1/*root*/ ==
|
|
|
|
NonOwningDERArray::MAX_LENGTH,
|
|
|
|
"MAX_SUBCA_COUNT and NonOwningDERArray::MAX_LENGTH mismatch.");
|
2014-06-01 03:32:58 +04:00
|
|
|
if (subCACount >= MAX_SUBCA_COUNT) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return Result::ERROR_UNKNOWN_ISSUER;
|
2014-06-01 03:32:58 +04:00
|
|
|
}
|
|
|
|
++subCACount;
|
|
|
|
} else {
|
2014-08-02 20:17:59 +04:00
|
|
|
assert(subCACount == 0);
|
2014-06-01 03:32:58 +04:00
|
|
|
}
|
|
|
|
|
2014-02-03 09:21:00 +04:00
|
|
|
// Find a trusted issuer.
|
2014-07-03 02:03:58 +04:00
|
|
|
|
2014-07-09 00:04:17 +04:00
|
|
|
PathBuildingStep pathBuilder(trustDomain, subject, time,
|
2014-07-03 02:03:58 +04:00
|
|
|
requiredEKUIfPresent, requiredPolicy,
|
2014-08-14 23:02:55 +04:00
|
|
|
stapledOCSPResponse, subCACount,
|
|
|
|
deferredEndEntityError);
|
2014-07-03 02:03:58 +04:00
|
|
|
|
2014-02-03 09:21:00 +04:00
|
|
|
// TODO(bug 965136): Add SKI/AKI matching optimizations
|
2014-07-18 22:48:49 +04:00
|
|
|
rv = trustDomain.FindIssuer(subject.GetIssuer(), pathBuilder, time);
|
|
|
|
if (rv != Success) {
|
|
|
|
return rv;
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
2014-02-11 12:46:05 +04:00
|
|
|
|
2014-07-03 02:03:58 +04:00
|
|
|
rv = pathBuilder.CheckResult();
|
|
|
|
if (rv != Success) {
|
|
|
|
return rv;
|
2014-02-11 12:46:05 +04:00
|
|
|
}
|
|
|
|
|
2014-07-03 02:03:58 +04:00
|
|
|
// If we found a valid chain but deferred reporting an error with the
|
|
|
|
// end-entity certificate, report it now.
|
2014-07-18 22:48:49 +04:00
|
|
|
if (deferredEndEntityError != Success) {
|
|
|
|
return deferredEndEntityError;
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-07-03 02:03:58 +04:00
|
|
|
// We've built a valid chain from the subject cert up to a trusted root.
|
|
|
|
return Success;
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-07-18 22:48:49 +04:00
|
|
|
Result
|
2014-07-31 23:17:31 +04:00
|
|
|
BuildCertChain(TrustDomain& trustDomain, Input certDER,
|
2014-08-02 19:49:12 +04:00
|
|
|
Time time, EndEntityOrCA endEntityOrCA,
|
2014-06-19 11:13:20 +04:00
|
|
|
KeyUsage requiredKeyUsageIfPresent,
|
|
|
|
KeyPurposeId requiredEKUIfPresent,
|
2014-05-16 05:59:52 +04:00
|
|
|
const CertPolicyId& requiredPolicy,
|
2014-07-31 23:17:31 +04:00
|
|
|
/*optional*/ const Input* stapledOCSPResponse)
|
2014-02-03 09:21:00 +04:00
|
|
|
{
|
2014-02-11 03:25:23 +04:00
|
|
|
// XXX: Support the legacy use of the subject CN field for indicating the
|
|
|
|
// domain name the certificate is valid for.
|
2014-07-09 00:04:17 +04:00
|
|
|
BackCert cert(certDER, endEntityOrCA, nullptr);
|
2014-07-04 03:59:42 +04:00
|
|
|
Result rv = cert.Init();
|
2014-02-03 09:21:00 +04:00
|
|
|
if (rv != Success) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return rv;
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-07-16 03:49:00 +04:00
|
|
|
// See documentation for CheckPublicKey() in pkixtypes.h for why the public
|
|
|
|
// key also needs to be checked here when trustDomain.VerifySignedData()
|
|
|
|
// should already be doing it.
|
2014-07-18 22:48:49 +04:00
|
|
|
rv = trustDomain.CheckPublicKey(cert.GetSubjectPublicKeyInfo());
|
2014-02-03 09:21:00 +04:00
|
|
|
if (rv != Success) {
|
2014-07-18 22:48:49 +04:00
|
|
|
return rv;
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-07-18 22:48:49 +04:00
|
|
|
return BuildForward(trustDomain, cert, time, requiredKeyUsageIfPresent,
|
|
|
|
requiredEKUIfPresent, requiredPolicy, stapledOCSPResponse,
|
|
|
|
0/*subCACount*/);
|
2014-02-03 09:21:00 +04:00
|
|
|
}
|
|
|
|
|
2014-03-21 01:29:21 +04:00
|
|
|
} } // namespace mozilla::pkix
|