133759787Spatrick #include <openssl/opensslfeatures.h> 233759787Spatrick /* crypto/opensslconf.h.in */ 333759787Spatrick 4*e0aac349Stb #if defined(HEADER_CRYPTO_LOCAL_H) && !defined(OPENSSLDIR) 533759787Spatrick #define OPENSSLDIR "/etc/ssl" 633759787Spatrick #endif 733759787Spatrick 833759787Spatrick #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 933759787Spatrick 1033759787Spatrick #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 1133759787Spatrick #define IDEA_INT unsigned int 1233759787Spatrick #endif 1333759787Spatrick 1433759787Spatrick #if defined(HEADER_MD2_H) && !defined(MD2_INT) 1533759787Spatrick #define MD2_INT unsigned int 1633759787Spatrick #endif 1733759787Spatrick 1833759787Spatrick #if defined(HEADER_RC2_H) && !defined(RC2_INT) 1933759787Spatrick /* I need to put in a mod for the alpha - eay */ 2033759787Spatrick #define RC2_INT unsigned int 2133759787Spatrick #endif 2233759787Spatrick 2333759787Spatrick #if defined(HEADER_RC4_H) 2433759787Spatrick #if !defined(RC4_INT) 2533759787Spatrick /* using int types make the structure larger but make the code faster 2633759787Spatrick * on most boxes I have tested - up to %20 faster. */ 2733759787Spatrick /* 2833759787Spatrick * I don't know what does "most" mean, but declaring "int" is a must on: 2933759787Spatrick * - Intel P6 because partial register stalls are very expensive; 3033759787Spatrick * - elder Alpha because it lacks byte load/store instructions; 3133759787Spatrick */ 3233759787Spatrick #define RC4_INT unsigned int 3333759787Spatrick #endif 3433759787Spatrick #if !defined(RC4_CHUNK) 3533759787Spatrick /* 3633759787Spatrick * This enables code handling data aligned at natural CPU word 3733759787Spatrick * boundary. See crypto/rc4/rc4_enc.c for further details. 3833759787Spatrick */ 3933759787Spatrick #define RC4_CHUNK unsigned long 4033759787Spatrick #endif 4133759787Spatrick #endif 4233759787Spatrick 4333759787Spatrick #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 4433759787Spatrick /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 4533759787Spatrick * %20 speed up (longs are 8 bytes, int's are 4). */ 4633759787Spatrick #ifndef DES_LONG 4733759787Spatrick #define DES_LONG unsigned int 4833759787Spatrick #endif 4933759787Spatrick #endif 5033759787Spatrick 5133759787Spatrick #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 5233759787Spatrick #define CONFIG_HEADER_BN_H 5333759787Spatrick #undef BN_LLONG 5433759787Spatrick 5533759787Spatrick /* Should we define BN_DIV2W here? */ 5633759787Spatrick 5733759787Spatrick /* Only one for the following should be defined */ 5833759787Spatrick /* The prime number generation stuff may not work when 5933759787Spatrick * EIGHT_BIT but I don't care since I've only used this mode 6071743258Sjmc * for debugging the bignum libraries */ 6133759787Spatrick #define SIXTY_FOUR_BIT_LONG 6233759787Spatrick #undef SIXTY_FOUR_BIT 6333759787Spatrick #undef THIRTY_TWO_BIT 6433759787Spatrick #undef SIXTEEN_BIT 6533759787Spatrick #undef EIGHT_BIT 6633759787Spatrick #endif 6733759787Spatrick 6833759787Spatrick #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 6933759787Spatrick #define CONFIG_HEADER_BF_LOCL_H 7033759787Spatrick #undef BF_PTR 7133759787Spatrick #endif /* HEADER_BF_LOCL_H */ 7233759787Spatrick 7333759787Spatrick #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 7433759787Spatrick #define CONFIG_HEADER_DES_LOCL_H 7533759787Spatrick #ifndef DES_DEFAULT_OPTIONS 7633759787Spatrick /* the following is tweaked from a config script, that is why it is a 7733759787Spatrick * protected undef/define */ 7833759787Spatrick #ifndef DES_PTR 7933759787Spatrick #undef DES_PTR 8033759787Spatrick #endif 8133759787Spatrick 8233759787Spatrick /* This helps C compiler generate the correct code for multiple functional 8371743258Sjmc * units. It reduces register dependencies at the expense of 2 more 8433759787Spatrick * registers */ 8533759787Spatrick #ifndef DES_RISC1 8633759787Spatrick #undef DES_RISC1 8733759787Spatrick #endif 8833759787Spatrick 8933759787Spatrick #ifndef DES_RISC2 9033759787Spatrick #undef DES_RISC2 9133759787Spatrick #endif 9233759787Spatrick 9333759787Spatrick #if defined(DES_RISC1) && defined(DES_RISC2) 9433759787Spatrick YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 9533759787Spatrick #endif 9633759787Spatrick 9733759787Spatrick /* Unroll the inner loop, this sometimes helps, sometimes hinders. 9871743258Sjmc * Very much CPU dependent */ 9933759787Spatrick #ifndef DES_UNROLL 10033759787Spatrick #define DES_UNROLL 10133759787Spatrick #endif 10233759787Spatrick 10333759787Spatrick /* These default values were supplied by 10433759787Spatrick * Peter Gutman <pgut001@cs.auckland.ac.nz> 10533759787Spatrick * They are only used if nothing else has been defined */ 10633759787Spatrick #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 10733759787Spatrick /* Special defines which change the way the code is built depending on the 10833759787Spatrick CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 10933759787Spatrick even newer MIPS CPU's, but at the moment one size fits all for 11033759787Spatrick optimization options. Older Sparc's work better with only UNROLL, but 11133759787Spatrick there's no way to tell at compile time what it is you're running on */ 11233759787Spatrick 11333759787Spatrick #if defined( sun ) /* Newer Sparc's */ 11433759787Spatrick # define DES_PTR 11533759787Spatrick # define DES_RISC1 11633759787Spatrick # define DES_UNROLL 11733759787Spatrick #elif defined( __ultrix ) /* Older MIPS */ 11833759787Spatrick # define DES_PTR 11933759787Spatrick # define DES_RISC2 12033759787Spatrick # define DES_UNROLL 12133759787Spatrick #elif defined( __osf1__ ) /* Alpha */ 12233759787Spatrick # define DES_PTR 12333759787Spatrick # define DES_RISC2 12433759787Spatrick #elif defined ( _AIX ) /* RS6000 */ 12533759787Spatrick /* Unknown */ 12633759787Spatrick #elif defined( __hpux ) /* HP-PA */ 12733759787Spatrick /* Unknown */ 12833759787Spatrick #elif defined( __aux ) /* 68K */ 12933759787Spatrick /* Unknown */ 13033759787Spatrick #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 13133759787Spatrick # define DES_UNROLL 13233759787Spatrick #elif defined( __sgi ) /* Newer MIPS */ 13333759787Spatrick # define DES_PTR 13433759787Spatrick # define DES_RISC2 13533759787Spatrick # define DES_UNROLL 13633759787Spatrick #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 13733759787Spatrick # define DES_PTR 13833759787Spatrick # define DES_RISC1 13933759787Spatrick # define DES_UNROLL 14033759787Spatrick #endif /* Systems-specific speed defines */ 14133759787Spatrick #endif 14233759787Spatrick 14333759787Spatrick #endif /* DES_DEFAULT_OPTIONS */ 14433759787Spatrick #endif /* HEADER_DES_LOCL_H */ 145