security/manager/ssl/public/nsICMSSecureMessage.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/ssl/public/nsICMSSecureMessage.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIX509Cert;
    1.12 +
    1.13 +/**
    1.14 + * nsICMSManager (service)
    1.15 + *  Interface to access users certificate store
    1.16 + */
    1.17 +[scriptable, uuid(14b4394a-1dd2-11b2-b4fd-ba4a194fe97e)]
    1.18 +interface nsICMSSecureMessage : nsISupports
    1.19 +{
    1.20 +  /**
    1.21 +   * getCertByPrefID - a BASE64 string representing a user's
    1.22 +   *   certificate (or NULL if there isn't one)
    1.23 +   */
    1.24 +  string getCertByPrefID(in string certID);
    1.25 +
    1.26 +  /**
    1.27 +   * decodeCert - decode a BASE64 string into an X509Certificate object
    1.28 +   */
    1.29 +  nsIX509Cert decodeCert(in string value);
    1.30 +
    1.31 +  /**
    1.32 +   * sendMessage - send a text message to the recipient indicated
    1.33 +   *   by the base64-encoded cert.
    1.34 +   */
    1.35 +  string sendMessage(in string msg, in string cert);
    1.36 +
    1.37 +  /**
    1.38 +   * receiveMessage - receive an encrypted (enveloped) message
    1.39 +   */
    1.40 +  string receiveMessage(in string msg);
    1.41 +};
    1.42 +
    1.43 +%{C++
    1.44 +#define NS_CMSSECUREMESSAGE_CONTRACTID "@mozilla.org/nsCMSSecureMessage;1"
    1.45 +%}

mercurial