Revert the size_t modifications from HEAD that had led to more
[openssl.git] / crypto / dh / dh.h
index 10bf3fe5de8ae2a0566124e0f6ffa84afe70d228..b0332f2c0c215dcb937caef5f13dc3e84a352c01 100644 (file)
 #include <openssl/bn.h>
 #endif
        
+#ifndef OPENSSL_DH_MAX_MODULUS_BITS
+# define OPENSSL_DH_MAX_MODULUS_BITS   10000
+#endif
+
 #define DH_FLAG_CACHE_MONT_P     0x01
 #define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
                                        * implementation now uses constant time
@@ -223,7 +227,6 @@ void ERR_load_DH_strings(void);
 
 /* Function codes. */
 #define DH_F_COMPUTE_KEY                                102
-#define DH_F_DHPARAMS_PRINT                             100
 #define DH_F_DHPARAMS_PRINT_FP                          101
 #define DH_F_DH_BUILTIN_GENPARAMS                       106
 #define DH_F_DH_NEW_METHOD                              105
@@ -232,6 +235,7 @@ void ERR_load_DH_strings(void);
 #define DH_F_DH_PRIV_ENCODE                             111
 #define DH_F_DH_PUB_DECODE                              108
 #define DH_F_DH_PUB_ENCODE                              109
+#define DH_F_DO_DH_PRINT                                100
 #define DH_F_GENERATE_KEY                               103
 #define DH_F_GENERATE_PARAMETERS                        104
 #define DH_F_PKEY_DH_DERIVE                             112
@@ -239,11 +243,12 @@ void ERR_load_DH_strings(void);
 
 /* Reason codes. */
 #define DH_R_BAD_GENERATOR                              101
-#define DH_R_BN_DECODE_ERROR                            103
+#define DH_R_BN_DECODE_ERROR                            109
 #define DH_R_BN_ERROR                                   106
 #define DH_R_DECODE_ERROR                               104
 #define DH_R_INVALID_PUBKEY                             102
 #define DH_R_KEYS_NOT_SET                               108
+#define DH_R_MODULUS_TOO_LARGE                          103
 #define DH_R_NO_PARAMETERS_SET                          107
 #define DH_R_NO_PRIVATE_VALUE                           100
 #define DH_R_PARAMETER_ENCODING_ERROR                   105