VerifySSLServerCertChild.h (2191B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set sw=2 ts=8 et tw=80 : */ 3 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/. */ 7 8 #ifndef mozilla_psm_VerifySSLServerCertChild_h__ 9 #define mozilla_psm_VerifySSLServerCertChild_h__ 10 11 #include "mozilla/psm/PVerifySSLServerCertChild.h" 12 13 #include "SSLServerCertVerification.h" 14 #include "mozilla/RefPtr.h" 15 #include "nsISupportsImpl.h" 16 #include "nsString.h" 17 #include "seccomon.h" 18 19 namespace mozilla { 20 namespace psm { 21 22 class DelegatedCredentialInfo; 23 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); 28 29 explicit VerifySSLServerCertChild( 30 SSLServerCertVerificationResult* aResultTask, 31 nsTArray<nsTArray<uint8_t>>&& aPeerCertChain, uint32_t aProviderFlags); 32 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); 41 42 private: 43 ~VerifySSLServerCertChild() = default; 44 45 RefPtr<SSLServerCertVerificationResult> mResultTask; 46 nsTArray<nsTArray<uint8_t>> mPeerCertChain; 47 uint32_t mProviderFlags; 48 }; 49 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); 57 58 } // namespace psm 59 } // namespace mozilla 60 61 #endif