12d03d1cbStedu #include <openssl/opensslfeatures.h> 2252ab50eSmiod /* crypto/opensslconf.h.in */ 3252ab50eSmiod 4*e0aac349Stb #if defined(HEADER_CRYPTO_LOCAL_H) && !defined(OPENSSLDIR) 5252ab50eSmiod #define OPENSSLDIR "/etc/ssl" 6252ab50eSmiod #endif 7252ab50eSmiod 8252ab50eSmiod #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 9252ab50eSmiod 10252ab50eSmiod #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 11252ab50eSmiod #define IDEA_INT unsigned int 12252ab50eSmiod #endif 13252ab50eSmiod 14252ab50eSmiod #if defined(HEADER_MD2_H) && !defined(MD2_INT) 15252ab50eSmiod #define MD2_INT unsigned int 16252ab50eSmiod #endif 17252ab50eSmiod 18252ab50eSmiod #if defined(HEADER_RC2_H) && !defined(RC2_INT) 19252ab50eSmiod /* I need to put in a mod for the alpha - eay */ 20252ab50eSmiod #define RC2_INT unsigned int 21252ab50eSmiod #endif 22252ab50eSmiod 23252ab50eSmiod #if defined(HEADER_RC4_H) 24252ab50eSmiod #if !defined(RC4_INT) 25252ab50eSmiod /* using int types make the structure larger but make the code faster 26252ab50eSmiod * on most boxes I have tested - up to %20 faster. */ 27252ab50eSmiod /* 28252ab50eSmiod * I don't know what does "most" mean, but declaring "int" is a must on: 29252ab50eSmiod * - Intel P6 because partial register stalls are very expensive; 30252ab50eSmiod * - elder Alpha because it lacks byte load/store instructions; 31252ab50eSmiod */ 32252ab50eSmiod #define RC4_INT unsigned int 33252ab50eSmiod #endif 34252ab50eSmiod #if !defined(RC4_CHUNK) 35252ab50eSmiod /* 36252ab50eSmiod * This enables code handling data aligned at natural CPU word 37252ab50eSmiod * boundary. See crypto/rc4/rc4_enc.c for further details. 38252ab50eSmiod */ 39252ab50eSmiod #undef RC4_CHUNK 40252ab50eSmiod #endif 41252ab50eSmiod #endif 42252ab50eSmiod 43252ab50eSmiod #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 44252ab50eSmiod /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 45252ab50eSmiod * %20 speed up (longs are 8 bytes, int's are 4). */ 46252ab50eSmiod #ifndef DES_LONG 47252ab50eSmiod #define DES_LONG unsigned int 48252ab50eSmiod #endif 49252ab50eSmiod #endif 50252ab50eSmiod 51252ab50eSmiod #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 52252ab50eSmiod #define CONFIG_HEADER_BN_H 53252ab50eSmiod #define BN_LLONG 54252ab50eSmiod 55252ab50eSmiod /* Should we define BN_DIV2W here? */ 56252ab50eSmiod 57252ab50eSmiod /* Only one for the following should be defined */ 58252ab50eSmiod /* The prime number generation stuff may not work when 59252ab50eSmiod * EIGHT_BIT but I don't care since I've only used this mode 6071743258Sjmc * for debugging the bignum libraries */ 61252ab50eSmiod #undef SIXTY_FOUR_BIT_LONG 62252ab50eSmiod #undef SIXTY_FOUR_BIT 63252ab50eSmiod #define THIRTY_TWO_BIT 64252ab50eSmiod #undef SIXTEEN_BIT 65252ab50eSmiod #undef EIGHT_BIT 66252ab50eSmiod #endif 67252ab50eSmiod 68252ab50eSmiod #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 69252ab50eSmiod #define CONFIG_HEADER_BF_LOCL_H 70252ab50eSmiod #undef BF_PTR 71252ab50eSmiod #endif /* HEADER_BF_LOCL_H */ 72252ab50eSmiod 73252ab50eSmiod #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 74252ab50eSmiod #define CONFIG_HEADER_DES_LOCL_H 75252ab50eSmiod #ifndef DES_DEFAULT_OPTIONS 76252ab50eSmiod /* the following is tweaked from a config script, that is why it is a 77252ab50eSmiod * protected undef/define */ 78252ab50eSmiod #ifndef DES_PTR 79252ab50eSmiod #undef DES_PTR 80252ab50eSmiod #endif 81252ab50eSmiod 82252ab50eSmiod /* This helps C compiler generate the correct code for multiple functional 8371743258Sjmc * units. It reduces register dependencies at the expense of 2 more 84252ab50eSmiod * registers */ 85252ab50eSmiod #ifndef DES_RISC1 86252ab50eSmiod #undef DES_RISC1 87252ab50eSmiod #endif 88252ab50eSmiod 89252ab50eSmiod #ifndef DES_RISC2 90252ab50eSmiod #undef DES_RISC2 91252ab50eSmiod #endif 92252ab50eSmiod 93252ab50eSmiod #if defined(DES_RISC1) && defined(DES_RISC2) 94252ab50eSmiod YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 95252ab50eSmiod #endif 96252ab50eSmiod 97252ab50eSmiod /* Unroll the inner loop, this sometimes helps, sometimes hinders. 9871743258Sjmc * Very much CPU dependent */ 99252ab50eSmiod #ifndef DES_UNROLL 100252ab50eSmiod #define DES_UNROLL 101252ab50eSmiod #endif 102252ab50eSmiod 103252ab50eSmiod /* These default values were supplied by 104252ab50eSmiod * Peter Gutman <pgut001@cs.auckland.ac.nz> 105252ab50eSmiod * They are only used if nothing else has been defined */ 106252ab50eSmiod #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 107252ab50eSmiod /* Special defines which change the way the code is built depending on the 108252ab50eSmiod CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 109252ab50eSmiod even newer MIPS CPU's, but at the moment one size fits all for 110252ab50eSmiod optimization options. Older Sparc's work better with only UNROLL, but 111252ab50eSmiod there's no way to tell at compile time what it is you're running on */ 112252ab50eSmiod 113252ab50eSmiod #if defined( sun ) /* Newer Sparc's */ 114252ab50eSmiod # define DES_PTR 115252ab50eSmiod # define DES_RISC1 116252ab50eSmiod # define DES_UNROLL 117252ab50eSmiod #elif defined( __ultrix ) /* Older MIPS */ 118252ab50eSmiod # define DES_PTR 119252ab50eSmiod # define DES_RISC2 120252ab50eSmiod # define DES_UNROLL 121252ab50eSmiod #elif defined( __osf1__ ) /* Alpha */ 122252ab50eSmiod # define DES_PTR 123252ab50eSmiod # define DES_RISC2 124252ab50eSmiod #elif defined ( _AIX ) /* RS6000 */ 125252ab50eSmiod /* Unknown */ 126252ab50eSmiod #elif defined( __hpux ) /* HP-PA */ 127252ab50eSmiod /* Unknown */ 128252ab50eSmiod #elif defined( __aux ) /* 68K */ 129252ab50eSmiod /* Unknown */ 130252ab50eSmiod #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 131252ab50eSmiod # define DES_UNROLL 132252ab50eSmiod #elif defined( __sgi ) /* Newer MIPS */ 133252ab50eSmiod # define DES_PTR 134252ab50eSmiod # define DES_RISC2 135252ab50eSmiod # define DES_UNROLL 136252ab50eSmiod #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 137252ab50eSmiod # define DES_PTR 138252ab50eSmiod # define DES_RISC1 139252ab50eSmiod # define DES_UNROLL 140252ab50eSmiod #endif /* Systems-specific speed defines */ 141252ab50eSmiod #endif 142252ab50eSmiod 143252ab50eSmiod #endif /* DES_DEFAULT_OPTIONS */ 144252ab50eSmiod #endif /* HEADER_DES_LOCL_H */ 145