michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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: /* An interface for verifying signatures */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: // NB: This isn't actually a principal at all. The naming is just historical. michael@0: interface nsICertificatePrincipal; michael@0: michael@0: [uuid(22870b07-b5ef-481b-9f7f-d41787d4e617)] michael@0: interface nsISignatureVerifier : nsISupports michael@0: { michael@0: /* Sig Verification Error Codes */ michael@0: const long VERIFY_OK = 0; michael@0: const long VERIFY_ERROR_UNKNOWN_CA = -8172; /* -8172 is the error code returned by PSM */ michael@0: michael@0: nsICertificatePrincipal verifySignature(in string aSignature, michael@0: in unsigned long aSignatureLen, michael@0: in string plaintext, michael@0: in unsigned long plaintextLen, michael@0: out long errorCode); michael@0: }; michael@0: michael@0: michael@0: %{C++ michael@0: #define SIGNATURE_VERIFIER_CONTRACTID "@mozilla.org/psm;1" michael@0: %}