security/manager/ssl/public/nsICMSMessage2.idl

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #include "nsISupports.idl"
     7 interface nsISMimeVerificationListener;
     9 [ptr] native UnsignedCharPtr(unsigned char);
    11 /*
    12  * This interface is currently not marked scriptable,
    13  * because its verification functions are meant to look like those
    14  * in nsICMSMessage. At the time the ptr type is eliminated in both 
    15  * interfaces, both should be made scriptable.
    16  */
    18 [uuid(a99a3203-39e3-45e1-909c-175b0e471c2b)]
    19 interface nsICMSMessage2 : nsISupports
    20 {
    21   /**
    22     * Async version of nsICMSMessage::VerifySignature.
    23     * Code will be executed on a background thread and
    24     * availability of results will be notified using a 
    25     * call to nsISMimeVerificationListener.
    26    */
    27   void asyncVerifySignature(in nsISMimeVerificationListener listener);
    29   /**
    30     * Async version of nsICMSMessage::VerifyDetachedSignature.
    31     * Code will be executed on a background thread and
    32     * availability of results will be notified using a 
    33     * call to nsISMimeVerificationListener.
    34     *
    35     * We are using "native unsigned char" ptr, because the function 
    36     * signatures of this one and nsICMSMessage::verifyDetachedSignature 
    37     * should be the identical. Cleaning up nsICMSMessages needs to be
    38     * postponed, because this async version is needed on MOZILLA_1_8_BRANCH.
    39     *
    40     * Once both interfaces get cleaned up, the function signature should
    41     * look like:
    42     *     [array, length_is(aDigestDataLen)]
    43     *     in octet aDigestData,
    44     *     in unsigned long aDigestDataLen);
    45    */
    46   void asyncVerifyDetachedSignature(in nsISMimeVerificationListener listener,
    47                                      in UnsignedCharPtr aDigestData, 
    48                                      in unsigned long aDigestDataLen);
    49 };
    51 [uuid(56310af6-dffc-48b4-abca-85eae4059064)]
    52 interface nsISMimeVerificationListener : nsISupports {
    54   /**
    55    *  Notify that results are ready, that have been requested
    56    *  using nsICMSMessage2::asyncVerify[Detached]Signature()
    57    *
    58    *  verificationResultCode matches synchronous result code from
    59    *  nsICMSMessage::verify[Detached]Signature
    60    */
    61   void notify(in nsICMSMessage2 verifiedMessage,
    62               in nsresult verificationResultCode);
    63 };

mercurial