Fix error codes.
[oweals/openssl.git] / fips / fips.h
index 7a079ef7ff43c30a4a52ec63c0d7bd1988c4019b..a95f44e084a73b6c3f51ee0baf0b5eabe9c29dca 100644 (file)
@@ -81,7 +81,7 @@ struct hmac_ctx_st;
 unsigned long FIPS_module_version(void);
 const char *FIPS_module_version_text(void);
 
-int FIPS_module_mode_set(int onoff);
+int FIPS_module_mode_set(int onoff, const char *auth);
 int FIPS_module_mode(void);
 const void *FIPS_rand_check(void);
 int FIPS_selftest(void);
@@ -174,6 +174,9 @@ void FIPS_get_timevec(unsigned char *buf, unsigned long *pctr);
 /* ECDH test */
 #define FIPS_TEST_ECDH         14
 
+/* Minimum authorisation string length */
+#define FIPS_AUTH_MIN_LEN      16
+
 void FIPS_post_set_callback(
        int (*post_cb)(int op, int id, int subid, void *ex));
 
@@ -341,6 +344,7 @@ void ERR_load_FIPS_strings(void);
 /* Function codes. */
 #define FIPS_F_DH_BUILTIN_GENPARAMS                     100
 #define FIPS_F_DH_INIT                                  148
+#define FIPS_F_DRBG_RESEED                              162
 #define FIPS_F_DSA_BUILTIN_PARAMGEN                     101
 #define FIPS_F_DSA_BUILTIN_PARAMGEN2                    102
 #define FIPS_F_DSA_DO_SIGN                              103
@@ -361,8 +365,8 @@ void ERR_load_FIPS_strings(void);
 #define FIPS_F_FIPS_DRBG_BYTES                          111
 #define FIPS_F_FIPS_DRBG_CHECK                          146
 #define FIPS_F_FIPS_DRBG_CPRNG_TEST                     112
+#define FIPS_F_FIPS_DRBG_ERROR_CHECK                    114
 #define FIPS_F_FIPS_DRBG_GENERATE                       113
-#define FIPS_F_FIPS_DRBG_HEALTH_CHECK                   114
 #define FIPS_F_FIPS_DRBG_INIT                           115
 #define FIPS_F_FIPS_DRBG_INSTANTIATE                    116
 #define FIPS_F_FIPS_DRBG_NEW                            117
@@ -406,6 +410,7 @@ void ERR_load_FIPS_strings(void);
 #define FIPS_R_ADDITIONAL_INPUT_ERROR_UNDETECTED        150
 #define FIPS_R_ADDITIONAL_INPUT_TOO_LONG                100
 #define FIPS_R_ALREADY_INSTANTIATED                     101
+#define FIPS_R_AUTHENTICATION_FAILURE                   151
 #define FIPS_R_CONTRADICTING_EVIDENCE                   102
 #define FIPS_R_DRBG_STUCK                               103
 #define FIPS_R_ENTROPY_ERROR_UNDETECTED                         104