Back to index

lightning-sunbird  0.9+nobinonly
sslerrstrs.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 Mozilla Communicator client code, released
00015  * March 31, 1998.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998-1999
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
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  * sslerrstrs.h - map SSL errors to strings (used by errormap.c)
00039  *
00040  */
00041 
00042 /*
00043  ****************************************************************************
00044  * The code below this point was provided by Nelson Bolyard <nelsonb> of the
00045  *     Netscape Certificate Server team on 27-March-1998.
00046  *     Taken from the file ns/security/cmd/lib/SSLerrs.h on NSS_1_BRANCH.
00047  *     Last updated from there: 24-July-1998 by Mark Smith <mcs>
00048  *
00049  * All of the Directory Server specific changes are enclosed inside
00050  *     #ifdef NS_DIRECTORY.
00051  ****************************************************************************
00052  */
00053 
00054 /* SSL-specific security error codes  */
00055 /* caller must include "sslerr.h" */
00056 
00057 ER3(SSL_ERROR_EXPORT_ONLY_SERVER,                SSL_ERROR_BASE + 0,
00058 "Unable to communicate securely.  Peer does not support high-grade encryption.")
00059 
00060 ER3(SSL_ERROR_US_ONLY_SERVER,                           SSL_ERROR_BASE + 1,
00061 "Unable to communicate securely.  Peer requires high-grade encryption which is not supported.")
00062 
00063 ER3(SSL_ERROR_NO_CYPHER_OVERLAP,                 SSL_ERROR_BASE + 2,
00064 "Cannot communicate securely with peer: no common encryption algorithm(s).")
00065 
00066 ER3(SSL_ERROR_NO_CERTIFICATE,                           SSL_ERROR_BASE + 3,
00067 "Unable to find the certificate or key necessary for authentication.")
00068 
00069 ER3(SSL_ERROR_BAD_CERTIFICATE,                          SSL_ERROR_BASE + 4,
00070 "Unable to communicate securely with peer: peers's certificate was rejected.")
00071 
00072 /* unused                                        (SSL_ERROR_BASE + 5),*/
00073 
00074 ER3(SSL_ERROR_BAD_CLIENT,                        SSL_ERROR_BASE + 6,
00075 "The server has encountered bad data from the client.")
00076 
00077 ER3(SSL_ERROR_BAD_SERVER,                        SSL_ERROR_BASE + 7,
00078 "The client has encountered bad data from the server.")
00079 
00080 ER3(SSL_ERROR_UNSUPPORTED_CERTIFICATE_TYPE,             SSL_ERROR_BASE + 8,
00081 "Unsupported certificate type.")
00082 
00083 ER3(SSL_ERROR_UNSUPPORTED_VERSION,               SSL_ERROR_BASE + 9,
00084 "Peer using unsupported version of security protocol.")
00085 
00086 /* unused                                        (SSL_ERROR_BASE + 10),*/
00087 
00088 ER3(SSL_ERROR_WRONG_CERTIFICATE,                 SSL_ERROR_BASE + 11,
00089 "Client authentication failed: private key in key database does not match public key in certificate database.")
00090 
00091 ER3(SSL_ERROR_BAD_CERT_DOMAIN,                          SSL_ERROR_BASE + 12,
00092 "Unable to communicate securely with peer: requested domain name does not match the server's certificate.")
00093 
00094 /* SSL_ERROR_POST_WARNING                        (SSL_ERROR_BASE + 13),
00095    defined in sslerr.h
00096 */
00097 
00098 ER3(SSL_ERROR_SSL2_DISABLED,                            (SSL_ERROR_BASE + 14),
00099 "Peer only supports SSL version 2, which is locally disabled.")
00100 
00101 
00102 ER3(SSL_ERROR_BAD_MAC_READ,                      (SSL_ERROR_BASE + 15),
00103 "SSL received a record with an incorrect Message Authentication Code.")
00104 
00105 ER3(SSL_ERROR_BAD_MAC_ALERT,                            (SSL_ERROR_BASE + 16),
00106 "SSL peer reports incorrect Message Authentication Code.")
00107 
00108 ER3(SSL_ERROR_BAD_CERT_ALERT,                           (SSL_ERROR_BASE + 17),
00109 "SSL peer cannot verify your certificate.")
00110 
00111 ER3(SSL_ERROR_REVOKED_CERT_ALERT,                (SSL_ERROR_BASE + 18),
00112 "SSL peer rejected your certificate as revoked.")
00113 
00114 ER3(SSL_ERROR_EXPIRED_CERT_ALERT,                (SSL_ERROR_BASE + 19),
00115 "SSL peer rejected your certificate as expired.")
00116 
00117 ER3(SSL_ERROR_SSL_DISABLED,                      (SSL_ERROR_BASE + 20),
00118 "Cannot connect: SSL is disabled.")
00119 
00120 ER3(SSL_ERROR_FORTEZZA_PQG,                      (SSL_ERROR_BASE + 21),
00121 "Cannot connect: SSL peer is in another FORTEZZA domain.")
00122 
00123 
00124 ER3(SSL_ERROR_UNKNOWN_CIPHER_SUITE          , (SSL_ERROR_BASE + 22),
00125 "An unknown SSL cipher suite has been requested.")
00126 
00127 ER3(SSL_ERROR_NO_CIPHERS_SUPPORTED          , (SSL_ERROR_BASE + 23),
00128 "No cipher suites are present and enabled in this program.")
00129 
00130 ER3(SSL_ERROR_BAD_BLOCK_PADDING             , (SSL_ERROR_BASE + 24),
00131 "SSL received a record with bad block padding.")
00132 
00133 ER3(SSL_ERROR_RX_RECORD_TOO_LONG            , (SSL_ERROR_BASE + 25),
00134 "SSL received a record that exceeded the maximum permissible length.")
00135 
00136 ER3(SSL_ERROR_TX_RECORD_TOO_LONG            , (SSL_ERROR_BASE + 26),
00137 "SSL attempted to send a record that exceeded the maximum permissible length.")
00138 
00139 /*
00140  * Received a malformed (too long or short or invalid content) SSL handshake.
00141  */
00142 ER3(SSL_ERROR_RX_MALFORMED_HELLO_REQUEST    , (SSL_ERROR_BASE + 27),
00143 "SSL received a malformed Hello Request handshake message.")
00144 
00145 ER3(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO     , (SSL_ERROR_BASE + 28),
00146 "SSL received a malformed Client Hello handshake message.")
00147 
00148 ER3(SSL_ERROR_RX_MALFORMED_SERVER_HELLO     , (SSL_ERROR_BASE + 29),
00149 "SSL received a malformed Server Hello handshake message.")
00150 
00151 ER3(SSL_ERROR_RX_MALFORMED_CERTIFICATE      , (SSL_ERROR_BASE + 30),
00152 "SSL received a malformed Certificate handshake message.")
00153 
00154 ER3(SSL_ERROR_RX_MALFORMED_SERVER_KEY_EXCH  , (SSL_ERROR_BASE + 31),
00155 "SSL received a malformed Server Key Exchange handshake message.")
00156 
00157 ER3(SSL_ERROR_RX_MALFORMED_CERT_REQUEST     , (SSL_ERROR_BASE + 32),
00158 "SSL received a malformed Certificate Request handshake message.")
00159 
00160 ER3(SSL_ERROR_RX_MALFORMED_HELLO_DONE       , (SSL_ERROR_BASE + 33),
00161 "SSL received a malformed Server Hello Done handshake message.")
00162 
00163 ER3(SSL_ERROR_RX_MALFORMED_CERT_VERIFY      , (SSL_ERROR_BASE + 34),
00164 "SSL received a malformed Certificate Verify handshake message.")
00165 
00166 ER3(SSL_ERROR_RX_MALFORMED_CLIENT_KEY_EXCH  , (SSL_ERROR_BASE + 35),
00167 "SSL received a malformed Client Key Exchange handshake message.")
00168 
00169 ER3(SSL_ERROR_RX_MALFORMED_FINISHED         , (SSL_ERROR_BASE + 36),
00170 "SSL received a malformed Finished handshake message.")
00171 
00172 /*
00173  * Received a malformed (too long or short) SSL record.
00174  */
00175 ER3(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER    , (SSL_ERROR_BASE + 37),
00176 "SSL received a malformed Change Cipher Spec record.")
00177 
00178 ER3(SSL_ERROR_RX_MALFORMED_ALERT            , (SSL_ERROR_BASE + 38),
00179 "SSL received a malformed Alert record.")
00180 
00181 ER3(SSL_ERROR_RX_MALFORMED_HANDSHAKE        , (SSL_ERROR_BASE + 39),
00182 "SSL received a malformed Handshake record.")
00183 
00184 ER3(SSL_ERROR_RX_MALFORMED_APPLICATION_DATA , (SSL_ERROR_BASE + 40),
00185 "SSL received a malformed Application Data record.")
00186 
00187 /*
00188  * Received an SSL handshake that was inappropriate for the state we're in.
00189  * E.g. Server received message from server, or wrong state in state machine.
00190  */
00191 ER3(SSL_ERROR_RX_UNEXPECTED_HELLO_REQUEST   , (SSL_ERROR_BASE + 41),
00192 "SSL received an unexpected Hello Request handshake message.")
00193 
00194 ER3(SSL_ERROR_RX_UNEXPECTED_CLIENT_HELLO    , (SSL_ERROR_BASE + 42),
00195 "SSL received an unexpected Client Hello handshake message.")
00196 
00197 ER3(SSL_ERROR_RX_UNEXPECTED_SERVER_HELLO    , (SSL_ERROR_BASE + 43),
00198 "SSL received an unexpected Server Hello handshake message.")
00199 
00200 ER3(SSL_ERROR_RX_UNEXPECTED_CERTIFICATE     , (SSL_ERROR_BASE + 44),
00201 "SSL received an unexpected Certificate handshake message.")
00202 
00203 ER3(SSL_ERROR_RX_UNEXPECTED_SERVER_KEY_EXCH , (SSL_ERROR_BASE + 45),
00204 "SSL received an unexpected Server Key Exchange handshake message.")
00205 
00206 ER3(SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST    , (SSL_ERROR_BASE + 46),
00207 "SSL received an unexpected Certificate Request handshake message.")
00208 
00209 ER3(SSL_ERROR_RX_UNEXPECTED_HELLO_DONE      , (SSL_ERROR_BASE + 47),
00210 "SSL received an unexpected Server Hello Done handshake message.")
00211 
00212 ER3(SSL_ERROR_RX_UNEXPECTED_CERT_VERIFY     , (SSL_ERROR_BASE + 48),
00213 "SSL received an unexpected Certificate Verify handshake message.")
00214 
00215 ER3(SSL_ERROR_RX_UNEXPECTED_CLIENT_KEY_EXCH , (SSL_ERROR_BASE + 49),
00216 "SSL received an unexpected Cllient Key Exchange handshake message.")
00217 
00218 ER3(SSL_ERROR_RX_UNEXPECTED_FINISHED        , (SSL_ERROR_BASE + 50),
00219 "SSL received an unexpected Finished handshake message.")
00220 
00221 /*
00222  * Received an SSL record that was inappropriate for the state we're in.
00223  */
00224 ER3(SSL_ERROR_RX_UNEXPECTED_CHANGE_CIPHER   , (SSL_ERROR_BASE + 51),
00225 "SSL received an unexpected Change Cipher Spec record.")
00226 
00227 ER3(SSL_ERROR_RX_UNEXPECTED_ALERT           , (SSL_ERROR_BASE + 52),
00228 "SSL received an unexpected Alert record.")
00229 
00230 ER3(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE       , (SSL_ERROR_BASE + 53),
00231 "SSL received an unexpected Handshake record.")
00232 
00233 ER3(SSL_ERROR_RX_UNEXPECTED_APPLICATION_DATA, (SSL_ERROR_BASE + 54),
00234 "SSL received an unexpected Application Data record.")
00235 
00236 /*
00237  * Received record/message with unknown discriminant.
00238  */
00239 ER3(SSL_ERROR_RX_UNKNOWN_RECORD_TYPE        , (SSL_ERROR_BASE + 55),
00240 "SSL received a record with an unknown content type.")
00241 
00242 ER3(SSL_ERROR_RX_UNKNOWN_HANDSHAKE          , (SSL_ERROR_BASE + 56),
00243 "SSL received a handshake message with an unknown message type.")
00244 
00245 ER3(SSL_ERROR_RX_UNKNOWN_ALERT              , (SSL_ERROR_BASE + 57),
00246 "SSL received an alert record with an unknown alert description.")
00247 
00248 /*
00249  * Received an alert reporting what we did wrong.  (more alerts above)
00250  */
00251 ER3(SSL_ERROR_CLOSE_NOTIFY_ALERT            , (SSL_ERROR_BASE + 58),
00252 "SSL peer has closed this connection.")
00253 
00254 ER3(SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT    , (SSL_ERROR_BASE + 59),
00255 "SSL peer was not expecting a handshake message it received.")
00256 
00257 ER3(SSL_ERROR_DECOMPRESSION_FAILURE_ALERT   , (SSL_ERROR_BASE + 60),
00258 "SSL peer was unable to succesfully decompress an SSL record it received.")
00259 
00260 ER3(SSL_ERROR_HANDSHAKE_FAILURE_ALERT       , (SSL_ERROR_BASE + 61),
00261 "SSL peer was unable to negotiate an acceptable set of security parameters.")
00262 
00263 ER3(SSL_ERROR_ILLEGAL_PARAMETER_ALERT       , (SSL_ERROR_BASE + 62),
00264 "SSL peer rejected a handshake message for unacceptable content.")
00265 
00266 ER3(SSL_ERROR_UNSUPPORTED_CERT_ALERT        , (SSL_ERROR_BASE + 63),
00267 "SSL peer does not support certificates of the type it received.")
00268 
00269 ER3(SSL_ERROR_CERTIFICATE_UNKNOWN_ALERT     , (SSL_ERROR_BASE + 64),
00270 "SSL peer had some unspecified issue with the certificate it received.")
00271 
00272 
00273 ER3(SSL_ERROR_GENERATE_RANDOM_FAILURE       , (SSL_ERROR_BASE + 65),
00274 "SSL experienced a failure of its random number generator.")
00275 
00276 ER3(SSL_ERROR_SIGN_HASHES_FAILURE           , (SSL_ERROR_BASE + 66),
00277 "Unable to digitally sign data required to verify your certificate.")
00278 
00279 ER3(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE    , (SSL_ERROR_BASE + 67),
00280 "SSL was unable to extract the public key from the peer's certificate.")
00281 
00282 ER3(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE   , (SSL_ERROR_BASE + 68),
00283 "Unspecified failure while processing SSL Server Key Exchange handshake.")
00284 
00285 ER3(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE   , (SSL_ERROR_BASE + 69),
00286 "Unspecified failure while processing SSL Client Key Exchange handshake.")
00287 
00288 ER3(SSL_ERROR_ENCRYPTION_FAILURE            , (SSL_ERROR_BASE + 70),
00289 "Bulk data encryption algorithm failed in selected cipher suite.")
00290 
00291 ER3(SSL_ERROR_DECRYPTION_FAILURE            , (SSL_ERROR_BASE + 71),
00292 "Bulk data decryption algorithm failed in selected cipher suite.")
00293 
00294 ER3(SSL_ERROR_SOCKET_WRITE_FAILURE          , (SSL_ERROR_BASE + 72),
00295 "Attempt to write encrypted data to underlying socket failed.")
00296 
00297 ER3(SSL_ERROR_MD5_DIGEST_FAILURE            , (SSL_ERROR_BASE + 73),
00298 "MD5 digest function failed.")
00299 
00300 ER3(SSL_ERROR_SHA_DIGEST_FAILURE            , (SSL_ERROR_BASE + 74),
00301 "SHA-1 digest function failed.")
00302 
00303 ER3(SSL_ERROR_MAC_COMPUTATION_FAILURE       , (SSL_ERROR_BASE + 75),
00304 "MAC computation failed.")
00305 
00306 ER3(SSL_ERROR_SYM_KEY_CONTEXT_FAILURE       , (SSL_ERROR_BASE + 76),
00307 "Failure to create Symmetric Key context.")
00308 
00309 ER3(SSL_ERROR_SYM_KEY_UNWRAP_FAILURE        , (SSL_ERROR_BASE + 77),
00310 "Failure to unwrap the Symmetric key in Client Key Exchange message.")
00311 
00312 ER3(SSL_ERROR_PUB_KEY_SIZE_LIMIT_EXCEEDED   , (SSL_ERROR_BASE + 78),
00313 "SSL Server attempted to use domestic-grade public key with export cipher suite.")
00314 
00315 ER3(SSL_ERROR_IV_PARAM_FAILURE              , (SSL_ERROR_BASE + 79),
00316 "PKCS11 code failed to translate an IV into a param.")
00317 
00318 ER3(SSL_ERROR_INIT_CIPHER_SUITE_FAILURE     , (SSL_ERROR_BASE + 80),
00319 "Failed to initialize the selected cipher suite.")
00320 
00321 ER3(SSL_ERROR_SESSION_KEY_GEN_FAILURE       , (SSL_ERROR_BASE + 81),
00322 "Client failed to generate session keys for SSL session.")
00323 
00324 ER3(SSL_ERROR_NO_SERVER_KEY_FOR_ALG         , (SSL_ERROR_BASE + 82),
00325 "Server has no key for the attempted key exchange algorithm.")
00326 
00327 ER3(SSL_ERROR_TOKEN_INSERTION_REMOVAL       , (SSL_ERROR_BASE + 83),
00328 "PKCS#11 token was inserted or removed while operation was in progress.")
00329 
00330 ER3(SSL_ERROR_TOKEN_SLOT_NOT_FOUND          , (SSL_ERROR_BASE + 84),
00331 "No PKCS#11 token could be found to do a required operation.")
00332 
00333 ER3(SSL_ERROR_NO_COMPRESSION_OVERLAP        , (SSL_ERROR_BASE + 85),
00334 "Cannot communicate securely with peer: no common compression algorithm(s).")
00335 
00336 ER3(SSL_ERROR_HANDSHAKE_NOT_COMPLETED       , (SSL_ERROR_BASE + 86),
00337 "Cannot initiate another SSL handshake until current handshake is complete.")
00338 
00339 ER3(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE      , (SSL_ERROR_BASE + 87),
00340 "Received incorrect handshakes hash values from peer.")
00341 
00342 ER3(SSL_ERROR_CERT_KEA_MISMATCH             , (SSL_ERROR_BASE + 88),
00343 "The certificate provided cannot be used with the selected key exchange algorithm.")