tor-browser

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

nsVerificationJob.h (1084B)


      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 _INC_NSVERIFICATIONJOB_H
      8 #define _INC_NSVERIFICATIONJOB_H
      9 
     10 #include "nspr.h"
     11 
     12 #include "nsIX509Cert.h"
     13 #include "nsProxyRelease.h"
     14 
     15 class nsBaseVerificationJob {
     16 public:
     17  virtual ~nsBaseVerificationJob() {}
     18  virtual void Run() = 0;
     19 };
     20 
     21 class nsCertVerificationJob : public nsBaseVerificationJob {
     22 public:
     23  nsCOMPtr<nsIX509Cert> mCert;
     24  nsMainThreadPtrHandle<nsICertVerificationListener> mListener;
     25 
     26  void Run();
     27 };
     28 
     29 class nsCertVerificationResult : public nsICertVerificationResult {
     30 public:
     31  nsCertVerificationResult();
     32 
     33  NS_DECL_THREADSAFE_ISUPPORTS
     34  NS_DECL_NSICERTVERIFICATIONRESULT
     35 
     36 protected:
     37  virtual ~nsCertVerificationResult();
     38 
     39 private:
     40  nsresult mRV;
     41  uint32_t mVerified;
     42  uint32_t mCount;
     43  char16_t** mUsages;
     44 
     45  friend class nsCertVerificationJob;
     46 };
     47 
     48 #endif