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: interface nsIX509Cert; michael@0: michael@0: /** michael@0: * nsICMSManager (service) michael@0: * Interface to access users certificate store michael@0: */ michael@0: [scriptable, uuid(14b4394a-1dd2-11b2-b4fd-ba4a194fe97e)] michael@0: interface nsICMSSecureMessage : nsISupports michael@0: { michael@0: /** michael@0: * getCertByPrefID - a BASE64 string representing a user's michael@0: * certificate (or NULL if there isn't one) michael@0: */ michael@0: string getCertByPrefID(in string certID); michael@0: michael@0: /** michael@0: * decodeCert - decode a BASE64 string into an X509Certificate object michael@0: */ michael@0: nsIX509Cert decodeCert(in string value); michael@0: michael@0: /** michael@0: * sendMessage - send a text message to the recipient indicated michael@0: * by the base64-encoded cert. michael@0: */ michael@0: string sendMessage(in string msg, in string cert); michael@0: michael@0: /** michael@0: * receiveMessage - receive an encrypted (enveloped) message michael@0: */ michael@0: string receiveMessage(in string msg); michael@0: }; michael@0: michael@0: %{C++ michael@0: #define NS_CMSSECUREMESSAGE_CONTRACTID "@mozilla.org/nsCMSSecureMessage;1" michael@0: %}