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 #define RC4_CHUNK unsigned long 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 #undef 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 #define SIXTY_FOUR_BIT_LONG 62252ab50eSmiod #undef SIXTY_FOUR_BIT 63252ab50eSmiod #undef THIRTY_TWO_BIT 64252ab50eSmiod #endif 65252ab50eSmiod 66252ab50eSmiod #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 67252ab50eSmiod #define CONFIG_HEADER_BF_LOCL_H 68252ab50eSmiod #define BF_PTR 69252ab50eSmiod #endif /* HEADER_BF_LOCL_H */ 70252ab50eSmiod 71252ab50eSmiod #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 72252ab50eSmiod #define CONFIG_HEADER_DES_LOCL_H 73252ab50eSmiod #ifndef DES_DEFAULT_OPTIONS 74252ab50eSmiod /* the following is tweaked from a config script, that is why it is a 75252ab50eSmiod * protected undef/define */ 76252ab50eSmiod #ifndef DES_PTR 77252ab50eSmiod #define DES_PTR 78252ab50eSmiod #endif 79252ab50eSmiod 80252ab50eSmiod /* This helps C compiler generate the correct code for multiple functional 8171743258Sjmc * units. It reduces register dependencies at the expense of 2 more 82252ab50eSmiod * registers */ 83252ab50eSmiod #ifndef DES_RISC1 84252ab50eSmiod #undef DES_RISC1 85252ab50eSmiod #endif 86252ab50eSmiod 87252ab50eSmiod #ifndef DES_RISC2 88252ab50eSmiod #define DES_RISC2 89252ab50eSmiod #endif 90252ab50eSmiod 91252ab50eSmiod #if defined(DES_RISC1) && defined(DES_RISC2) 92252ab50eSmiod YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 93252ab50eSmiod #endif 94252ab50eSmiod 95252ab50eSmiod /* Unroll the inner loop, this sometimes helps, sometimes hinders. 9671743258Sjmc * Very much CPU dependent */ 97252ab50eSmiod #ifndef DES_UNROLL 98252ab50eSmiod #undef DES_UNROLL 99252ab50eSmiod #endif 100252ab50eSmiod 101252ab50eSmiod /* These default values were supplied by 102252ab50eSmiod * Peter Gutman <pgut001@cs.auckland.ac.nz> 103252ab50eSmiod * They are only used if nothing else has been defined */ 104252ab50eSmiod #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 105252ab50eSmiod /* Special defines which change the way the code is built depending on the 106252ab50eSmiod CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 107252ab50eSmiod even newer MIPS CPU's, but at the moment one size fits all for 108252ab50eSmiod optimization options. Older Sparc's work better with only UNROLL, but 109252ab50eSmiod there's no way to tell at compile time what it is you're running on */ 110252ab50eSmiod 111252ab50eSmiod #if defined( sun ) /* Newer Sparc's */ 112252ab50eSmiod # define DES_PTR 113252ab50eSmiod # define DES_RISC1 114252ab50eSmiod # define DES_UNROLL 115252ab50eSmiod #elif defined( __ultrix ) /* Older MIPS */ 116252ab50eSmiod # define DES_PTR 117252ab50eSmiod # define DES_RISC2 118252ab50eSmiod # define DES_UNROLL 119252ab50eSmiod #elif defined( __osf1__ ) /* Alpha */ 120252ab50eSmiod # define DES_PTR 121252ab50eSmiod # define DES_RISC2 122252ab50eSmiod #elif defined ( _AIX ) /* RS6000 */ 123252ab50eSmiod /* Unknown */ 124252ab50eSmiod #elif defined( __hpux ) /* HP-PA */ 125252ab50eSmiod /* Unknown */ 126252ab50eSmiod #elif defined( __aux ) /* 68K */ 127252ab50eSmiod /* Unknown */ 128252ab50eSmiod #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 129252ab50eSmiod # define DES_UNROLL 130252ab50eSmiod #elif defined( __sgi ) /* Newer MIPS */ 131252ab50eSmiod # define DES_PTR 132252ab50eSmiod # define DES_RISC2 133252ab50eSmiod # define DES_UNROLL 134252ab50eSmiod #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 135252ab50eSmiod # define DES_PTR 136252ab50eSmiod # define DES_RISC1 137252ab50eSmiod # define DES_UNROLL 138252ab50eSmiod #endif /* Systems-specific speed defines */ 139252ab50eSmiod #endif 140252ab50eSmiod 141252ab50eSmiod #endif /* DES_DEFAULT_OPTIONS */ 142252ab50eSmiod #endif /* HEADER_DES_LOCL_H */ 143