nsVerificationJob.h 1.1 KB

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