nsNSSCertificateFakeTransport.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef nsNSSCertificateFakeTransport_h
  6. #define nsNSSCertificateFakeTransport_h
  7. #include "ScopedNSSTypes.h"
  8. #include "mozilla/Vector.h"
  9. #include "nsCOMPtr.h"
  10. #include "nsIClassInfo.h"
  11. #include "nsISerializable.h"
  12. #include "nsIX509Cert.h"
  13. #include "nsIX509CertList.h"
  14. #include "secitem.h"
  15. class nsNSSCertificateFakeTransport : public nsIX509Cert,
  16. public nsISerializable,
  17. public nsIClassInfo
  18. {
  19. public:
  20. NS_DECL_THREADSAFE_ISUPPORTS
  21. NS_DECL_NSIX509CERT
  22. NS_DECL_NSISERIALIZABLE
  23. NS_DECL_NSICLASSINFO
  24. nsNSSCertificateFakeTransport();
  25. protected:
  26. virtual ~nsNSSCertificateFakeTransport();
  27. private:
  28. mozilla::UniqueSECItem mCertSerialization;
  29. };
  30. class nsNSSCertListFakeTransport : public nsIX509CertList,
  31. public nsISerializable
  32. {
  33. public:
  34. NS_DECL_THREADSAFE_ISUPPORTS
  35. NS_DECL_NSIX509CERTLIST
  36. NS_DECL_NSISERIALIZABLE
  37. nsNSSCertListFakeTransport();
  38. protected:
  39. virtual ~nsNSSCertListFakeTransport();
  40. private:
  41. mozilla::Vector<nsCOMPtr<nsIX509Cert> > mFakeCertList;
  42. };
  43. #endif // nsNSSCertificateFakeTransport_h