Some error code cleanups (SSL lib. used SSL_R_... codes reserved for alerts)
authorBodo Möller <bodo@openssl.org>
Sun, 8 Jan 2006 19:33:31 +0000 (19:33 +0000)
committerBodo Möller <bodo@openssl.org>
Sun, 8 Jan 2006 19:33:31 +0000 (19:33 +0000)
crypto/rsa/rsa.h
fips/fips.h
fips/fips_err.h
ssl/ssl.h
ssl/ssl_err.c

index b02b48be0aa5e0cb4acdd019f9c44eb1da29f22d..0b639cd37ffac7b75f13e66d6e39a1ded6931c0f 100644 (file)
@@ -389,17 +389,17 @@ void ERR_load_RSA_strings(void);
 #define RSA_R_NULL_BEFORE_BLOCK_MISSING                         113
 #define RSA_R_N_DOES_NOT_EQUAL_P_Q                      127
 #define RSA_R_OAEP_DECODING_ERROR                       121
-#define RSA_R_SLEN_RECOVERY_FAILED                      135
 #define RSA_R_PADDING_CHECK_FAILED                      114
 #define RSA_R_P_NOT_PRIME                               128
 #define RSA_R_Q_NOT_PRIME                               129
 #define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED              130
+#define RSA_R_SLEN_CHECK_FAILED                                 136
+#define RSA_R_SLEN_RECOVERY_FAILED                      135
 #define RSA_R_SSLV3_ROLLBACK_ATTACK                     115
 #define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116
 #define RSA_R_UNKNOWN_ALGORITHM_TYPE                    117
 #define RSA_R_UNKNOWN_PADDING_TYPE                      118
 #define RSA_R_WRONG_SIGNATURE_LENGTH                    119
-#define RSA_R_SLEN_CHECK_FAILED                                 136
 
 #ifdef  __cplusplus
 }
index d6aa19ac91bb8236ba3c4854c1e486e5cc8c2d57..3e5188b7ea7e566602736f0c4cc1c4d4526f3aff 100644 (file)
@@ -96,6 +96,7 @@ void ERR_load_FIPS_strings(void);
 #define FIPS_F_DSA_DO_VERIFY                            112
 #define FIPS_F_DSA_GENERATE_PARAMETERS                  110
 #define FIPS_F_FIPS_CHECK_DSA                           116
+#define FIPS_F_FIPS_CHECK_DSO                           120
 #define FIPS_F_FIPS_CHECK_EXE                           106
 #define FIPS_F_FIPS_CHECK_RSA                           115
 #define FIPS_F_FIPS_DSA_CHECK                           102
@@ -111,7 +112,6 @@ void ERR_load_FIPS_strings(void);
 #define FIPS_F_RSA_GENERATE_KEY                                 113
 #define FIPS_F_RSA_X931_GENERATE_KEY                    119
 #define FIPS_F_SSLEAY_RAND_BYTES                        101
-#define FIPS_F_FIPS_CHECK_DSO                           120
 
 /* Reason codes. */
 #define FIPS_R_CANNOT_READ_EXE                          103
@@ -122,9 +122,9 @@ void ERR_load_FIPS_strings(void);
 #define FIPS_R_INVALID_KEY_LENGTH                       109
 #define FIPS_R_KEY_TOO_SHORT                            108
 #define FIPS_R_NON_FIPS_METHOD                          100
+#define FIPS_R_NO_DSO_PATH                              110
 #define FIPS_R_PAIRWISE_TEST_FAILED                     107
 #define FIPS_R_SELFTEST_FAILED                          101
-#define FIPS_R_NO_DSO_PATH                              110
 
 #ifdef  __cplusplus
 }
index 6839453faba5b2f6fd37aadb1504bb89a3fcd322..f08bd060e049313976f774c7f538ea0a4182c6fa 100644 (file)
@@ -75,6 +75,7 @@ static ERR_STRING_DATA FIPS_str_functs[]=
 {ERR_FUNC(FIPS_F_DSA_DO_VERIFY),       "DSA_do_verify"},
 {ERR_FUNC(FIPS_F_DSA_GENERATE_PARAMETERS),     "DSA_generate_parameters"},
 {ERR_FUNC(FIPS_F_FIPS_CHECK_DSA),      "FIPS_CHECK_DSA"},
+{ERR_FUNC(FIPS_F_FIPS_CHECK_DSO),      "FIPS_CHECK_DSO"},
 {ERR_FUNC(FIPS_F_FIPS_CHECK_EXE),      "FIPS_CHECK_EXE"},
 {ERR_FUNC(FIPS_F_FIPS_CHECK_RSA),      "FIPS_CHECK_RSA"},
 {ERR_FUNC(FIPS_F_FIPS_DSA_CHECK),      "FIPS_dsa_check"},
@@ -90,7 +91,6 @@ static ERR_STRING_DATA FIPS_str_functs[]=
 {ERR_FUNC(FIPS_F_RSA_GENERATE_KEY),    "RSA_generate_key"},
 {ERR_FUNC(FIPS_F_RSA_X931_GENERATE_KEY),       "RSA_X931_generate_key"},
 {ERR_FUNC(FIPS_F_SSLEAY_RAND_BYTES),   "SSLEAY_RAND_BYTES"},
-{ERR_FUNC(FIPS_F_FIPS_CHECK_DSO),      "FIPS_check_dso"},
 {0,NULL}
        };
 
@@ -104,9 +104,9 @@ static ERR_STRING_DATA FIPS_str_reasons[]=
 {ERR_REASON(FIPS_R_INVALID_KEY_LENGTH)   ,"invalid key length"},
 {ERR_REASON(FIPS_R_KEY_TOO_SHORT)        ,"key too short"},
 {ERR_REASON(FIPS_R_NON_FIPS_METHOD)      ,"non fips method"},
+{ERR_REASON(FIPS_R_NO_DSO_PATH)          ,"DSO path can't be determined"},
 {ERR_REASON(FIPS_R_PAIRWISE_TEST_FAILED) ,"pairwise test failed"},
 {ERR_REASON(FIPS_R_SELFTEST_FAILED)      ,"selftest failed"},
-{ERR_REASON(FIPS_R_NO_DSO_PATH)                 ,"DSO path can't be determined"},
 {0,NULL}
        };
 
index f553be626266ffede1ee05237ca7acf6eedb17be..99e188086b9af651ad8fd72fcdfa1ff1744105bf 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -1567,7 +1567,7 @@ void ERR_load_SSL_strings(void);
 #define SSL_F_SSL_CTRL                                  232
 #define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY                         168
 #define SSL_F_SSL_CTX_NEW                               169
-#define SSL_F_SSL_CTX_SET_CIPHER_LIST                   1026
+#define SSL_F_SSL_CTX_SET_CIPHER_LIST                   269
 #define SSL_F_SSL_CTX_SET_PURPOSE                       226
 #define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT            219
 #define SSL_F_SSL_CTX_SET_SSL_VERSION                   170
@@ -1597,7 +1597,7 @@ void ERR_load_SSL_strings(void);
 #define SSL_F_SSL_SESSION_PRINT_FP                      190
 #define SSL_F_SSL_SESS_CERT_NEW                                 225
 #define SSL_F_SSL_SET_CERT                              191
-#define SSL_F_SSL_SET_CIPHER_LIST                       1027
+#define SSL_F_SSL_SET_CIPHER_LIST                       271
 #define SSL_F_SSL_SET_FD                                192
 #define SSL_F_SSL_SET_PKEY                              193
 #define SSL_F_SSL_SET_PURPOSE                           227
@@ -1676,40 +1676,39 @@ void ERR_load_SSL_strings(void);
 #define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED             145
 #define SSL_R_DATA_LENGTH_TOO_LONG                      146
 #define SSL_R_DECRYPTION_FAILED                                 147
-#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC       1109
+#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC       281
 #define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG           148
 #define SSL_R_DIGEST_CHECK_FAILED                       149
 #define SSL_R_ENCRYPTED_LENGTH_TOO_LONG                         150
-#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY              1092
+#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY              282
 #define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST             151
 #define SSL_R_EXCESSIVE_MESSAGE_SIZE                    152
 #define SSL_R_EXTRA_DATA_IN_MESSAGE                     153
 #define SSL_R_GOT_A_FIN_BEFORE_A_CCS                    154
 #define SSL_R_HTTPS_PROXY_REQUEST                       155
 #define SSL_R_HTTP_REQUEST                              156
-#define SSL_R_ILLEGAL_PADDING                           1110
+#define SSL_R_ILLEGAL_PADDING                           283
 #define SSL_R_INVALID_CHALLENGE_LENGTH                  158
 #define SSL_R_INVALID_COMMAND                           280
 #define SSL_R_INVALID_PURPOSE                           278
 #define SSL_R_INVALID_TRUST                             279
-#define SSL_R_KEY_ARG_TOO_LONG                          1112
-#define SSL_R_KRB5                                      1104
-#define SSL_R_KRB5_C_CC_PRINC                           1094
-#define SSL_R_KRB5_C_GET_CRED                           1095
-#define SSL_R_KRB5_C_INIT                               1096
-#define SSL_R_KRB5_C_MK_REQ                             1097
-#define SSL_R_KRB5_S_BAD_TICKET                                 1098
-#define SSL_R_KRB5_S_INIT                               1099
-#define SSL_R_KRB5_S_RD_REQ                             1108
-#define SSL_R_KRB5_S_TKT_EXPIRED                        1105
-#define SSL_R_KRB5_S_TKT_NYV                            1106
-#define SSL_R_KRB5_S_TKT_SKEW                           1107
+#define SSL_R_KEY_ARG_TOO_LONG                          284
+#define SSL_R_KRB5                                      285
+#define SSL_R_KRB5_C_CC_PRINC                           286
+#define SSL_R_KRB5_C_GET_CRED                           287
+#define SSL_R_KRB5_C_INIT                               288
+#define SSL_R_KRB5_C_MK_REQ                             289
+#define SSL_R_KRB5_S_BAD_TICKET                                 290
+#define SSL_R_KRB5_S_INIT                               291
+#define SSL_R_KRB5_S_RD_REQ                             292
+#define SSL_R_KRB5_S_TKT_EXPIRED                        293
+#define SSL_R_KRB5_S_TKT_NYV                            294
+#define SSL_R_KRB5_S_TKT_SKEW                           295
 #define SSL_R_LENGTH_MISMATCH                           159
 #define SSL_R_LENGTH_TOO_SHORT                          160
 #define SSL_R_LIBRARY_BUG                               274
 #define SSL_R_LIBRARY_HAS_NO_CIPHERS                    161
-#define SSL_R_MASTER_KEY_TOO_LONG                       1112
-#define SSL_R_MESSAGE_TOO_LONG                          1111
+#define SSL_R_MESSAGE_TOO_LONG                          296
 #define SSL_R_MISSING_DH_DSA_CERT                       162
 #define SSL_R_MISSING_DH_KEY                            163
 #define SSL_R_MISSING_DH_RSA_CERT                       164
@@ -1746,7 +1745,7 @@ void ERR_load_SSL_strings(void);
 #define SSL_R_NULL_SSL_CTX                              195
 #define SSL_R_NULL_SSL_METHOD_PASSED                    196
 #define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED           197
-#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE             1115
+#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE             297
 #define SSL_R_PACKET_LENGTH_TOO_LONG                    198
 #define SSL_R_PATH_TOO_LONG                             270
 #define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE                 199
@@ -1765,7 +1764,7 @@ void ERR_load_SSL_strings(void);
 #define SSL_R_READ_WRONG_PACKET_TYPE                    212
 #define SSL_R_RECORD_LENGTH_MISMATCH                    213
 #define SSL_R_RECORD_TOO_LARGE                          214
-#define SSL_R_RECORD_TOO_SMALL                          1093
+#define SSL_R_RECORD_TOO_SMALL                          298
 #define SSL_R_REQUIRED_CIPHER_MISSING                   215
 #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO                216
 #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO                  217
@@ -1774,8 +1773,8 @@ void ERR_load_SSL_strings(void);
 #define SSL_R_SHORT_READ                                219
 #define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE     220
 #define SSL_R_SSL23_DOING_SESSION_ID_REUSE              221
-#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG               1114
-#define SSL_R_SSL3_SESSION_ID_TOO_LONG                  1113
+#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG               299
+#define SSL_R_SSL3_SESSION_ID_TOO_LONG                  300
 #define SSL_R_SSL3_SESSION_ID_TOO_SHORT                         222
 #define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE               1042
 #define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC                1020
@@ -1786,20 +1785,15 @@ void ERR_load_SSL_strings(void);
 #define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE             1040
 #define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER             1047
 #define SSL_R_SSLV3_ALERT_NO_CERTIFICATE                1041
-#define SSL_R_SSLV3_ALERT_PEER_ERROR_CERTIFICATE        223
-#define SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CERTIFICATE     224
-#define SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CIPHER          225
-#define SSL_R_SSLV3_ALERT_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 226
 #define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE            1010
-#define SSL_R_SSLV3_ALERT_UNKNOWN_REMOTE_ERROR_TYPE     227
 #define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE       1043
 #define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION        228
 #define SSL_R_SSL_HANDSHAKE_FAILURE                     229
 #define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS                230
-#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED            1102
-#define SSL_R_SSL_SESSION_ID_CONFLICT                   1103
+#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED            301
+#define SSL_R_SSL_SESSION_ID_CONFLICT                   302
 #define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG           273
-#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH             1101
+#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH             303
 #define SSL_R_SSL_SESSION_ID_IS_DIFFERENT               231
 #define SSL_R_TLSV1_ALERT_ACCESS_DENIED                         1049
 #define SSL_R_TLSV1_ALERT_DECODE_ERROR                  1050
@@ -1840,7 +1834,6 @@ void ERR_load_SSL_strings(void);
 #define SSL_R_UNKNOWN_STATE                             255
 #define SSL_R_UNSUPPORTED_CIPHER                        256
 #define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM                 257
-#define SSL_R_UNSUPPORTED_OPTION                        1091
 #define SSL_R_UNSUPPORTED_PROTOCOL                      258
 #define SSL_R_UNSUPPORTED_SSL_VERSION                   259
 #define SSL_R_WRITE_BIO_NOT_SET                                 260
index 825ff252e62da3732906f19556e17e8feafc395e..4bcf591298bf82da5dacfc6b75fcad7acd3b348d 100644 (file)
@@ -303,7 +303,6 @@ static ERR_STRING_DATA SSL_str_reasons[]=
 {ERR_REASON(SSL_R_LENGTH_TOO_SHORT)      ,"length too short"},
 {ERR_REASON(SSL_R_LIBRARY_BUG)           ,"library bug"},
 {ERR_REASON(SSL_R_LIBRARY_HAS_NO_CIPHERS),"library has no ciphers"},
-{ERR_REASON(SSL_R_MASTER_KEY_TOO_LONG)   ,"master key too long"},
 {ERR_REASON(SSL_R_MESSAGE_TOO_LONG)      ,"message too long"},
 {ERR_REASON(SSL_R_MISSING_DH_DSA_CERT)   ,"missing dh dsa cert"},
 {ERR_REASON(SSL_R_MISSING_DH_KEY)        ,"missing dh key"},
@@ -381,12 +380,7 @@ static ERR_STRING_DATA SSL_str_reasons[]=
 {ERR_REASON(SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE),"sslv3 alert handshake failure"},
 {ERR_REASON(SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER),"sslv3 alert illegal parameter"},
 {ERR_REASON(SSL_R_SSLV3_ALERT_NO_CERTIFICATE),"sslv3 alert no certificate"},
-{ERR_REASON(SSL_R_SSLV3_ALERT_PEER_ERROR_CERTIFICATE),"sslv3 alert peer error certificate"},
-{ERR_REASON(SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CERTIFICATE),"sslv3 alert peer error no certificate"},
-{ERR_REASON(SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CIPHER),"sslv3 alert peer error no cipher"},
-{ERR_REASON(SSL_R_SSLV3_ALERT_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE),"sslv3 alert peer error unsupported certificate type"},
 {ERR_REASON(SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE),"sslv3 alert unexpected message"},
-{ERR_REASON(SSL_R_SSLV3_ALERT_UNKNOWN_REMOTE_ERROR_TYPE),"sslv3 alert unknown remote error type"},
 {ERR_REASON(SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE),"sslv3 alert unsupported certificate"},
 {ERR_REASON(SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION),"ssl ctx has no default ssl version"},
 {ERR_REASON(SSL_R_SSL_HANDSHAKE_FAILURE) ,"ssl handshake failure"},
@@ -435,7 +429,6 @@ static ERR_STRING_DATA SSL_str_reasons[]=
 {ERR_REASON(SSL_R_UNKNOWN_STATE)         ,"unknown state"},
 {ERR_REASON(SSL_R_UNSUPPORTED_CIPHER)    ,"unsupported cipher"},
 {ERR_REASON(SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM),"unsupported compression algorithm"},
-{ERR_REASON(SSL_R_UNSUPPORTED_OPTION)    ,"unsupported option"},
 {ERR_REASON(SSL_R_UNSUPPORTED_PROTOCOL)  ,"unsupported protocol"},
 {ERR_REASON(SSL_R_UNSUPPORTED_SSL_VERSION),"unsupported ssl version"},
 {ERR_REASON(SSL_R_WRITE_BIO_NOT_SET)     ,"write bio not set"},