16cf1845bSdrahn #include <openssl/opensslfeatures.h> 26cf1845bSdrahn /* crypto/opensslconf.h.in */ 36cf1845bSdrahn 4*e0aac349Stb #if defined(HEADER_CRYPTO_LOCAL_H) && !defined(OPENSSLDIR) 56cf1845bSdrahn #define OPENSSLDIR "/etc/ssl" 66cf1845bSdrahn #endif 76cf1845bSdrahn 86cf1845bSdrahn #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 96cf1845bSdrahn 106cf1845bSdrahn #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 116cf1845bSdrahn #define IDEA_INT unsigned int 126cf1845bSdrahn #endif 136cf1845bSdrahn 146cf1845bSdrahn #if defined(HEADER_MD2_H) && !defined(MD2_INT) 156cf1845bSdrahn #define MD2_INT unsigned int 166cf1845bSdrahn #endif 176cf1845bSdrahn 186cf1845bSdrahn #if defined(HEADER_RC2_H) && !defined(RC2_INT) 196cf1845bSdrahn /* I need to put in a mod for the alpha - eay */ 206cf1845bSdrahn #define RC2_INT unsigned int 216cf1845bSdrahn #endif 226cf1845bSdrahn 236cf1845bSdrahn #if defined(HEADER_RC4_H) 246cf1845bSdrahn #if !defined(RC4_INT) 256cf1845bSdrahn /* using int types make the structure larger but make the code faster 266cf1845bSdrahn * on most boxes I have tested - up to %20 faster. */ 276cf1845bSdrahn /* 286cf1845bSdrahn * I don't know what does "most" mean, but declaring "int" is a must on: 296cf1845bSdrahn * - Intel P6 because partial register stalls are very expensive; 306cf1845bSdrahn * - elder Alpha because it lacks byte load/store instructions; 316cf1845bSdrahn */ 326cf1845bSdrahn #define RC4_INT unsigned int 336cf1845bSdrahn #endif 346cf1845bSdrahn #if !defined(RC4_CHUNK) 356cf1845bSdrahn /* 366cf1845bSdrahn * This enables code handling data aligned at natural CPU word 376cf1845bSdrahn * boundary. See crypto/rc4/rc4_enc.c for further details. 386cf1845bSdrahn */ 396cf1845bSdrahn #define RC4_CHUNK unsigned long 406cf1845bSdrahn #endif 416cf1845bSdrahn #endif 426cf1845bSdrahn 436cf1845bSdrahn #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 446cf1845bSdrahn /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 456cf1845bSdrahn * %20 speed up (longs are 8 bytes, int's are 4). */ 466cf1845bSdrahn #ifndef DES_LONG 476cf1845bSdrahn #define DES_LONG unsigned int 486cf1845bSdrahn #endif 496cf1845bSdrahn #endif 506cf1845bSdrahn 516cf1845bSdrahn #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 526cf1845bSdrahn #define CONFIG_HEADER_BN_H 536cf1845bSdrahn #undef BN_LLONG 546cf1845bSdrahn 556cf1845bSdrahn /* Should we define BN_DIV2W here? */ 566cf1845bSdrahn 576cf1845bSdrahn /* Only one for the following should be defined */ 586cf1845bSdrahn /* The prime number generation stuff may not work when 596cf1845bSdrahn * EIGHT_BIT but I don't care since I've only used this mode 6071743258Sjmc * for debugging the bignum libraries */ 616cf1845bSdrahn #define SIXTY_FOUR_BIT_LONG 626cf1845bSdrahn #undef SIXTY_FOUR_BIT 636cf1845bSdrahn #undef THIRTY_TWO_BIT 646cf1845bSdrahn #undef SIXTEEN_BIT 656cf1845bSdrahn #undef EIGHT_BIT 666cf1845bSdrahn #endif 676cf1845bSdrahn 686cf1845bSdrahn #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 696cf1845bSdrahn #define CONFIG_HEADER_BF_LOCL_H 706cf1845bSdrahn #undef BF_PTR 716cf1845bSdrahn #endif /* HEADER_BF_LOCL_H */ 726cf1845bSdrahn 736cf1845bSdrahn #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 746cf1845bSdrahn #define CONFIG_HEADER_DES_LOCL_H 756cf1845bSdrahn #ifndef DES_DEFAULT_OPTIONS 766cf1845bSdrahn /* the following is tweaked from a config script, that is why it is a 776cf1845bSdrahn * protected undef/define */ 786cf1845bSdrahn #ifndef DES_PTR 796cf1845bSdrahn #undef DES_PTR 806cf1845bSdrahn #endif 816cf1845bSdrahn 826cf1845bSdrahn /* This helps C compiler generate the correct code for multiple functional 8371743258Sjmc * units. It reduces register dependencies at the expense of 2 more 846cf1845bSdrahn * registers */ 856cf1845bSdrahn #ifndef DES_RISC1 866cf1845bSdrahn #undef DES_RISC1 876cf1845bSdrahn #endif 886cf1845bSdrahn 896cf1845bSdrahn #ifndef DES_RISC2 906cf1845bSdrahn #undef DES_RISC2 916cf1845bSdrahn #endif 926cf1845bSdrahn 936cf1845bSdrahn #if defined(DES_RISC1) && defined(DES_RISC2) 946cf1845bSdrahn YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 956cf1845bSdrahn #endif 966cf1845bSdrahn 976cf1845bSdrahn /* Unroll the inner loop, this sometimes helps, sometimes hinders. 9871743258Sjmc * Very much CPU dependent */ 996cf1845bSdrahn #ifndef DES_UNROLL 1006cf1845bSdrahn #define DES_UNROLL 1016cf1845bSdrahn #endif 1026cf1845bSdrahn 1036cf1845bSdrahn /* These default values were supplied by 1046cf1845bSdrahn * Peter Gutman <pgut001@cs.auckland.ac.nz> 1056cf1845bSdrahn * They are only used if nothing else has been defined */ 1066cf1845bSdrahn #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 1076cf1845bSdrahn /* Special defines which change the way the code is built depending on the 1086cf1845bSdrahn CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 1096cf1845bSdrahn even newer MIPS CPU's, but at the moment one size fits all for 1106cf1845bSdrahn optimization options. Older Sparc's work better with only UNROLL, but 1116cf1845bSdrahn there's no way to tell at compile time what it is you're running on */ 1126cf1845bSdrahn 1136cf1845bSdrahn #if defined( sun ) /* Newer Sparc's */ 1146cf1845bSdrahn # define DES_PTR 1156cf1845bSdrahn # define DES_RISC1 1166cf1845bSdrahn # define DES_UNROLL 1176cf1845bSdrahn #elif defined( __ultrix ) /* Older MIPS */ 1186cf1845bSdrahn # define DES_PTR 1196cf1845bSdrahn # define DES_RISC2 1206cf1845bSdrahn # define DES_UNROLL 1216cf1845bSdrahn #elif defined( __osf1__ ) /* Alpha */ 1226cf1845bSdrahn # define DES_PTR 1236cf1845bSdrahn # define DES_RISC2 1246cf1845bSdrahn #elif defined ( _AIX ) /* RS6000 */ 1256cf1845bSdrahn /* Unknown */ 1266cf1845bSdrahn #elif defined( __hpux ) /* HP-PA */ 1276cf1845bSdrahn /* Unknown */ 1286cf1845bSdrahn #elif defined( __aux ) /* 68K */ 1296cf1845bSdrahn /* Unknown */ 1306cf1845bSdrahn #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 1316cf1845bSdrahn # define DES_UNROLL 1326cf1845bSdrahn #elif defined( __sgi ) /* Newer MIPS */ 1336cf1845bSdrahn # define DES_PTR 1346cf1845bSdrahn # define DES_RISC2 1356cf1845bSdrahn # define DES_UNROLL 1366cf1845bSdrahn #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 1376cf1845bSdrahn # define DES_PTR 1386cf1845bSdrahn # define DES_RISC1 1396cf1845bSdrahn # define DES_UNROLL 1406cf1845bSdrahn #endif /* Systems-specific speed defines */ 1416cf1845bSdrahn #endif 1426cf1845bSdrahn 1436cf1845bSdrahn #endif /* DES_DEFAULT_OPTIONS */ 1446cf1845bSdrahn #endif /* HEADER_DES_LOCL_H */ 145