tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SelectTLSClientAuthCertChild.h (1611B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 *
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef SECURITY_MANAGER_SSL_SELECTTLSCLIENTAUTHCERTCHILD_H_
      8 #define SECURITY_MANAGER_SSL_SELECTTLSCLIENTAUTHCERTCHILD_H_
      9 
     10 #include "mozilla/psm/PSelectTLSClientAuthCertChild.h"
     11 #include "TLSClientAuthCertSelection.h"
     12 
     13 namespace mozilla {
     14 namespace psm {
     15 
     16 // Socket process component of the SelectTLSClientAuthCert IPC protocol. When
     17 // the parent process selects a client authentication certificate (or opts for
     18 // no certificate), RecvTLSClientAuthCertSelected will be called via IPC with
     19 // the bytes of the certificate (and the bytes of the associated certificate
     20 // chain). That function dispatches an event to the socket thread that notifies
     21 // NSS that the associated connection can continue.
     22 class SelectTLSClientAuthCertChild : public PSelectTLSClientAuthCertChild {
     23 public:
     24  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SelectTLSClientAuthCertChild, override)
     25 
     26  explicit SelectTLSClientAuthCertChild(
     27      ClientAuthCertificateSelected* continuation);
     28 
     29  ipc::IPCResult RecvTLSClientAuthCertSelected(
     30      ByteArray&& aSelectedCertBytes,
     31      nsTArray<ByteArray>&& aSelectedCertChainBytes);
     32 
     33 private:
     34  ~SelectTLSClientAuthCertChild() = default;
     35 
     36  RefPtr<ClientAuthCertificateSelected> mContinuation;
     37 };
     38 
     39 }  // namespace psm
     40 }  // namespace mozilla
     41 
     42 #endif  // SECURITY_MANAGER_SSL_SELECTTLSCLIENTAUTHCERTCHILD_H_