1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et tw=80 : */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef mozilla_psm_VerifySSLServerCertChild_h__
9 #define mozilla_psm_VerifySSLServerCertChild_h__
11 #include "mozilla/psm/PVerifySSLServerCertChild.h"
13 #include "SSLServerCertVerification.h"
14 #include "mozilla/RefPtr.h"
15 #include "nsISupportsImpl.h"
22 class DelegatedCredentialInfo
;
24 // This class implements the socket process part of the server certificate
25 // verification IPC protocol.
26 class VerifySSLServerCertChild
: public PVerifySSLServerCertChild
{
27 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VerifySSLServerCertChild
, override
);
29 explicit VerifySSLServerCertChild(
30 SSLServerCertVerificationResult
* aResultTask
,
31 nsTArray
<nsTArray
<uint8_t>>&& aPeerCertChain
, uint32_t aProviderFlags
);
33 ipc::IPCResult
RecvOnVerifySSLServerCertFinished(
34 nsTArray
<ByteArray
>&& aBuiltCertChain
,
35 const uint16_t& aCertTransparencyStatus
, const EVStatus
& aEVStatus
,
36 const bool& aSucceeded
, int32_t aFinalError
,
37 const nsITransportSecurityInfo::OverridableErrorCategory
&
38 aOverridableErrorCategory
,
39 const bool& aIsBuiltCertChainRootBuiltInRoot
,
40 const bool& aMadeOCSPRequests
);
43 ~VerifySSLServerCertChild() = default;
45 RefPtr
<SSLServerCertVerificationResult
> mResultTask
;
46 nsTArray
<nsTArray
<uint8_t>> mPeerCertChain
;
47 uint32_t mProviderFlags
;
50 SECStatus
RemoteProcessCertVerification(
51 nsTArray
<nsTArray
<uint8_t>>&& aPeerCertChain
, const nsACString
& aHostName
,
52 int32_t aPort
, const OriginAttributes
& aOriginAttributes
,
53 Maybe
<nsTArray
<uint8_t>>& aStapledOCSPResponse
,
54 Maybe
<nsTArray
<uint8_t>>& aSctsFromTLSExtension
,
55 Maybe
<DelegatedCredentialInfo
>& aDcInfo
, uint32_t aProviderFlags
,
56 uint32_t aCertVerifierFlags
, SSLServerCertVerificationResult
* aResultTask
);
59 } // namespace mozilla