Back to index

lightning-sunbird  0.9+nobinonly
nsICMSMessageErrors.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla Communicator.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corp..
00019  * Portions created by the Initial Developer are Copyright (C) 2001
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s): David Drinan <ddrinan@netscape.com>
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "nsISupports.idl"
00039 
00044 [scriptable,uuid(f2aec680-60a0-49f0-afe5-6cf1d3f15e0d)]
00045 interface nsICMSMessageErrors : nsISupports
00046 {
00047   const long SUCCESS = 0;
00048   const long GENERAL_ERROR = 1;
00049   const long VERIFY_NOT_SIGNED = 1024;
00050   const long VERIFY_NO_CONTENT_INFO = 1025;
00051   const long VERIFY_BAD_DIGEST = 1026;
00052   const long VERIFY_NOCERT = 1028;
00053   const long VERIFY_UNTRUSTED = 1029;
00054   const long VERIFY_ERROR_UNVERIFIED = 1031;
00055   const long VERIFY_ERROR_PROCESSING = 1032;
00056   const long VERIFY_BAD_SIGNATURE = 1033;
00057   const long VERIFY_DIGEST_MISMATCH = 1034;
00058   const long VERIFY_UNKNOWN_ALGO = 1035;
00059   const long VERIFY_UNSUPPORTED_ALGO = 1036;
00060   const long VERIFY_MALFORMED_SIGNATURE = 1037;
00061   const long VERIFY_HEADER_MISMATCH = 1038;
00062   const long VERIFY_NOT_YET_ATTEMPTED = 1039;
00063   const long VERIFY_CERT_WITHOUT_ADDRESS = 1040;
00064 
00065   const long ENCRYPT_NO_BULK_ALG = 1056;
00066   const long ENCRYPT_INCOMPLETE = 1057;
00067 };
00068 
00069 %{ C++
00074 #define NS_ERROR_CMS_VERIFY_NOT_SIGNED \
00075   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00076                             nsICMSMessageErrors::VERIFY_NOT_SIGNED)
00077 #define NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO \
00078   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00079                             nsICMSMessageErrors::VERIFY_NO_CONTENT_INFO)
00080 #define NS_ERROR_CMS_VERIFY_BAD_DIGEST \
00081   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00082                             nsICMSMessageErrors::VERIFY_BAD_DIGEST)
00083 #define NS_ERROR_CMS_VERIFY_NOCERT \
00084   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00085                             nsICMSMessageErrors::VERIFY_NOCERT)
00086 #define NS_ERROR_CMS_VERIFY_UNTRUSTED \
00087   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00088                             nsICMSMessageErrors::VERIFY_UNTRUSTED)
00089 #define NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED \
00090   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00091                             nsICMSMessageErrors::VERIFY_ERROR_UNVERIFIED)
00092 #define NS_ERROR_CMS_VERIFY_ERROR_PROCESSING \
00093   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00094                             nsICMSMessageErrors::VERIFY_ERROR_PROCESSING)
00095 #define NS_ERROR_CMS_VERIFY_BAD_SIGNATURE \
00096   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00097                             nsICMSMessageErrors::VERIFY_BAD_SIGNATURE)
00098 #define NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH \
00099   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00100                             nsICMSMessageErrors::VERIFY_DIGEST_MISMATCH)
00101 #define NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO \
00102   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00103                             nsICMSMessageErrors::VERIFY_UNKNOWN_ALGO)
00104 #define NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO \
00105   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00106                             nsICMSMessageErrors::VERIFY_UNSUPPORTED_ALGO)
00107 #define NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE \
00108   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00109                             nsICMSMessageErrors::VERIFY_MALFORMED_SIGNATURE)
00110 #define NS_ERROR_CMS_VERIFY_HEADER_MISMATCH \
00111   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00112                             nsICMSMessageErrors::VERIFY_HEADER_MISMATCH)
00113 #define NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED \
00114   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00115                             nsICMSMessageErrors::VERIFY_NOT_YET_ATTEMPTED)
00116 #define NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS \
00117   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00118                             nsICMSMessageErrors::VERIFY_CERT_WITHOUT_ADDRESS)
00119 #define NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG \
00120   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00121                             nsICMSMessageErrors::ENCRYPT_NO_BULK_ALG)
00122 #define NS_ERROR_CMS_ENCRYPT_INCOMPLETE \
00123   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, \
00124                             nsICMSMessageErrors::ENCRYPT_INCOMPLETE)
00125 %}