]> granicus.if.org Git - openssl/commitdiff
Fix more error codes.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 14 Aug 2007 13:33:33 +0000 (13:33 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 14 Aug 2007 13:33:33 +0000 (13:33 +0000)
crypto/dsa/dsa.h
crypto/dsa/dsa_err.c
crypto/fips_err.h
crypto/rand/rand.h
crypto/rand/rand_err.c
crypto/rsa/rsa.h
crypto/rsa/rsa_err.c
fips-1.0/fips.c
fips-1.0/fips.h

index 6a9e732dea99589c1c280f5e4fd3653146dbf344..ebf8cd37f73a17cbc4f4d96b6de11f5065ffbf0b 100644 (file)
@@ -292,6 +292,7 @@ void ERR_load_DSA_strings(void);
 #define DSA_F_D2I_DSA_SIG                               110
 #define DSA_F_DSAPARAMS_PRINT                           100
 #define DSA_F_DSAPARAMS_PRINT_FP                        101
+#define DSA_F_DSA_BUILTIN_PARAMGEN                      118
 #define DSA_F_DSA_DO_SIGN                               112
 #define DSA_F_DSA_DO_VERIFY                             113
 #define DSA_F_DSA_GENERATE_PARAMETERS                   117
index e41619c5c1673c8ac75528e97d6778b8c9b238e5..aa11046c0a7a95427c780e32a48d17384ee575a6 100644 (file)
@@ -73,6 +73,7 @@ static ERR_STRING_DATA DSA_str_functs[]=
 {ERR_FUNC(DSA_F_D2I_DSA_SIG),  "d2i_DSA_SIG"},
 {ERR_FUNC(DSA_F_DSAPARAMS_PRINT),      "DSAparams_print"},
 {ERR_FUNC(DSA_F_DSAPARAMS_PRINT_FP),   "DSAparams_print_fp"},
+{ERR_FUNC(DSA_F_DSA_BUILTIN_PARAMGEN), "DSA_BUILTIN_PARAMGEN"},
 {ERR_FUNC(DSA_F_DSA_DO_SIGN),  "DSA_do_sign"},
 {ERR_FUNC(DSA_F_DSA_DO_VERIFY),        "DSA_do_verify"},
 {ERR_FUNC(DSA_F_DSA_GENERATE_PARAMETERS),      "DSA_generate_parameters"},
index 9c07e9f7259da2b0c9cd8ec0d77beba70636fb76..30f90fd80254549e2aba1427242378e6b4a9bdd2 100644 (file)
 
 static ERR_STRING_DATA FIPS_str_functs[]=
        {
-{ERR_FUNC(FIPS_F_DH_GENERATE_PARAMETERS),      "DH_generate_parameters"},
+{ERR_FUNC(FIPS_F_DH_BUILTIN_GENPARAMS),        "DH_BUILTIN_GENPARAMS"},
+{ERR_FUNC(FIPS_F_DSA_BUILTIN_PARAMGEN),        "DSA_BUILTIN_PARAMGEN"},
 {ERR_FUNC(FIPS_F_DSA_DO_SIGN), "DSA_do_sign"},
 {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_FINGERPRINT),      "FIPS_CHECK_FINGERPRINT"},
-{ERR_FUNC(FIPS_F_FIPS_CHECK_PK_SIG),   "FIPS_CHECK_PK_SIG"},
+{ERR_FUNC(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT),       "FIPS_CHECK_INCORE_FINGERPRINT"},
 {ERR_FUNC(FIPS_F_FIPS_CHECK_RSA),      "FIPS_CHECK_RSA"},
-{ERR_FUNC(FIPS_F_FIPS_DSA_CHECK),      "FIPS_dsa_check"},
+{ERR_FUNC(FIPS_F_FIPS_DSA_CHECK),      "FIPS_DSA_CHECK"},
 {ERR_FUNC(FIPS_F_FIPS_MODE_SET),       "FIPS_mode_set"},
 {ERR_FUNC(FIPS_F_FIPS_PKEY_SIGNATURE_TEST),    "fips_pkey_signature_test"},
 {ERR_FUNC(FIPS_F_FIPS_SELFTEST_AES),   "FIPS_selftest_aes"},
 {ERR_FUNC(FIPS_F_FIPS_SELFTEST_DES),   "FIPS_selftest_des"},
 {ERR_FUNC(FIPS_F_FIPS_SELFTEST_DSA),   "FIPS_selftest_dsa"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_HMAC),  "FIPS_selftest_hmac"},
 {ERR_FUNC(FIPS_F_FIPS_SELFTEST_RNG),   "FIPS_selftest_rng"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_RSA),   "FIPS_selftest_rsa"},
-{ERR_FUNC(FIPS_F_FIPS_SELFTEST_SHA),   "FIPS_SELFTEST_SHA"},
+{ERR_FUNC(FIPS_F_FIPS_SELFTEST_SHA1),  "FIPS_selftest_sha1"},
 {ERR_FUNC(FIPS_F_HASH_FINAL),  "HASH_FINAL"},
+{ERR_FUNC(FIPS_F_RSA_BUILTIN_KEYGEN),  "RSA_BUILTIN_KEYGEN"},
+{ERR_FUNC(FIPS_F_RSA_EAY_PRIVATE_DECRYPT),     "RSA_EAY_PRIVATE_DECRYPT"},
+{ERR_FUNC(FIPS_F_RSA_EAY_PRIVATE_ENCRYPT),     "RSA_EAY_PRIVATE_ENCRYPT"},
+{ERR_FUNC(FIPS_F_RSA_EAY_PUBLIC_DECRYPT),      "RSA_EAY_PUBLIC_DECRYPT"},
 {ERR_FUNC(FIPS_F_RSA_EAY_PUBLIC_ENCRYPT),      "RSA_EAY_PUBLIC_ENCRYPT"},
-{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_RSA_X931_GENERATE_KEY_EX),    "RSA_X931_generate_key_ex"},
 {ERR_FUNC(FIPS_F_SSLEAY_RAND_BYTES),   "SSLEAY_RAND_BYTES"},
 {0,NULL}
        };
index dae7a4a76c0d0a1043f5e18ec9b922ec91f04968..cbf1b297b1cfa8f935b9be09224f245d75a43379 100644 (file)
@@ -139,7 +139,9 @@ void ERR_load_RAND_strings(void);
 /* Function codes. */
 #define RAND_F_FIPS_RAND                                103
 #define RAND_F_FIPS_RAND_BYTES                          102
+#define RAND_F_FIPS_RAND_SET_DT                                 106
 #define RAND_F_FIPS_SET_DT                              104
+#define RAND_F_FIPS_SET_PRNG_SEED                       107
 #define RAND_F_FIPS_SET_TEST_MODE                       105
 #define RAND_F_RAND_GET_RAND_METHOD                     101
 #define RAND_F_SSLEAY_RAND_BYTES                        100
@@ -154,6 +156,7 @@ void ERR_load_RAND_strings(void);
 #define RAND_R_PRNG_NOT_REKEYED                                 102
 #define RAND_R_PRNG_NOT_RESEEDED                        103
 #define RAND_R_PRNG_NOT_SEEDED                          100
+#define RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY             110
 #define RAND_R_PRNG_STUCK                               104
 
 #ifdef  __cplusplus
index cc1513e0fa5194a0603f539ce8d33be8d1840e1c..7fa27a5d43b6c9ea071129aec5d645c37cdc39ca 100644 (file)
@@ -1,6 +1,6 @@
 /* crypto/rand/rand_err.c */
 /* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2007 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -72,7 +72,9 @@ static ERR_STRING_DATA RAND_str_functs[]=
        {
 {ERR_FUNC(RAND_F_FIPS_RAND),   "FIPS_RAND"},
 {ERR_FUNC(RAND_F_FIPS_RAND_BYTES),     "FIPS_RAND_BYTES"},
+{ERR_FUNC(RAND_F_FIPS_RAND_SET_DT),    "FIPS_RAND_SET_DT"},
 {ERR_FUNC(RAND_F_FIPS_SET_DT), "FIPS_SET_DT"},
+{ERR_FUNC(RAND_F_FIPS_SET_PRNG_SEED),  "FIPS_SET_PRNG_SEED"},
 {ERR_FUNC(RAND_F_FIPS_SET_TEST_MODE),  "FIPS_SET_TEST_MODE"},
 {ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD),        "RAND_get_rand_method"},
 {ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES),   "SSLEAY_RAND_BYTES"},
@@ -90,6 +92,7 @@ static ERR_STRING_DATA RAND_str_reasons[]=
 {ERR_REASON(RAND_R_PRNG_NOT_REKEYED)     ,"prng not rekeyed"},
 {ERR_REASON(RAND_R_PRNG_NOT_RESEEDED)    ,"prng not reseeded"},
 {ERR_REASON(RAND_R_PRNG_NOT_SEEDED)      ,"PRNG not seeded"},
+{ERR_REASON(RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY),"prng seed must not match key"},
 {ERR_REASON(RAND_R_PRNG_STUCK)           ,"prng stuck"},
 {0,NULL}
        };
index 068f613b28237a72c923cd1131671b2af03bd8a2..e7a6a92c41b4ca44c6171841ff32490b793e1a18 100644 (file)
@@ -406,6 +406,8 @@ void ERR_load_RSA_strings(void);
 /* Error codes for the RSA functions. */
 
 /* Function codes. */
+#define RSA_F_FIPS_RSA_SIGN                             140
+#define RSA_F_FIPS_RSA_VERIFY                           141
 #define RSA_F_MEMORY_LOCK                               100
 #define RSA_F_RSA_BUILTIN_KEYGEN                        129
 #define RSA_F_RSA_CHECK_KEY                             123
index 69a5db945931282c94ec84b2c91f4c2f5647b7be..2b4dacb979a66e003453fedd178e82db6a59ffb2 100644 (file)
@@ -70,6 +70,8 @@
 
 static ERR_STRING_DATA RSA_str_functs[]=
        {
+{ERR_FUNC(RSA_F_FIPS_RSA_SIGN),        "FIPS_RSA_SIGN"},
+{ERR_FUNC(RSA_F_FIPS_RSA_VERIFY),      "FIPS_RSA_VERIFY"},
 {ERR_FUNC(RSA_F_MEMORY_LOCK),  "MEMORY_LOCK"},
 {ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN),   "RSA_BUILTIN_KEYGEN"},
 {ERR_FUNC(RSA_F_RSA_CHECK_KEY),        "RSA_check_key"},
index 7c6236d5abf92d6238081b3caebae73148c8f5f3..469e847f660854b11dc2790e68e2a81dd362296d 100644 (file)
@@ -490,5 +490,15 @@ int fips_cipher_test(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
        return 1;
        }
 
+#if 0
+/* The purpose of this is to ensure the error code exists and the function
+ * name is to keep the error checking script quiet
+ */
+void hash_final(void)
+       {
+       FIPSerr(FIPS_F_HASH_FINAL,FIPS_R_NON_FIPS_METHOD);
+       }
+#endif
+
 
 #endif
index 394b31040a169ed5306f98a933da1f34ef1fb27d..f3639860dc1335f2c37bebe9312449b4e52268a6 100644 (file)
@@ -119,6 +119,7 @@ void ERR_load_FIPS_strings(void);
 #define FIPS_F_FIPS_SELFTEST_HMAC                       113
 #define FIPS_F_FIPS_SELFTEST_RNG                        114
 #define FIPS_F_FIPS_SELFTEST_SHA1                       115
+#define FIPS_F_HASH_FINAL                               123
 #define FIPS_F_RSA_BUILTIN_KEYGEN                       116
 #define FIPS_F_RSA_EAY_PRIVATE_DECRYPT                  117
 #define FIPS_F_RSA_EAY_PRIVATE_ENCRYPT                  118