diff options
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/opensslconf.h | 180 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pod2mantest | 53 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pod2mantest.pod | 15 |
3 files changed, 248 insertions, 0 deletions
diff --git a/src/lib/libcrypto/opensslconf.h b/src/lib/libcrypto/opensslconf.h new file mode 100644 index 0000000000..c9756e47a3 --- /dev/null +++ b/src/lib/libcrypto/opensslconf.h | |||
@@ -0,0 +1,180 @@ | |||
1 | /* opensslconf.h */ | ||
2 | /* WARNING: Generated automatically from opensslconf.h.in by Configure. */ | ||
3 | |||
4 | /* OpenSSL was configured with the following options: */ | ||
5 | #ifndef OPENSSL_DOING_MAKEDEPEND | ||
6 | |||
7 | #ifndef OPENSSL_NO_KRB5 | ||
8 | # define OPENSSL_NO_KRB5 | ||
9 | #endif | ||
10 | |||
11 | #endif /* OPENSSL_DOING_MAKEDEPEND */ | ||
12 | |||
13 | /* The OPENSSL_NO_* macros are also defined as NO_* if the application | ||
14 | asks for it. This is a transient feature that is provided for those | ||
15 | who haven't had the time to do the appropriate changes in their | ||
16 | applications. */ | ||
17 | #ifdef OPENSSL_ALGORITHM_DEFINES | ||
18 | # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) | ||
19 | # define NO_KRB5 | ||
20 | # endif | ||
21 | #endif | ||
22 | |||
23 | /* crypto/opensslconf.h.in */ | ||
24 | |||
25 | /* Generate 80386 code? */ | ||
26 | #undef I386_ONLY | ||
27 | |||
28 | #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ | ||
29 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | ||
30 | #define OPENSSLDIR "/usr/local/ssl" | ||
31 | #endif | ||
32 | #endif | ||
33 | |||
34 | #undef OPENSSL_UNISTD | ||
35 | #define OPENSSL_UNISTD <unistd.h> | ||
36 | |||
37 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION | ||
38 | |||
39 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) | ||
40 | #define IDEA_INT unsigned int | ||
41 | #endif | ||
42 | |||
43 | #if defined(HEADER_MD2_H) && !defined(MD2_INT) | ||
44 | #define MD2_INT unsigned int | ||
45 | #endif | ||
46 | |||
47 | #if defined(HEADER_RC2_H) && !defined(RC2_INT) | ||
48 | /* I need to put in a mod for the alpha - eay */ | ||
49 | #define RC2_INT unsigned int | ||
50 | #endif | ||
51 | |||
52 | #if defined(HEADER_RC4_H) | ||
53 | #if !defined(RC4_INT) | ||
54 | /* using int types make the structure larger but make the code faster | ||
55 | * on most boxes I have tested - up to %20 faster. */ | ||
56 | /* | ||
57 | * I don't know what does "most" mean, but declaring "int" is a must on: | ||
58 | * - Intel P6 because partial register stalls are very expensive; | ||
59 | * - elder Alpha because it lacks byte load/store instructions; | ||
60 | */ | ||
61 | #define RC4_INT unsigned int | ||
62 | #endif | ||
63 | #if !defined(RC4_CHUNK) | ||
64 | /* | ||
65 | * This enables code handling data aligned at natural CPU word | ||
66 | * boundary. See crypto/rc4/rc4_enc.c for further details. | ||
67 | */ | ||
68 | #undef RC4_CHUNK | ||
69 | #endif | ||
70 | #endif | ||
71 | |||
72 | #if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG) | ||
73 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a | ||
74 | * %20 speed up (longs are 8 bytes, int's are 4). */ | ||
75 | #ifndef DES_LONG | ||
76 | #define DES_LONG unsigned long | ||
77 | #endif | ||
78 | #endif | ||
79 | |||
80 | #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) | ||
81 | #define CONFIG_HEADER_BN_H | ||
82 | #undef BN_LLONG | ||
83 | |||
84 | /* Should we define BN_DIV2W here? */ | ||
85 | |||
86 | /* Only one for the following should be defined */ | ||
87 | /* The prime number generation stuff may not work when | ||
88 | * EIGHT_BIT but I don't care since I've only used this mode | ||
89 | * for debuging the bignum libraries */ | ||
90 | #undef SIXTY_FOUR_BIT_LONG | ||
91 | #undef SIXTY_FOUR_BIT | ||
92 | #define THIRTY_TWO_BIT | ||
93 | #undef SIXTEEN_BIT | ||
94 | #undef EIGHT_BIT | ||
95 | #endif | ||
96 | |||
97 | #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) | ||
98 | #define CONFIG_HEADER_RC4_LOCL_H | ||
99 | /* if this is defined data[i] is used instead of *data, this is a %20 | ||
100 | * speedup on x86 */ | ||
101 | #undef RC4_INDEX | ||
102 | #endif | ||
103 | |||
104 | #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) | ||
105 | #define CONFIG_HEADER_BF_LOCL_H | ||
106 | #undef BF_PTR | ||
107 | #endif /* HEADER_BF_LOCL_H */ | ||
108 | |||
109 | #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) | ||
110 | #define CONFIG_HEADER_DES_LOCL_H | ||
111 | #ifndef DES_DEFAULT_OPTIONS | ||
112 | /* the following is tweaked from a config script, that is why it is a | ||
113 | * protected undef/define */ | ||
114 | #ifndef DES_PTR | ||
115 | #undef DES_PTR | ||
116 | #endif | ||
117 | |||
118 | /* This helps C compiler generate the correct code for multiple functional | ||
119 | * units. It reduces register dependancies at the expense of 2 more | ||
120 | * registers */ | ||
121 | #ifndef DES_RISC1 | ||
122 | #undef DES_RISC1 | ||
123 | #endif | ||
124 | |||
125 | #ifndef DES_RISC2 | ||
126 | #undef DES_RISC2 | ||
127 | #endif | ||
128 | |||
129 | #if defined(DES_RISC1) && defined(DES_RISC2) | ||
130 | YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! | ||
131 | #endif | ||
132 | |||
133 | /* Unroll the inner loop, this sometimes helps, sometimes hinders. | ||
134 | * Very mucy CPU dependant */ | ||
135 | #ifndef DES_UNROLL | ||
136 | #undef DES_UNROLL | ||
137 | #endif | ||
138 | |||
139 | /* These default values were supplied by | ||
140 | * Peter Gutman <pgut001@cs.auckland.ac.nz> | ||
141 | * They are only used if nothing else has been defined */ | ||
142 | #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) | ||
143 | /* Special defines which change the way the code is built depending on the | ||
144 | CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find | ||
145 | even newer MIPS CPU's, but at the moment one size fits all for | ||
146 | optimization options. Older Sparc's work better with only UNROLL, but | ||
147 | there's no way to tell at compile time what it is you're running on */ | ||
148 | |||
149 | #if defined( sun ) /* Newer Sparc's */ | ||
150 | # define DES_PTR | ||
151 | # define DES_RISC1 | ||
152 | # define DES_UNROLL | ||
153 | #elif defined( __ultrix ) /* Older MIPS */ | ||
154 | # define DES_PTR | ||
155 | # define DES_RISC2 | ||
156 | # define DES_UNROLL | ||
157 | #elif defined( __osf1__ ) /* Alpha */ | ||
158 | # define DES_PTR | ||
159 | # define DES_RISC2 | ||
160 | #elif defined ( _AIX ) /* RS6000 */ | ||
161 | /* Unknown */ | ||
162 | #elif defined( __hpux ) /* HP-PA */ | ||
163 | /* Unknown */ | ||
164 | #elif defined( __aux ) /* 68K */ | ||
165 | /* Unknown */ | ||
166 | #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ | ||
167 | # define DES_UNROLL | ||
168 | #elif defined( __sgi ) /* Newer MIPS */ | ||
169 | # define DES_PTR | ||
170 | # define DES_RISC2 | ||
171 | # define DES_UNROLL | ||
172 | #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ | ||
173 | # define DES_PTR | ||
174 | # define DES_RISC1 | ||
175 | # define DES_UNROLL | ||
176 | #endif /* Systems-specific speed defines */ | ||
177 | #endif | ||
178 | |||
179 | #endif /* DES_DEFAULT_OPTIONS */ | ||
180 | #endif /* HEADER_DES_LOCL_H */ | ||
diff --git a/src/lib/libcrypto/util/pod2mantest b/src/lib/libcrypto/util/pod2mantest new file mode 100644 index 0000000000..79aefafac0 --- /dev/null +++ b/src/lib/libcrypto/util/pod2mantest | |||
@@ -0,0 +1,53 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # This script is used by test/Makefile.ssl to check whether a sane 'pod2man' | ||
4 | # is installed. | ||
5 | # ('make install' should not try to run 'pod2man' if it does not exist or if | ||
6 | # it is a broken 'pod2man' version that is known to cause trouble. if we find | ||
7 | # the system 'pod2man' to be broken, we use our own copy instead) | ||
8 | # | ||
9 | # In any case, output an appropriate command line for running (or not | ||
10 | # running) pod2man. | ||
11 | |||
12 | |||
13 | IFS=: | ||
14 | try_without_dir=true | ||
15 | # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. | ||
16 | for dir in dummy:$PATH; do | ||
17 | if [ "$try_without_dir" = true ]; then | ||
18 | # first iteration | ||
19 | pod2man=pod2man | ||
20 | try_without_dir=false | ||
21 | else | ||
22 | # second and later iterations | ||
23 | pod2man="$dir/pod2man" | ||
24 | if [ ! -f "$pod2man" ]; then # '-x' is not available on Ultrix | ||
25 | pod2man='' | ||
26 | fi | ||
27 | fi | ||
28 | |||
29 | if [ ! "$pod2man" = '' ]; then | ||
30 | failure=none | ||
31 | |||
32 | |||
33 | if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | grep '^MARKER - ' >/dev/null 2>&1; then | ||
34 | failure=MultilineTest | ||
35 | fi | ||
36 | |||
37 | |||
38 | if [ "$failure" = none ]; then | ||
39 | echo "$pod2man" | ||
40 | exit 0 | ||
41 | fi | ||
42 | |||
43 | echo "$pod2man does not work properly ('$failure' failed). Looking for another pod2man ..." >&2 | ||
44 | fi | ||
45 | done | ||
46 | |||
47 | echo "No working pod2man found. Consider installing a new version." >&2 | ||
48 | if [ "$1" = ignore ]; then | ||
49 | echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 | ||
50 | echo "util/pod2man.pl" | ||
51 | exit 0 | ||
52 | fi | ||
53 | exit 1 | ||
diff --git a/src/lib/libcrypto/util/pod2mantest.pod b/src/lib/libcrypto/util/pod2mantest.pod new file mode 100644 index 0000000000..5d2539a17f --- /dev/null +++ b/src/lib/libcrypto/util/pod2mantest.pod | |||
@@ -0,0 +1,15 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | foo, bar, | ||
6 | MARKER - test of multiline name section | ||
7 | |||
8 | =head1 DESCRIPTION | ||
9 | |||
10 | This is a test .pod file to see if we have a buggy pod2man or not. | ||
11 | If we have a buggy implementation, we will get a line matching the | ||
12 | regular expression "^ +MARKER - test of multiline name section *$" | ||
13 | at the end of the resulting document. | ||
14 | |||
15 | =cut | ||