PageRenderTime 112ms CodeModel.GetById 87ms app.highlight 20ms RepoModel.GetById 1ms app.codeStats 1ms

/gecko_api/include/secerr.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 229 lines | 180 code | 9 blank | 40 comment | 1 complexity | 19da254dc9e1af8a60c8cf700a538aa2 MD5 | raw file
  1/* ***** BEGIN LICENSE BLOCK *****
  2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3 *
  4 * The contents of this file are subject to the Mozilla Public License Version
  5 * 1.1 (the "License"); you may not use this file except in compliance with
  6 * the License. You may obtain a copy of the License at
  7 * http://www.mozilla.org/MPL/
  8 *
  9 * Software distributed under the License is distributed on an "AS IS" basis,
 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 11 * for the specific language governing rights and limitations under the
 12 * License.
 13 *
 14 * The Original Code is the Netscape security libraries.
 15 *
 16 * The Initial Developer of the Original Code is
 17 * Netscape Communications Corporation.
 18 * Portions created by the Initial Developer are Copyright (C) 1994-2000
 19 * the Initial Developer. All Rights Reserved.
 20 *
 21 * Contributor(s):
 22 *
 23 * Alternatively, the contents of this file may be used under the terms of
 24 * either the GNU General Public License Version 2 or later (the "GPL"), or
 25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 26 * in which case the provisions of the GPL or the LGPL are applicable instead
 27 * of those above. If you wish to allow use of your version of this file only
 28 * under the terms of either the GPL or the LGPL, and not to allow others to
 29 * use your version of this file under the terms of the MPL, indicate your
 30 * decision by deleting the provisions above and replace them with the notice
 31 * and other provisions required by the GPL or the LGPL. If you do not delete
 32 * the provisions above, a recipient may use your version of this file under
 33 * the terms of any one of the MPL, the GPL or the LGPL.
 34 *
 35 * ***** END LICENSE BLOCK ***** */
 36
 37#ifndef __SEC_ERR_H_
 38#define __SEC_ERR_H_
 39
 40#include "utilrename.h"
 41
 42#define SEC_ERROR_BASE				(-0x2000)
 43#define SEC_ERROR_LIMIT				(SEC_ERROR_BASE + 1000)
 44
 45#define IS_SEC_ERROR(code) \
 46    (((code) >= SEC_ERROR_BASE) && ((code) < SEC_ERROR_LIMIT))
 47
 48#ifndef NO_SECURITY_ERROR_ENUM
 49typedef enum {
 50SEC_ERROR_IO 				    =	SEC_ERROR_BASE + 0,
 51SEC_ERROR_LIBRARY_FAILURE 		    =	SEC_ERROR_BASE + 1,
 52SEC_ERROR_BAD_DATA 			    =	SEC_ERROR_BASE + 2,
 53SEC_ERROR_OUTPUT_LEN 			    =	SEC_ERROR_BASE + 3,
 54SEC_ERROR_INPUT_LEN 			    =	SEC_ERROR_BASE + 4,
 55SEC_ERROR_INVALID_ARGS 			    =	SEC_ERROR_BASE + 5,
 56SEC_ERROR_INVALID_ALGORITHM 		    =	SEC_ERROR_BASE + 6,
 57SEC_ERROR_INVALID_AVA 			    =	SEC_ERROR_BASE + 7,
 58SEC_ERROR_INVALID_TIME 			    =	SEC_ERROR_BASE + 8,
 59SEC_ERROR_BAD_DER 			    =	SEC_ERROR_BASE + 9,
 60SEC_ERROR_BAD_SIGNATURE 		    =	SEC_ERROR_BASE + 10,
 61SEC_ERROR_EXPIRED_CERTIFICATE 		    =	SEC_ERROR_BASE + 11,
 62SEC_ERROR_REVOKED_CERTIFICATE 		    =	SEC_ERROR_BASE + 12,
 63SEC_ERROR_UNKNOWN_ISSUER 		    =	SEC_ERROR_BASE + 13,
 64SEC_ERROR_BAD_KEY 			    =	SEC_ERROR_BASE + 14,
 65SEC_ERROR_BAD_PASSWORD 			    =	SEC_ERROR_BASE + 15,
 66SEC_ERROR_RETRY_PASSWORD 		    =	SEC_ERROR_BASE + 16,
 67SEC_ERROR_NO_NODELOCK 			    =	SEC_ERROR_BASE + 17,
 68SEC_ERROR_BAD_DATABASE 			    =	SEC_ERROR_BASE + 18,
 69SEC_ERROR_NO_MEMORY 			    =	SEC_ERROR_BASE + 19,
 70SEC_ERROR_UNTRUSTED_ISSUER 		    =	SEC_ERROR_BASE + 20,
 71SEC_ERROR_UNTRUSTED_CERT 		    =	SEC_ERROR_BASE + 21,
 72SEC_ERROR_DUPLICATE_CERT 		    =	(SEC_ERROR_BASE + 22),
 73SEC_ERROR_DUPLICATE_CERT_NAME 		    =	(SEC_ERROR_BASE + 23),
 74SEC_ERROR_ADDING_CERT 			    =	(SEC_ERROR_BASE + 24),
 75SEC_ERROR_FILING_KEY 			    =	(SEC_ERROR_BASE + 25),
 76SEC_ERROR_NO_KEY 			    =	(SEC_ERROR_BASE + 26),
 77SEC_ERROR_CERT_VALID 			    =	(SEC_ERROR_BASE + 27),
 78SEC_ERROR_CERT_NOT_VALID 		    =	(SEC_ERROR_BASE + 28),
 79SEC_ERROR_CERT_NO_RESPONSE 		    =	(SEC_ERROR_BASE + 29),
 80SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE 	    =	(SEC_ERROR_BASE + 30),
 81SEC_ERROR_CRL_EXPIRED 			    =	(SEC_ERROR_BASE + 31),
 82SEC_ERROR_CRL_BAD_SIGNATURE 		    =	(SEC_ERROR_BASE + 32),
 83SEC_ERROR_CRL_INVALID 			    =	(SEC_ERROR_BASE + 33),
 84SEC_ERROR_EXTENSION_VALUE_INVALID 	    = 	(SEC_ERROR_BASE + 34),
 85SEC_ERROR_EXTENSION_NOT_FOUND 		    = 	(SEC_ERROR_BASE + 35),
 86SEC_ERROR_CA_CERT_INVALID 		    = 	(SEC_ERROR_BASE + 36),
 87SEC_ERROR_PATH_LEN_CONSTRAINT_INVALID 	    = 	(SEC_ERROR_BASE + 37),
 88SEC_ERROR_CERT_USAGES_INVALID 		    = 	(SEC_ERROR_BASE + 38),
 89SEC_INTERNAL_ONLY 			    =	(SEC_ERROR_BASE + 39),
 90SEC_ERROR_INVALID_KEY 			    =	(SEC_ERROR_BASE + 40),
 91SEC_ERROR_UNKNOWN_CRITICAL_EXTENSION 	    = 	(SEC_ERROR_BASE + 41),
 92SEC_ERROR_OLD_CRL 			    =	(SEC_ERROR_BASE + 42),
 93SEC_ERROR_NO_EMAIL_CERT 		    =	(SEC_ERROR_BASE + 43),
 94SEC_ERROR_NO_RECIPIENT_CERTS_QUERY 	    =	(SEC_ERROR_BASE + 44),
 95SEC_ERROR_NOT_A_RECIPIENT 		    =	(SEC_ERROR_BASE + 45),
 96SEC_ERROR_PKCS7_KEYALG_MISMATCH 	    =	(SEC_ERROR_BASE + 46),
 97SEC_ERROR_PKCS7_BAD_SIGNATURE 		    =	(SEC_ERROR_BASE + 47),
 98SEC_ERROR_UNSUPPORTED_KEYALG 		    =	(SEC_ERROR_BASE + 48),
 99SEC_ERROR_DECRYPTION_DISALLOWED 	    =	(SEC_ERROR_BASE + 49),
100/* Fortezza Alerts */
101XP_SEC_FORTEZZA_BAD_CARD 		    =	(SEC_ERROR_BASE + 50),
102XP_SEC_FORTEZZA_NO_CARD 		    =	(SEC_ERROR_BASE + 51),
103XP_SEC_FORTEZZA_NONE_SELECTED 		    =	(SEC_ERROR_BASE + 52),
104XP_SEC_FORTEZZA_MORE_INFO 		    =	(SEC_ERROR_BASE + 53),
105XP_SEC_FORTEZZA_PERSON_NOT_FOUND 	    =	(SEC_ERROR_BASE + 54),
106XP_SEC_FORTEZZA_NO_MORE_INFO 		    =	(SEC_ERROR_BASE + 55),
107XP_SEC_FORTEZZA_BAD_PIN 		    =	(SEC_ERROR_BASE + 56),
108XP_SEC_FORTEZZA_PERSON_ERROR 		    =	(SEC_ERROR_BASE + 57),
109SEC_ERROR_NO_KRL 			    =	(SEC_ERROR_BASE + 58),
110SEC_ERROR_KRL_EXPIRED 			    =	(SEC_ERROR_BASE + 59),
111SEC_ERROR_KRL_BAD_SIGNATURE 		    =	(SEC_ERROR_BASE + 60),
112SEC_ERROR_REVOKED_KEY 			    =	(SEC_ERROR_BASE + 61),
113SEC_ERROR_KRL_INVALID 			    =	(SEC_ERROR_BASE + 62),
114SEC_ERROR_NEED_RANDOM 			    =	(SEC_ERROR_BASE + 63),
115SEC_ERROR_NO_MODULE 			    =	(SEC_ERROR_BASE + 64),
116SEC_ERROR_NO_TOKEN 			    =	(SEC_ERROR_BASE + 65),
117SEC_ERROR_READ_ONLY 			    =	(SEC_ERROR_BASE + 66),
118SEC_ERROR_NO_SLOT_SELECTED 		    =	(SEC_ERROR_BASE + 67),
119SEC_ERROR_CERT_NICKNAME_COLLISION 	    =	(SEC_ERROR_BASE + 68),
120SEC_ERROR_KEY_NICKNAME_COLLISION 	    =	(SEC_ERROR_BASE + 69),
121SEC_ERROR_SAFE_NOT_CREATED 		    =	(SEC_ERROR_BASE + 70),
122SEC_ERROR_BAGGAGE_NOT_CREATED 		    =	(SEC_ERROR_BASE + 71),
123XP_JAVA_REMOVE_PRINCIPAL_ERROR 		    =	(SEC_ERROR_BASE + 72),
124XP_JAVA_DELETE_PRIVILEGE_ERROR 		    =	(SEC_ERROR_BASE + 73),
125XP_JAVA_CERT_NOT_EXISTS_ERROR 		    =	(SEC_ERROR_BASE + 74),
126SEC_ERROR_BAD_EXPORT_ALGORITHM 		    =	(SEC_ERROR_BASE + 75),
127SEC_ERROR_EXPORTING_CERTIFICATES 	    =	(SEC_ERROR_BASE + 76),
128SEC_ERROR_IMPORTING_CERTIFICATES 	    =	(SEC_ERROR_BASE + 77),
129SEC_ERROR_PKCS12_DECODING_PFX 		    =	(SEC_ERROR_BASE + 78),
130SEC_ERROR_PKCS12_INVALID_MAC 		    =	(SEC_ERROR_BASE + 79),
131SEC_ERROR_PKCS12_UNSUPPORTED_MAC_ALGORITHM  =	(SEC_ERROR_BASE + 80),
132SEC_ERROR_PKCS12_UNSUPPORTED_TRANSPORT_MODE =	(SEC_ERROR_BASE + 81),
133SEC_ERROR_PKCS12_CORRUPT_PFX_STRUCTURE 	    =	(SEC_ERROR_BASE + 82),
134SEC_ERROR_PKCS12_UNSUPPORTED_PBE_ALGORITHM  = 	(SEC_ERROR_BASE + 83),
135SEC_ERROR_PKCS12_UNSUPPORTED_VERSION 	    =	(SEC_ERROR_BASE + 84),
136SEC_ERROR_PKCS12_PRIVACY_PASSWORD_INCORRECT =	(SEC_ERROR_BASE + 85),
137SEC_ERROR_PKCS12_CERT_COLLISION 	    =	(SEC_ERROR_BASE + 86),
138SEC_ERROR_USER_CANCELLED 		    =	(SEC_ERROR_BASE + 87),
139SEC_ERROR_PKCS12_DUPLICATE_DATA 	    =	(SEC_ERROR_BASE + 88),
140SEC_ERROR_MESSAGE_SEND_ABORTED 		    =	(SEC_ERROR_BASE + 89),
141SEC_ERROR_INADEQUATE_KEY_USAGE 		    =	(SEC_ERROR_BASE + 90),
142SEC_ERROR_INADEQUATE_CERT_TYPE 		    =	(SEC_ERROR_BASE + 91),
143SEC_ERROR_CERT_ADDR_MISMATCH 		    =	(SEC_ERROR_BASE + 92),
144SEC_ERROR_PKCS12_UNABLE_TO_IMPORT_KEY 	    =	(SEC_ERROR_BASE + 93),
145SEC_ERROR_PKCS12_IMPORTING_CERT_CHAIN 	    =	(SEC_ERROR_BASE + 94),
146SEC_ERROR_PKCS12_UNABLE_TO_LOCATE_OBJECT_BY_NAME = (SEC_ERROR_BASE + 95),
147SEC_ERROR_PKCS12_UNABLE_TO_EXPORT_KEY 	    =	(SEC_ERROR_BASE + 96),
148SEC_ERROR_PKCS12_UNABLE_TO_WRITE 	    = 	(SEC_ERROR_BASE + 97),
149SEC_ERROR_PKCS12_UNABLE_TO_READ 	    =	(SEC_ERROR_BASE + 98),
150SEC_ERROR_PKCS12_KEY_DATABASE_NOT_INITIALIZED 	 = (SEC_ERROR_BASE + 99),
151SEC_ERROR_KEYGEN_FAIL 			    =	(SEC_ERROR_BASE + 100),
152SEC_ERROR_INVALID_PASSWORD 		    =	(SEC_ERROR_BASE + 101),
153SEC_ERROR_RETRY_OLD_PASSWORD 		    =	(SEC_ERROR_BASE + 102),
154SEC_ERROR_BAD_NICKNAME 			    =	(SEC_ERROR_BASE + 103),
155SEC_ERROR_NOT_FORTEZZA_ISSUER 		    = 	(SEC_ERROR_BASE + 104),
156SEC_ERROR_CANNOT_MOVE_SENSITIVE_KEY         =   (SEC_ERROR_BASE + 105),
157SEC_ERROR_JS_INVALID_MODULE_NAME 	    =	(SEC_ERROR_BASE + 106),
158SEC_ERROR_JS_INVALID_DLL 		    =	(SEC_ERROR_BASE + 107),
159SEC_ERROR_JS_ADD_MOD_FAILURE 		    =	(SEC_ERROR_BASE + 108),
160SEC_ERROR_JS_DEL_MOD_FAILURE 		    =	(SEC_ERROR_BASE + 109),
161SEC_ERROR_OLD_KRL 			    =	(SEC_ERROR_BASE + 110),
162SEC_ERROR_CKL_CONFLICT 			    =	(SEC_ERROR_BASE + 111),
163SEC_ERROR_CERT_NOT_IN_NAME_SPACE 	    =	(SEC_ERROR_BASE + 112),
164SEC_ERROR_KRL_NOT_YET_VALID 		    =	(SEC_ERROR_BASE + 113),
165SEC_ERROR_CRL_NOT_YET_VALID 		    =	(SEC_ERROR_BASE + 114),
166SEC_ERROR_UNKNOWN_CERT 			    =	(SEC_ERROR_BASE + 115),
167SEC_ERROR_UNKNOWN_SIGNER 		    =	(SEC_ERROR_BASE + 116),
168SEC_ERROR_CERT_BAD_ACCESS_LOCATION 	    =	(SEC_ERROR_BASE + 117),
169SEC_ERROR_OCSP_UNKNOWN_RESPONSE_TYPE 	    =	(SEC_ERROR_BASE + 118),
170SEC_ERROR_OCSP_BAD_HTTP_RESPONSE 	    =	(SEC_ERROR_BASE + 119),
171SEC_ERROR_OCSP_MALFORMED_REQUEST 	    =	(SEC_ERROR_BASE + 120),
172SEC_ERROR_OCSP_SERVER_ERROR 		    =	(SEC_ERROR_BASE + 121),
173SEC_ERROR_OCSP_TRY_SERVER_LATER 	    =	(SEC_ERROR_BASE + 122),
174SEC_ERROR_OCSP_REQUEST_NEEDS_SIG 	    =	(SEC_ERROR_BASE + 123),
175SEC_ERROR_OCSP_UNAUTHORIZED_REQUEST 	    =	(SEC_ERROR_BASE + 124),
176SEC_ERROR_OCSP_UNKNOWN_RESPONSE_STATUS 	    =	(SEC_ERROR_BASE + 125),
177SEC_ERROR_OCSP_UNKNOWN_CERT 		    =	(SEC_ERROR_BASE + 126),
178SEC_ERROR_OCSP_NOT_ENABLED 		    =	(SEC_ERROR_BASE + 127),
179SEC_ERROR_OCSP_NO_DEFAULT_RESPONDER 	    =	(SEC_ERROR_BASE + 128),
180SEC_ERROR_OCSP_MALFORMED_RESPONSE 	    =	(SEC_ERROR_BASE + 129),
181SEC_ERROR_OCSP_UNAUTHORIZED_RESPONSE 	    =	(SEC_ERROR_BASE + 130),
182SEC_ERROR_OCSP_FUTURE_RESPONSE 		    =	(SEC_ERROR_BASE + 131),
183SEC_ERROR_OCSP_OLD_RESPONSE 		    =	(SEC_ERROR_BASE + 132),
184/* smime stuff */
185SEC_ERROR_DIGEST_NOT_FOUND		    =	(SEC_ERROR_BASE + 133),
186SEC_ERROR_UNSUPPORTED_MESSAGE_TYPE	    =	(SEC_ERROR_BASE + 134),
187SEC_ERROR_MODULE_STUCK			    =	(SEC_ERROR_BASE + 135),
188SEC_ERROR_BAD_TEMPLATE			    =	(SEC_ERROR_BASE + 136),
189SEC_ERROR_CRL_NOT_FOUND 		    =	(SEC_ERROR_BASE + 137),
190SEC_ERROR_REUSED_ISSUER_AND_SERIAL          =   (SEC_ERROR_BASE + 138),
191SEC_ERROR_BUSY                              =   (SEC_ERROR_BASE + 139),
192SEC_ERROR_EXTRA_INPUT                       =   (SEC_ERROR_BASE + 140),
193/* error codes used by elliptic curve code */
194SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE	    =	(SEC_ERROR_BASE + 141),
195SEC_ERROR_UNSUPPORTED_EC_POINT_FORM	    =	(SEC_ERROR_BASE + 142),
196SEC_ERROR_UNRECOGNIZED_OID		    =	(SEC_ERROR_BASE + 143),
197SEC_ERROR_OCSP_INVALID_SIGNING_CERT	    =   (SEC_ERROR_BASE + 144),
198/* new revocation errors */
199SEC_ERROR_REVOKED_CERTIFICATE_CRL	    =	(SEC_ERROR_BASE + 145),
200SEC_ERROR_REVOKED_CERTIFICATE_OCSP	    =	(SEC_ERROR_BASE + 146),
201SEC_ERROR_CRL_INVALID_VERSION               =	(SEC_ERROR_BASE + 147),
202SEC_ERROR_CRL_V1_CRITICAL_EXTENSION         =	(SEC_ERROR_BASE + 148),
203SEC_ERROR_CRL_UNKNOWN_CRITICAL_EXTENSION    =	(SEC_ERROR_BASE + 149),
204SEC_ERROR_UNKNOWN_OBJECT_TYPE               =	(SEC_ERROR_BASE + 150),
205SEC_ERROR_INCOMPATIBLE_PKCS11               =	(SEC_ERROR_BASE + 151),
206SEC_ERROR_NO_EVENT                          = 	(SEC_ERROR_BASE + 152),
207SEC_ERROR_CRL_ALREADY_EXISTS                = 	(SEC_ERROR_BASE + 153),
208SEC_ERROR_NOT_INITIALIZED                   = 	(SEC_ERROR_BASE + 154),
209SEC_ERROR_TOKEN_NOT_LOGGED_IN               = 	(SEC_ERROR_BASE + 155),
210SEC_ERROR_OCSP_RESPONDER_CERT_INVALID      =	(SEC_ERROR_BASE + 156),
211SEC_ERROR_OCSP_BAD_SIGNATURE               =	(SEC_ERROR_BASE + 157),
212
213SEC_ERROR_OUT_OF_SEARCH_LIMITS             =	(SEC_ERROR_BASE + 158),
214SEC_ERROR_INVALID_POLICY_MAPPING           =	(SEC_ERROR_BASE + 159),
215SEC_ERROR_POLICY_VALIDATION_FAILED         =	(SEC_ERROR_BASE + 160),
216SEC_ERROR_UNKNOWN_AIA_LOCATION_TYPE        =	(SEC_ERROR_BASE + 161),
217SEC_ERROR_BAD_HTTP_RESPONSE                =	(SEC_ERROR_BASE + 162),
218SEC_ERROR_BAD_LDAP_RESPONSE                =	(SEC_ERROR_BASE + 163),
219SEC_ERROR_FAILED_TO_ENCODE_DATA            =	(SEC_ERROR_BASE + 164),
220SEC_ERROR_BAD_INFO_ACCESS_LOCATION         =	(SEC_ERROR_BASE + 165), 
221
222SEC_ERROR_LIBPKIX_INTERNAL                 =	(SEC_ERROR_BASE + 166),
223
224/* Add new error codes above here. */
225SEC_ERROR_END_OF_LIST 
226} SECErrorCodes;
227#endif /* NO_SECURITY_ERROR_ENUM */
228
229#endif /* __SEC_ERR_H_ */