|
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 /* An interface for verifying signatures */ |
|
7 |
|
8 #include "nsISupports.idl" |
|
9 |
|
10 // NB: This isn't actually a principal at all. The naming is just historical. |
|
11 interface nsICertificatePrincipal; |
|
12 |
|
13 [uuid(22870b07-b5ef-481b-9f7f-d41787d4e617)] |
|
14 interface nsISignatureVerifier : nsISupports |
|
15 { |
|
16 /* Sig Verification Error Codes */ |
|
17 const long VERIFY_OK = 0; |
|
18 const long VERIFY_ERROR_UNKNOWN_CA = -8172; /* -8172 is the error code returned by PSM */ |
|
19 |
|
20 nsICertificatePrincipal verifySignature(in string aSignature, |
|
21 in unsigned long aSignatureLen, |
|
22 in string plaintext, |
|
23 in unsigned long plaintextLen, |
|
24 out long errorCode); |
|
25 }; |
|
26 |
|
27 |
|
28 %{C++ |
|
29 #define SIGNATURE_VERIFIER_CONTRACTID "@mozilla.org/psm;1" |
|
30 %} |