michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _INC_NSVERIFICATIONJOB_H michael@0: #define _INC_NSVERIFICATIONJOB_H michael@0: michael@0: #include "nspr.h" michael@0: michael@0: #include "nsIX509Cert.h" michael@0: #include "nsIX509Cert3.h" michael@0: #include "nsICMSMessage.h" michael@0: #include "nsICMSMessage2.h" michael@0: #include "nsProxyRelease.h" michael@0: michael@0: class nsBaseVerificationJob michael@0: { michael@0: public: michael@0: virtual ~nsBaseVerificationJob() {} michael@0: virtual void Run() = 0; michael@0: }; michael@0: michael@0: class nsCertVerificationJob : public nsBaseVerificationJob michael@0: { michael@0: public: michael@0: nsCOMPtr mCert; michael@0: nsMainThreadPtrHandle mListener; michael@0: michael@0: void Run(); michael@0: }; michael@0: michael@0: class nsCertVerificationResult : public nsICertVerificationResult michael@0: { michael@0: public: michael@0: nsCertVerificationResult(); michael@0: virtual ~nsCertVerificationResult(); michael@0: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSICERTVERIFICATIONRESULT michael@0: michael@0: private: michael@0: nsresult mRV; michael@0: uint32_t mVerified; michael@0: uint32_t mCount; michael@0: char16_t **mUsages; michael@0: michael@0: friend class nsCertVerificationJob; michael@0: }; michael@0: michael@0: class nsSMimeVerificationJob : public nsBaseVerificationJob michael@0: { michael@0: public: michael@0: nsSMimeVerificationJob() { digest_data = nullptr; digest_len = 0; } michael@0: ~nsSMimeVerificationJob() { delete [] digest_data; } michael@0: michael@0: nsCOMPtr mMessage; michael@0: nsCOMPtr mListener; michael@0: michael@0: unsigned char *digest_data; michael@0: uint32_t digest_len; michael@0: michael@0: void Run(); michael@0: }; michael@0: michael@0: michael@0: michael@0: #endif