michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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: #include "nsISupports.idl" michael@0: michael@0: %{ C++ michael@0: #define NS_CMSMESSAGE_CONTRACTID "@mozilla.org/nsCMSMessage;1" michael@0: %} michael@0: michael@0: [ptr] native UnsignedCharPtr(unsigned char); michael@0: michael@0: interface nsIX509Cert; michael@0: interface nsIArray; michael@0: michael@0: /** michael@0: * nsICMSMessage michael@0: * Interface to a CMS Message michael@0: */ michael@0: [uuid(a4557478-ae16-11d5-ba4b-00108303b117)] michael@0: interface nsICMSMessage : nsISupports michael@0: { michael@0: void contentIsSigned(out boolean aSigned); michael@0: void contentIsEncrypted(out boolean aEncrypted); michael@0: void getSignerCommonName(out string aName); michael@0: void getSignerEmailAddress(out string aEmail); michael@0: void getSignerCert(out nsIX509Cert scert); michael@0: void getEncryptionCert(out nsIX509Cert ecert); michael@0: void verifySignature(); michael@0: void verifyDetachedSignature(in UnsignedCharPtr aDigestData, in unsigned long aDigestDataLen); michael@0: void CreateEncrypted(in nsIArray aRecipientCerts); michael@0: void CreateSigned(in nsIX509Cert scert, in nsIX509Cert ecert, in UnsignedCharPtr aDigestData, in unsigned long aDigestDataLen); michael@0: }; michael@0: