Back to index

lightning-sunbird  0.9+nobinonly
secerr.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #ifndef __SEC_ERR_H_
00038 #define __SEC_ERR_H_
00039 
00040 
00041 #define SEC_ERROR_BASE                           (-0x2000)
00042 #define SEC_ERROR_LIMIT                          (SEC_ERROR_BASE + 1000)
00043 
00044 #define IS_SEC_ERROR(code) \
00045     (((code) >= SEC_ERROR_BASE) && ((code) < SEC_ERROR_LIMIT))
00046 
00047 #ifndef NO_SECURITY_ERROR_ENUM
00048 typedef enum {
00049 SEC_ERROR_IO                           =  SEC_ERROR_BASE + 0,
00050 SEC_ERROR_LIBRARY_FAILURE              =  SEC_ERROR_BASE + 1,
00051 SEC_ERROR_BAD_DATA                     =  SEC_ERROR_BASE + 2,
00052 SEC_ERROR_OUTPUT_LEN                          =  SEC_ERROR_BASE + 3,
00053 SEC_ERROR_INPUT_LEN                    =  SEC_ERROR_BASE + 4,
00054 SEC_ERROR_INVALID_ARGS                        =  SEC_ERROR_BASE + 5,
00055 SEC_ERROR_INVALID_ALGORITHM                   =  SEC_ERROR_BASE + 6,
00056 SEC_ERROR_INVALID_AVA                         =  SEC_ERROR_BASE + 7,
00057 SEC_ERROR_INVALID_TIME                        =  SEC_ERROR_BASE + 8,
00058 SEC_ERROR_BAD_DER                      =  SEC_ERROR_BASE + 9,
00059 SEC_ERROR_BAD_SIGNATURE                =  SEC_ERROR_BASE + 10,
00060 SEC_ERROR_EXPIRED_CERTIFICATE                 =  SEC_ERROR_BASE + 11,
00061 SEC_ERROR_REVOKED_CERTIFICATE                 =  SEC_ERROR_BASE + 12,
00062 SEC_ERROR_UNKNOWN_ISSUER               =  SEC_ERROR_BASE + 13,
00063 SEC_ERROR_BAD_KEY                      =  SEC_ERROR_BASE + 14,
00064 SEC_ERROR_BAD_PASSWORD                        =  SEC_ERROR_BASE + 15,
00065 SEC_ERROR_RETRY_PASSWORD               =  SEC_ERROR_BASE + 16,
00066 SEC_ERROR_NO_NODELOCK                         =  SEC_ERROR_BASE + 17,
00067 SEC_ERROR_BAD_DATABASE                        =  SEC_ERROR_BASE + 18,
00068 SEC_ERROR_NO_MEMORY                    =  SEC_ERROR_BASE + 19,
00069 SEC_ERROR_UNTRUSTED_ISSUER             =  SEC_ERROR_BASE + 20,
00070 SEC_ERROR_UNTRUSTED_CERT               =  SEC_ERROR_BASE + 21,
00071 SEC_ERROR_DUPLICATE_CERT               =  (SEC_ERROR_BASE + 22),
00072 SEC_ERROR_DUPLICATE_CERT_NAME                 =  (SEC_ERROR_BASE + 23),
00073 SEC_ERROR_ADDING_CERT                         =  (SEC_ERROR_BASE + 24),
00074 SEC_ERROR_FILING_KEY                          =  (SEC_ERROR_BASE + 25),
00075 SEC_ERROR_NO_KEY                       =  (SEC_ERROR_BASE + 26),
00076 SEC_ERROR_CERT_VALID                          =  (SEC_ERROR_BASE + 27),
00077 SEC_ERROR_CERT_NOT_VALID               =  (SEC_ERROR_BASE + 28),
00078 SEC_ERROR_CERT_NO_RESPONSE             =  (SEC_ERROR_BASE + 29),
00079 SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE          =  (SEC_ERROR_BASE + 30),
00080 SEC_ERROR_CRL_EXPIRED                         =  (SEC_ERROR_BASE + 31),
00081 SEC_ERROR_CRL_BAD_SIGNATURE                   =  (SEC_ERROR_BASE + 32),
00082 SEC_ERROR_CRL_INVALID                         =  (SEC_ERROR_BASE + 33),
00083 SEC_ERROR_EXTENSION_VALUE_INVALID      =  (SEC_ERROR_BASE + 34),
00084 SEC_ERROR_EXTENSION_NOT_FOUND                 =  (SEC_ERROR_BASE + 35),
00085 SEC_ERROR_CA_CERT_INVALID              =  (SEC_ERROR_BASE + 36),
00086 SEC_ERROR_PATH_LEN_CONSTRAINT_INVALID         =  (SEC_ERROR_BASE + 37),
00087 SEC_ERROR_CERT_USAGES_INVALID                 =  (SEC_ERROR_BASE + 38),
00088 SEC_INTERNAL_ONLY                      =  (SEC_ERROR_BASE + 39),
00089 SEC_ERROR_INVALID_KEY                         =  (SEC_ERROR_BASE + 40),
00090 SEC_ERROR_UNKNOWN_CRITICAL_EXTENSION          =  (SEC_ERROR_BASE + 41),
00091 SEC_ERROR_OLD_CRL                      =  (SEC_ERROR_BASE + 42),
00092 SEC_ERROR_NO_EMAIL_CERT                =  (SEC_ERROR_BASE + 43),
00093 SEC_ERROR_NO_RECIPIENT_CERTS_QUERY            =  (SEC_ERROR_BASE + 44),
00094 SEC_ERROR_NOT_A_RECIPIENT              =  (SEC_ERROR_BASE + 45),
00095 SEC_ERROR_PKCS7_KEYALG_MISMATCH        =  (SEC_ERROR_BASE + 46),
00096 SEC_ERROR_PKCS7_BAD_SIGNATURE                 =  (SEC_ERROR_BASE + 47),
00097 SEC_ERROR_UNSUPPORTED_KEYALG                  =  (SEC_ERROR_BASE + 48),
00098 SEC_ERROR_DECRYPTION_DISALLOWED        =  (SEC_ERROR_BASE + 49),
00099 /* Fortezza Alerts */
00100 XP_SEC_FORTEZZA_BAD_CARD               =  (SEC_ERROR_BASE + 50),
00101 XP_SEC_FORTEZZA_NO_CARD                =  (SEC_ERROR_BASE + 51),
00102 XP_SEC_FORTEZZA_NONE_SELECTED                 =  (SEC_ERROR_BASE + 52),
00103 XP_SEC_FORTEZZA_MORE_INFO              =  (SEC_ERROR_BASE + 53),
00104 XP_SEC_FORTEZZA_PERSON_NOT_FOUND       =  (SEC_ERROR_BASE + 54),
00105 XP_SEC_FORTEZZA_NO_MORE_INFO                  =  (SEC_ERROR_BASE + 55),
00106 XP_SEC_FORTEZZA_BAD_PIN                =  (SEC_ERROR_BASE + 56),
00107 XP_SEC_FORTEZZA_PERSON_ERROR                  =  (SEC_ERROR_BASE + 57),
00108 SEC_ERROR_NO_KRL                       =  (SEC_ERROR_BASE + 58),
00109 SEC_ERROR_KRL_EXPIRED                         =  (SEC_ERROR_BASE + 59),
00110 SEC_ERROR_KRL_BAD_SIGNATURE                   =  (SEC_ERROR_BASE + 60),
00111 SEC_ERROR_REVOKED_KEY                         =  (SEC_ERROR_BASE + 61),
00112 SEC_ERROR_KRL_INVALID                         =  (SEC_ERROR_BASE + 62),
00113 SEC_ERROR_NEED_RANDOM                         =  (SEC_ERROR_BASE + 63),
00114 SEC_ERROR_NO_MODULE                    =  (SEC_ERROR_BASE + 64),
00115 SEC_ERROR_NO_TOKEN                     =  (SEC_ERROR_BASE + 65),
00116 SEC_ERROR_READ_ONLY                    =  (SEC_ERROR_BASE + 66),
00117 SEC_ERROR_NO_SLOT_SELECTED             =  (SEC_ERROR_BASE + 67),
00118 SEC_ERROR_CERT_NICKNAME_COLLISION      =  (SEC_ERROR_BASE + 68),
00119 SEC_ERROR_KEY_NICKNAME_COLLISION       =  (SEC_ERROR_BASE + 69),
00120 SEC_ERROR_SAFE_NOT_CREATED             =  (SEC_ERROR_BASE + 70),
00121 SEC_ERROR_BAGGAGE_NOT_CREATED                 =  (SEC_ERROR_BASE + 71),
00122 XP_JAVA_REMOVE_PRINCIPAL_ERROR                =  (SEC_ERROR_BASE + 72),
00123 XP_JAVA_DELETE_PRIVILEGE_ERROR                =  (SEC_ERROR_BASE + 73),
00124 XP_JAVA_CERT_NOT_EXISTS_ERROR                 =  (SEC_ERROR_BASE + 74),
00125 SEC_ERROR_BAD_EXPORT_ALGORITHM                =  (SEC_ERROR_BASE + 75),
00126 SEC_ERROR_EXPORTING_CERTIFICATES       =  (SEC_ERROR_BASE + 76),
00127 SEC_ERROR_IMPORTING_CERTIFICATES       =  (SEC_ERROR_BASE + 77),
00128 SEC_ERROR_PKCS12_DECODING_PFX                 =  (SEC_ERROR_BASE + 78),
00129 SEC_ERROR_PKCS12_INVALID_MAC                  =  (SEC_ERROR_BASE + 79),
00130 SEC_ERROR_PKCS12_UNSUPPORTED_MAC_ALGORITHM  =    (SEC_ERROR_BASE + 80),
00131 SEC_ERROR_PKCS12_UNSUPPORTED_TRANSPORT_MODE =    (SEC_ERROR_BASE + 81),
00132 SEC_ERROR_PKCS12_CORRUPT_PFX_STRUCTURE        =  (SEC_ERROR_BASE + 82),
00133 SEC_ERROR_PKCS12_UNSUPPORTED_PBE_ALGORITHM  =    (SEC_ERROR_BASE + 83),
00134 SEC_ERROR_PKCS12_UNSUPPORTED_VERSION          =  (SEC_ERROR_BASE + 84),
00135 SEC_ERROR_PKCS12_PRIVACY_PASSWORD_INCORRECT =    (SEC_ERROR_BASE + 85),
00136 SEC_ERROR_PKCS12_CERT_COLLISION        =  (SEC_ERROR_BASE + 86),
00137 SEC_ERROR_USER_CANCELLED               =  (SEC_ERROR_BASE + 87),
00138 SEC_ERROR_PKCS12_DUPLICATE_DATA        =  (SEC_ERROR_BASE + 88),
00139 SEC_ERROR_MESSAGE_SEND_ABORTED                =  (SEC_ERROR_BASE + 89),
00140 SEC_ERROR_INADEQUATE_KEY_USAGE                =  (SEC_ERROR_BASE + 90),
00141 SEC_ERROR_INADEQUATE_CERT_TYPE                =  (SEC_ERROR_BASE + 91),
00142 SEC_ERROR_CERT_ADDR_MISMATCH                  =  (SEC_ERROR_BASE + 92),
00143 SEC_ERROR_PKCS12_UNABLE_TO_IMPORT_KEY         =  (SEC_ERROR_BASE + 93),
00144 SEC_ERROR_PKCS12_IMPORTING_CERT_CHAIN         =  (SEC_ERROR_BASE + 94),
00145 SEC_ERROR_PKCS12_UNABLE_TO_LOCATE_OBJECT_BY_NAME = (SEC_ERROR_BASE + 95),
00146 SEC_ERROR_PKCS12_UNABLE_TO_EXPORT_KEY         =  (SEC_ERROR_BASE + 96),
00147 SEC_ERROR_PKCS12_UNABLE_TO_WRITE       =  (SEC_ERROR_BASE + 97),
00148 SEC_ERROR_PKCS12_UNABLE_TO_READ        =  (SEC_ERROR_BASE + 98),
00149 SEC_ERROR_PKCS12_KEY_DATABASE_NOT_INITIALIZED     = (SEC_ERROR_BASE + 99),
00150 SEC_ERROR_KEYGEN_FAIL                         =  (SEC_ERROR_BASE + 100),
00151 SEC_ERROR_INVALID_PASSWORD             =  (SEC_ERROR_BASE + 101),
00152 SEC_ERROR_RETRY_OLD_PASSWORD                  =  (SEC_ERROR_BASE + 102),
00153 SEC_ERROR_BAD_NICKNAME                        =  (SEC_ERROR_BASE + 103),
00154 SEC_ERROR_NOT_FORTEZZA_ISSUER                 =  (SEC_ERROR_BASE + 104),
00155 SEC_ERROR_CANNOT_MOVE_SENSITIVE_KEY         =   (SEC_ERROR_BASE + 105),
00156 SEC_ERROR_JS_INVALID_MODULE_NAME       =  (SEC_ERROR_BASE + 106),
00157 SEC_ERROR_JS_INVALID_DLL               =  (SEC_ERROR_BASE + 107),
00158 SEC_ERROR_JS_ADD_MOD_FAILURE                  =  (SEC_ERROR_BASE + 108),
00159 SEC_ERROR_JS_DEL_MOD_FAILURE                  =  (SEC_ERROR_BASE + 109),
00160 SEC_ERROR_OLD_KRL                      =  (SEC_ERROR_BASE + 110),
00161 SEC_ERROR_CKL_CONFLICT                        =  (SEC_ERROR_BASE + 111),
00162 SEC_ERROR_CERT_NOT_IN_NAME_SPACE       =  (SEC_ERROR_BASE + 112),
00163 SEC_ERROR_KRL_NOT_YET_VALID                   =  (SEC_ERROR_BASE + 113),
00164 SEC_ERROR_CRL_NOT_YET_VALID                   =  (SEC_ERROR_BASE + 114),
00165 SEC_ERROR_UNKNOWN_CERT                        =  (SEC_ERROR_BASE + 115),
00166 SEC_ERROR_UNKNOWN_SIGNER               =  (SEC_ERROR_BASE + 116),
00167 SEC_ERROR_CERT_BAD_ACCESS_LOCATION            =  (SEC_ERROR_BASE + 117),
00168 SEC_ERROR_OCSP_UNKNOWN_RESPONSE_TYPE          =  (SEC_ERROR_BASE + 118),
00169 SEC_ERROR_OCSP_BAD_HTTP_RESPONSE       =  (SEC_ERROR_BASE + 119),
00170 SEC_ERROR_OCSP_MALFORMED_REQUEST       =  (SEC_ERROR_BASE + 120),
00171 SEC_ERROR_OCSP_SERVER_ERROR                   =  (SEC_ERROR_BASE + 121),
00172 SEC_ERROR_OCSP_TRY_SERVER_LATER        =  (SEC_ERROR_BASE + 122),
00173 SEC_ERROR_OCSP_REQUEST_NEEDS_SIG       =  (SEC_ERROR_BASE + 123),
00174 SEC_ERROR_OCSP_UNAUTHORIZED_REQUEST           =  (SEC_ERROR_BASE + 124),
00175 SEC_ERROR_OCSP_UNKNOWN_RESPONSE_STATUS        =  (SEC_ERROR_BASE + 125),
00176 SEC_ERROR_OCSP_UNKNOWN_CERT                   =  (SEC_ERROR_BASE + 126),
00177 SEC_ERROR_OCSP_NOT_ENABLED             =  (SEC_ERROR_BASE + 127),
00178 SEC_ERROR_OCSP_NO_DEFAULT_RESPONDER           =  (SEC_ERROR_BASE + 128),
00179 SEC_ERROR_OCSP_MALFORMED_RESPONSE      =  (SEC_ERROR_BASE + 129),
00180 SEC_ERROR_OCSP_UNAUTHORIZED_RESPONSE          =  (SEC_ERROR_BASE + 130),
00181 SEC_ERROR_OCSP_FUTURE_RESPONSE                =  (SEC_ERROR_BASE + 131),
00182 SEC_ERROR_OCSP_OLD_RESPONSE                   =  (SEC_ERROR_BASE + 132),
00183 /* smime stuff */
00184 SEC_ERROR_DIGEST_NOT_FOUND             =  (SEC_ERROR_BASE + 133),
00185 SEC_ERROR_UNSUPPORTED_MESSAGE_TYPE     =  (SEC_ERROR_BASE + 134),
00186 SEC_ERROR_MODULE_STUCK                        =  (SEC_ERROR_BASE + 135),
00187 SEC_ERROR_BAD_TEMPLATE                        =  (SEC_ERROR_BASE + 136),
00188 SEC_ERROR_CRL_NOT_FOUND                =  (SEC_ERROR_BASE + 137),
00189 SEC_ERROR_REUSED_ISSUER_AND_SERIAL          =   (SEC_ERROR_BASE + 138),
00190 SEC_ERROR_BUSY                              =   (SEC_ERROR_BASE + 139),
00191 SEC_ERROR_EXTRA_INPUT                       =   (SEC_ERROR_BASE + 140),
00192 /* error codes used by elliptic curve code */
00193 SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE          =  (SEC_ERROR_BASE + 141),
00194 SEC_ERROR_UNSUPPORTED_EC_POINT_FORM           =  (SEC_ERROR_BASE + 142),
00195 SEC_ERROR_UNRECOGNIZED_OID             =  (SEC_ERROR_BASE + 143),
00196 SEC_ERROR_OCSP_INVALID_SIGNING_CERT           =   (SEC_ERROR_BASE + 144),
00197 /* new revocation errors */
00198 SEC_ERROR_REVOKED_CERTIFICATE_CRL      =  (SEC_ERROR_BASE + 145),
00199 SEC_ERROR_REVOKED_CERTIFICATE_OCSP     =  (SEC_ERROR_BASE + 146),
00200 SEC_ERROR_CRL_INVALID_VERSION               =    (SEC_ERROR_BASE + 147),
00201 SEC_ERROR_CRL_V1_CRITICAL_EXTENSION         =    (SEC_ERROR_BASE + 148),
00202 SEC_ERROR_CRL_UNKNOWN_CRITICAL_EXTENSION    =    (SEC_ERROR_BASE + 149),
00203 SEC_ERROR_UNKNOWN_OBJECT_TYPE               =    (SEC_ERROR_BASE + 150),
00204 SEC_ERROR_INCOMPATIBLE_PKCS11               =    (SEC_ERROR_BASE + 151),
00205 SEC_ERROR_NO_EVENT                          =    (SEC_ERROR_BASE + 152),
00206 SEC_ERROR_CRL_ALREADY_EXISTS                =    (SEC_ERROR_BASE + 153),
00207 SEC_ERROR_NOT_INITIALIZED                   =    (SEC_ERROR_BASE + 154),
00208 SEC_ERROR_TOKEN_NOT_LOGGED_IN               =    (SEC_ERROR_BASE + 155),
00209 SEC_ERROR_OCSP_RESPONDER_CERT_INVALID      =     (SEC_ERROR_BASE + 156),
00210 SEC_ERROR_OCSP_BAD_SIGNATURE               =     (SEC_ERROR_BASE + 157),
00211 
00212 /* Add new error codes above here. */
00213 SEC_ERROR_END_OF_LIST 
00214 } SECErrorCodes;
00215 #endif /* NO_SECURITY_ERROR_ENUM */
00216 
00217 #endif /* __SEC_ERR_H_ */