From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- security/manager/ssl/VerifySSLServerCertChild.h | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 security/manager/ssl/VerifySSLServerCertChild.h (limited to 'security/manager/ssl/VerifySSLServerCertChild.h') diff --git a/security/manager/ssl/VerifySSLServerCertChild.h b/security/manager/ssl/VerifySSLServerCertChild.h new file mode 100644 index 0000000000..94fd5d48d0 --- /dev/null +++ b/security/manager/ssl/VerifySSLServerCertChild.h @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set sw=2 ts=8 et tw=80 : */ + +/* 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/. */ + +#ifndef mozilla_psm_VerifySSLServerCertChild_h__ +#define mozilla_psm_VerifySSLServerCertChild_h__ + +#include "mozilla/psm/PVerifySSLServerCertChild.h" + +#include "SSLServerCertVerification.h" +#include "mozilla/RefPtr.h" +#include "nsISupportsImpl.h" +#include "nsString.h" +#include "seccomon.h" + +namespace mozilla { +namespace psm { + +class DelegatedCredentialInfo; + +// This class implements the socket process part of the server certificate +// verification IPC protocol. +class VerifySSLServerCertChild : public PVerifySSLServerCertChild { + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VerifySSLServerCertChild, override); + + explicit VerifySSLServerCertChild( + SSLServerCertVerificationResult* aResultTask, + nsTArray>&& aPeerCertChain, uint32_t aProviderFlags); + + ipc::IPCResult RecvOnVerifiedSSLServerCertSuccess( + nsTArray&& aBuiltCertChain, + const uint16_t& aCertTransparencyStatus, const uint8_t& aEVStatus, + const bool& aIsBuiltCertChainRootBuiltInRoot, + const bool& aMadeOCSPRequests); + + ipc::IPCResult RecvOnVerifiedSSLServerCertFailure( + const int32_t& aFinalError, const uint32_t& aOverridableErrorCategory, + const bool& aMadeOCSPRequests); + + private: + ~VerifySSLServerCertChild() = default; + + RefPtr mResultTask; + nsTArray> mPeerCertChain; + uint32_t mProviderFlags; +}; + +SECStatus RemoteProcessCertVerification( + nsTArray>&& aPeerCertChain, const nsACString& aHostName, + int32_t aPort, const OriginAttributes& aOriginAttributes, + Maybe>& aStapledOCSPResponse, + Maybe>& aSctsFromTLSExtension, + Maybe& aDcInfo, uint32_t aProviderFlags, + uint32_t aCertVerifierFlags, SSLServerCertVerificationResult* aResultTask); + +} // namespace psm +} // namespace mozilla + +#endif -- cgit v1.2.3