зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1311996 - Fix code using pkix::Result to not conflict with the new mozilla::Result type. r=keeler
This commit is contained in:
Родитель
df46d270bd
Коммит
31df59e394
|
@ -643,7 +643,8 @@ VerifyCertificate(CERTCertificate* signerCert, void* voidContext, void* pinArg)
|
|||
return MapSECStatus(SECFailure);
|
||||
}
|
||||
Input certDER;
|
||||
Result rv = certDER.Init(signerCert->derCert.data, signerCert->derCert.len);
|
||||
mozilla::pkix::Result rv = certDER.Init(signerCert->derCert.data,
|
||||
signerCert->derCert.len);
|
||||
if (rv != Success) {
|
||||
return mozilla::psm::GetXPCOMFromNSSError(MapResultToPRErrorCode(rv));
|
||||
}
|
||||
|
@ -654,7 +655,7 @@ VerifyCertificate(CERTCertificate* signerCert, void* voidContext, void* pinArg)
|
|||
KeyPurposeId::id_kp_codeSigning,
|
||||
CertPolicyId::anyPolicy,
|
||||
nullptr/*stapledOCSPResponse*/);
|
||||
if (rv == Result::ERROR_EXPIRED_CERTIFICATE) {
|
||||
if (rv == mozilla::pkix::Result::ERROR_EXPIRED_CERTIFICATE) {
|
||||
// For code-signing you normally need trusted 3rd-party timestamps to
|
||||
// handle expiration properly. The signer could always mess with their
|
||||
// system clock so you can't trust the certificate was un-expired when
|
||||
|
|
|
@ -16,6 +16,8 @@ namespace mozilla { namespace ct {
|
|||
|
||||
using namespace mozilla::pkix;
|
||||
|
||||
typedef mozilla::pkix::Result Result;
|
||||
|
||||
// Note: length is always specified in bytes.
|
||||
// Signed Certificate Timestamp (SCT) Version length
|
||||
static const size_t kVersionLength = 1;
|
||||
|
|
|
@ -26,6 +26,8 @@ class MultiLogCTVerifier;
|
|||
|
||||
namespace mozilla { namespace psm {
|
||||
|
||||
typedef mozilla::pkix::Result Result;
|
||||
|
||||
// These values correspond to the CERT_CHAIN_KEY_SIZE_STATUS telemetry.
|
||||
enum class KeySizeStatus {
|
||||
NeverChecked = 0,
|
||||
|
|
|
@ -38,6 +38,8 @@ using namespace mozilla::pkix;
|
|||
|
||||
namespace mozilla { namespace psm {
|
||||
|
||||
typedef mozilla::pkix::Result Result;
|
||||
|
||||
static SECStatus
|
||||
DigestLength(UniquePK11Context& context, uint32_t length)
|
||||
{
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
using namespace mozilla;
|
||||
using namespace mozilla::pkix;
|
||||
|
||||
namespace mozilla { namespace psm {
|
||||
|
||||
OCSPVerificationTrustDomain::OCSPVerificationTrustDomain(
|
||||
NSSCertDBTrustDomain& certDBTrustDomain)
|
||||
: mCertDBTrustDomain(certDBTrustDomain)
|
||||
|
@ -122,3 +124,5 @@ OCSPVerificationTrustDomain::DigestBuf(
|
|||
{
|
||||
return mCertDBTrustDomain.DigestBuf(item, digestAlg, digestBuf, digestBufLen);
|
||||
}
|
||||
|
||||
} } // namespace mozilla::psm
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
namespace mozilla { namespace psm {
|
||||
|
||||
typedef mozilla::pkix::Result Result;
|
||||
|
||||
class OCSPVerificationTrustDomain : public mozilla::pkix::TrustDomain
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -164,7 +164,7 @@ ContentSignatureVerifier::CreateContextInternal(const nsACString& aData,
|
|||
SECItem* certSecItem = &node->cert->derCert;
|
||||
|
||||
Input certDER;
|
||||
Result result =
|
||||
mozilla::pkix::Result result =
|
||||
certDER.Init(BitwiseCast<uint8_t*, unsigned char*>(certSecItem->data),
|
||||
certSecItem->len);
|
||||
if (result != Success) {
|
||||
|
|
|
@ -257,11 +257,12 @@ VerifyCertificate(CERTCertificate* cert, void* voidContext, void* pinArg)
|
|||
RefPtr<SharedCertVerifier> certVerifier(GetDefaultCertVerifier());
|
||||
NS_ENSURE_TRUE(certVerifier, NS_ERROR_UNEXPECTED);
|
||||
|
||||
Result result = certVerifier->VerifyCert(cert,
|
||||
certificateUsageObjectSigner,
|
||||
Now(), pinArg,
|
||||
nullptr, // hostname
|
||||
context->builtChain);
|
||||
mozilla::pkix::Result result =
|
||||
certVerifier->VerifyCert(cert,
|
||||
certificateUsageObjectSigner,
|
||||
Now(), pinArg,
|
||||
nullptr, // hostname
|
||||
context->builtChain);
|
||||
if (result != Success) {
|
||||
return GetXPCOMFromNSSError(MapResultToPRErrorCode(result));
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ struct nsCancelHTTPDownloadEvent : Runnable {
|
|||
}
|
||||
};
|
||||
|
||||
Result
|
||||
mozilla::pkix::Result
|
||||
nsNSSHttpServerSession::createSessionFcn(const char* host,
|
||||
uint16_t portnum,
|
||||
/*out*/ nsNSSHttpServerSession** pSession)
|
||||
|
@ -210,7 +210,7 @@ nsNSSHttpServerSession::createSessionFcn(const char* host,
|
|||
return Success;
|
||||
}
|
||||
|
||||
Result
|
||||
mozilla::pkix::Result
|
||||
nsNSSHttpRequestSession::createFcn(const nsNSSHttpServerSession* session,
|
||||
const char* http_protocol_variant,
|
||||
const char* path_and_query_string,
|
||||
|
@ -250,7 +250,7 @@ nsNSSHttpRequestSession::createFcn(const nsNSSHttpServerSession* session,
|
|||
return Success;
|
||||
}
|
||||
|
||||
Result
|
||||
mozilla::pkix::Result
|
||||
nsNSSHttpRequestSession::setPostDataFcn(const char* http_data,
|
||||
const uint32_t http_data_len,
|
||||
const char* http_content_type)
|
||||
|
@ -262,7 +262,7 @@ nsNSSHttpRequestSession::setPostDataFcn(const char* http_data,
|
|||
return Success;
|
||||
}
|
||||
|
||||
Result
|
||||
mozilla::pkix::Result
|
||||
nsNSSHttpRequestSession::trySendAndReceiveFcn(PRPollDesc** pPollDesc,
|
||||
uint16_t* http_response_code,
|
||||
const char** http_response_content_type,
|
||||
|
@ -353,7 +353,7 @@ nsNSSHttpRequestSession::Release()
|
|||
}
|
||||
}
|
||||
|
||||
Result
|
||||
mozilla::pkix::Result
|
||||
nsNSSHttpRequestSession::internal_send_receive_attempt(bool &retryable_error,
|
||||
PRPollDesc **pPollDesc,
|
||||
uint16_t *http_response_code,
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
using namespace mozilla::pkix;
|
||||
using namespace mozilla::pkix::test;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
template <size_t N>
|
||||
inline Input
|
||||
|
@ -46,7 +45,7 @@ protected:
|
|||
};
|
||||
|
||||
static void
|
||||
PutAndGet(OCSPCache& cache, const CertID& certID, Result result,
|
||||
PutAndGet(mozilla::psm::OCSPCache& cache, const CertID& certID, Result result,
|
||||
Time time, const char* firstPartyDomain = nullptr)
|
||||
{
|
||||
// The first time is thisUpdate. The second is validUntil.
|
||||
|
|
Загрузка…
Ссылка в новой задаче