security/manager/ssl/public/nsISignatureVerifier.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/ssl/public/nsISignatureVerifier.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     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 +/* An interface for verifying signatures */
    1.10 +
    1.11 +#include "nsISupports.idl"
    1.12 +
    1.13 +// NB: This isn't actually a principal at all. The naming is just historical.
    1.14 +interface nsICertificatePrincipal;
    1.15 +
    1.16 +[uuid(22870b07-b5ef-481b-9f7f-d41787d4e617)]
    1.17 +interface nsISignatureVerifier : nsISupports
    1.18 +{
    1.19 +   /* Sig Verification Error Codes */
    1.20 +  const long VERIFY_OK = 0;
    1.21 +  const long VERIFY_ERROR_UNKNOWN_CA  = -8172; /* -8172 is the error code returned by PSM */
    1.22 +  
    1.23 +  nsICertificatePrincipal verifySignature(in string aSignature,
    1.24 +                                          in unsigned long aSignatureLen,
    1.25 +                                          in string plaintext,
    1.26 +                                          in unsigned long plaintextLen,
    1.27 +                                          out long errorCode);
    1.28 +};
    1.29 +
    1.30 +
    1.31 +%{C++
    1.32 +#define SIGNATURE_VERIFIER_CONTRACTID "@mozilla.org/psm;1"
    1.33 +%}

mercurial