Compare commits
420 Commits
OpenSSL_0_
...
OpenSSL_0_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
68f0bcfbc3 | ||
![]() |
662ede2370 | ||
![]() |
d0edf6e593 | ||
![]() |
c93f908f7f | ||
![]() |
16d2a7caef | ||
![]() |
b7b5cd6132 | ||
![]() |
71583fb0d7 | ||
![]() |
058f86e9e0 | ||
![]() |
4509102cb9 | ||
![]() |
87c99c59bd | ||
![]() |
732d1bf43a | ||
![]() |
88fd7424f6 | ||
![]() |
30a452ab32 | ||
![]() |
9c90f27dac | ||
![]() |
ec4e600da6 | ||
![]() |
4097dce455 | ||
![]() |
c9b552534e | ||
![]() |
f0ad5fc2ab | ||
![]() |
5f444c8fcd | ||
![]() |
62afa8bd58 | ||
![]() |
2689b8f326 | ||
![]() |
bd69ac5c93 | ||
![]() |
33ed371ec9 | ||
![]() |
3b07c32fe7 | ||
![]() |
9cc513a000 | ||
![]() |
cac32e5acd | ||
![]() |
0e9edc98d4 | ||
![]() |
27bd937cc0 | ||
![]() |
f56c451143 | ||
![]() |
05a1f76093 | ||
![]() |
4ed9388e5d | ||
![]() |
94a1183fab | ||
![]() |
30e4269241 | ||
![]() |
59315df637 | ||
![]() |
3659df7d15 | ||
![]() |
16f1fdbc8b | ||
![]() |
98c1a4900c | ||
![]() |
2541f58309 | ||
![]() |
6b063f32d9 | ||
![]() |
693f2e3625 | ||
![]() |
afab06d3f5 | ||
![]() |
8fb97c9acd | ||
![]() |
7312a38d9e | ||
![]() |
475e8d3d1d | ||
![]() |
c5f070d5d5 | ||
![]() |
1b9e855744 | ||
![]() |
f3b2ea53e2 | ||
![]() |
ed71769948 | ||
![]() |
e1c0a9c416 | ||
![]() |
0b8c5413a4 | ||
![]() |
c473d53898 | ||
![]() |
e8f8249319 | ||
![]() |
e2ced802b4 | ||
![]() |
9163658aa8 | ||
![]() |
d3a15e132d | ||
![]() |
47954f114c | ||
![]() |
3ef747c8b6 | ||
![]() |
75622f1ece | ||
![]() |
a052dd6532 | ||
![]() |
5cc2658cff | ||
![]() |
2f4335ec2b | ||
![]() |
2ab0740785 | ||
![]() |
82f676c633 | ||
![]() |
5f24adda77 | ||
![]() |
900f062d1f | ||
![]() |
ba64c2cc8f | ||
![]() |
29e62e487f | ||
![]() |
ec28f9c12c | ||
![]() |
4e6480faf8 | ||
![]() |
00dc2d7551 | ||
![]() |
27346c53b1 | ||
![]() |
e2491c45ab | ||
![]() |
398cd7276f | ||
![]() |
873ddf7c0c | ||
![]() |
4aae637f6c | ||
![]() |
705d0f5c8d | ||
![]() |
844df66895 | ||
![]() |
0d5b4f594d | ||
![]() |
8c2786fff7 | ||
![]() |
66ce343361 | ||
![]() |
1b9f21fdc8 | ||
![]() |
f3031b106d | ||
![]() |
6e260c4093 | ||
![]() |
f19d064087 | ||
![]() |
25a1259911 | ||
![]() |
f63f51dc22 | ||
![]() |
4eebab0d22 | ||
![]() |
bc63a2ee0e | ||
![]() |
476f09712c | ||
![]() |
fe0444b17e | ||
![]() |
16c9148220 | ||
![]() |
9d92486cfb | ||
![]() |
bb41fdb5ec | ||
![]() |
3410aa1aa8 | ||
![]() |
f50b911a3f | ||
![]() |
2a948bd306 | ||
![]() |
d4e35514ba | ||
![]() |
3fd6b9f6d4 | ||
![]() |
a598524ad6 | ||
![]() |
828ce10ce7 | ||
![]() |
8939adbad9 | ||
![]() |
ff160dba54 | ||
![]() |
fb5b7317a7 | ||
![]() |
457f692eab | ||
![]() |
e077b5452f | ||
![]() |
a9cfd20da7 | ||
![]() |
22e6c2524e | ||
![]() |
6d8cbdcb53 | ||
![]() |
54a7ea6f36 | ||
![]() |
0e2f5ec2d2 | ||
![]() |
8c5e375c8e | ||
![]() |
ce8a202831 | ||
![]() |
0ece1d304d | ||
![]() |
7f0f9f1934 | ||
![]() |
8f09a154e3 | ||
![]() |
4e7566579e | ||
![]() |
fba1cfa06d | ||
![]() |
110c6f72ec | ||
![]() |
27f7d430ce | ||
![]() |
5964e95c0a | ||
![]() |
f78ae9c0f2 | ||
![]() |
e072e16e92 | ||
![]() |
7a79b5601a | ||
![]() |
74b0c41e47 | ||
![]() |
bbfbd4b270 | ||
![]() |
88ec5a637f | ||
![]() |
75fcbb43a7 | ||
![]() |
e4e049e489 | ||
![]() |
225e35bd36 | ||
![]() |
9f81f23742 | ||
![]() |
0ae4ad9e9f | ||
![]() |
a157379adc | ||
![]() |
1ed3815650 | ||
![]() |
27310553b1 | ||
![]() |
78490b9cc2 | ||
![]() |
86ccb91ddb | ||
![]() |
8e4552ed30 | ||
![]() |
bc4a5ed341 | ||
![]() |
d5157a6244 | ||
![]() |
d07e7c32c2 | ||
![]() |
8f35294c1b | ||
![]() |
2bdcfbd7a3 | ||
![]() |
46b695d850 | ||
![]() |
6076f21f5e | ||
![]() |
be34231656 | ||
![]() |
54e73364f1 | ||
![]() |
c6b220d933 | ||
![]() |
d1c5c168b5 | ||
![]() |
931756b833 | ||
![]() |
39e76bc454 | ||
![]() |
961b565690 | ||
![]() |
142cdf5ec9 | ||
![]() |
1e2b14e9ca | ||
![]() |
4fe70c7812 | ||
![]() |
21eb91c79e | ||
![]() |
9d80973ea1 | ||
![]() |
e4fb312330 | ||
![]() |
1296e72d1d | ||
![]() |
f077cf68af | ||
![]() |
a69cc10af1 | ||
![]() |
2dd060d94e | ||
![]() |
546490c00e | ||
![]() |
409a5de586 | ||
![]() |
84b1e84af1 | ||
![]() |
5250725ba5 | ||
![]() |
84d5ad6181 | ||
![]() |
96c15b8aad | ||
![]() |
4fc2bf07b5 | ||
![]() |
2007fe63f8 | ||
![]() |
ee435c0d9c | ||
![]() |
3f691235da | ||
![]() |
86a925b27e | ||
![]() |
954d8e4f79 | ||
![]() |
b575dff21a | ||
![]() |
b35ca7b257 | ||
![]() |
0102bb94cb | ||
![]() |
57bc7769b7 | ||
![]() |
0461b8c90b | ||
![]() |
bd8e228d60 | ||
![]() |
bad99f6a9d | ||
![]() |
5600a9cba1 | ||
![]() |
607ae30be8 | ||
![]() |
37d9503a67 | ||
![]() |
a1033894d7 | ||
![]() |
0480574310 | ||
![]() |
dab0aaa612 | ||
![]() |
6fcf1dbc50 | ||
![]() |
352df99302 | ||
![]() |
a3063b37ef | ||
![]() |
cf13eaf1a1 | ||
![]() |
cc811b1d7e | ||
![]() |
a81d9af7f7 | ||
![]() |
1dc94d4dcc | ||
![]() |
5a2485ce12 | ||
![]() |
142398d3a7 | ||
![]() |
6c0118ee8e | ||
![]() |
765ca5ea06 | ||
![]() |
97333eaff7 | ||
![]() |
b088a2d3f9 | ||
![]() |
b9447ec1bc | ||
![]() |
73bec6d4b7 | ||
![]() |
e4b95737f0 | ||
![]() |
c13eba970c | ||
![]() |
4309b740ce | ||
![]() |
c0d4f622eb | ||
![]() |
a004b06237 | ||
![]() |
98eab43915 | ||
![]() |
ef03883edd | ||
![]() |
636631cdd5 | ||
![]() |
02ff8c1b66 | ||
![]() |
0b0be7a381 | ||
![]() |
83df7b20c4 | ||
![]() |
90c60eee9d | ||
![]() |
8e1e238219 | ||
![]() |
88c1fec923 | ||
![]() |
981469c80d | ||
![]() |
b5a4fd98a5 | ||
![]() |
bd573ee31a | ||
![]() |
20dc821092 | ||
![]() |
6d85cd36e2 | ||
![]() |
10ac28e26d | ||
![]() |
8f94b2010f | ||
![]() |
d48e6a47bd | ||
![]() |
40b676aa4f | ||
![]() |
7e4e392b07 | ||
![]() |
30e3c99d9f | ||
![]() |
0f618d0576 | ||
![]() |
624feae8af | ||
![]() |
246f2b016b | ||
![]() |
118204f9a7 | ||
![]() |
60d16c258a | ||
![]() |
c56dbabcfd | ||
![]() |
30167ace51 | ||
![]() |
b01db3b279 | ||
![]() |
2af5880cfd | ||
![]() |
ff3fa159d0 | ||
![]() |
c440333535 | ||
![]() |
5322333b7b | ||
![]() |
e98823d847 | ||
![]() |
d87a127837 | ||
![]() |
0062e618f0 | ||
![]() |
282382cc14 | ||
![]() |
0a3aece096 | ||
![]() |
bc35d57932 | ||
![]() |
dd1a3c26ba | ||
![]() |
5f988984e4 | ||
![]() |
0748cdc7f1 | ||
![]() |
b2c71c489d | ||
![]() |
2ce906cee7 | ||
![]() |
23b1ff0970 | ||
![]() |
c2777386fc | ||
![]() |
cdc5b4a41e | ||
![]() |
52e5e5c2ba | ||
![]() |
7a48984dd5 | ||
![]() |
c653b56937 | ||
![]() |
96f2552c8a | ||
![]() |
04aff67de4 | ||
![]() |
e5658b9331 | ||
![]() |
ac2336adb0 | ||
![]() |
1a6356b2ca | ||
![]() |
b05645902a | ||
![]() |
5da8738fea | ||
![]() |
54d4f8c320 | ||
![]() |
f9f6c92c52 | ||
![]() |
98753dd088 | ||
![]() |
c76153f31d | ||
![]() |
881cb8b108 | ||
![]() |
8cbb91c857 | ||
![]() |
66bca12856 | ||
![]() |
aaae0aa48b | ||
![]() |
256c5769b4 | ||
![]() |
0535d3b25f | ||
![]() |
b36ea7636b | ||
![]() |
62be003150 | ||
![]() |
1f7238a434 | ||
![]() |
364c7cd621 | ||
![]() |
9d5390a049 | ||
![]() |
bda2fa364d | ||
![]() |
2944c9c665 | ||
![]() |
129bd04329 | ||
![]() |
caa7b2ad4f | ||
![]() |
c14b4d6b38 | ||
![]() |
a6816db813 | ||
![]() |
1d76d78858 | ||
![]() |
0382c95e4d | ||
![]() |
fb70607064 | ||
![]() |
fda20f08d0 | ||
![]() |
959ba907df | ||
![]() |
afd41c9fc7 | ||
![]() |
dfc3b51e78 | ||
![]() |
2964ba8c6a | ||
![]() |
7f2e024e78 | ||
![]() |
c0cc5c3059 | ||
![]() |
193e764c0b | ||
![]() |
6b20c70b52 | ||
![]() |
e68cb95d84 | ||
![]() |
448666239c | ||
![]() |
69c5d47bd4 | ||
![]() |
c0ac323360 | ||
![]() |
daf5fafced | ||
![]() |
a0cd3ca62b | ||
![]() |
fa47b4d8b8 | ||
![]() |
4a9476dd8d | ||
![]() |
661ef5eead | ||
![]() |
8d2511688d | ||
![]() |
d38ef273cc | ||
![]() |
969511d2cb | ||
![]() |
989f48d8c1 | ||
![]() |
85ca752e33 | ||
![]() |
f8ea5cb579 | ||
![]() |
17244d193b | ||
![]() |
360e506710 | ||
![]() |
09ad2458b8 | ||
![]() |
df77232bdc | ||
![]() |
2ae5bd9bb6 | ||
![]() |
ad200a864e | ||
![]() |
9d1b5614f9 | ||
![]() |
416b19c6fc | ||
![]() |
5b7249f302 | ||
![]() |
8ce7348625 | ||
![]() |
699543e4a2 | ||
![]() |
4309c4ad46 | ||
![]() |
3f1cbad2e7 | ||
![]() |
4ebb5293fc | ||
![]() |
2814c62915 | ||
![]() |
876e96fdbf | ||
![]() |
e78a012305 | ||
![]() |
f68843e3d7 | ||
![]() |
19a97a1df0 | ||
![]() |
72997517b0 | ||
![]() |
2a9fca82d2 | ||
![]() |
55b1516770 | ||
![]() |
3cc9a89dda | ||
![]() |
4d1e5535b2 | ||
![]() |
46a0d4fbcb | ||
![]() |
04945fda66 | ||
![]() |
1954767b45 | ||
![]() |
97e2e71ef9 | ||
![]() |
0bc81d5135 | ||
![]() |
c8a647846c | ||
![]() |
90ce14cd84 | ||
![]() |
28e276f139 | ||
![]() |
f22e1e4dd2 | ||
![]() |
e0d769caa2 | ||
![]() |
4a37c48789 | ||
![]() |
ad492c3601 | ||
![]() |
6983b4615c | ||
![]() |
0c055b201e | ||
![]() |
339e4dd3ef | ||
![]() |
d57084f235 | ||
![]() |
7eed0fc041 | ||
![]() |
7a1c6aa2a3 | ||
![]() |
4a2e36b19e | ||
![]() |
1c2018f37f | ||
![]() |
948dcdb81b | ||
![]() |
08101d72ce | ||
![]() |
75c4028585 | ||
![]() |
85f258d1c2 | ||
![]() |
49be7042dc | ||
![]() |
44fcd3ef3e | ||
![]() |
21cde7a41c | ||
![]() |
8598289936 | ||
![]() |
35dde7480f | ||
![]() |
5e42f9ab46 | ||
![]() |
7acf00a633 | ||
![]() |
69339d254b | ||
![]() |
ec517d25e8 | ||
![]() |
ce9b1b0573 | ||
![]() |
0a2407a851 | ||
![]() |
76a03d568e | ||
![]() |
7c03f26393 | ||
![]() |
9ff9e406ea | ||
![]() |
b5beb13abb | ||
![]() |
ceb12d3074 | ||
![]() |
59c0dd56ab | ||
![]() |
dcf19c173c | ||
![]() |
e235000169 | ||
![]() |
821951b851 | ||
![]() |
35ba1f17dc | ||
![]() |
ea8e0cc7c2 | ||
![]() |
cb661c56b0 | ||
![]() |
e904bd0ddc | ||
![]() |
e9883d285d | ||
![]() |
8d6ad9e39d | ||
![]() |
aa18245f7e | ||
![]() |
316bfb77b5 | ||
![]() |
9b58214e4a | ||
![]() |
3c801fa460 | ||
![]() |
1c9202004b | ||
![]() |
1004c99c29 | ||
![]() |
c9ecb1edd8 | ||
![]() |
8baf5fdca0 | ||
![]() |
aafafa314d | ||
![]() |
49e42a1f60 | ||
![]() |
9cd16b1dea | ||
![]() |
12cd28258d | ||
![]() |
9564997222 | ||
![]() |
f968059c67 | ||
![]() |
0b900a5e93 | ||
![]() |
09867a47a4 | ||
![]() |
9d5c42b61b | ||
![]() |
8e7a8b68d2 | ||
![]() |
4d625031a5 | ||
![]() |
26a60b2eb0 | ||
![]() |
07d09fdb66 | ||
![]() |
4553ed276b | ||
![]() |
62966f3829 | ||
![]() |
c445142505 | ||
![]() |
f70ddce761 | ||
![]() |
e29246cb17 | ||
![]() |
146e6776f5 | ||
![]() |
a45051fbfc | ||
![]() |
ec9f67f610 | ||
![]() |
30c08f2e3d | ||
![]() |
9f100cf344 | ||
![]() |
a5a01e9051 | ||
![]() |
6be4688bdc | ||
![]() |
717c5cdcc7 | ||
![]() |
0654bba39f | ||
![]() |
4d77d5b316 |
241
CHANGES
241
CHANGES
@@ -2,8 +2,178 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.7b and 0.9.7c [30 Sep 2003]
|
||||
|
||||
*) Fix various bugs revealed by running the NISCC test suite:
|
||||
|
||||
Stop out of bounds reads in the ASN1 code when presented with
|
||||
invalid tags (CAN-2003-0543 and CAN-2003-0544).
|
||||
|
||||
Free up ASN1_TYPE correctly if ANY type is invalid (CAN-2003-0545).
|
||||
|
||||
If verify callback ignores invalid public key errors don't try to check
|
||||
certificate signature with the NULL public key.
|
||||
|
||||
[Steve Henson]
|
||||
|
||||
*) New -ignore_err option in ocsp application to stop the server
|
||||
exiting on the first error in a request.
|
||||
[Steve Henson]
|
||||
|
||||
*) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate
|
||||
if the server requested one: as stated in TLS 1.0 and SSL 3.0
|
||||
specifications.
|
||||
[Steve Henson]
|
||||
|
||||
*) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional
|
||||
extra data after the compression methods not only for TLS 1.0
|
||||
but also for SSL 3.0 (as required by the specification).
|
||||
[Bodo Moeller; problem pointed out by Matthias Loepfe]
|
||||
|
||||
*) Change X509_certificate_type() to mark the key as exported/exportable
|
||||
when it's 512 *bits* long, not 512 bytes.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Change AES_cbc_encrypt() so it outputs exact multiple of
|
||||
blocks during encryption.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Various fixes to base64 BIO and non blocking I/O. On write
|
||||
flushes were not handled properly if the BIO retried. On read
|
||||
data was not being buffered properly and had various logic bugs.
|
||||
This also affects blocking I/O when the data being decoded is a
|
||||
certain size.
|
||||
[Steve Henson]
|
||||
|
||||
*) Various S/MIME bugfixes and compatibility changes:
|
||||
output correct application/pkcs7 MIME type if
|
||||
PKCS7_NOOLDMIMETYPE is set. Tolerate some broken signatures.
|
||||
Output CR+LF for EOL if PKCS7_CRLFEOL is set (this makes opening
|
||||
of files as .eml work). Correctly handle very long lines in MIME
|
||||
parser.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 0.9.7a and 0.9.7b [10 Apr 2003]
|
||||
|
||||
*) Countermeasure against the Klima-Pokorny-Rosa extension of
|
||||
Bleichbacher's attack on PKCS #1 v1.5 padding: treat
|
||||
a protocol version number mismatch like a decryption error
|
||||
in ssl3_get_client_key_exchange (ssl/s3_srvr.c).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Turn on RSA blinding by default in the default implementation
|
||||
to avoid a timing attack. Applications that don't want it can call
|
||||
RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING.
|
||||
They would be ill-advised to do so in most cases.
|
||||
[Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller]
|
||||
|
||||
*) Change RSA blinding code so that it works when the PRNG is not
|
||||
seeded (in this case, the secret RSA exponent is abused as
|
||||
an unpredictable seed -- if it is not unpredictable, there
|
||||
is no point in blinding anyway). Make RSA blinding thread-safe
|
||||
by remembering the creator's thread ID in rsa->blinding and
|
||||
having all other threads use local one-time blinding factors
|
||||
(this requires more computation than sharing rsa->blinding, but
|
||||
avoids excessive locking; and if an RSA object is not shared
|
||||
between threads, blinding will still be very fast).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Fixed a typo bug that would cause ENGINE_set_default() to set an
|
||||
ENGINE as defaults for all supported algorithms irrespective of
|
||||
the 'flags' parameter. 'flags' is now honoured, so applications
|
||||
should make sure they are passing it correctly.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Target "mingw" now allows native Windows code to be generated in
|
||||
the Cygwin environment as well as with the MinGW compiler.
|
||||
[Ulf Moeller]
|
||||
|
||||
Changes between 0.9.7 and 0.9.7a [19 Feb 2003]
|
||||
|
||||
*) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
|
||||
via timing by performing a MAC computation even if incorrrect
|
||||
block cipher padding has been found. This is a countermeasure
|
||||
against active attacks where the attacker has to distinguish
|
||||
between bad padding and a MAC verification error. (CAN-2003-0078)
|
||||
|
||||
[Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
|
||||
Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
|
||||
Martin Vuagnoux (EPFL, Ilion)]
|
||||
|
||||
*) Make the no-err option work as intended. The intention with no-err
|
||||
is not to have the whole error stack handling routines removed from
|
||||
libcrypto, it's only intended to remove all the function name and
|
||||
reason texts, thereby removing some of the footprint that may not
|
||||
be interesting if those errors aren't displayed anyway.
|
||||
|
||||
NOTE: it's still possible for any application or module to have it's
|
||||
own set of error texts inserted. The routines are there, just not
|
||||
used by default when no-err is given.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add support for FreeBSD on IA64.
|
||||
[dirk.meyer@dinoex.sub.org via Richard Levitte, resolves #454]
|
||||
|
||||
*) Adjust DES_cbc_cksum() so it returns the same value as the MIT
|
||||
Kerberos function mit_des_cbc_cksum(). Before this change,
|
||||
the value returned by DES_cbc_cksum() was like the one from
|
||||
mit_des_cbc_cksum(), except the bytes were swapped.
|
||||
[Kevin Greaney <Kevin.Greaney@hp.com> and Richard Levitte]
|
||||
|
||||
*) Allow an application to disable the automatic SSL chain building.
|
||||
Before this a rather primitive chain build was always performed in
|
||||
ssl3_output_cert_chain(): an application had no way to send the
|
||||
correct chain if the automatic operation produced an incorrect result.
|
||||
|
||||
Now the chain builder is disabled if either:
|
||||
|
||||
1. Extra certificates are added via SSL_CTX_add_extra_chain_cert().
|
||||
|
||||
2. The mode flag SSL_MODE_NO_AUTO_CHAIN is set.
|
||||
|
||||
The reasoning behind this is that an application would not want the
|
||||
auto chain building to take place if extra chain certificates are
|
||||
present and it might also want a means of sending no additional
|
||||
certificates (for example the chain has two certificates and the
|
||||
root is omitted).
|
||||
[Steve Henson]
|
||||
|
||||
*) Add the possibility to build without the ENGINE framework.
|
||||
[Steven Reddie <smr@essemer.com.au> via Richard Levitte]
|
||||
|
||||
*) Under Win32 gmtime() can return NULL: check return value in
|
||||
OPENSSL_gmtime(). Add error code for case where gmtime() fails.
|
||||
[Steve Henson]
|
||||
|
||||
*) DSA routines: under certain error conditions uninitialized BN objects
|
||||
could be freed. Solution: make sure initialization is performed early
|
||||
enough. (Reported and fix supplied by Ivan D Nestlerode <nestler@MIT.EDU>,
|
||||
Nils Larsch <nla@trustcenter.de> via PR#459)
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Another fix for SSLv2 session ID handling: the session ID was incorrectly
|
||||
checked on reconnect on the client side, therefore session resumption
|
||||
could still fail with a "ssl session id is different" error. This
|
||||
behaviour is masked when SSL_OP_ALL is used due to
|
||||
SSL_OP_MICROSOFT_SESS_ID_BUG being set.
|
||||
Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
|
||||
followup to PR #377.
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) IA-32 assembler support enhancements: unified ELF targets, support
|
||||
for SCO/Caldera platforms, fix for Cygwin shared build.
|
||||
[Andy Polyakov]
|
||||
|
||||
*) Add support for FreeBSD on sparc64. As a consequence, support for
|
||||
FreeBSD on non-x86 processors is separate from x86 processors on
|
||||
the config script, much like the NetBSD support.
|
||||
[Richard Levitte & Kris Kennaway <kris@obsecurity.org>]
|
||||
|
||||
Changes between 0.9.6h and 0.9.7 [31 Dec 2002]
|
||||
|
||||
[NB: OpenSSL 0.9.6i and later 0.9.6 patch levels were released after
|
||||
OpenSSL 0.9.7.]
|
||||
|
||||
*) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
|
||||
code (06) was taken as the first octet of the session ID and the last
|
||||
octet was ignored consequently. As a result SSLv2 client side session
|
||||
@@ -177,7 +347,7 @@
|
||||
# is assumed to contain the absolute OpenSSL source directory.
|
||||
mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
|
||||
cd objtree/"`uname -s`-`uname -r`-`uname -m`"
|
||||
(cd $OPENSSL_SOURCE; find . -type f -o -type l) | while read F; do
|
||||
(cd $OPENSSL_SOURCE; find . -type f) | while read F; do
|
||||
mkdir -p `dirname $F`
|
||||
ln -s $OPENSSL_SOURCE/$F $F
|
||||
done
|
||||
@@ -1677,6 +1847,11 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k
|
||||
be reduced modulo m.
|
||||
[Lenka Fibikova <fibikova@exp-math.uni-essen.de>, Bodo Moeller]
|
||||
|
||||
#if 0
|
||||
The following entry accidentily appeared in the CHANGES file
|
||||
distributed with OpenSSL 0.9.7. The modifications described in
|
||||
it do *not* apply to OpenSSL 0.9.7.
|
||||
|
||||
*) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there
|
||||
was actually never needed) and in BN_mul(). The removal in BN_mul()
|
||||
required a small change in bn_mul_part_recursive() and the addition
|
||||
@@ -1685,6 +1860,7 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k
|
||||
bn_sub_words() and bn_add_words() except they take arrays with
|
||||
differing sizes.
|
||||
[Richard Levitte]
|
||||
#endif
|
||||
|
||||
*) In 'openssl passwd', verify passwords read from the terminal
|
||||
unless the '-salt' option is used (which usually means that
|
||||
@@ -1816,6 +1992,69 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k
|
||||
*) Clean old EAY MD5 hack from e_os.h.
|
||||
[Richard Levitte]
|
||||
|
||||
Changes between 0.9.6j and 0.9.6k [30 Sep 2003]
|
||||
|
||||
*) Fix various bugs revealed by running the NISCC test suite:
|
||||
|
||||
Stop out of bounds reads in the ASN1 code when presented with
|
||||
invalid tags (CAN-2003-0543 and CAN-2003-0544).
|
||||
|
||||
If verify callback ignores invalid public key errors don't try to check
|
||||
certificate signature with the NULL public key.
|
||||
|
||||
[Steve Henson]
|
||||
|
||||
*) In ssl3_accept() (ssl/s3_srvr.c) only accept a client certificate
|
||||
if the server requested one: as stated in TLS 1.0 and SSL 3.0
|
||||
specifications.
|
||||
[Steve Henson]
|
||||
|
||||
*) In ssl3_get_client_hello() (ssl/s3_srvr.c), tolerate additional
|
||||
extra data after the compression methods not only for TLS 1.0
|
||||
but also for SSL 3.0 (as required by the specification).
|
||||
[Bodo Moeller; problem pointed out by Matthias Loepfe]
|
||||
|
||||
*) Change X509_certificate_type() to mark the key as exported/exportable
|
||||
when it's 512 *bits* long, not 512 bytes.
|
||||
[Richard Levitte]
|
||||
|
||||
Changes between 0.9.6i and 0.9.6j [10 Apr 2003]
|
||||
|
||||
*) Countermeasure against the Klima-Pokorny-Rosa extension of
|
||||
Bleichbacher's attack on PKCS #1 v1.5 padding: treat
|
||||
a protocol version number mismatch like a decryption error
|
||||
in ssl3_get_client_key_exchange (ssl/s3_srvr.c).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Turn on RSA blinding by default in the default implementation
|
||||
to avoid a timing attack. Applications that don't want it can call
|
||||
RSA_blinding_off() or use the new flag RSA_FLAG_NO_BLINDING.
|
||||
They would be ill-advised to do so in most cases.
|
||||
[Ben Laurie, Steve Henson, Geoff Thorpe, Bodo Moeller]
|
||||
|
||||
*) Change RSA blinding code so that it works when the PRNG is not
|
||||
seeded (in this case, the secret RSA exponent is abused as
|
||||
an unpredictable seed -- if it is not unpredictable, there
|
||||
is no point in blinding anyway). Make RSA blinding thread-safe
|
||||
by remembering the creator's thread ID in rsa->blinding and
|
||||
having all other threads use local one-time blinding factors
|
||||
(this requires more computation than sharing rsa->blinding, but
|
||||
avoids excessive locking; and if an RSA object is not shared
|
||||
between threads, blinding will still be very fast).
|
||||
[Bodo Moeller]
|
||||
|
||||
Changes between 0.9.6h and 0.9.6i [19 Feb 2003]
|
||||
|
||||
*) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
|
||||
via timing by performing a MAC computation even if incorrrect
|
||||
block cipher padding has been found. This is a countermeasure
|
||||
against active attacks where the attacker has to distinguish
|
||||
between bad padding and a MAC verification error. (CAN-2003-0078)
|
||||
|
||||
[Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
|
||||
Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
|
||||
Martin Vuagnoux (EPFL, Ilion)]
|
||||
|
||||
Changes between 0.9.6g and 0.9.6h [5 Dec 2002]
|
||||
|
||||
*) New function OPENSSL_cleanse(), which is used to cleanse a section of
|
||||
|
110
Configure
110
Configure
@@ -10,7 +10,7 @@ use strict;
|
||||
|
||||
# see INSTALL for instructions.
|
||||
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n";
|
||||
|
||||
# Options:
|
||||
#
|
||||
@@ -38,6 +38,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
|
||||
# --test-sanity Make a number of sanity checks on the data in this file.
|
||||
# This is a debugging tool for OpenSSL developers.
|
||||
#
|
||||
# no-engine do not compile in any engine code.
|
||||
# no-hw-xxx do not compile support for specific crypto hardware.
|
||||
# Generic OpenSSL-style methods relating to this support
|
||||
# are always compiled but return NULL if the hardware
|
||||
@@ -107,7 +108,6 @@ my $tlib="-lnsl -lsocket";
|
||||
my $bits1="THIRTY_TWO_BIT ";
|
||||
my $bits2="SIXTY_FOUR_BIT ";
|
||||
|
||||
my $x86_sol_asm="asm/bn86-sol.o asm/co86-sol.o:asm/dx86-sol.o asm/yx86-sol.o:asm/bx86-sol.o:asm/mx86-sol.o:asm/sx86-sol.o:asm/cx86-sol.o:asm/rx86-sol.o:asm/rm86-sol.o:asm/r586-sol.o";
|
||||
my $x86_elf_asm="asm/bn86-elf.o asm/co86-elf.o:asm/dx86-elf.o asm/yx86-elf.o:asm/bx86-elf.o:asm/mx86-elf.o:asm/sx86-elf.o:asm/cx86-elf.o:asm/rx86-elf.o:asm/rm86-elf.o:asm/r586-elf.o";
|
||||
my $x86_out_asm="asm/bn86-out.o asm/co86-out.o:asm/dx86-out.o asm/yx86-out.o:asm/bx86-out.o:asm/mx86-out.o:asm/sx86-out.o:asm/cx86-out.o:asm/rx86-out.o:asm/rm86-out.o:asm/r586-out.o";
|
||||
my $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:asm/bx86bsdi.o:asm/mx86bsdi.o:asm/sx86bsdi.o:asm/cx86bsdi.o:asm/rx86bsdi.o:asm/rm86bsdi.o:asm/r586bsdi.o";
|
||||
@@ -161,7 +161,7 @@ my %table=(
|
||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
|
||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
||||
# error message.
|
||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### Solaris x86 with Sun C setups
|
||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -219,7 +219,7 @@ my %table=(
|
||||
# './Configure irix-[g]cc' manually.
|
||||
# -mips4 flag is added by ./config when appropriate.
|
||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-cc", "cc:-n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# N64 ABI builds.
|
||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -262,22 +262,21 @@ my %table=(
|
||||
"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# IA-64 targets
|
||||
# I have no idea if this one actually works, feedback needed. <appro>
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
|
||||
# with debugging of the following config.
|
||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||
#
|
||||
# Chris Ruemmler <ruemmler@cup.hp.com>
|
||||
# Kevin Steves <ks@hp.se>
|
||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# Isn't the line below meaningless? HP-UX cc optimizes for host by default.
|
||||
# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
|
||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HPUX 9.X config.
|
||||
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
||||
@@ -384,18 +383,21 @@ my %table=(
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::",
|
||||
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown):::BN_LLONG:::",
|
||||
"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::",
|
||||
"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"FreeBSD-sparc64","gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"FreeBSD-ia64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64-cpp.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
"bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown):::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
|
||||
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -403,7 +405,7 @@ my %table=(
|
||||
"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
|
||||
# NCR MP-RAS UNIX ver 02.03.01
|
||||
"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl -lc89:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
|
||||
# QNX 4
|
||||
"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
|
||||
@@ -414,33 +416,36 @@ my %table=(
|
||||
# Linux on ARM
|
||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# SCO/Caldera targets.
|
||||
#
|
||||
# Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc.
|
||||
# Now we only have blended unixware-* as it's the only one used by ./config.
|
||||
# If you want to optimize for particular microarchitecture, bypass ./config
|
||||
# and './Configure unixware-7 -Kpentium_pro' or whatever appropriate.
|
||||
# Note that not all targets include assembler support. Mostly because of
|
||||
# lack of motivation to support out-of-date platforms with out-of-date
|
||||
# compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has
|
||||
# patiently assisted to debug most of it.
|
||||
#
|
||||
# UnixWare 2.0x fails destest with -O
|
||||
"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"unixware-2.0-pentium","cc:-DFILIO_H -DNO_STRINGS_H -Kpentium::-Kthread::-lsocket -lnsl -lresolv -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
|
||||
|
||||
# UnixWare 2.1
|
||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"unixware-2.1-pentium","cc:-O -DFILIO_H -Kpentium::-Kthread::-lsocket -lnsl -lresolv -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
|
||||
"unixware-2.1-p6","cc:-O -DFILIO_H -Kp6::-Kthread::-lsocket -lnsl -lresolv -lx:MD2_CHAR RC4_INDEX ${x86_gcc_des}::",
|
||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"sco3-gcc", "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
|
||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
|
||||
"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# UnixWare 7
|
||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"unixware-7-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"unixware-7-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# OpenUNIX 8
|
||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8-pentium","cc:-O -DFILIO_H -Kalloca -Kpentium::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8-pentium_pro","cc:-O -DFILIO_H -Kalloca -Kpentium_pro::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# IBM's AIX.
|
||||
"aix-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
|
||||
"aix-gcc", "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::",
|
||||
"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
|
||||
"aix43-gcc", "gcc:-O1 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
"aix64-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn::::::-X 64",
|
||||
"aix64-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
|
||||
|
||||
#
|
||||
# Cray T90 and similar (SDSC)
|
||||
@@ -473,15 +478,6 @@ my %table=(
|
||||
"dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lnsl -lsocket:RC4_INDEX DES_UNROLL:::",
|
||||
"dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown)::-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
|
||||
# SCO 3 - Tim Rice <tim@multitalents.net>
|
||||
"sco3-gcc", "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
|
||||
|
||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the
|
||||
# SCO cc.
|
||||
"sco5-cc", "cc:-belf::(unknown)::-lsocket -lresolv -lnsl:${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:svr3-shared:-Kpic", # des options?
|
||||
"sco5-cc-pentium", "cc:-Kpentium::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des options?
|
||||
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lresolv -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:svr3-shared:-fPIC",
|
||||
|
||||
# Sinix/ReliantUNIX RM400
|
||||
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */
|
||||
"ReliantUNIX","cc:-KPIC -g -DTERMIOS -DB_ENDIAN::-Kthread:SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:reliantunix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -508,13 +504,11 @@ my %table=(
|
||||
"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
|
||||
# Borland C++ 4.5
|
||||
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX::::::::::win32",
|
||||
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN::::::::::win32",
|
||||
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
|
||||
# Mingw32
|
||||
# (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl
|
||||
# and its library files in util/pl/*)
|
||||
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
# MinGW
|
||||
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-mno-cygwin -lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32::::.dll",
|
||||
|
||||
# UWIN
|
||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
@@ -566,6 +560,8 @@ my %table=(
|
||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
||||
"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::",
|
||||
"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::",
|
||||
"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::",
|
||||
"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::::::::::::::::ranlibmips:",
|
||||
|
||||
##### Compaq Non-Stop Kernel (Tandem)
|
||||
"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::",
|
||||
@@ -656,6 +652,7 @@ my $openssl_thread_defines;
|
||||
my $openssl_sys_defines="";
|
||||
my $openssl_other_defines;
|
||||
my $libs;
|
||||
my $libkrb5="";
|
||||
my $target;
|
||||
my $options;
|
||||
my $symlink;
|
||||
@@ -696,6 +693,11 @@ PROCESS_ARGS:
|
||||
$flags .= "-DOPENSSL_NO_ASM ";
|
||||
$openssl_other_defines .= "#define OPENSSL_NO_ASM\n";
|
||||
}
|
||||
elsif (/^no-err$/)
|
||||
{
|
||||
$flags .= "-DOPENSSL_NO_ERR ";
|
||||
$openssl_other_defines .= "#define OPENSSL_NO_ERR\n";
|
||||
}
|
||||
elsif (/^no-hw-(.+)$/)
|
||||
{
|
||||
my $hw=$1;
|
||||
@@ -956,6 +958,8 @@ my $shared_extension = $fields[$idx_shared_extension];
|
||||
my $ranlib = $fields[$idx_ranlib];
|
||||
my $arflags = $fields[$idx_arflags];
|
||||
|
||||
my $no_shared_warn=0;
|
||||
|
||||
$cflags="$flags$cflags" if ($flags ne "");
|
||||
|
||||
# Kerberos settings. The flavor must be provided from outside, either through
|
||||
@@ -1020,8 +1024,6 @@ else
|
||||
$withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include"
|
||||
if $withargs{"krb5-include"} eq "" &&
|
||||
$withargs{"krb5-dir"} ne "";
|
||||
|
||||
$libs.=$withargs{"krb5-lib"}." " if $withargs{"krb5-lib"} ne "";
|
||||
}
|
||||
|
||||
# The DSO code currently always implements all functions so that no
|
||||
@@ -1107,6 +1109,7 @@ if ($zlib)
|
||||
my $shared_mark = "";
|
||||
if ($shared_target eq "")
|
||||
{
|
||||
$no_shared_warn = 1 if !$no_shared;
|
||||
$no_shared = 1;
|
||||
}
|
||||
if (!$no_shared)
|
||||
@@ -1240,6 +1243,7 @@ while (<IN>)
|
||||
s/^ARFLAGS=.*/ARFLAGS= $arflags/;
|
||||
s/^PERL=.*/PERL= $perl/;
|
||||
s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
|
||||
s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/;
|
||||
s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
|
||||
s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/;
|
||||
s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared);
|
||||
@@ -1513,6 +1517,16 @@ applications as the compiler options required on this system are not known.
|
||||
See file INSTALL for details if you need multi-threading.
|
||||
EOF
|
||||
|
||||
print <<\EOF if ($no_shared_warn);
|
||||
|
||||
You gave the option 'shared'. Normally, that would give you shared libraries.
|
||||
Unfortunately, the OpenSSL configuration doesn't include shared library support
|
||||
for this platform yet, so it will pretend you gave the option 'no-shared'. If
|
||||
you can inform the developpers (openssl-dev\@openssl.org) how to support shared
|
||||
libraries on this platform, they will at least look at it and try their best
|
||||
(but please first make sure you have tried with a current version of OpenSSL).
|
||||
EOF
|
||||
|
||||
exit(0);
|
||||
|
||||
sub usage
|
||||
|
69
FAQ
69
FAQ
@@ -68,7 +68,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.7 was released on December 31, 2002.
|
||||
OpenSSL 0.9.7c was released on September 30, 2003.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -189,18 +189,30 @@ for permission to use their software with OpenSSL.
|
||||
|
||||
Cryptographic software needs a source of unpredictable data to work
|
||||
correctly. Many open source operating systems provide a "randomness
|
||||
device" that serves this purpose. On other systems, applications have
|
||||
to call the RAND_add() or RAND_seed() function with appropriate data
|
||||
before generating keys or performing public key encryption.
|
||||
(These functions initialize the pseudo-random number generator, PRNG.)
|
||||
device" (/dev/urandom or /dev/random) that serves this purpose.
|
||||
All OpenSSL versions try to use /dev/urandom by default; starting with
|
||||
version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not
|
||||
available.
|
||||
|
||||
Some broken applications do not do this. As of version 0.9.5, the
|
||||
OpenSSL functions that need randomness report an error if the random
|
||||
number generator has not been seeded with at least 128 bits of
|
||||
randomness. If this error occurs, please contact the author of the
|
||||
application you are using. It is likely that it never worked
|
||||
correctly. OpenSSL 0.9.5 and later make the error visible by refusing
|
||||
to perform potentially insecure encryption.
|
||||
On other systems, applications have to call the RAND_add() or
|
||||
RAND_seed() function with appropriate data before generating keys or
|
||||
performing public key encryption. (These functions initialize the
|
||||
pseudo-random number generator, PRNG.) Some broken applications do
|
||||
not do this. As of version 0.9.5, the OpenSSL functions that need
|
||||
randomness report an error if the random number generator has not been
|
||||
seeded with at least 128 bits of randomness. If this error occurs and
|
||||
is not discussed in the documentation of the application you are
|
||||
using, please contact the author of that application; it is likely
|
||||
that it never worked correctly. OpenSSL 0.9.5 and later make the
|
||||
error visible by refusing to perform potentially insecure encryption.
|
||||
|
||||
If you are using Solaris 8, you can add /dev/urandom and /dev/random
|
||||
devices by installing patch 112438 (Sparc) or 112439 (x86), which are
|
||||
available via the Patchfinder at <URL: http://sunsolve.sun.com>
|
||||
(Solaris 9 includes these devices by default). For /dev/random support
|
||||
for earlier Solaris versions, see Sun's statement at
|
||||
<URL: http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski>
|
||||
(the SUNWski package is available in patch 105710).
|
||||
|
||||
On systems without /dev/urandom and /dev/random, it is a good idea to
|
||||
use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
|
||||
@@ -233,18 +245,6 @@ OpenSSL command line tools. Applications using the OpenSSL library
|
||||
provide their own configuration options to specify the entropy source,
|
||||
please check out the documentation coming the with application.
|
||||
|
||||
For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested
|
||||
installing the SUNski package from Sun patch 105710-01 (Sparc) which
|
||||
adds a /dev/random device and make sure it gets used, usually through
|
||||
$RANDFILE. There are probably similar patches for the other Solaris
|
||||
versions. An official statement from Sun with respect to /dev/random
|
||||
support can be found at
|
||||
http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski
|
||||
However, be warned that /dev/random is usually a blocking device, which
|
||||
may have some effects on OpenSSL.
|
||||
A third party /dev/random solution for Solaris is available at
|
||||
http://www.cosy.sbg.ac.at/~andi/
|
||||
|
||||
|
||||
* Why do I get an "unable to write 'random state'" error message?
|
||||
|
||||
@@ -490,10 +490,13 @@ and then redo the compilation. What you should really do is make sure
|
||||
Sometimes, you may get reports from VC++ command line (cl) that it
|
||||
can't find standard include files like stdio.h and other weirdnesses.
|
||||
One possible cause is that the environment isn't correctly set up.
|
||||
To solve that problem, one should run VCVARS32.BAT which is found in
|
||||
the 'bin' subdirectory of the VC++ installation directory (somewhere
|
||||
under 'Program Files'). This needs to be done prior to running NMAKE,
|
||||
and the changes are only valid for the current DOS session.
|
||||
To solve that problem for VC++ versions up to 6, one should run
|
||||
VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++
|
||||
installation directory (somewhere under 'Program Files'). For VC++
|
||||
version 7 (and up?), which is also called VS.NET, the file is called
|
||||
VSVARS32.BAT instead.
|
||||
This needs to be done prior to running NMAKE, and the changes are only
|
||||
valid for the current DOS session.
|
||||
|
||||
|
||||
* What is special about OpenSSL on Redhat?
|
||||
@@ -577,10 +580,13 @@ As of 0.9.7 assembler routines were overhauled for position independence
|
||||
of the machine code, which is essential for shared library support. For
|
||||
some reason OpenBSD is equipped with an out-of-date GNU assembler which
|
||||
finds the new code offensive. To work around the problem, configure with
|
||||
no-asm (and sacrifice a great deal of performance) or upgrade /usr/bin/as.
|
||||
no-asm (and sacrifice a great deal of performance) or patch your assembler
|
||||
according to <URL: http://www.openssl.org/~appro/gas-1.92.3.OpenBSD.patch>.
|
||||
For your convenience a pre-compiled replacement binary is provided at
|
||||
http://www.openssl.org/~appro/i386-openbsd3-as, which is compiled from
|
||||
binutils-2.8 released in 1997.
|
||||
<URL: http://www.openssl.org/~appro/gas-1.92.3.static.aout.bin>.
|
||||
Reportedly elder *BSD a.out platforms also suffer from this problem and
|
||||
remedy should be same. Provided binary is statically linked and should be
|
||||
working across wider range of *BSD branches, not just OpenBSD.
|
||||
|
||||
[PROG] ========================================================================
|
||||
|
||||
@@ -726,6 +732,7 @@ The general answer is to check the config.log file generated when running
|
||||
the OpenSSH configure script. It should contain the detailed information
|
||||
on why the OpenSSL library was not detected or considered incompatible.
|
||||
|
||||
|
||||
* Can I use OpenSSL's SSL library with non-blocking I/O?
|
||||
|
||||
Yes; make sure to read the SSL_get_error(3) manual page!
|
||||
|
24
INSTALL
24
INSTALL
@@ -158,7 +158,7 @@
|
||||
If a test fails, look at the output. There may be reasons for
|
||||
the failure that isn't a problem in OpenSSL itself (like a missing
|
||||
or malfunctioning bc). If it is a problem with OpenSSL itself,
|
||||
try removing any compiler optimization flags from the CFLAGS line
|
||||
try removing any compiler optimization flags from the CFLAG line
|
||||
in Makefile.ssl and run "make clean; make". Please send a bug
|
||||
report to <openssl-bugs@openssl.org>, including the output of
|
||||
"make report" in order to be added to the request tracker at
|
||||
@@ -308,3 +308,25 @@
|
||||
to install additional support software to obtain random seed.
|
||||
Please check out the manual pages for RAND_add(), RAND_bytes(), RAND_egd(),
|
||||
and the FAQ for more information.
|
||||
|
||||
Note on support for multiple builds
|
||||
-----------------------------------
|
||||
|
||||
OpenSSL is usually built in it's source tree. Unfortunately, this doesn't
|
||||
support building for multiple platforms from the same source tree very well.
|
||||
It is however possible to build in a separate tree through the use of lots
|
||||
of symbolic links, which should be prepared like this:
|
||||
|
||||
mkdir -p objtree/"`uname -s`-`uname -r`-`uname -m`"
|
||||
cd objtree/"`uname -s`-`uname -r`-`uname -m`"
|
||||
(cd $OPENSSL_SOURCE; find . -type f) | while read F; do
|
||||
mkdir -p `dirname $F`
|
||||
rm -f $F; ln -s $OPENSSL_SOURCE/$F $F
|
||||
echo $F '->' $OPENSSL_SOURCE/$F
|
||||
done
|
||||
make -f Makefile.org clean
|
||||
|
||||
OPENSSL_SOURCE is an environment variable that contains the absolute (this
|
||||
is important!) path to the OpenSSL source tree.
|
||||
|
||||
Also, operations like 'make update' should still be made in the source tree.
|
||||
|
147
INSTALL.W32
147
INSTALL.W32
@@ -10,13 +10,20 @@
|
||||
|
||||
You need Perl for Win32. Unless you will build on Cygwin, you will need
|
||||
ActiveState Perl, available from http://www.activestate.com/ActivePerl.
|
||||
For Cygwin users, there's more info in the Cygwin section.
|
||||
|
||||
and one of the following C compilers:
|
||||
|
||||
* Visual C++
|
||||
* Borland C
|
||||
* GNU C (Mingw32 or Cygwin)
|
||||
* GNU C (Cygwin or MinGW)
|
||||
|
||||
If you are compiling from a tarball or a CVS snapshot then the Win32 files
|
||||
may well be not up to date. This may mean that some "tweaking" is required to
|
||||
get it all to work. See the trouble shooting section later on for if (when?)
|
||||
it goes wrong.
|
||||
|
||||
Visual C++
|
||||
----------
|
||||
|
||||
If you want to compile in the assembly language routines with Visual C++ then
|
||||
you will need an assembler. This is worth doing because it will result in
|
||||
@@ -26,26 +33,19 @@
|
||||
* Microsoft MASM (aka "ml")
|
||||
* Free Netwide Assembler NASM.
|
||||
|
||||
MASM was at one point distributed with VC++. It is now distributed with some
|
||||
Microsoft DDKs, for example the Windows NT 4.0 DDK and the Windows 98 DDK. If
|
||||
you do not have either of these DDKs then you can just download the binaries
|
||||
for the Windows 98 DDK and extract and rename the two files XXXXXml.exe and
|
||||
XXXXXml.err, to ml.exe and ml.err and install somewhere on your PATH. Both
|
||||
DDKs can be downloaded from the Microsoft developers site www.msdn.com.
|
||||
MASM is distributed with most versions of VC++. For the versions where it is
|
||||
not included in VC++, it is also distributed with some Microsoft DDKs, for
|
||||
example the Windows NT 4.0 DDK and the Windows 98 DDK. If you do not have
|
||||
either of these DDKs then you can just download the binaries for the Windows
|
||||
98 DDK and extract and rename the two files XXXXXml.exe and XXXXXml.err, to
|
||||
ml.exe and ml.err and install somewhere on your PATH. Both DDKs can be
|
||||
downloaded from the Microsoft developers site www.msdn.com.
|
||||
|
||||
NASM is freely available. Version 0.98 was used during testing: other versions
|
||||
may also work. It is available from many places, see for example:
|
||||
http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
|
||||
The NASM binary nasmw.exe needs to be installed anywhere on your PATH.
|
||||
|
||||
If you are compiling from a tarball or a CVS snapshot then the Win32 files
|
||||
may well be not up to date. This may mean that some "tweaking" is required to
|
||||
get it all to work. See the trouble shooting section later on for if (when?)
|
||||
it goes wrong.
|
||||
|
||||
Visual C++
|
||||
----------
|
||||
|
||||
Firstly you should run Configure:
|
||||
|
||||
> perl Configure VC-WIN32
|
||||
@@ -119,18 +119,72 @@
|
||||
* Run make:
|
||||
> make -f bcb.mak
|
||||
|
||||
GNU C (Mingw32)
|
||||
---------------
|
||||
GNU C (Cygwin)
|
||||
--------------
|
||||
|
||||
To build OpenSSL, you need the Mingw32 package and GNU make.
|
||||
Cygwin provides a bash shell and GNU tools environment running
|
||||
on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
|
||||
Consequently, a make of OpenSSL with Cygwin is closer to a GNU
|
||||
bash environment such as Linux than to other the other Win32
|
||||
makes.
|
||||
|
||||
Cygwin implements a Posix/Unix runtime system (cygwin1.dll).
|
||||
It is also possible to create Win32 binaries that only use the
|
||||
Microsoft C runtime system (msvcrt.dll or crtdll.dll) using
|
||||
MinGW. MinGW can be used in the Cygwin development environment
|
||||
or in a standalone setup as described in the following section.
|
||||
|
||||
To build OpenSSL using Cygwin:
|
||||
|
||||
* Install Cygwin (see http://cygwin.com/)
|
||||
|
||||
* Install Perl and ensure it is in the path. Both Cygwin perl
|
||||
(5.6.1-2 or newer) and ActivePerl work.
|
||||
|
||||
* Run the Cygwin bash shell
|
||||
|
||||
* $ tar zxvf openssl-x.x.x.tar.gz
|
||||
$ cd openssl-x.x.x
|
||||
|
||||
To build the Cygwin version of OpenSSL:
|
||||
|
||||
$ ./config
|
||||
[...]
|
||||
$ make
|
||||
[...]
|
||||
$ make test
|
||||
$ make install
|
||||
|
||||
This will create a default install in /usr/local/ssl.
|
||||
|
||||
To build the MinGW version (native Windows) in Cygwin:
|
||||
|
||||
$ ./Configure mingw
|
||||
[...]
|
||||
$ make
|
||||
[...]
|
||||
$ make test
|
||||
$ make install
|
||||
|
||||
Cygwin Notes:
|
||||
|
||||
"make test" and normal file operations may fail in directories
|
||||
mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
|
||||
stripping of carriage returns. To avoid this ensure that a binary
|
||||
mount is used, e.g. mount -b c:\somewhere /home.
|
||||
|
||||
"bc" is not provided in older Cygwin distribution. This causes a
|
||||
non-fatal error in "make test" but is otherwise harmless. If
|
||||
desired and needed, GNU bc can be built with Cygwin without change.
|
||||
|
||||
GNU C (MinGW)
|
||||
-------------
|
||||
|
||||
* Compiler installation:
|
||||
|
||||
Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/
|
||||
gnu-win32/mingw32/gcc-2.95.2/gcc-2.95.2-msvcrt.exe>. Extract it
|
||||
to a directory such as C:\gcc-2.95.2 and add c:\gcc-2.95.2\bin to
|
||||
the PATH environment variable in "System Properties"; or edit and
|
||||
run C:\gcc-2.95.2\mingw32.bat to set the PATH.
|
||||
MinGW is available from http://www.mingw.org. Run the installer and
|
||||
set the MinGW bin directory to the PATH in "System Properties" or
|
||||
autoexec.bat.
|
||||
|
||||
* Compile OpenSSL:
|
||||
|
||||
@@ -152,49 +206,6 @@
|
||||
> cd out
|
||||
> ..\ms\test
|
||||
|
||||
GNU C (Cygwin)
|
||||
--------------
|
||||
|
||||
Cygwin provides a bash shell and GNU tools environment running
|
||||
on NT 4.0, Windows 9x, Windows ME, Windows 2000, and Windows XP.
|
||||
Consequently, a make of OpenSSL with Cygwin is closer to a GNU
|
||||
bash environment such as Linux than to other W32 makes which are
|
||||
based on a single makefile approach. Cygwin implements Posix/Unix
|
||||
calls through cygwin1.dll, and is contrasted to Mingw32 which links
|
||||
dynamically to msvcrt.dll or crtdll.dll.
|
||||
|
||||
To build OpenSSL using Cygwin:
|
||||
|
||||
* Install Cygwin (see http://cygwin.com/)
|
||||
|
||||
* Install Perl and ensure it is in the path (recent Cygwin perl
|
||||
(version 5.6.1-2 of the latter has been reported to work) or
|
||||
ActivePerl)
|
||||
|
||||
* Run the Cygwin bash shell
|
||||
|
||||
* $ tar zxvf openssl-x.x.x.tar.gz
|
||||
$ cd openssl-x.x.x
|
||||
$ ./config
|
||||
[...]
|
||||
$ make
|
||||
[...]
|
||||
$ make test
|
||||
$ make install
|
||||
|
||||
This will create a default install in /usr/local/ssl.
|
||||
|
||||
Cygwin Notes:
|
||||
|
||||
"make test" and normal file operations may fail in directories
|
||||
mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
|
||||
stripping of carriage returns. To avoid this ensure that a binary
|
||||
mount is used, e.g. mount -b c:\somewhere /home.
|
||||
|
||||
"bc" is not provided in older Cygwin distribution. This causes a
|
||||
non-fatal error in "make test" but is otherwise harmless. If
|
||||
desired and needed, GNU bc can be built with Cygwin without change.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
@@ -214,7 +225,7 @@
|
||||
$ md c:\openssl\lib
|
||||
$ md c:\openssl\include
|
||||
$ md c:\openssl\include\openssl
|
||||
$ copy /b inc32\* c:\openssl\include\openssl
|
||||
$ copy /b inc32\openssl\* c:\openssl\include\openssl
|
||||
$ copy /b out32dll\ssleay32.lib c:\openssl\lib
|
||||
$ copy /b out32dll\libeay32.lib c:\openssl\lib
|
||||
$ copy /b out32dll\ssleay32.dll c:\openssl\bin
|
||||
|
2
LICENSE
2
LICENSE
@@ -12,7 +12,7 @@
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
150
Makefile.org
150
Makefile.org
@@ -72,6 +72,14 @@ TAR= tar
|
||||
TARFLAGS= --no-recursion
|
||||
MAKEDEPPROG=makedepend
|
||||
|
||||
# We let the C compiler driver to take care of .s files. This is done in
|
||||
# order to be excused from maintaining a separate set of architecture
|
||||
# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
|
||||
# gcc, then the driver will automatically translate it to -xarch=v8plus
|
||||
# and pass it down to assembler.
|
||||
AS=$(CC) -c
|
||||
ASFLAG=$(CFLAG)
|
||||
|
||||
# Set BN_ASM to bn_asm.o if you want to use the C version
|
||||
BN_ASM= bn_asm.o
|
||||
#BN_ASM= bn_asm.o
|
||||
@@ -159,6 +167,7 @@ RMD160_ASM_OBJ= asm/rm86-out.o
|
||||
|
||||
# KRB5 stuff
|
||||
KRB5_INCLUDES=
|
||||
LIBKRB5=
|
||||
|
||||
# When we're prepared to use shared libraries in the programs we link here
|
||||
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||
@@ -185,6 +194,7 @@ MAKE= make -f Makefile.ssl
|
||||
MANDIR=$(OPENSSLDIR)/man
|
||||
MAN1=1
|
||||
MAN3=3
|
||||
MANSUFFIX=
|
||||
SHELL=/bin/sh
|
||||
|
||||
TOP= .
|
||||
@@ -216,7 +226,7 @@ sub_all:
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making all in $$i..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' AS='${AS}' ASFLAG='${ASFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all ) || exit 1; \
|
||||
else \
|
||||
$(MAKE) $$i; \
|
||||
fi; \
|
||||
@@ -269,13 +279,16 @@ do_bsd-gcc-shared: do_gnu-shared
|
||||
do_linux-shared: do_gnu-shared
|
||||
do_gnu-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
|
||||
@@ -283,22 +296,28 @@ DETECT_GNU_LD=(${CC} -Wl,-V /dev/null 2>&1 | grep '^GNU ld' )>/dev/null
|
||||
# For Darwin AKA Mac OS/X (dyld)
|
||||
do_darwin-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
( set -x ; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} --verbose -dynamiclib -o lib$$i${SHLIB_EXT} \
|
||||
lib$$i.a $$libs -all_load -current_version ${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-compatibility_version ${SHLIB_MAJOR}.`echo ${SHLIB_MINOR} | cut -d. -f1` \
|
||||
-install_name ${INSTALLTOP}/lib/lib$$i${SHLIB_EXT} ) || exit 1; \
|
||||
libs="$$libs -l`basename $$i${SHLIB_EXT} .dylib`"; \
|
||||
libs="-l`basename $$i${SHLIB_EXT} .dylib` $$libs"; \
|
||||
echo "" ; \
|
||||
done
|
||||
|
||||
do_cygwin-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} -shared -o cyg$$i-$(SHLIB_VERSION_NUMBER).dll \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--out-implib,lib$$i.dll.a \
|
||||
-Wl,--no-whole-archive $$libs ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
# This assumes that GNU utilities are *not* used
|
||||
@@ -307,11 +326,14 @@ do_alpha-osf1-shared:
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
@@ -323,11 +345,14 @@ do_tru64-shared:
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -msym -o lib$$i.so \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
@@ -339,12 +364,15 @@ do_tru64-shared-rpath:
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -msym -o lib$$i.so \
|
||||
-rpath ${INSTALLTOP}/lib \
|
||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||
-all lib$$i.a -none $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
@@ -355,6 +383,9 @@ do_solaris-shared:
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
MINUSZ='-z '; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && MINUSZ='-Wl,-z,'; \
|
||||
@@ -363,7 +394,7 @@ do_solaris-shared:
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${MINUSZ}allextract lib$$i.a $${MINUSZ}defaultextract \
|
||||
$$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
@@ -373,16 +404,20 @@ do_svr3-shared:
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
find . -name "*.o" -print > allobjs ; \
|
||||
OBJS= ; export OBJS ; \
|
||||
for obj in `ar t lib$$i.a` ; do \
|
||||
OBJS="$${OBJS} `grep $$obj allobjs`" ; \
|
||||
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||
done ; \
|
||||
set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
@@ -392,17 +427,23 @@ do_svr5-shared:
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( PATH=/usr/ccs/bin:$$PATH ; export PATH; \
|
||||
SHARE_FLAG='-G'; \
|
||||
(${CC} -v 2>&1 | grep gcc) > /dev/null && SHARE_FLAG='-shared'; \
|
||||
find . -name "*.o" -print > allobjs ; \
|
||||
OBJS= ; export OBJS ; \
|
||||
for obj in `ar t lib$$i.a` ; do \
|
||||
OBJS="$${OBJS} `grep $$obj allobjs`" ; \
|
||||
OBJS="$${OBJS} `grep /$$obj allobjs`" ; \
|
||||
done ; \
|
||||
set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
set -x; LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH \
|
||||
${CC} ${SHARED_LDFLAGS} \
|
||||
$${SHARE_FLAG} -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-h lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
$${OBJS} $$libs ${EX_LIBS} ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
@@ -412,11 +453,14 @@ do_irix-shared:
|
||||
$(MAKE) do_gnu-shared; \
|
||||
else \
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-soname,lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-all lib$$i.a $$libs ${EX_LIBS} -lc) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
@@ -433,6 +477,9 @@ do_irix-shared:
|
||||
#
|
||||
do_hpux-shared:
|
||||
for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
+vnocompatwarnings \
|
||||
-b -z +s \
|
||||
@@ -453,6 +500,9 @@ do_hpux-shared:
|
||||
#
|
||||
do_hpux64-shared:
|
||||
for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; /usr/ccs/bin/ld ${SHARED_LDFLAGS} \
|
||||
-b -z \
|
||||
-o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
@@ -495,17 +545,24 @@ SHAREDFLAGS=${SHARED_LDFLAGS} -G -bE:lib$$i.exp -bM:SRE
|
||||
SHAREDCMD=$(CC)
|
||||
do_aix-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
( set -x; \
|
||||
ld -r -o $$i.o $(ALLSYMSFLAG) lib$$i.a && \
|
||||
ld -r -o lib$$i.o $(ALLSYMSFLAG) lib$$i.a && \
|
||||
( nm -Pg lib$$i.o | grep ' [BD] ' | cut -f1 -d' ' > lib$$i.exp; \
|
||||
$(SHAREDCMD) $(SHAREDFLAG) -o lib$$i.so lib$$i.o \
|
||||
$(SHAREDCMD) $(SHAREDFLAGS) \
|
||||
-o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib$$i.o \
|
||||
$$libs ${EX_LIBS} ) ) \
|
||||
|| exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
do_reliantunix-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
tmpdir=/tmp/openssl.$$$$ ; rm -rf $$tmpdir ; \
|
||||
( set -x; \
|
||||
( Opwd=`pwd` ; mkdir $$tmpdir || exit 1; \
|
||||
@@ -515,7 +572,7 @@ do_reliantunix-shared:
|
||||
cp $$tmpdir/lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} . ; \
|
||||
) || exit 1; \
|
||||
rm -rf $$tmpdir ; \
|
||||
libs="$$libs -l$$i"; \
|
||||
libs="-l$$i $$libs"; \
|
||||
done
|
||||
|
||||
openssl.pc: Makefile.ssl
|
||||
@@ -528,7 +585,7 @@ openssl.pc: Makefile.ssl
|
||||
echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
|
||||
echo 'Version: '$(VERSION); \
|
||||
echo 'Requires: '; \
|
||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
|
||||
echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
|
||||
echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
|
||||
|
||||
Makefile.ssl: Makefile.org
|
||||
@@ -537,10 +594,10 @@ Makefile.ssl: Makefile.org
|
||||
@false
|
||||
|
||||
libclean:
|
||||
rm -f *.a */lib */*/lib
|
||||
rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
|
||||
|
||||
clean:
|
||||
rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
|
||||
clean: libclean
|
||||
rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
|
||||
@for i in $(DIRS) ;\
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
@@ -550,7 +607,7 @@ clean:
|
||||
fi; \
|
||||
done;
|
||||
rm -f openssl.pc
|
||||
rm -f *.a *.o speed.* *.map *.so .pure core
|
||||
rm -f speed.* .pure
|
||||
rm -f $(TARFILE)
|
||||
@for i in $(ONEDIRS) ;\
|
||||
do \
|
||||
@@ -600,9 +657,11 @@ rehash: rehash.time
|
||||
rehash.time: certs
|
||||
@(OPENSSL="`pwd`/apps/openssl"; OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
|
||||
if [ "$(PLATFORM)" = "DJGPP" ]; then PATH="`pwd`\;$$PATH"; \
|
||||
elif [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
touch rehash.time
|
||||
@@ -612,11 +671,13 @@ test: tests
|
||||
tests: rehash
|
||||
@(cd test && echo "testing..." && \
|
||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' TESTS='${TESTS}' OPENSSL_DEBUG_MEMORY=on tests );
|
||||
@LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; LIBPATH="`pwd`"; \
|
||||
if [ "$(PLATFORM)" = "DJGPP" ]; then PATH="`pwd`\;$$PATH"; \
|
||||
elif [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
apps/openssl version -a
|
||||
@LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
apps/openssl version -a
|
||||
|
||||
report:
|
||||
@$(PERL) util/selftest.pl
|
||||
@@ -749,7 +810,7 @@ install: all install_docs
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)/cyg\1-$(SHLIB_VERSION_NUMBER)/'`; \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)\.dll/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
@@ -763,8 +824,15 @@ install: all install_docs
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
set $(MAKE); \
|
||||
$$1 -f $$here/Makefile link-shared ); \
|
||||
if [ "$(INSTALLTOP)" != "/usr" ]; then \
|
||||
echo 'OpenSSL shared libraries have been installed in:'; \
|
||||
echo ' $(INSTALLTOP)'; \
|
||||
echo ''; \
|
||||
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
||||
fi; \
|
||||
fi
|
||||
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
|
||||
install_docs:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
@@ -781,33 +849,33 @@ install_docs:
|
||||
for i in doc/apps/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
||||
echo "installing man$$sec/$$fn.$$sec"; \
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$$sec $$n.$$sec; \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
done); \
|
||||
done; \
|
||||
for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
||||
echo "installing man$$sec/$$fn.$$sec"; \
|
||||
echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$$sec $$n.$$sec; \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
done); \
|
||||
done
|
||||
|
||||
|
45
NEWS
45
NEWS
@@ -5,6 +5,35 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c:
|
||||
|
||||
o Security: fix various ASN1 parsing bugs.
|
||||
o New -ignore_err option to OCSP utility.
|
||||
o Various interop and bug fixes in S/MIME code.
|
||||
o SSL/TLS protocol fix for unrequested client certificates.
|
||||
|
||||
Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b:
|
||||
|
||||
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||
Bleichbacher's attack
|
||||
o Security: make RSA blinding default.
|
||||
o Configuration: Irix fixes, AIX fixes, better mingw support.
|
||||
o Support for new platforms: linux-ia64-ecc.
|
||||
o Build: shared library support fixes.
|
||||
o ASN.1: treat domainComponent correctly.
|
||||
o Documentation: fixes and additions.
|
||||
|
||||
Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a:
|
||||
|
||||
o Security: Important security related bugfixes.
|
||||
o Enhanced compatibility with MIT Kerberos.
|
||||
o Can be built without the ENGINE framework.
|
||||
o IA32 assembler enhancements.
|
||||
o Support for new platforms: FreeBSD/IA64 and FreeBSD/Sparc64.
|
||||
o Configuration: the no-err option now works properly.
|
||||
o SSL/TLS: now handles manual certificate chain building.
|
||||
o SSL/TLS: certain session ID malfunctions corrected.
|
||||
|
||||
Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7:
|
||||
|
||||
o New library section OCSP.
|
||||
@@ -51,6 +80,22 @@
|
||||
o SSL/TLS: add callback to retrieve SSL/TLS messages.
|
||||
o SSL/TLS: support AES cipher suites (RFC3268).
|
||||
|
||||
Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k:
|
||||
|
||||
o Security: fix various ASN1 parsing bugs.
|
||||
o SSL/TLS protocol fix for unrequested client certificates.
|
||||
|
||||
Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j:
|
||||
|
||||
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||
Bleichbacher's attack
|
||||
o Security: make RSA blinding default.
|
||||
o Build: shared library support fixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i:
|
||||
|
||||
o Important security related bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
|
||||
|
||||
o New configuration targets for Tandem OSS and A/UX.
|
||||
|
59
PROBLEMS
59
PROBLEMS
@@ -70,3 +70,62 @@ if compiled with WorkShop 6 compiler and -xarch=v9. The cause for
|
||||
this seems to be the fact that compiler emits multiplication to
|
||||
perform shift operations:-( To work the problem around configure
|
||||
with './Configure solaris64-sparcv9-cc -DMD32_REG_T=int'.
|
||||
|
||||
* Problems with hp-parisc2-cc target when used with "no-asm" flag
|
||||
|
||||
When using the hp-parisc2-cc target, wrong bignum code is generated.
|
||||
This is due to the SIXTY_FOUR_BIT build being compiled with the +O3
|
||||
aggressive optimization.
|
||||
The problem manifests itself by the BN_kronecker test hanging in an
|
||||
endless loop. Reason: the BN_kronecker test calls BN_generate_prime()
|
||||
which itself hangs. The reason could be tracked down to the bn_mul_comba8()
|
||||
function in bn_asm.c. At some occasions the higher 32bit value of r[7]
|
||||
is off by 1 (meaning: calculated=shouldbe+1). Further analysis failed,
|
||||
as no debugger support possible at +O3 and additional fprintf()'s
|
||||
introduced fixed the bug, therefore it is most likely a bug in the
|
||||
optimizer.
|
||||
The bug was found in the BN_kronecker test but may also lead to
|
||||
failures in other parts of the code.
|
||||
(See Ticket #426.)
|
||||
|
||||
Workaround: modify the target to +O2 when building with no-asm.
|
||||
|
||||
* Poor support for AIX shared builds.
|
||||
|
||||
do_aix-shared rule is not flexible enough to parameterize through a
|
||||
config-line. './Configure aix43-cc shared' is working, but not
|
||||
'./Configure aix64-gcc shared'. In latter case make fails to create shared
|
||||
libraries. It's possible to build 64-bit shared libraries by running
|
||||
'env OBJECT_MODE=64 make', but we need more elegant solution. Preferably one
|
||||
supporting even gcc shared builds. See RT#463 for background information.
|
||||
|
||||
* Problems building shared libraries on SCO OpenServer Release 5.0.6
|
||||
with gcc 2.95.3
|
||||
|
||||
The symptoms appear when running the test suite, more specifically
|
||||
test/ectest, with the following result:
|
||||
|
||||
OSSL_LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH="$OSSL_LIBPATH:$LD_LIBRARY_PATH"; DYLD_LIBRARY_PATH="$OSSL_LIBPATH:$DYLD_LIBRARY_PATH"; SHLIB_PATH="$OSSL_LIBPATH:$SHLIB_PATH"; LIBPATH="$OSSL_LIBPATH:$LIBPATH"; if [ "debug-sco5-gcc" = "Cygwin" ]; then PATH="${LIBPATH}:$PATH"; fi; export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; ./ectest
|
||||
ectest.c:186: ABORT
|
||||
|
||||
The cause of the problem seems to be that isxdigit(), called from
|
||||
BN_hex2bn(), returns 0 on a perfectly legitimate hex digit. Further
|
||||
investigation shows that any of the isxxx() macros return 0 on any
|
||||
input. A direct look in the information array that the isxxx() use,
|
||||
called __ctype, shows that it contains all zeroes...
|
||||
|
||||
Taking a look at the newly created libcrypto.so with nm, one can see
|
||||
that the variable __ctype is defined in libcrypto's .bss (which
|
||||
explains why it is filled with zeroes):
|
||||
|
||||
$ nm -Pg libcrypto.so | grep __ctype
|
||||
__ctype B 0011659c
|
||||
__ctype2 U
|
||||
|
||||
Curiously, __ctype2 is undefined, in spite of being declared in
|
||||
/usr/include/ctype.h in exactly the same way as __ctype.
|
||||
|
||||
Any information helping to solve this issue would be deeply
|
||||
appreciated.
|
||||
|
||||
NOTE: building non-shared doesn't come with this problem.
|
||||
|
4
README
4
README
@@ -1,7 +1,7 @@
|
||||
|
||||
OpenSSL 0.9.7 31 Dec 2002
|
||||
OpenSSL 0.9.7c 30 Sep 2003
|
||||
|
||||
Copyright (c) 1998-2002 The OpenSSL Project
|
||||
Copyright (c) 1998-2003 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
All rights reserved.
|
||||
|
||||
|
20
STATUS
20
STATUS
@@ -1,11 +1,17 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2002/12/30 23:54:11 $
|
||||
______________ $Date: 2003/09/30 12:08:19 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.8: Under development...
|
||||
o OpenSSL 0.9.7c: Released on September 30th, 2003
|
||||
o OpenSSL 0.9.7b: Released on April 10th, 2003
|
||||
o OpenSSL 0.9.7a: Released on February 19th, 2003
|
||||
o OpenSSL 0.9.7: Released on December 31st, 2002
|
||||
o OpenSSL 0.9.6k: Released on September 30th, 2003
|
||||
o OpenSSL 0.9.6j: Released on April 10th, 2003
|
||||
o OpenSSL 0.9.6i: Released on February 19th, 2003
|
||||
o OpenSSL 0.9.6h: Released on December 5th, 2002
|
||||
o OpenSSL 0.9.6g: Released on August 9th, 2002
|
||||
o OpenSSL 0.9.6f: Released on August 8th, 2002
|
||||
@@ -27,17 +33,7 @@
|
||||
|
||||
RELEASE SHOWSTOPPERS
|
||||
|
||||
o [2002-11-21]
|
||||
PR 343 mentions that scrubbing memory with 'memset(ptr, 0, n)' may
|
||||
be optimized away in modern compilers. This is definitely not good
|
||||
and needs to be fixed immediately. The formula to use is presented
|
||||
in:
|
||||
|
||||
http://online.securityfocus.com/archive/82/297918/2002-10-27/2002-11-02/0
|
||||
|
||||
The problem report that mentions this is:
|
||||
|
||||
https://www.aet.TU-Cottbus.DE/rt2/Ticket/Display.html?id=343
|
||||
o
|
||||
|
||||
AVAILABLE PATCHES
|
||||
|
||||
|
539
TABLE
539
TABLE
@@ -32,7 +32,7 @@ $unistd =
|
||||
$thread_cflag =
|
||||
$sys_id = WIN32
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG DES_PTR RC4_INDEX
|
||||
$bn_ops = BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -225,6 +225,56 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** FreeBSD-ia64
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
|
||||
$bn_obj = asm/ia64-cpp.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= bsd-gcc-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** FreeBSD-sparc64
|
||||
$cc = gcc
|
||||
$cflags = -DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer
|
||||
$unistd =
|
||||
$thread_cflag = -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= bsd-gcc-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** MPE/iX-gcc
|
||||
$cc = gcc
|
||||
$cflags = -D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB
|
||||
@@ -250,31 +300,6 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** Mingw32
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** NetBSD-m68
|
||||
$cc = gcc
|
||||
$cflags = -DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN
|
||||
@@ -683,15 +708,15 @@ $thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr5-shared
|
||||
$shared_cflag = -Kpic
|
||||
@@ -708,15 +733,15 @@ $thread_cflag = -pthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr5-shared
|
||||
$shared_cflag = -fPIC
|
||||
@@ -725,56 +750,6 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** OpenUNIX-8-pentium
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H -Kalloca -Kpentium
|
||||
$unistd =
|
||||
$thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr5-shared
|
||||
$shared_cflag = -Kpic
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** OpenUNIX-8-pentium_pro
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H -Kalloca -Kpentium_pro
|
||||
$unistd =
|
||||
$thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr5-shared
|
||||
$shared_cflag = -Kpic
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** ReliantUNIX
|
||||
$cc = cc
|
||||
$cflags = -KPIC -g -DTERMIOS -DB_ENDIAN
|
||||
@@ -1118,10 +1093,10 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target=
|
||||
$shared_target= aix-shared
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -1168,10 +1143,10 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target=
|
||||
$shared_target= aix-shared
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$shared_ldflag = -q64
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags = -X 64
|
||||
|
||||
@@ -2302,7 +2277,7 @@ $arflags =
|
||||
|
||||
*** hpux-ia64-cc
|
||||
$cc = cc
|
||||
$cflags = -Ae +DD32 +O3 +ESlit -z -DB_ENDIAN
|
||||
$cflags = -Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2352,7 +2327,7 @@ $arflags =
|
||||
|
||||
*** hpux-parisc-cc
|
||||
$cc = cc
|
||||
$cflags = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
|
||||
$cflags = +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2427,7 +2402,7 @@ $arflags =
|
||||
|
||||
*** hpux-parisc1_1-cc
|
||||
$cc = cc
|
||||
$cflags = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$cflags = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2452,7 +2427,7 @@ $arflags =
|
||||
|
||||
*** hpux-parisc2-cc
|
||||
$cc = cc
|
||||
$cflags = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$cflags = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2577,7 +2552,7 @@ $arflags =
|
||||
|
||||
*** hpux64-ia64-cc
|
||||
$cc = cc
|
||||
$cflags = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN
|
||||
$cflags = -Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2652,7 +2627,7 @@ $arflags =
|
||||
|
||||
*** hpux64-parisc2-cc
|
||||
$cc = cc
|
||||
$cflags = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$cflags = +DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2752,7 +2727,7 @@ $arflags =
|
||||
|
||||
*** irix-mips3-cc
|
||||
$cc = cc
|
||||
$cflags = -n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
|
||||
$cflags = -n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
|
||||
$unistd =
|
||||
$thread_cflag = -D_SGI_MP_SOURCE
|
||||
$sys_id =
|
||||
@@ -3050,6 +3025,31 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** linux-ia64-ecc
|
||||
$cc = ecc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O2 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR
|
||||
$bn_obj = asm/ia64.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** linux-k6
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall
|
||||
@@ -3104,10 +3104,10 @@ $arflags =
|
||||
$cc = gcc
|
||||
$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -3117,11 +3117,11 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -3129,10 +3129,10 @@ $arflags =
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -3142,11 +3142,11 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -3425,13 +3425,38 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** mingw
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id = MINGW32
|
||||
$lflags = -mno-cygwin -lwsock32 -lgdi32
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj = asm/bn86-out.o asm/co86-out.o
|
||||
$des_obj = asm/dx86-out.o asm/yx86-out.o
|
||||
$bf_obj = asm/bx86-out.o
|
||||
$md5_obj = asm/mx86-out.o
|
||||
$sha1_obj = asm/sx86-out.o
|
||||
$cast_obj = asm/cx86-out.o
|
||||
$rc4_obj = asm/rx86-out.o
|
||||
$rmd160_obj = asm/rm86-out.o
|
||||
$rc5_obj = asm/r586-out.o
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension = .dll
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** ncr-scde
|
||||
$cc = cc
|
||||
$cflags = -O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$lflags = -lsocket -lnsl -lc89
|
||||
$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3656,47 +3681,22 @@ $cflags = -belf
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lresolv -lnsl
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr3-shared
|
||||
$shared_cflag = -Kpic
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** sco5-cc-pentium
|
||||
$cc = cc
|
||||
$cflags = -Kpentium
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -lsocket
|
||||
$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -3706,22 +3706,22 @@ $cflags = -O3 -fomit-frame-pointer
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lresolv -lnsl
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr3-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
@@ -3958,15 +3958,15 @@ $thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj = asm/bn86-sol.o asm/co86-sol.o
|
||||
$des_obj = asm/dx86-sol.o asm/yx86-sol.o
|
||||
$bf_obj = asm/bx86-sol.o
|
||||
$md5_obj = asm/mx86-sol.o
|
||||
$sha1_obj = asm/sx86-sol.o
|
||||
$cast_obj = asm/cx86-sol.o
|
||||
$rc4_obj = asm/rx86-sol.o
|
||||
$rmd160_obj = asm/rm86-sol.o
|
||||
$rc5_obj = asm/r586-sol.o
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -fPIC
|
||||
@@ -4175,31 +4175,6 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** unixware-2.0-pentium
|
||||
$cc = cc
|
||||
$cflags = -DFILIO_H -DNO_STRINGS_H -Kpentium
|
||||
$unistd =
|
||||
$thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -lresolv -lx
|
||||
$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** unixware-2.1
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H
|
||||
@@ -4225,56 +4200,6 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** unixware-2.1-p6
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H -Kp6
|
||||
$unistd =
|
||||
$thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -lresolv -lx
|
||||
$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** unixware-2.1-pentium
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H -Kpentium
|
||||
$unistd =
|
||||
$thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -lresolv -lx
|
||||
$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** unixware-7
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H -Kalloca
|
||||
@@ -4283,15 +4208,15 @@ $thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr5-shared
|
||||
$shared_cflag = -Kpic
|
||||
@@ -4308,15 +4233,15 @@ $thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= gnu-shared
|
||||
$shared_cflag = -fPIC
|
||||
@@ -4325,14 +4250,14 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** unixware-7-pentium
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H -Kalloca -Kpentium
|
||||
*** vxworks-mipsle
|
||||
$cc = ccmips
|
||||
$cflags = -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I$(WIND_BASE)/target/h
|
||||
$unistd =
|
||||
$thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$thread_cflag =
|
||||
$sys_id = VXWORKS
|
||||
$lflags = -r
|
||||
$bn_ops =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -4342,37 +4267,12 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr5-shared
|
||||
$shared_cflag = -Kpic
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** unixware-7-pentium_pro
|
||||
$cc = cc
|
||||
$cflags = -O -DFILIO_H -Kalloca -Kpentium_pro
|
||||
$unistd =
|
||||
$thread_cflag = -Kthread
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl
|
||||
$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr5-shared
|
||||
$shared_cflag = -Kpic
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$shared_extension =
|
||||
$ranlib = ranlibmips
|
||||
$arflags =
|
||||
|
||||
*** vxworks-ppc405
|
||||
@@ -4449,3 +4349,28 @@ $shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** vxworks-ppc860
|
||||
$cc = ccppc
|
||||
$cflags = -nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I$(WIND_BASE)/target/h
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id = VXWORKS
|
||||
$lflags = -r
|
||||
$bn_ops =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
@@ -18,6 +18,7 @@ PERL= perl
|
||||
RM= rm -f
|
||||
# KRB5 stuff
|
||||
KRB5_INCLUDES=
|
||||
LIBKRB5=
|
||||
|
||||
PEX_LIBS=
|
||||
EX_LIBS=
|
||||
@@ -86,6 +87,7 @@ all: exe
|
||||
exe: $(PROGRAM)
|
||||
|
||||
req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
|
||||
LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
|
||||
$(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
|
||||
|
||||
sreq.o: req.c
|
||||
@@ -146,12 +148,15 @@ $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
if [ "$(SHLIB_TARGET)" = "hpux-shared" -o "$(SHLIB_TARGET)" = "darwin-shared" ] ; then \
|
||||
$(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
|
||||
else \
|
||||
LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
|
||||
$(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
|
||||
fi
|
||||
-(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \
|
||||
LIBPATH="`pwd`"; LD_LIBRARY_PATH="`pwd`"; DYLD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; \
|
||||
if [ "$(PLATFORM)" = "DJGPP" ]; then PATH="`pwd`\;$$PATH"; \
|
||||
elif [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
LD_LIBRARY_PATH="`pwd`:$$LD_LIBRARY_PATH"; \
|
||||
DYLD_LIBRARY_PATH="`pwd`:$$DYLD_LIBRARY_PATH"; \
|
||||
SHLIB_PATH="`pwd`:$$SHLIB_PATH"; \
|
||||
LIBPATH="`pwd`:$$LIBPATH"; \
|
||||
if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="`pwd`:$$PATH"; fi; \
|
||||
export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
|
||||
|
12
apps/apps.c
12
apps/apps.c
@@ -122,7 +122,9 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
#include <openssl/ui.h>
|
||||
#include <openssl/safestack.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#define strcasecmp _stricmp
|
||||
@@ -138,10 +140,6 @@
|
||||
#include "apps.h"
|
||||
#undef NON_MAIN
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
# include "bss_file.c"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
unsigned long flag;
|
||||
@@ -859,6 +857,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
|
||||
BIO_printf(err,"no keyfile specified\n");
|
||||
goto end;
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (format == FORMAT_ENGINE)
|
||||
{
|
||||
if (!e)
|
||||
@@ -868,6 +867,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
|
||||
ui_method, &cb_data);
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
key=BIO_new(BIO_s_file());
|
||||
if (key == NULL)
|
||||
{
|
||||
@@ -935,6 +935,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
|
||||
BIO_printf(err,"no keyfile specified\n");
|
||||
goto end;
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (format == FORMAT_ENGINE)
|
||||
{
|
||||
if (!e)
|
||||
@@ -944,6 +945,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
|
||||
ui_method, &cb_data);
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
key=BIO_new(BIO_s_file());
|
||||
if (key == NULL)
|
||||
{
|
||||
@@ -1329,6 +1331,7 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
/* Try to load an engine in a shareable library */
|
||||
static ENGINE *try_load_engine(BIO *err, const char *engine, int debug)
|
||||
{
|
||||
@@ -1385,6 +1388,7 @@ ENGINE *setup_engine(BIO *err, const char *engine, int debug)
|
||||
}
|
||||
return e;
|
||||
}
|
||||
#endif
|
||||
|
||||
int load_config(BIO *err, CONF *cnf)
|
||||
{
|
||||
|
69
apps/apps.h
69
apps/apps.h
@@ -121,7 +121,9 @@
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/txt_db.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
#include <openssl/ossl_typ.h>
|
||||
|
||||
int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
|
||||
@@ -179,30 +181,57 @@ extern BIO *bio_err;
|
||||
do_pipe_sig()
|
||||
# define apps_shutdown()
|
||||
#else
|
||||
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
|
||||
defined(OPENSSL_SYS_WIN32)
|
||||
# ifdef _O_BINARY
|
||||
# define apps_startup() \
|
||||
do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
||||
# ifndef OPENSSL_NO_ENGINE
|
||||
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
|
||||
defined(OPENSSL_SYS_WIN32)
|
||||
# ifdef _O_BINARY
|
||||
# define apps_startup() \
|
||||
do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
||||
# else
|
||||
# define apps_startup() \
|
||||
do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
||||
# endif
|
||||
# else
|
||||
# define apps_startup() \
|
||||
do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
|
||||
do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
|
||||
ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
|
||||
setup_ui_method(); } while(0)
|
||||
# endif
|
||||
# define apps_shutdown() \
|
||||
do { CONF_modules_unload(1); destroy_ui_method(); \
|
||||
EVP_cleanup(); ENGINE_cleanup(); \
|
||||
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
|
||||
ERR_free_strings(); } while(0)
|
||||
# else
|
||||
# define apps_startup() \
|
||||
do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
|
||||
ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
|
||||
setup_ui_method(); } while(0)
|
||||
# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
|
||||
defined(OPENSSL_SYS_WIN32)
|
||||
# ifdef _O_BINARY
|
||||
# define apps_startup() \
|
||||
do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||
setup_ui_method(); } while(0)
|
||||
# else
|
||||
# define apps_startup() \
|
||||
do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
|
||||
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
|
||||
setup_ui_method(); } while(0)
|
||||
# endif
|
||||
# else
|
||||
# define apps_startup() \
|
||||
do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
|
||||
ERR_load_crypto_strings(); \
|
||||
setup_ui_method(); } while(0)
|
||||
# endif
|
||||
# define apps_shutdown() \
|
||||
do { CONF_modules_unload(1); destroy_ui_method(); \
|
||||
EVP_cleanup(); \
|
||||
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
|
||||
ERR_free_strings(); } while(0)
|
||||
# endif
|
||||
# define apps_shutdown() \
|
||||
do { CONF_modules_unload(1); destroy_ui_method(); \
|
||||
EVP_cleanup(); ENGINE_cleanup(); \
|
||||
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
|
||||
ERR_free_strings(); } while(0)
|
||||
#endif
|
||||
|
||||
typedef struct args_st
|
||||
@@ -248,7 +277,9 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
|
||||
STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
|
||||
const char *pass, ENGINE *e, const char *cert_descrip);
|
||||
X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *setup_engine(BIO *err, const char *engine, int debug);
|
||||
#endif
|
||||
|
||||
int load_config(BIO *err, CONF *cnf);
|
||||
char *make_config_name(void);
|
||||
|
18
apps/ca.c
18
apps/ca.c
@@ -196,7 +196,9 @@ static char *ca_usage[]={
|
||||
" -extensions .. - Extension section (override value in config file)\n",
|
||||
" -extfile file - Configuration file with X509v3 extentions to add\n",
|
||||
" -crlexts .. - CRL extension section (override value in config file)\n",
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
" -engine e - use engine e, possibly a hardware device.\n",
|
||||
#endif
|
||||
" -status serial - Shows certificate status given the serial number\n",
|
||||
" -updatedb - Updates db for expired certificates\n",
|
||||
NULL
|
||||
@@ -333,7 +335,9 @@ int MAIN(int argc, char **argv)
|
||||
#define BSIZE 256
|
||||
MS_STATIC char buf[3][BSIZE];
|
||||
char *randfile=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
char *tofree=NULL;
|
||||
|
||||
#ifdef EFENCE
|
||||
@@ -537,11 +541,13 @@ EF_ALIGNMENT=0;
|
||||
rev_arg = *(++argv);
|
||||
rev_type = REV_CA_COMPROMISE;
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
bad:
|
||||
@@ -562,7 +568,9 @@ bad:
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
/*****************************************************************/
|
||||
tofree=NULL;
|
||||
@@ -597,7 +605,10 @@ bad:
|
||||
goto err;
|
||||
}
|
||||
if(tofree)
|
||||
{
|
||||
OPENSSL_free(tofree);
|
||||
tofree = NULL;
|
||||
}
|
||||
|
||||
if (!load_config(bio_err, conf))
|
||||
goto err;
|
||||
@@ -1633,11 +1644,12 @@ err:
|
||||
BIO_free_all(out);
|
||||
BIO_free_all(in);
|
||||
|
||||
sk_X509_pop_free(cert_sk,X509_free);
|
||||
if (cert_sk)
|
||||
sk_X509_pop_free(cert_sk,X509_free);
|
||||
|
||||
if (ret) ERR_print_errors(bio_err);
|
||||
app_RAND_write_file(randfile, bio_err);
|
||||
if (free_key)
|
||||
if (free_key && key)
|
||||
OPENSSL_free(key);
|
||||
BN_free(serial);
|
||||
TXT_DB_free(db);
|
||||
@@ -2181,7 +2193,7 @@ again2:
|
||||
|
||||
#ifdef X509_V3
|
||||
/* Make it an X509 v3 certificate. */
|
||||
if (!X509_set_version(x509,2)) goto err;
|
||||
if (!X509_set_version(ret,2)) goto err;
|
||||
#endif
|
||||
|
||||
if (BN_to_ASN1_INTEGER(serial,ci->serialNumber) == NULL)
|
||||
|
@@ -81,6 +81,7 @@ static char *crl_usage[]={
|
||||
" -in arg - input file - default stdin\n",
|
||||
" -out arg - output file - default stdout\n",
|
||||
" -hash - print hash value\n",
|
||||
" -fingerprint - print the crl fingerprint\n",
|
||||
" -issuer - print issuer DN\n",
|
||||
" -lastupdate - lastUpdate field\n",
|
||||
" -nextupdate - nextUpdate field\n",
|
||||
|
@@ -100,7 +100,9 @@ int MAIN(int argc, char **argv)
|
||||
EVP_PKEY *sigkey = NULL;
|
||||
unsigned char *sigbuf = NULL;
|
||||
int siglen = 0;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -166,11 +168,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) break;
|
||||
keyform=str2fmt(*(++argv));
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) break;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-hex") == 0)
|
||||
out_bin = 0;
|
||||
else if (strcmp(*argv,"-binary") == 0)
|
||||
@@ -208,7 +212,9 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err,"-keyform arg key file format (PEM or ENGINE)\n");
|
||||
BIO_printf(bio_err,"-signature file signature to verify\n");
|
||||
BIO_printf(bio_err,"-binary output in binary form\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
|
||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
|
||||
LN_md5,LN_md5);
|
||||
@@ -228,7 +234,9 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
in=BIO_new(BIO_s_file());
|
||||
bmd=BIO_new(BIO_f_md());
|
||||
|
15
apps/dh.c
15
apps/dh.c
@@ -87,12 +87,17 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
DH *dh=NULL;
|
||||
int i,badops=0,text=0;
|
||||
BIO *in=NULL,*out=NULL;
|
||||
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
||||
char *infile,*outfile,*prog,*engine;
|
||||
char *infile,*outfile,*prog;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -103,7 +108,9 @@ int MAIN(int argc, char **argv)
|
||||
if (!load_config(bio_err, NULL))
|
||||
goto end;
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
engine=NULL;
|
||||
#endif
|
||||
infile=NULL;
|
||||
outfile=NULL;
|
||||
informat=FORMAT_PEM;
|
||||
@@ -134,11 +141,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
outfile= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-check") == 0)
|
||||
check=1;
|
||||
else if (strcmp(*argv,"-text") == 0)
|
||||
@@ -170,13 +179,17 @@ bad:
|
||||
BIO_printf(bio_err," -text print a text form of the DH parameters\n");
|
||||
BIO_printf(bio_err," -C Output C code\n");
|
||||
BIO_printf(bio_err," -noout no output\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
goto end;
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
in=BIO_new(BIO_s_file());
|
||||
out=BIO_new(BIO_s_file());
|
||||
|
@@ -148,7 +148,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
DH *dh=NULL;
|
||||
int i,badops=0,text=0;
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
@@ -157,7 +159,10 @@ int MAIN(int argc, char **argv)
|
||||
BIO *in=NULL,*out=NULL;
|
||||
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
||||
char *infile,*outfile,*prog;
|
||||
char *inrand=NULL,*engine=NULL;
|
||||
char *inrand=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
int num = 0, g = 0;
|
||||
|
||||
apps_startup();
|
||||
@@ -199,11 +204,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
outfile= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-check") == 0)
|
||||
check=1;
|
||||
else if (strcmp(*argv,"-text") == 0)
|
||||
@@ -249,7 +256,9 @@ bad:
|
||||
BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n");
|
||||
BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n");
|
||||
BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||
BIO_printf(bio_err," the random number generator\n");
|
||||
@@ -259,7 +268,9 @@ bad:
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (g && !num)
|
||||
num = DEFBITS;
|
||||
|
15
apps/dsa.c
15
apps/dsa.c
@@ -90,7 +90,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
int ret=1;
|
||||
DSA *dsa=NULL;
|
||||
int i,badops=0;
|
||||
@@ -98,7 +100,10 @@ int MAIN(int argc, char **argv)
|
||||
BIO *in=NULL,*out=NULL;
|
||||
int informat,outformat,text=0,noout=0;
|
||||
int pubin = 0, pubout = 0;
|
||||
char *infile,*outfile,*prog,*engine;
|
||||
char *infile,*outfile,*prog;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine;
|
||||
#endif
|
||||
char *passargin = NULL, *passargout = NULL;
|
||||
char *passin = NULL, *passout = NULL;
|
||||
int modulus=0;
|
||||
@@ -112,7 +117,9 @@ int MAIN(int argc, char **argv)
|
||||
if (!load_config(bio_err, NULL))
|
||||
goto end;
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
engine=NULL;
|
||||
#endif
|
||||
infile=NULL;
|
||||
outfile=NULL;
|
||||
informat=FORMAT_PEM;
|
||||
@@ -153,11 +160,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
passargout= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-noout") == 0)
|
||||
noout=1;
|
||||
else if (strcmp(*argv,"-text") == 0)
|
||||
@@ -189,7 +198,9 @@ bad:
|
||||
BIO_printf(bio_err," -passin arg input file pass phrase source\n");
|
||||
BIO_printf(bio_err," -out arg output file\n");
|
||||
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -des encrypt PEM output with cbc des\n");
|
||||
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
||||
#ifndef OPENSSL_NO_IDEA
|
||||
@@ -207,7 +218,9 @@ bad:
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||
BIO_printf(bio_err, "Error getting passwords\n");
|
||||
|
@@ -90,7 +90,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
DSA *dsa=NULL;
|
||||
int i,badops=0,text=0;
|
||||
BIO *in=NULL,*out=NULL;
|
||||
@@ -98,7 +100,9 @@ int MAIN(int argc, char **argv)
|
||||
char *infile,*outfile,*prog,*inrand=NULL;
|
||||
int numbits= -1,num,genkey=0;
|
||||
int need_rand=0;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -139,11 +143,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
outfile= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if(strcmp(*argv, "-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine = *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-text") == 0)
|
||||
text=1;
|
||||
else if (strcmp(*argv,"-C") == 0)
|
||||
@@ -191,7 +197,9 @@ bad:
|
||||
BIO_printf(bio_err," -noout no output\n");
|
||||
BIO_printf(bio_err," -genkey generate a DSA key\n");
|
||||
BIO_printf(bio_err," -rand files to use for random number input\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," number number of bits to use for generating private key\n");
|
||||
goto end;
|
||||
}
|
||||
@@ -235,7 +243,9 @@ bad:
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (need_rand)
|
||||
{
|
||||
|
10
apps/enc.c
10
apps/enc.c
@@ -100,7 +100,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
static const char magic[]="Salted__";
|
||||
char mbuf[sizeof magic-1];
|
||||
char *strbuf=NULL;
|
||||
@@ -119,7 +121,9 @@ int MAIN(int argc, char **argv)
|
||||
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
|
||||
#define PROG_NAME_SIZE 39
|
||||
char pname[PROG_NAME_SIZE+1];
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -163,11 +167,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
passarg= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-d") == 0)
|
||||
enc=0;
|
||||
else if (strcmp(*argv,"-p") == 0)
|
||||
@@ -270,7 +276,9 @@ bad:
|
||||
BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
|
||||
BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]");
|
||||
BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e");
|
||||
#endif
|
||||
|
||||
BIO_printf(bio_err,"Cipher Types\n");
|
||||
OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH,
|
||||
@@ -284,7 +292,9 @@ bad:
|
||||
argv++;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (bufsize != NULL)
|
||||
{
|
||||
|
@@ -56,6 +56,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -518,3 +520,10 @@ end:
|
||||
apps_shutdown();
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#else
|
||||
|
||||
# if PEDANTIC
|
||||
static void *dummy=&dummy;
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
10
apps/gendh.c
10
apps/gendh.c
@@ -81,13 +81,17 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
DH *dh=NULL;
|
||||
int ret=1,num=DEFBITS;
|
||||
int g=2;
|
||||
char *outfile=NULL;
|
||||
char *inrand=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
BIO *out=NULL;
|
||||
|
||||
apps_startup();
|
||||
@@ -115,11 +119,13 @@ int MAIN(int argc, char **argv)
|
||||
g=3; */
|
||||
else if (strcmp(*argv,"-5") == 0)
|
||||
g=5;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-rand") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -138,14 +144,18 @@ bad:
|
||||
BIO_printf(bio_err," -2 - use 2 as the generator value\n");
|
||||
/* BIO_printf(bio_err," -3 - use 3 as the generator value\n"); */
|
||||
BIO_printf(bio_err," -5 - use 5 as the generator value\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||
BIO_printf(bio_err," the random number generator\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
out=BIO_new(BIO_s_file());
|
||||
if (out == NULL)
|
||||
|
@@ -77,7 +77,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
DSA *dsa=NULL;
|
||||
int ret=1;
|
||||
char *outfile=NULL;
|
||||
@@ -85,7 +87,9 @@ int MAIN(int argc, char **argv)
|
||||
char *passargout = NULL, *passout = NULL;
|
||||
BIO *out=NULL,*in=NULL;
|
||||
const EVP_CIPHER *enc=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -111,11 +115,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
passargout= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-rand") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -167,7 +173,9 @@ bad:
|
||||
BIO_printf(bio_err," -aes128, -aes192, -aes256\n");
|
||||
BIO_printf(bio_err," encrypt PEM output with cbc aes\n");
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||
BIO_printf(bio_err," the random number generator\n");
|
||||
@@ -176,7 +184,9 @@ bad:
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
|
||||
BIO_printf(bio_err, "Error getting password\n");
|
||||
|
@@ -81,7 +81,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
int ret=1;
|
||||
RSA *rsa=NULL;
|
||||
int i,num=DEFBITS;
|
||||
@@ -90,7 +92,9 @@ int MAIN(int argc, char **argv)
|
||||
unsigned long f4=RSA_F4;
|
||||
char *outfile=NULL;
|
||||
char *passargout = NULL, *passout = NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
char *inrand=NULL;
|
||||
BIO *out=NULL;
|
||||
|
||||
@@ -122,11 +126,13 @@ int MAIN(int argc, char **argv)
|
||||
f4=3;
|
||||
else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
|
||||
f4=RSA_F4;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-rand") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -177,7 +183,9 @@ bad:
|
||||
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
||||
BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n");
|
||||
BIO_printf(bio_err," -3 use 3 for the E value\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err," load the file (or the files in the directory) into\n");
|
||||
BIO_printf(bio_err," the random number generator\n");
|
||||
@@ -191,7 +199,9 @@ bad:
|
||||
goto err;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (outfile == NULL)
|
||||
{
|
||||
|
31
apps/ocsp.c
31
apps/ocsp.c
@@ -55,6 +55,7 @@
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
#ifndef OPENSSL_NO_OCSP
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -135,6 +136,7 @@ int MAIN(int argc, char **argv)
|
||||
int accept_count = -1;
|
||||
int badarg = 0;
|
||||
int i;
|
||||
int ignore_err = 0;
|
||||
STACK *reqnames = NULL;
|
||||
STACK_OF(OCSP_CERTID) *ids = NULL;
|
||||
|
||||
@@ -194,6 +196,8 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
else if (!strcmp(*args, "-ignore_err"))
|
||||
ignore_err = 1;
|
||||
else if (!strcmp(*args, "-noverify"))
|
||||
noverify = 1;
|
||||
else if (!strcmp(*args, "-nonce"))
|
||||
@@ -523,7 +527,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf (bio_err, "-serial n serial number to check\n");
|
||||
BIO_printf (bio_err, "-signer file certificate to sign OCSP request with\n");
|
||||
BIO_printf (bio_err, "-signkey file private key to sign OCSP request with\n");
|
||||
BIO_printf (bio_err, "-sign_certs file additional certificates to include in signed request\n");
|
||||
BIO_printf (bio_err, "-sign_other file additional certificates to include in signed request\n");
|
||||
BIO_printf (bio_err, "-no_certs don't include any certificates in signed request\n");
|
||||
BIO_printf (bio_err, "-req_text print text form of request\n");
|
||||
BIO_printf (bio_err, "-resp_text print text form of response\n");
|
||||
@@ -543,10 +547,10 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf (bio_err, "-validity_period n maximum validity discrepancy in seconds\n");
|
||||
BIO_printf (bio_err, "-status_age n maximum status age in seconds\n");
|
||||
BIO_printf (bio_err, "-noverify don't verify response at all\n");
|
||||
BIO_printf (bio_err, "-verify_certs file additional certificates to search for signer\n");
|
||||
BIO_printf (bio_err, "-verify_other file additional certificates to search for signer\n");
|
||||
BIO_printf (bio_err, "-trust_other don't verify additional certificates\n");
|
||||
BIO_printf (bio_err, "-no_intern don't search certificates contained in response for signer\n");
|
||||
BIO_printf (bio_err, "-no_sig_verify don't check signature on response\n");
|
||||
BIO_printf (bio_err, "-no_signature_verify don't check signature on response\n");
|
||||
BIO_printf (bio_err, "-no_cert_verify don't check signing certificate\n");
|
||||
BIO_printf (bio_err, "-no_chain don't chain verify response\n");
|
||||
BIO_printf (bio_err, "-no_cert_checks don't do additional checks on signing certificate\n");
|
||||
@@ -722,7 +726,12 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
else if (host)
|
||||
{
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
cbio = BIO_new_connect(host);
|
||||
#else
|
||||
BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n");
|
||||
goto end;
|
||||
#endif
|
||||
if (!cbio)
|
||||
{
|
||||
BIO_printf(bio_err, "Error creating connect BIO\n");
|
||||
@@ -732,7 +741,16 @@ int MAIN(int argc, char **argv)
|
||||
if (use_ssl == 1)
|
||||
{
|
||||
BIO *sbio;
|
||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
||||
ctx = SSL_CTX_new(SSLv23_client_method());
|
||||
#elif !defined(OPENSSL_NO_SSL3)
|
||||
ctx = SSL_CTX_new(SSLv3_client_method());
|
||||
#elif !defined(OPENSSL_NO_SSL2)
|
||||
ctx = SSL_CTX_new(SSLv2_client_method());
|
||||
#else
|
||||
BIO_printf(bio_err, "SSL is disabled\n");
|
||||
goto end;
|
||||
#endif
|
||||
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
|
||||
sbio = BIO_new_ssl(ctx, 1);
|
||||
cbio = BIO_push(sbio, cbio);
|
||||
@@ -794,6 +812,8 @@ int MAIN(int argc, char **argv)
|
||||
{
|
||||
BIO_printf(out, "Responder Error: %s (%ld)\n",
|
||||
OCSP_response_status_str(i), i);
|
||||
if (ignore_err)
|
||||
goto redo_accept;
|
||||
ret = 0;
|
||||
goto end;
|
||||
}
|
||||
@@ -1139,7 +1159,11 @@ static BIO *init_responder(char *port)
|
||||
bufbio = BIO_new(BIO_f_buffer());
|
||||
if (!bufbio)
|
||||
goto err;
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
acbio = BIO_new_accept(port);
|
||||
#else
|
||||
BIO_printf(bio_err, "Error setting up accept BIO - sockets not supported.\n");
|
||||
#endif
|
||||
if (!acbio)
|
||||
goto err;
|
||||
BIO_set_accept_bios(acbio, bufbio);
|
||||
@@ -1226,3 +1250,4 @@ static int send_ocsp_response(BIO *cbio, OCSP_RESPONSE *resp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -122,7 +122,9 @@
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/ssl.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
|
||||
#include "progs.h"
|
||||
#include "s_apps.h"
|
||||
@@ -161,7 +163,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (type < 0 || type > CRYPTO_NUM_LOCKS)
|
||||
if (type < 0 || type >= CRYPTO_NUM_LOCKS)
|
||||
{
|
||||
errstr = "type out of bounds";
|
||||
goto err;
|
||||
|
@@ -120,7 +120,9 @@ int MAIN(int argc, char **argv)
|
||||
char *passin = NULL, *passout = NULL;
|
||||
char *inrand = NULL;
|
||||
char *CApath = NULL, *CAfile = NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -252,11 +254,13 @@ int MAIN(int argc, char **argv)
|
||||
args++;
|
||||
CAfile = *args;
|
||||
} else badarg = 1;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
} else if (!strcmp(*args,"-engine")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
engine = *args;
|
||||
} else badarg = 1;
|
||||
#endif
|
||||
} else badarg = 1;
|
||||
|
||||
} else badarg = 1;
|
||||
@@ -304,14 +308,18 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf (bio_err, "-password p set import/export password source\n");
|
||||
BIO_printf (bio_err, "-passin p input file pass phrase source\n");
|
||||
BIO_printf (bio_err, "-passout p output file pass phrase source\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
||||
BIO_printf(bio_err, " the random number generator\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(passarg) {
|
||||
if(export_cert) passargout = passarg;
|
||||
|
10
apps/pkcs7.c
10
apps/pkcs7.c
@@ -82,7 +82,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
PKCS7 *p7=NULL;
|
||||
int i,badops=0;
|
||||
BIO *in=NULL,*out=NULL;
|
||||
@@ -90,7 +92,9 @@ int MAIN(int argc, char **argv)
|
||||
char *infile,*outfile,*prog;
|
||||
int print_certs=0,text=0,noout=0;
|
||||
int ret=1;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -134,11 +138,13 @@ int MAIN(int argc, char **argv)
|
||||
text=1;
|
||||
else if (strcmp(*argv,"-print_certs") == 0)
|
||||
print_certs=1;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||
@@ -161,14 +167,18 @@ bad:
|
||||
BIO_printf(bio_err," -print_certs print any certs or crl in the input\n");
|
||||
BIO_printf(bio_err," -text print full details of certificates\n");
|
||||
BIO_printf(bio_err," -noout don't output encoded data\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
in=BIO_new(BIO_s_file());
|
||||
out=BIO_new(BIO_s_file());
|
||||
|
19
apps/pkcs8.c
19
apps/pkcs8.c
@@ -85,7 +85,9 @@ int MAIN(int argc, char **argv)
|
||||
EVP_PKEY *pkey=NULL;
|
||||
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
|
||||
int badarg = 0;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
||||
|
||||
@@ -145,11 +147,13 @@ int MAIN(int argc, char **argv)
|
||||
if (!args[1]) goto bad;
|
||||
passargout= *(++args);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*args,"-engine") == 0)
|
||||
{
|
||||
if (!args[1]) goto bad;
|
||||
engine= *(++args);
|
||||
}
|
||||
#endif
|
||||
else if (!strcmp (*args, "-in")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
@@ -182,11 +186,15 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n");
|
||||
BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n");
|
||||
BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
return (1);
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||
BIO_printf(bio_err, "Error getting passwords\n");
|
||||
@@ -227,7 +235,7 @@ int MAIN(int argc, char **argv)
|
||||
return (1);
|
||||
}
|
||||
if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, p8_broken))) {
|
||||
BIO_printf(bio_err, "Error converting key\n", outfile);
|
||||
BIO_printf(bio_err, "Error converting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
@@ -251,8 +259,7 @@ int MAIN(int argc, char **argv)
|
||||
if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
|
||||
p8pass, strlen(p8pass),
|
||||
NULL, 0, iter, p8inf))) {
|
||||
BIO_printf(bio_err, "Error encrypting key\n",
|
||||
outfile);
|
||||
BIO_printf(bio_err, "Error encrypting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
@@ -295,7 +302,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!p8) {
|
||||
BIO_printf (bio_err, "Error reading key\n", outfile);
|
||||
BIO_printf (bio_err, "Error reading key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
@@ -309,13 +316,13 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!p8inf) {
|
||||
BIO_printf(bio_err, "Error decrypting key\n", outfile);
|
||||
BIO_printf(bio_err, "Error decrypting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (!(pkey = EVP_PKCS82PKEY(p8inf))) {
|
||||
BIO_printf(bio_err, "Error converting key\n", outfile);
|
||||
BIO_printf(bio_err, "Error converting key\n");
|
||||
ERR_print_errors(bio_err);
|
||||
return (1);
|
||||
}
|
||||
|
@@ -35,7 +35,9 @@ extern int pkcs8_main(int argc,char *argv[]);
|
||||
extern int spkac_main(int argc,char *argv[]);
|
||||
extern int smime_main(int argc,char *argv[]);
|
||||
extern int rand_main(int argc,char *argv[]);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
extern int engine_main(int argc,char *argv[]);
|
||||
#endif
|
||||
extern int ocsp_main(int argc,char *argv[]);
|
||||
|
||||
#define FUNC_TYPE_GENERAL 1
|
||||
@@ -92,7 +94,9 @@ FUNCTION functions[] = {
|
||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
||||
{FUNC_TYPE_GENERAL,"s_client",s_client_main},
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SPEED
|
||||
{FUNC_TYPE_GENERAL,"speed",speed_main},
|
||||
#endif
|
||||
#if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
|
||||
{FUNC_TYPE_GENERAL,"s_time",s_time_main},
|
||||
#endif
|
||||
@@ -111,7 +115,9 @@ FUNCTION functions[] = {
|
||||
{FUNC_TYPE_GENERAL,"spkac",spkac_main},
|
||||
{FUNC_TYPE_GENERAL,"smime",smime_main},
|
||||
{FUNC_TYPE_GENERAL,"rand",rand_main},
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
{FUNC_TYPE_GENERAL,"engine",engine_main},
|
||||
#endif
|
||||
{FUNC_TYPE_GENERAL,"ocsp",ocsp_main},
|
||||
#ifndef OPENSSL_NO_MD2
|
||||
{FUNC_TYPE_MD,"md2",dgst_main},
|
||||
|
10
apps/rand.c
10
apps/rand.c
@@ -76,7 +76,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
int i, r, ret = 1;
|
||||
int badopt;
|
||||
char *outfile = NULL;
|
||||
@@ -84,7 +86,9 @@ int MAIN(int argc, char **argv)
|
||||
int base64 = 0;
|
||||
BIO *out = NULL;
|
||||
int num = -1;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -106,6 +110,7 @@ int MAIN(int argc, char **argv)
|
||||
else
|
||||
badopt = 1;
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(argv[i], "-engine") == 0)
|
||||
{
|
||||
if ((argv[i+1] != NULL) && (engine == NULL))
|
||||
@@ -113,6 +118,7 @@ int MAIN(int argc, char **argv)
|
||||
else
|
||||
badopt = 1;
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(argv[i], "-rand") == 0)
|
||||
{
|
||||
if ((argv[i+1] != NULL) && (inrand == NULL))
|
||||
@@ -150,13 +156,17 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err, "Usage: rand [options] num\n");
|
||||
BIO_printf(bio_err, "where options are\n");
|
||||
BIO_printf(bio_err, "-out file - write to file\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err, "-engine e - use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err, "-base64 - encode output\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
|
||||
if (inrand != NULL)
|
||||
|
16
apps/req.c
16
apps/req.c
@@ -162,7 +162,9 @@ int MAIN(int argc, char **argv)
|
||||
int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
|
||||
int nodes=0,kludge=0,newhdr=0,subject=0,pubkey=0;
|
||||
char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
char *extensions = NULL;
|
||||
char *req_exts = NULL;
|
||||
const EVP_CIPHER *cipher=NULL;
|
||||
@@ -210,11 +212,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
outformat=str2fmt(*(++argv));
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-key") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -428,7 +432,9 @@ bad:
|
||||
BIO_printf(bio_err," -verify verify signature on REQ\n");
|
||||
BIO_printf(bio_err," -modulus RSA modulus\n");
|
||||
BIO_printf(bio_err," -nodes don't encrypt the output key\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -subject output the request's subject\n");
|
||||
BIO_printf(bio_err," -passin private key password source\n");
|
||||
BIO_printf(bio_err," -key file use the private key contained in file\n");
|
||||
@@ -453,7 +459,7 @@ bad:
|
||||
BIO_printf(bio_err," -extensions .. specify certificate extension section (override value in config file)\n");
|
||||
BIO_printf(bio_err," -reqexts .. specify request extension section (override value in config file)\n");
|
||||
BIO_printf(bio_err," -utf8 input characters are UTF8 (default ASCII)\n");
|
||||
BIO_printf(bio_err," -nameopt arg - various certificate name options\n");
|
||||
BIO_printf(bio_err," -nameopt arg - various certificate name options\n");
|
||||
BIO_printf(bio_err," -reqopt arg - various request text options\n\n");
|
||||
goto end;
|
||||
}
|
||||
@@ -617,7 +623,9 @@ bad:
|
||||
if ((in == NULL) || (out == NULL))
|
||||
goto end;
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (keyfile != NULL)
|
||||
{
|
||||
@@ -1237,11 +1245,17 @@ start: for (;;)
|
||||
|
||||
sprintf(buf,"%s_min",v->name);
|
||||
if (!NCONF_get_number(req_conf,dn_sect,buf, &n_min))
|
||||
{
|
||||
ERR_clear_error();
|
||||
n_min = -1;
|
||||
}
|
||||
|
||||
sprintf(buf,"%s_max",v->name);
|
||||
if (!NCONF_get_number(req_conf,dn_sect,buf, &n_max))
|
||||
{
|
||||
ERR_clear_error();
|
||||
n_max = -1;
|
||||
}
|
||||
|
||||
if (!add_DN_object(subj,v->value,def,value,nid,
|
||||
n_min,n_max, chtype))
|
||||
|
@@ -104,7 +104,9 @@ int MAIN(int argc, char **argv)
|
||||
char *infile,*outfile,*prog;
|
||||
char *passargin = NULL, *passargout = NULL;
|
||||
char *passin = NULL, *passout = NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
int modulus=0;
|
||||
|
||||
apps_startup();
|
||||
@@ -156,11 +158,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
passargout= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-sgckey") == 0)
|
||||
sgckey=1;
|
||||
else if (strcmp(*argv,"-pubin") == 0)
|
||||
@@ -212,13 +216,17 @@ bad:
|
||||
BIO_printf(bio_err," -check verify key consistency\n");
|
||||
BIO_printf(bio_err," -pubin expect a public key in input file\n");
|
||||
BIO_printf(bio_err," -pubout output a public key\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
goto end;
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||
BIO_printf(bio_err, "Error getting passwords\n");
|
||||
|
@@ -85,7 +85,9 @@ int MAIN(int argc, char **argv)
|
||||
ENGINE *e = NULL;
|
||||
BIO *in = NULL, *out = NULL;
|
||||
char *infile = NULL, *outfile = NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine = NULL;
|
||||
#endif
|
||||
char *keyfile = NULL;
|
||||
char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY;
|
||||
int keyform = FORMAT_PEM;
|
||||
@@ -125,9 +127,11 @@ int MAIN(int argc, char **argv)
|
||||
} else if (strcmp(*argv,"-keyform") == 0) {
|
||||
if (--argc < 1) badarg = 1;
|
||||
keyform=str2fmt(*(++argv));
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
} else if(!strcmp(*argv, "-engine")) {
|
||||
if (--argc < 1) badarg = 1;
|
||||
engine = *(++argv);
|
||||
#endif
|
||||
} else if(!strcmp(*argv, "-pubin")) {
|
||||
key_type = KEY_PUBKEY;
|
||||
} else if(!strcmp(*argv, "-certin")) {
|
||||
@@ -162,7 +166,9 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
/* FIXME: seed PRNG only if needed */
|
||||
app_RAND_load_file(NULL, bio_err, 0);
|
||||
@@ -305,7 +311,9 @@ static void usage()
|
||||
BIO_printf(bio_err, "-encrypt encrypt with public key\n");
|
||||
BIO_printf(bio_err, "-decrypt decrypt with private key\n");
|
||||
BIO_printf(bio_err, "-hexdump hex dump output\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
@@ -112,6 +112,14 @@
|
||||
#include <sys/types.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_MSDOS
|
||||
#define _kbhit kbhit
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
|
||||
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
|
||||
/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */
|
||||
|
@@ -136,10 +136,6 @@ typedef unsigned int u_int;
|
||||
#include <openssl/rand.h>
|
||||
#include "s_apps.h"
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_WINCE
|
||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
|
||||
#ifdef fileno
|
||||
@@ -221,8 +217,10 @@ static void sc_usage(void)
|
||||
BIO_printf(bio_err," -starttls prot - use the STARTTLS command before starting TLS\n");
|
||||
BIO_printf(bio_err," for those protocols that support it, where\n");
|
||||
BIO_printf(bio_err," 'prot' defines which one to assume. Currently,\n");
|
||||
BIO_printf(bio_err," only \"smtp\" is supported.\n");
|
||||
BIO_printf(bio_err," only \"smtp\" and \"pop3\" are supported.\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
|
||||
}
|
||||
@@ -249,14 +247,16 @@ int MAIN(int argc, char **argv)
|
||||
int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
|
||||
SSL_CTX *ctx=NULL;
|
||||
int ret=1,in_init=1,i,nbio_test=0;
|
||||
int smtp_starttls = 0;
|
||||
int starttls_proto = 0;
|
||||
int prexit = 0, vflags = 0;
|
||||
SSL_METHOD *meth=NULL;
|
||||
BIO *sbio;
|
||||
char *inrand=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine_id=NULL;
|
||||
ENGINE *e=NULL;
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#endif
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
struct timeval tv;
|
||||
#endif
|
||||
|
||||
@@ -411,15 +411,19 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
++argv;
|
||||
if (strcmp(*argv,"smtp") == 0)
|
||||
smtp_starttls = 1;
|
||||
starttls_proto = 1;
|
||||
else if (strcmp(*argv,"pop3") == 0)
|
||||
starttls_proto = 2;
|
||||
else
|
||||
goto bad;
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine_id = *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-rand") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -444,7 +448,9 @@ bad:
|
||||
OpenSSL_add_ssl_algorithms();
|
||||
SSL_load_error_strings();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine_id, 1);
|
||||
#endif
|
||||
|
||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
||||
&& !RAND_status())
|
||||
@@ -579,12 +585,18 @@ re_start:
|
||||
sbuf_off=0;
|
||||
|
||||
/* This is an ugly hack that does a lot of assumptions */
|
||||
if (smtp_starttls)
|
||||
if (starttls_proto == 1)
|
||||
{
|
||||
BIO_read(sbio,mbuf,BUFSIZZ);
|
||||
BIO_printf(sbio,"STARTTLS\r\n");
|
||||
BIO_read(sbio,sbuf,BUFSIZZ);
|
||||
}
|
||||
if (starttls_proto == 2)
|
||||
{
|
||||
BIO_read(sbio,mbuf,BUFSIZZ);
|
||||
BIO_printf(sbio,"STLS\r\n");
|
||||
BIO_read(sbio,sbuf,BUFSIZZ);
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -605,11 +617,11 @@ re_start:
|
||||
print_stuff(bio_c_out,con,full_log);
|
||||
if (full_log > 0) full_log--;
|
||||
|
||||
if (smtp_starttls)
|
||||
if (starttls_proto)
|
||||
{
|
||||
BIO_printf(bio_err,"%s",mbuf);
|
||||
/* We don't need to know any more */
|
||||
smtp_starttls = 0;
|
||||
starttls_proto = 0;
|
||||
}
|
||||
|
||||
if (reconnect)
|
||||
@@ -628,7 +640,7 @@ re_start:
|
||||
|
||||
if (!ssl_pending)
|
||||
{
|
||||
#ifndef OPENSSL_SYS_WINDOWS
|
||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
|
||||
if (tty_on)
|
||||
{
|
||||
if (read_tty) FD_SET(fileno(stdin),&readfds);
|
||||
@@ -655,8 +667,8 @@ re_start:
|
||||
* will choke the compiler: if you do have a cast then
|
||||
* you can either go for (int *) or (void *).
|
||||
*/
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
/* Under Windows we make the assumption that we can
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
/* Under Windows/DOS we make the assumption that we can
|
||||
* always write to the tty: therefore if we need to
|
||||
* write to the tty we just fall through. Otherwise
|
||||
* we timeout the select every second and see if there
|
||||
@@ -670,7 +682,7 @@ re_start:
|
||||
tv.tv_usec = 0;
|
||||
i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,&tv);
|
||||
#ifdef OPENSSL_SYS_WINCE
|
||||
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
|
||||
if(!i && (!_kbhit() || !read_tty) ) continue;
|
||||
#else
|
||||
if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
|
||||
@@ -839,8 +851,8 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#ifdef OPENSSL_SYS_WINCE
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
|
||||
else if (_kbhit())
|
||||
#else
|
||||
else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
|
||||
|
@@ -140,10 +140,6 @@ typedef unsigned int u_int;
|
||||
#include <openssl/rand.h>
|
||||
#include "s_apps.h"
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_WINCE
|
||||
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
|
||||
#ifdef fileno
|
||||
@@ -242,7 +238,9 @@ static int s_msg=0;
|
||||
static int s_quiet=0;
|
||||
|
||||
static int hack=0;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
static char *engine_id=NULL;
|
||||
#endif
|
||||
static const char *session_id_prefix=NULL;
|
||||
|
||||
#ifdef MONOLITH
|
||||
@@ -267,7 +265,9 @@ static void s_server_init(void)
|
||||
s_msg=0;
|
||||
s_quiet=0;
|
||||
hack=0;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
engine_id=NULL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -316,7 +316,9 @@ static void sv_usage(void)
|
||||
BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
||||
BIO_printf(bio_err," -HTTP - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
||||
BIO_printf(bio_err," with the assumption it contains a complete HTTP response.\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
|
||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
}
|
||||
@@ -490,7 +492,9 @@ int MAIN(int argc, char *argv[])
|
||||
int no_tmp_rsa=0,no_dhe=0,nocert=0;
|
||||
int state=0;
|
||||
SSL_METHOD *meth=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e=NULL;
|
||||
#endif
|
||||
char *inrand=NULL;
|
||||
|
||||
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
|
||||
@@ -665,11 +669,13 @@ int MAIN(int argc, char *argv[])
|
||||
if (--argc < 1) goto bad;
|
||||
session_id_prefix = *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine_id= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-rand") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -694,7 +700,9 @@ bad:
|
||||
SSL_load_error_strings();
|
||||
OpenSSL_add_ssl_algorithms();
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine_id, 1);
|
||||
#endif
|
||||
|
||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
||||
&& !RAND_status())
|
||||
@@ -905,7 +913,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
unsigned long l;
|
||||
SSL *con=NULL;
|
||||
BIO *sbio;
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
struct timeval tv;
|
||||
#endif
|
||||
|
||||
@@ -979,7 +987,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
if (!read_from_sslcon)
|
||||
{
|
||||
FD_ZERO(&readfds);
|
||||
#ifndef OPENSSL_SYS_WINDOWS
|
||||
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
|
||||
FD_SET(fileno(stdin),&readfds);
|
||||
#endif
|
||||
FD_SET(s,&readfds);
|
||||
@@ -989,8 +997,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
* the compiler: if you do have a cast then you can either
|
||||
* go for (int *) or (void *).
|
||||
*/
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
/* Under Windows we can't select on stdin: only
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
|
||||
/* Under DOS (non-djgpp) and Windows we can't select on stdin: only
|
||||
* on sockets. As a workaround we timeout the select every
|
||||
* second and check for any keypress. In a proper Windows
|
||||
* application we wouldn't do this because it is inefficient.
|
||||
@@ -1251,7 +1259,13 @@ static int init_ssl_connection(SSL *con)
|
||||
if (SSL_ctrl(con,SSL_CTRL_GET_FLAGS,0,NULL) &
|
||||
TLS1_FLAGS_TLS_PADDING_BUG)
|
||||
BIO_printf(bio_s_out,"Peer has incorrect TLSv1 block padding\n");
|
||||
|
||||
#ifndef OPENSSL_NO_KRB5
|
||||
if (con->kssl_ctx->client_princ != NULL)
|
||||
{
|
||||
BIO_printf(bio_s_out,"Kerberos peer principal is %s\n",
|
||||
con->kssl_ctx->client_princ);
|
||||
}
|
||||
#endif /* OPENSSL_NO_KRB5 */
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
12
apps/smime.c
12
apps/smime.c
@@ -104,7 +104,9 @@ int MAIN(int argc, char **argv)
|
||||
int need_rand = 0;
|
||||
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
|
||||
int keyform = FORMAT_PEM;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
args = argv + 1;
|
||||
ret = 1;
|
||||
@@ -166,6 +168,10 @@ int MAIN(int argc, char **argv)
|
||||
flags |= PKCS7_BINARY;
|
||||
else if (!strcmp (*args, "-nosigs"))
|
||||
flags |= PKCS7_NOSIGS;
|
||||
else if (!strcmp (*args, "-nooldmime"))
|
||||
flags |= PKCS7_NOOLDMIMETYPE;
|
||||
else if (!strcmp (*args, "-crlfeol"))
|
||||
flags |= PKCS7_CRLFEOL;
|
||||
else if (!strcmp (*args, "-crl_check"))
|
||||
store_flags |= X509_V_FLAG_CRL_CHECK;
|
||||
else if (!strcmp (*args, "-crl_check_all"))
|
||||
@@ -176,11 +182,13 @@ int MAIN(int argc, char **argv)
|
||||
inrand = *args;
|
||||
} else badarg = 1;
|
||||
need_rand = 1;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
} else if (!strcmp(*args,"-engine")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
engine = *args;
|
||||
} else badarg = 1;
|
||||
#endif
|
||||
} else if (!strcmp(*args,"-passin")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
@@ -330,7 +338,9 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
|
||||
BIO_printf (bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n");
|
||||
BIO_printf (bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf (bio_err, "-passin arg input file pass phrase source\n");
|
||||
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
||||
@@ -339,7 +349,9 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
|
||||
BIO_printf(bio_err, "Error getting password\n");
|
||||
|
10
apps/speed.c
10
apps/speed.c
@@ -58,6 +58,8 @@
|
||||
|
||||
/* most of this code has been pilfered from my libdes speed.c program */
|
||||
|
||||
#ifndef OPENSSL_NO_SPEED
|
||||
|
||||
#undef SECONDS
|
||||
#define SECONDS 3
|
||||
#define RSA_SECONDS 10
|
||||
@@ -370,7 +372,9 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e = NULL;
|
||||
#endif
|
||||
unsigned char *buf=NULL,*buf2=NULL;
|
||||
int mret=1;
|
||||
long count=0,save_count=0;
|
||||
@@ -590,6 +594,7 @@ int MAIN(int argc, char **argv)
|
||||
j--; /* Otherwise, -elapsed gets confused with
|
||||
an algorithm. */
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if ((argc > 0) && (strcmp(*argv,"-engine") == 0))
|
||||
{
|
||||
argc--;
|
||||
@@ -606,6 +611,7 @@ int MAIN(int argc, char **argv)
|
||||
means all of them should be run) */
|
||||
j--;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_FORK
|
||||
else if ((argc > 0) && (strcmp(*argv,"-multi") == 0))
|
||||
{
|
||||
@@ -865,7 +871,9 @@ int MAIN(int argc, char **argv)
|
||||
#if defined(TIMES) || defined(USE_TOD)
|
||||
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err,"-evp e use EVP e.\n");
|
||||
BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n");
|
||||
BIO_printf(bio_err,"-mr produce machine readable output.\n");
|
||||
@@ -1393,6 +1401,7 @@ int MAIN(int argc, char **argv)
|
||||
else
|
||||
EVP_EncryptFinal_ex(&ctx,buf,&outl);
|
||||
d=Time_F(STOP);
|
||||
EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
}
|
||||
if (evp_md)
|
||||
{
|
||||
@@ -1939,3 +1948,4 @@ static int do_multi(int multi)
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -92,7 +92,9 @@ int MAIN(int argc, char **argv)
|
||||
CONF *conf = NULL;
|
||||
NETSCAPE_SPKI *spki = NULL;
|
||||
EVP_PKEY *pkey = NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -141,11 +143,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
spksect= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-noout") == 0)
|
||||
noout=1;
|
||||
else if (strcmp(*argv,"-pubkey") == 0)
|
||||
@@ -171,7 +175,9 @@ bad:
|
||||
BIO_printf(bio_err," -noout don't print SPKAC\n");
|
||||
BIO_printf(bio_err," -pubkey output public key\n");
|
||||
BIO_printf(bio_err," -verify verify SPKAC signature\n");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
#endif
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -181,7 +187,9 @@ bad:
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if(keyfile) {
|
||||
pkey = load_key(bio_err,
|
||||
|
@@ -86,7 +86,9 @@ int MAIN(int argc, char **argv)
|
||||
STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
|
||||
X509_STORE *cert_ctx=NULL;
|
||||
X509_LOOKUP *lookup=NULL;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
cert_ctx=X509_STORE_new();
|
||||
if (cert_ctx == NULL) goto end;
|
||||
@@ -142,11 +144,13 @@ int MAIN(int argc, char **argv)
|
||||
if (argc-- < 1) goto end;
|
||||
trustfile= *(++argv);
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto end;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-help") == 0)
|
||||
goto end;
|
||||
else if (strcmp(*argv,"-ignore_critical") == 0)
|
||||
@@ -170,7 +174,9 @@ int MAIN(int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
|
||||
if (lookup == NULL) abort();
|
||||
@@ -219,7 +225,11 @@ int MAIN(int argc, char **argv)
|
||||
ret=0;
|
||||
end:
|
||||
if (ret == 1) {
|
||||
BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check] [-engine e] cert1 cert2 ...\n");
|
||||
BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check]");
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
BIO_printf(bio_err," [-engine e]");
|
||||
#endif
|
||||
BIO_printf(bio_err," cert1 cert2 ...\n");
|
||||
BIO_printf(bio_err,"recognized usages:\n");
|
||||
for(i = 0; i < X509_PURPOSE_get_count(); i++) {
|
||||
X509_PURPOSE *ptmp;
|
||||
|
16
apps/x509.c
16
apps/x509.c
@@ -131,7 +131,9 @@ static char *x509_usage[]={
|
||||
" -extensions - section from config file with X509V3 extensions to add\n",
|
||||
" -clrext - delete extensions before signing and input certificate\n",
|
||||
" -nameopt arg - various certificate name options\n",
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
" -engine e - use engine e, possibly a hardware device.\n",
|
||||
#endif
|
||||
" -certopt arg - various certificate text options\n",
|
||||
NULL
|
||||
};
|
||||
@@ -183,7 +185,9 @@ int MAIN(int argc, char **argv)
|
||||
int need_rand = 0;
|
||||
int checkend=0,checkoffset=0;
|
||||
unsigned long nmflag = 0, certflag = 0;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine=NULL;
|
||||
#endif
|
||||
|
||||
reqfile=0;
|
||||
|
||||
@@ -354,17 +358,13 @@ int MAIN(int argc, char **argv)
|
||||
if (--argc < 1) goto bad;
|
||||
if (!set_name_ex(&nmflag, *(++argv))) goto bad;
|
||||
}
|
||||
else if (strcmp(*argv,"-setalias") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
alias= *(++argv);
|
||||
trustout = 1;
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine= *(++argv);
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-C") == 0)
|
||||
C= ++num;
|
||||
else if (strcmp(*argv,"-email") == 0)
|
||||
@@ -450,7 +450,9 @@ bad:
|
||||
goto end;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
e = setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (need_rand)
|
||||
app_RAND_load_file(NULL, bio_err, 0);
|
||||
@@ -1143,7 +1145,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
||||
else if (!(bs = load_serial(CAfile, serialfile, create)))
|
||||
goto end;
|
||||
|
||||
if (!X509_STORE_add_cert(ctx,x)) goto end;
|
||||
/* if (!X509_STORE_add_cert(ctx,x)) goto end;*/
|
||||
|
||||
/* NOTE: this certificate can/should be self signed, unless it was
|
||||
* a certificate request in which case it is not. */
|
||||
|
@@ -29,7 +29,7 @@ RC4-MD5, but a re-connect tries to use DES-CBC-SHA. So netscape, when
|
||||
doing a re-connect, always takes the first cipher in the cipher list.
|
||||
|
||||
If we accept a netscape connection, demand a client cert, have a
|
||||
non-self-sighed CA which does not have it's CA in netscape, and the
|
||||
non-self-signed CA which does not have it's CA in netscape, and the
|
||||
browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta
|
||||
|
||||
Netscape browsers do not really notice the server sending a
|
||||
|
68
config
68
config
@@ -74,34 +74,27 @@ if [ "x$XREL" != "x" ]; then
|
||||
echo "whatever-whatever-sco5"; exit 0
|
||||
;;
|
||||
4.2MP)
|
||||
if [ "x$VERSION" = "x2.01" ]; then
|
||||
echo "${MACHINE}-whatever-unixware201"; exit 0
|
||||
elif [ "x$VERSION" = "x2.02" ]; then
|
||||
echo "${MACHINE}-whatever-unixware202"; exit 0
|
||||
elif [ "x$VERSION" = "x2.03" ]; then
|
||||
echo "${MACHINE}-whatever-unixware203"; exit 0
|
||||
elif [ "x$VERSION" = "x2.1.1" ]; then
|
||||
echo "${MACHINE}-whatever-unixware211"; exit 0
|
||||
elif [ "x$VERSION" = "x2.1.2" ]; then
|
||||
echo "${MACHINE}-whatever-unixware212"; exit 0
|
||||
elif [ "x$VERSION" = "x2.1.3" ]; then
|
||||
echo "${MACHINE}-whatever-unixware213"; exit 0
|
||||
else
|
||||
echo "${MACHINE}-whatever-unixware2"; exit 0
|
||||
fi
|
||||
case "x${VERSION}" in
|
||||
x2.0*) echo "whatever-whatever-unixware20"; exit 0 ;;
|
||||
x2.1*) echo "whatever-whatever-unixware21"; exit 0 ;;
|
||||
x2*) echo "whatever-whatever-unixware2"; exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
4.2)
|
||||
echo "whatever-whatever-unixware1"; exit 0
|
||||
;;
|
||||
OpenUNIX)
|
||||
if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x8" ]; then
|
||||
echo "${MACHINE}-unknown-OpenUNIX${VERSION}"; exit 0
|
||||
fi
|
||||
echo "i386-whatever-unixware1"; exit 0
|
||||
;;
|
||||
5)
|
||||
if [ "`echo x$VERSION | sed -e 's/\..*//'`" = "x7" ]; then
|
||||
echo "${MACHINE}-sco-unixware7"; exit 0
|
||||
fi
|
||||
case "x${VERSION}" in
|
||||
# We hardcode i586 in place of ${MACHINE} for the
|
||||
# following reason. The catch is that even though Pentium
|
||||
# is minimum requirement for platforms in question,
|
||||
# ${MACHINE} gets always assigned to i386. Now, problem
|
||||
# with i386 is that it makes ./config pass 386 to
|
||||
# ./Configure, which in turn makes make generate
|
||||
# inefficient SHA-1 (for this moment) code.
|
||||
x7*) echo "i586-sco-unixware7"; exit 0 ;;
|
||||
x8*) echo "i586-unkn-OpenUNIX${VERSION}"; exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -196,7 +189,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
echo "${MACHINE}-whatever-bsdi"; exit 0
|
||||
;;
|
||||
|
||||
FreeBSD:*)
|
||||
FreeBSD:*:*:*386*)
|
||||
VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
|
||||
MACH=`sysctl -n hw.model`
|
||||
ARCH='whatever'
|
||||
@@ -205,7 +198,6 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
*486* ) MACH="i486" ;;
|
||||
Pentium\ II*) MACH="i686" ;;
|
||||
Pentium* ) MACH="i586" ;;
|
||||
Alpha* ) MACH="alpha" ;;
|
||||
* ) MACH="$MACHINE" ;;
|
||||
esac
|
||||
case ${MACH} in
|
||||
@@ -214,6 +206,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
|
||||
;;
|
||||
|
||||
FreeBSD:*)
|
||||
echo "${MACHINE}-whatever-freebsd"; exit 0
|
||||
;;
|
||||
|
||||
NetBSD:*:*:*386*)
|
||||
echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
|
||||
;;
|
||||
@@ -461,6 +457,10 @@ if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
|
||||
(cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
|
||||
fi
|
||||
|
||||
CCVER=${CCVER:-0}
|
||||
|
||||
# read the output of the embedded GuessOS
|
||||
@@ -473,7 +473,7 @@ echo Operating system: $GUESSOS
|
||||
# more time that I want to waste at the moment
|
||||
case "$GUESSOS" in
|
||||
mips2-sgi-irix)
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=${CPU:-0}
|
||||
if [ $CPU -ge 4000 ]; then
|
||||
options="$options -mips2"
|
||||
@@ -481,7 +481,7 @@ case "$GUESSOS" in
|
||||
OUT="irix-$CC"
|
||||
;;
|
||||
mips3-sgi-irix)
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=${CPU:-0}
|
||||
if [ $CPU -ge 5000 ]; then
|
||||
options="$options -mips4"
|
||||
@@ -497,7 +497,7 @@ case "$GUESSOS" in
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
fi
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=${CPU:-0}
|
||||
if [ $CPU -ge 5000 ]; then
|
||||
options="$options -mips4"
|
||||
@@ -547,7 +547,7 @@ EOF
|
||||
ppc-apple-darwin*) OUT="darwin-ppc-cc" ;;
|
||||
i386-apple-darwin*) OUT="darwin-i386-cc" ;;
|
||||
sparc64-*-linux2)
|
||||
echo "WARNING! If *know* that your GNU C supports 64-bit/V9 ABI"
|
||||
echo "WARNING! If you *know* that your GNU C supports 64-bit/V9 ABI"
|
||||
echo " and wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure linux64-sparcv9' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
@@ -640,6 +640,8 @@ EOF
|
||||
*86*-*-solaris2) OUT="solaris-x86-$CC" ;;
|
||||
*-*-sunos4) OUT="sunos-$CC" ;;
|
||||
alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
|
||||
sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;;
|
||||
ia64-*-freebsd*) OUT="FreeBSD-ia64" ;;
|
||||
*-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
|
||||
*-freebsd[1-2]*) OUT="FreeBSD" ;;
|
||||
*86*-*-netbsd) OUT="NetBSD-x86" ;;
|
||||
@@ -696,9 +698,11 @@ EOF
|
||||
CPU_VERSION=${CPU_VERSION:-0}
|
||||
# See <sys/unistd.h> for further info on CPU_VERSION.
|
||||
if [ $CPU_VERSION -ge 768 ]; then # IA-64 CPU
|
||||
echo "NOTICE! 64-bit is the only ABI currently operational on HP-UXi."
|
||||
echo " Post request to openssl-dev@openssl.org for 32-bit support."
|
||||
echo "WARNING! 64-bit ABI is the default configured ABI on HP-UXi."
|
||||
echo " If you wish to build 32-bit library, the you have to"
|
||||
echo " invoke './Configure hpux-ia32-cc' *manually*."
|
||||
if [ "$TEST" = "false" ]; then
|
||||
echo " You have about 5 seconds to press Ctrl-C to abort."
|
||||
(stty -icanon min 0 time 50; read waste) < /dev/tty
|
||||
fi
|
||||
OUT="hpux64-ia64-cc"
|
||||
|
@@ -100,7 +100,7 @@ void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
unsigned char *ivec, int *num);
|
||||
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char counter[AES_BLOCK_SIZE],
|
||||
unsigned char ivec[AES_BLOCK_SIZE],
|
||||
unsigned char ecount_buf[AES_BLOCK_SIZE],
|
||||
unsigned int *num);
|
||||
|
||||
|
@@ -72,7 +72,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
|
||||
if (AES_ENCRYPT == enc) {
|
||||
while (len >= AES_BLOCK_SIZE) {
|
||||
for(n=0; n < sizeof tmp; ++n)
|
||||
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||
tmp[n] = in[n] ^ ivec[n];
|
||||
AES_encrypt(tmp, out, key);
|
||||
memcpy(ivec, out, AES_BLOCK_SIZE);
|
||||
@@ -86,12 +86,12 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
for(n=len; n < AES_BLOCK_SIZE; ++n)
|
||||
tmp[n] = ivec[n];
|
||||
AES_encrypt(tmp, tmp, key);
|
||||
memcpy(out, tmp, len);
|
||||
memcpy(ivec, tmp, sizeof tmp);
|
||||
memcpy(out, tmp, AES_BLOCK_SIZE);
|
||||
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||
}
|
||||
} else {
|
||||
while (len >= AES_BLOCK_SIZE) {
|
||||
memcpy(tmp, in, sizeof tmp);
|
||||
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||
AES_decrypt(in, out, key);
|
||||
for(n=0; n < AES_BLOCK_SIZE; ++n)
|
||||
out[n] ^= ivec[n];
|
||||
@@ -101,11 +101,11 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
out += AES_BLOCK_SIZE;
|
||||
}
|
||||
if (len) {
|
||||
memcpy(tmp, in, sizeof tmp);
|
||||
memcpy(tmp, in, AES_BLOCK_SIZE);
|
||||
AES_decrypt(tmp, tmp, key);
|
||||
for(n=0; n < len; ++n)
|
||||
out[n] ^= ivec[n];
|
||||
memcpy(ivec, tmp, sizeof tmp);
|
||||
memcpy(ivec, tmp, AES_BLOCK_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -750,7 +750,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
rk[2] = GETU32(userKey + 8);
|
||||
rk[3] = GETU32(userKey + 12);
|
||||
if (bits == 128) {
|
||||
for (;;) {
|
||||
while (1) {
|
||||
temp = rk[3];
|
||||
rk[4] = rk[0] ^
|
||||
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||
@@ -770,7 +770,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
rk[4] = GETU32(userKey + 16);
|
||||
rk[5] = GETU32(userKey + 20);
|
||||
if (bits == 192) {
|
||||
for (;;) {
|
||||
while (1) {
|
||||
temp = rk[ 5];
|
||||
rk[ 6] = rk[ 0] ^
|
||||
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||
@@ -792,7 +792,7 @@ int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
rk[6] = GETU32(userKey + 24);
|
||||
rk[7] = GETU32(userKey + 28);
|
||||
if (bits == 256) {
|
||||
for (;;) {
|
||||
while (1) {
|
||||
temp = rk[ 7];
|
||||
rk[ 8] = rk[ 0] ^
|
||||
(Te4[(temp >> 16) & 0xff] & 0xff000000) ^
|
||||
|
@@ -62,19 +62,49 @@
|
||||
/* NOTE: CTR mode is big-endian. The rest of the AES code
|
||||
* is endian-neutral. */
|
||||
|
||||
/* increment counter (128-bit int) by 2^64 */
|
||||
/* increment counter (128-bit int) by 1 */
|
||||
static void AES_ctr128_inc(unsigned char *counter) {
|
||||
unsigned long c;
|
||||
|
||||
/* Grab 3rd dword of counter and increment */
|
||||
/* Grab bottom dword of counter and increment */
|
||||
#ifdef L_ENDIAN
|
||||
c = GETU32(counter + 8);
|
||||
c = GETU32(counter + 0);
|
||||
c++;
|
||||
PUTU32(counter + 8, c);
|
||||
PUTU32(counter + 0, c);
|
||||
#else
|
||||
c = GETU32(counter + 4);
|
||||
c = GETU32(counter + 12);
|
||||
c++;
|
||||
PUTU32(counter + 4, c);
|
||||
PUTU32(counter + 12, c);
|
||||
#endif
|
||||
|
||||
/* if no overflow, we're done */
|
||||
if (c)
|
||||
return;
|
||||
|
||||
/* Grab 1st dword of counter and increment */
|
||||
#ifdef L_ENDIAN
|
||||
c = GETU32(counter + 4);
|
||||
c++;
|
||||
PUTU32(counter + 4, c);
|
||||
#else
|
||||
c = GETU32(counter + 8);
|
||||
c++;
|
||||
PUTU32(counter + 8, c);
|
||||
#endif
|
||||
|
||||
/* if no overflow, we're done */
|
||||
if (c)
|
||||
return;
|
||||
|
||||
/* Grab 2nd dword of counter and increment */
|
||||
#ifdef L_ENDIAN
|
||||
c = GETU32(counter + 8);
|
||||
c++;
|
||||
PUTU32(counter + 8, c);
|
||||
#else
|
||||
c = GETU32(counter + 4);
|
||||
c++;
|
||||
PUTU32(counter + 4, c);
|
||||
#endif
|
||||
|
||||
/* if no overflow, we're done */
|
||||
@@ -100,10 +130,16 @@ static void AES_ctr128_inc(unsigned char *counter) {
|
||||
* encrypted counter is kept in ecount_buf. Both *num and
|
||||
* ecount_buf must be initialised with zeros before the first
|
||||
* call to AES_ctr128_encrypt().
|
||||
*
|
||||
* This algorithm assumes that the counter is in the x lower bits
|
||||
* of the IV (ivec), and that the application has full control over
|
||||
* overflow and the rest of the IV. This implementation takes NO
|
||||
* responsability for checking that the counter doesn't overflow
|
||||
* into the rest of the IV when incremented.
|
||||
*/
|
||||
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char counter[AES_BLOCK_SIZE],
|
||||
unsigned char ivec[AES_BLOCK_SIZE],
|
||||
unsigned char ecount_buf[AES_BLOCK_SIZE],
|
||||
unsigned int *num) {
|
||||
|
||||
@@ -117,8 +153,8 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
|
||||
while (l--) {
|
||||
if (n == 0) {
|
||||
AES_encrypt(counter, ecount_buf, key);
|
||||
AES_ctr128_inc(counter);
|
||||
AES_encrypt(ivec, ecount_buf, key);
|
||||
AES_ctr128_inc(ivec);
|
||||
}
|
||||
*(out++) = *(in++) ^ ecount_buf[n];
|
||||
n = (n+1) % AES_BLOCK_SIZE;
|
||||
|
@@ -296,7 +296,7 @@ static int in_utf8(unsigned long value, void *arg)
|
||||
|
||||
static int out_utf8(unsigned long value, void *arg)
|
||||
{
|
||||
long *outlen;
|
||||
int *outlen;
|
||||
outlen = arg;
|
||||
*outlen += UTF8_putc(NULL, -1, value);
|
||||
return 1;
|
||||
|
@@ -279,7 +279,7 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING
|
||||
* otherwise it is the number of bytes per character
|
||||
*/
|
||||
|
||||
const static char tag2nbyte[] = {
|
||||
const static signed char tag2nbyte[] = {
|
||||
-1, -1, -1, -1, -1, /* 0-4 */
|
||||
-1, -1, -1, -1, -1, /* 5-9 */
|
||||
-1, -1, 0, -1, /* 10-13 */
|
||||
|
@@ -143,7 +143,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
|
||||
/* Now the tables and helper functions for the string table:
|
||||
*/
|
||||
|
||||
/* size limits: this stuff is taken straight from RFC2459 */
|
||||
/* size limits: this stuff is taken straight from RFC3280 */
|
||||
|
||||
#define ub_name 32768
|
||||
#define ub_common_name 64
|
||||
@@ -153,6 +153,8 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
|
||||
#define ub_organization_unit_name 64
|
||||
#define ub_title 64
|
||||
#define ub_email_address 128
|
||||
#define ub_serial_number 64
|
||||
|
||||
|
||||
/* This table must be kept in NID order */
|
||||
|
||||
@@ -170,9 +172,11 @@ static ASN1_STRING_TABLE tbl_standard[] = {
|
||||
{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||
{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||
{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||
{NID_serialNumber, 1, ub_serial_number, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
||||
{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
|
||||
{NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
|
||||
{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
||||
{NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK},
|
||||
{NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
|
||||
};
|
||||
|
||||
@@ -249,4 +253,38 @@ static void st_free(ASN1_STRING_TABLE *tbl)
|
||||
if(tbl->flags & STABLE_FLAGS_MALLOC) OPENSSL_free(tbl);
|
||||
}
|
||||
|
||||
|
||||
IMPLEMENT_STACK_OF(ASN1_STRING_TABLE)
|
||||
|
||||
#ifdef STRING_TABLE_TEST
|
||||
|
||||
main()
|
||||
{
|
||||
ASN1_STRING_TABLE *tmp;
|
||||
int i, last_nid = -1;
|
||||
|
||||
for (tmp = tbl_standard, i = 0;
|
||||
i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
|
||||
{
|
||||
if (tmp->nid < last_nid)
|
||||
{
|
||||
last_nid = 0;
|
||||
break;
|
||||
}
|
||||
last_nid = tmp->nid;
|
||||
}
|
||||
|
||||
if (last_nid != 0)
|
||||
{
|
||||
printf("Table order OK\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
for (tmp = tbl_standard, i = 0;
|
||||
i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
|
||||
printf("Index %d, NID %d, Name=%s\n", i, tmp->nid,
|
||||
OBJ_nid2ln(tmp->nid));
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -105,7 +105,10 @@ ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
|
||||
|
||||
ts=OPENSSL_gmtime(&t,&data);
|
||||
if (ts == NULL)
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_TIME_SET, ASN1_R_ERROR_GETTING_TIME);
|
||||
return NULL;
|
||||
}
|
||||
if((ts->tm_year >= 50) && (ts->tm_year < 150))
|
||||
return ASN1_UTCTIME_set(s, t);
|
||||
return ASN1_GENERALIZEDTIME_set(s,t);
|
||||
@@ -152,7 +155,7 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
|
||||
if (t->data[0] >= '5') strcpy(str, "19");
|
||||
else strcpy(str, "20");
|
||||
|
||||
BUF_strlcat(str, (char *)t->data, t->length+2);
|
||||
BUF_strlcat(str, (char *)t->data, t->length+3); /* Include space for a '\0' */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -132,7 +132,7 @@ extern "C" {
|
||||
#define B_ASN1_NUMERICSTRING 0x0001
|
||||
#define B_ASN1_PRINTABLESTRING 0x0002
|
||||
#define B_ASN1_T61STRING 0x0004
|
||||
#define B_ASN1_TELETEXSTRING 0x0008
|
||||
#define B_ASN1_TELETEXSTRING 0x0004
|
||||
#define B_ASN1_VIDEOTEXSTRING 0x0008
|
||||
#define B_ASN1_IA5STRING 0x0010
|
||||
#define B_ASN1_GRAPHICSTRING 0x0020
|
||||
@@ -980,6 +980,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_F_ASN1_TEMPLATE_D2I 131
|
||||
#define ASN1_F_ASN1_TEMPLATE_EX_D2I 132
|
||||
#define ASN1_F_ASN1_TEMPLATE_NEW 133
|
||||
#define ASN1_F_ASN1_TIME_SET 175
|
||||
#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134
|
||||
#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135
|
||||
#define ASN1_F_ASN1_UNPACK_STRING 136
|
||||
@@ -1037,6 +1038,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_R_DECODE_ERROR 110
|
||||
#define ASN1_R_DECODING_ERROR 111
|
||||
#define ASN1_R_ENCODE_ERROR 112
|
||||
#define ASN1_R_ERROR_GETTING_TIME 173
|
||||
#define ASN1_R_ERROR_LOADING_SECTION 172
|
||||
#define ASN1_R_ERROR_PARSING_SET_ELEMENT 113
|
||||
#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* crypto/asn1/asn1_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -100,6 +100,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_D2I,0), "ASN1_TEMPLATE_D2I"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_EX_D2I,0), "ASN1_TEMPLATE_EX_D2I"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TEMPLATE_NEW,0), "ASN1_TEMPLATE_NEW"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TIME_SET,0), "ASN1_TIME_set"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,0), "ASN1_TYPE_get_int_octetstring"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_TYPE_GET_OCTETSTRING,0), "ASN1_TYPE_get_octetstring"},
|
||||
{ERR_PACK(0,ASN1_F_ASN1_UNPACK_STRING,0), "ASN1_unpack_string"},
|
||||
@@ -160,6 +161,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
||||
{ASN1_R_DECODE_ERROR ,"decode error"},
|
||||
{ASN1_R_DECODING_ERROR ,"decoding error"},
|
||||
{ASN1_R_ENCODE_ERROR ,"encode error"},
|
||||
{ASN1_R_ERROR_GETTING_TIME ,"error getting time"},
|
||||
{ASN1_R_ERROR_LOADING_SECTION ,"error loading section"},
|
||||
{ASN1_R_ERROR_PARSING_SET_ELEMENT ,"error parsing set element"},
|
||||
{ASN1_R_ERROR_SETTING_CIPHER_PARAMS ,"error setting cipher params"},
|
||||
|
@@ -104,10 +104,12 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
|
||||
l<<=7L;
|
||||
l|= *(p++)&0x7f;
|
||||
if (--max == 0) goto err;
|
||||
if (l > (INT_MAX >> 7L)) goto err;
|
||||
}
|
||||
l<<=7L;
|
||||
l|= *(p++)&0x7f;
|
||||
tag=(int)l;
|
||||
if (--max == 0) goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -691,6 +691,7 @@ static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, unsigned char **in, long inl
|
||||
|
||||
int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it)
|
||||
{
|
||||
ASN1_VALUE **opval = NULL;
|
||||
ASN1_STRING *stmp;
|
||||
ASN1_TYPE *typ = NULL;
|
||||
int ret = 0;
|
||||
@@ -705,6 +706,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char
|
||||
*pval = (ASN1_VALUE *)typ;
|
||||
} else typ = (ASN1_TYPE *)*pval;
|
||||
if(utype != typ->type) ASN1_TYPE_set(typ, utype, NULL);
|
||||
opval = pval;
|
||||
pval = (ASN1_VALUE **)&typ->value.ptr;
|
||||
}
|
||||
switch(utype) {
|
||||
@@ -796,7 +798,12 @@ int asn1_ex_c2i(ASN1_VALUE **pval, unsigned char *cont, int len, int utype, char
|
||||
|
||||
ret = 1;
|
||||
err:
|
||||
if(!ret) ASN1_TYPE_free(typ);
|
||||
if(!ret)
|
||||
{
|
||||
ASN1_TYPE_free(typ);
|
||||
if (opval)
|
||||
*opval = NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -49,14 +49,8 @@ lib: $(LIBOBJ)
|
||||
@touch lib
|
||||
|
||||
# elf
|
||||
asm/bx86-elf.o: asm/bx86unix.cpp
|
||||
$(CPP) -DELF -x c asm/bx86unix.cpp | as -o asm/bx86-elf.o
|
||||
|
||||
# solaris
|
||||
asm/bx86-sol.o: asm/bx86unix.cpp
|
||||
$(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
|
||||
as -o asm/bx86-sol.o asm/bx86-sol.s
|
||||
rm -f asm/bx86-sol.s
|
||||
asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > bx86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/bx86-out.o: asm/bx86unix.cpp
|
||||
@@ -103,7 +97,7 @@ dclean:
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/bx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
rm -f asm/bx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
|
@@ -1 +1,2 @@
|
||||
bx86unix.cpp
|
||||
bx86-elf.s
|
||||
|
@@ -378,7 +378,7 @@ _dopr(
|
||||
case 'p':
|
||||
value = (long)va_arg(args, void *);
|
||||
fmtint(sbuffer, buffer, &currlen, maxlen,
|
||||
value, 16, min, max, flags);
|
||||
value, 16, min, max, flags|DP_F_NUM);
|
||||
break;
|
||||
case 'n': /* XXX */
|
||||
if (cflags == DP_C_SHORT) {
|
||||
@@ -482,8 +482,9 @@ fmtint(
|
||||
int flags)
|
||||
{
|
||||
int signvalue = 0;
|
||||
char *prefix = "";
|
||||
unsigned LLONG uvalue;
|
||||
char convert[DECIMAL_SIZE(value)+1];
|
||||
char convert[DECIMAL_SIZE(value)+3];
|
||||
int place = 0;
|
||||
int spadlen = 0;
|
||||
int zpadlen = 0;
|
||||
@@ -501,6 +502,10 @@ fmtint(
|
||||
else if (flags & DP_F_SPACE)
|
||||
signvalue = ' ';
|
||||
}
|
||||
if (flags & DP_F_NUM) {
|
||||
if (base == 8) prefix = "0";
|
||||
if (base == 16) prefix = "0x";
|
||||
}
|
||||
if (flags & DP_F_UP)
|
||||
caps = 1;
|
||||
do {
|
||||
@@ -514,7 +519,7 @@ fmtint(
|
||||
convert[place] = 0;
|
||||
|
||||
zpadlen = max - place;
|
||||
spadlen = min - OSSL_MAX(max, place) - (signvalue ? 1 : 0);
|
||||
spadlen = min - OSSL_MAX(max, place) - (signvalue ? 1 : 0) - strlen(prefix);
|
||||
if (zpadlen < 0)
|
||||
zpadlen = 0;
|
||||
if (spadlen < 0)
|
||||
@@ -536,6 +541,12 @@ fmtint(
|
||||
if (signvalue)
|
||||
doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue);
|
||||
|
||||
/* prefix */
|
||||
while (*prefix) {
|
||||
doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix);
|
||||
prefix++;
|
||||
}
|
||||
|
||||
/* zeros */
|
||||
if (zpadlen > 0) {
|
||||
while (zpadlen > 0) {
|
||||
@@ -692,7 +703,7 @@ fmtfp(
|
||||
* Decimal point. This should probably use locale to find the correct
|
||||
* char to print out.
|
||||
*/
|
||||
if (max > 0) {
|
||||
if (max > 0 || (flags & DP_F_NUM)) {
|
||||
doapr_outch(sbuffer, buffer, currlen, maxlen, '.');
|
||||
|
||||
while (fplace > 0)
|
||||
@@ -825,5 +836,5 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
|
||||
* had the buffer been large enough.) */
|
||||
return -1;
|
||||
else
|
||||
return (retlen <= INT_MAX) ? retlen : -1;
|
||||
return (retlen <= INT_MAX) ? (int)retlen : -1;
|
||||
}
|
||||
|
@@ -492,7 +492,7 @@ void BIO_sock_cleanup(void)
|
||||
|
||||
#if !defined(OPENSSL_SYS_VMS) || __VMS_VER >= 70000000
|
||||
|
||||
int BIO_socket_ioctl(int fd, long type, unsigned long *arg)
|
||||
int BIO_socket_ioctl(int fd, long type, void *arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -742,7 +742,7 @@ int BIO_set_tcp_ndelay(int s, int on)
|
||||
int BIO_socket_nbio(int s, int mode)
|
||||
{
|
||||
int ret= -1;
|
||||
unsigned long l;
|
||||
int l;
|
||||
|
||||
l=mode;
|
||||
#ifdef FIONBIO
|
||||
|
@@ -494,6 +494,7 @@ static int buffer_gets(BIO *b, char *buf, int size)
|
||||
if (i <= 0)
|
||||
{
|
||||
BIO_copy_next_retry(b);
|
||||
*buf='\0';
|
||||
if (i < 0) return((num > 0)?num:i);
|
||||
if (i == 0) return(num);
|
||||
}
|
||||
|
@@ -244,7 +244,7 @@ typedef struct bio_method_st
|
||||
long (_far *ctrl)();
|
||||
int (_far *create)();
|
||||
int (_far *destroy)();
|
||||
long (_fat *callback_ctrl)();
|
||||
long (_far *callback_ctrl)();
|
||||
} BIO_METHOD;
|
||||
#endif
|
||||
|
||||
@@ -585,7 +585,7 @@ struct hostent *BIO_gethostbyname(const char *name);
|
||||
* and an appropriate error code is set).
|
||||
*/
|
||||
int BIO_sock_error(int sock);
|
||||
int BIO_socket_ioctl(int fd, long type, unsigned long *arg);
|
||||
int BIO_socket_ioctl(int fd, long type, void *arg);
|
||||
int BIO_socket_nbio(int fd,int mode);
|
||||
int BIO_get_port(const char *str, unsigned short *port_ptr);
|
||||
int BIO_get_host_ip(const char *str, unsigned char *ip);
|
||||
|
@@ -395,6 +395,8 @@ BIO *BIO_pop(BIO *b)
|
||||
if (b == NULL) return(NULL);
|
||||
ret=b->next_bio;
|
||||
|
||||
BIO_ctrl(b,BIO_CTRL_POP,0,NULL);
|
||||
|
||||
if (b->prev_bio != NULL)
|
||||
b->prev_bio->next_bio=b->next_bio;
|
||||
if (b->next_bio != NULL)
|
||||
@@ -402,7 +404,6 @@ BIO *BIO_pop(BIO *b)
|
||||
|
||||
b->next_bio=NULL;
|
||||
b->prev_bio=NULL;
|
||||
BIO_ctrl(b,BIO_CTRL_POP,0,NULL);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,57 @@
|
||||
/* crypto/bio/bss_bio.c -*- Mode: C; c-file-style: "eay" -*- */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
/* Special method for a BIO where the other endpoint is also a BIO
|
||||
* of this kind, handled by the same thread (i.e. the "peer" is actually
|
||||
@@ -502,7 +555,7 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr)
|
||||
break;
|
||||
|
||||
case BIO_C_DESTROY_BIO_PAIR:
|
||||
/* Effects both BIOs in the pair -- call just once!
|
||||
/* Affects both BIOs in the pair -- call just once!
|
||||
* Or let BIO_free(bio1); BIO_free(bio2); do the job. */
|
||||
bio_destroy_pair(bio);
|
||||
ret = 1;
|
||||
|
@@ -213,12 +213,29 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
b->shutdown=(int)num&BIO_CLOSE;
|
||||
b->ptr=(char *)ptr;
|
||||
b->init=1;
|
||||
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
|
||||
/* Set correct text/binary mode */
|
||||
#if defined(OPENSSL_SYS_WINDOWS)
|
||||
if (num & BIO_FP_TEXT)
|
||||
_setmode(fileno((FILE *)ptr),_O_TEXT);
|
||||
else
|
||||
_setmode(fileno((FILE *)ptr),_O_BINARY);
|
||||
#elif defined(OPENSSL_SYS_MSDOS)
|
||||
{
|
||||
int fd = fileno((FILE*)ptr);
|
||||
/* Set correct text/binary mode */
|
||||
if (num & BIO_FP_TEXT)
|
||||
_setmode(fd,_O_TEXT);
|
||||
/* Dangerous to set stdin/stdout to raw (unless redirected) */
|
||||
else
|
||||
{
|
||||
if (fd == STDIN_FILENO || fd == STDOUT_FILENO)
|
||||
{
|
||||
if (isatty(fd) <= 0)
|
||||
_setmode(fd,_O_BINARY);
|
||||
}
|
||||
else
|
||||
_setmode(fd,_O_BINARY);
|
||||
}
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_OS2)
|
||||
if (num & BIO_FP_TEXT)
|
||||
setmode(fileno((FILE *)ptr), O_TEXT);
|
||||
|
@@ -22,14 +22,7 @@ BN_ASM= bn_asm.o
|
||||
#BN_ASM= bn86-elf.o
|
||||
|
||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
||||
|
||||
# We let the C compiler driver to take care of .s files. This is done in
|
||||
# order to be excused from maintaining a separate set of architecture
|
||||
# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
|
||||
# gcc, then the driver will automatically translate it to -xarch=v8plus
|
||||
# and pass it down to assembler.
|
||||
AS=$(CC) -c
|
||||
ASFLAGS=$(CFLAGS)
|
||||
ASFLAGS= $(INCLUDES) $(ASFLAG)
|
||||
|
||||
GENERAL=Makefile
|
||||
TEST=bntest.c exptest.c
|
||||
@@ -73,22 +66,11 @@ lib: $(LIBOBJ)
|
||||
@touch lib
|
||||
|
||||
# elf
|
||||
asm/bn86-elf.o: asm/bn86unix.cpp
|
||||
$(CPP) -DELF -x c asm/bn86unix.cpp | as -o asm/bn86-elf.o
|
||||
asm/bn86-elf.s: asm/bn-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) bn-586.pl elf $(CFLAGS) > bn86-elf.s)
|
||||
|
||||
asm/co86-elf.o: asm/co86unix.cpp
|
||||
$(CPP) -DELF -x c asm/co86unix.cpp | as -o asm/co86-elf.o
|
||||
|
||||
# solaris
|
||||
asm/bn86-sol.o: asm/bn86unix.cpp
|
||||
$(CC) -E -DSOL asm/bn86unix.cpp | sed 's/^#.*//' > asm/bn86-sol.s
|
||||
as -o asm/bn86-sol.o asm/bn86-sol.s
|
||||
rm -f asm/bn86-sol.s
|
||||
|
||||
asm/co86-sol.o: asm/co86unix.cpp
|
||||
$(CC) -E -DSOL asm/co86unix.cpp | sed 's/^#.*//' > asm/co86-sol.s
|
||||
as -o asm/co86-sol.o asm/co86-sol.s
|
||||
rm -f asm/co86-sol.s
|
||||
asm/co86-elf.s: asm/co-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) co-586.pl elf $(CFLAGS) > co86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/bn86-out.o: asm/bn86unix.cpp
|
||||
@@ -178,7 +160,7 @@ dclean:
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/co86unix.cpp asm/bn86unix.cpp *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
|
||||
rm -f asm/co86unix.cpp asm/bn86unix.cpp asm/*-elf.* *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_asm.s
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
|
@@ -1,2 +1,4 @@
|
||||
bn86unix.cpp
|
||||
co86unix.cpp
|
||||
bn86-elf.s
|
||||
co86-elf.s
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.explicit
|
||||
.text
|
||||
.ident "ia64.S, Version 1.1"
|
||||
.ident "ia64.S, Version 2.0"
|
||||
.ident "IA-64 ISA artwork by Andy Polyakov <appro@fy.chalmers.se>"
|
||||
|
||||
//
|
||||
@@ -13,6 +13,35 @@
|
||||
// disclaimed.
|
||||
// ====================================================================
|
||||
//
|
||||
// Version 2.x is Itanium2 re-tune. Few words about how Itanum2 is
|
||||
// different from Itanium to this module viewpoint. Most notably, is it
|
||||
// "wider" than Itanium? Can you experience loop scalability as
|
||||
// discussed in commentary sections? Not really:-( Itanium2 has 6
|
||||
// integer ALU ports, i.e. it's 2 ports wider, but it's not enough to
|
||||
// spin twice as fast, as I need 8 IALU ports. Amount of floating point
|
||||
// ports is the same, i.e. 2, while I need 4. In other words, to this
|
||||
// module Itanium2 remains effectively as "wide" as Itanium. Yet it's
|
||||
// essentially different in respect to this module, and a re-tune was
|
||||
// required. Well, because some intruction latencies has changed. Most
|
||||
// noticeably those intensively used:
|
||||
//
|
||||
// Itanium Itanium2
|
||||
// ldf8 9 6 L2 hit
|
||||
// ld8 2 1 L1 hit
|
||||
// getf 2 5
|
||||
// xma[->getf] 7[+1] 4[+0]
|
||||
// add[->st8] 1[+1] 1[+0]
|
||||
//
|
||||
// What does it mean? You might ratiocinate that the original code
|
||||
// should run just faster... Because sum of latencies is smaller...
|
||||
// Wrong! Note that getf latency increased. This means that if a loop is
|
||||
// scheduled for lower latency (and they are), then it will suffer from
|
||||
// stall condition and the code will therefore turn anti-scalable, e.g.
|
||||
// original bn_mul_words spun at 5*n or 2.5 times slower than expected
|
||||
// on Itanium2! What to do? Reschedule loops for Itanium2? But then
|
||||
// Itanium would exhibit anti-scalability. So I've chosen to reschedule
|
||||
// for worst latency for every instruction aiming for best *all-round*
|
||||
// performance.
|
||||
|
||||
// Q. How much faster does it get?
|
||||
// A. Here is the output from 'openssl speed rsa dsa' for vanilla
|
||||
@@ -149,12 +178,27 @@ bn_add_words:
|
||||
brp.loop.imp .L_bn_add_words_ctop,.L_bn_add_words_cend-16
|
||||
}
|
||||
.body
|
||||
{ .mib; mov r14=r32 // rp
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
#endif
|
||||
mov r9=pr };;
|
||||
{ .mii; mov r15=r33 // ap
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
mov ar.lc=r10
|
||||
mov ar.ec=6 }
|
||||
{ .mib; mov r16=r34 // bp
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r16=0,r34 // bp
|
||||
#else
|
||||
mov r16=r34 // bp
|
||||
#endif
|
||||
mov pr.rot=1<<16 };;
|
||||
|
||||
.L_bn_add_words_ctop:
|
||||
@@ -174,7 +218,7 @@ bn_add_words:
|
||||
|
||||
{ .mii;
|
||||
(p59) add r8=1,r8 // return value
|
||||
mov pr=r9,-1
|
||||
mov pr=r9,0x1ffff
|
||||
mov ar.lc=r3 }
|
||||
{ .mbb; nop.b 0x0
|
||||
br.ret.sptk.many b0 };;
|
||||
@@ -202,12 +246,27 @@ bn_sub_words:
|
||||
brp.loop.imp .L_bn_sub_words_ctop,.L_bn_sub_words_cend-16
|
||||
}
|
||||
.body
|
||||
{ .mib; mov r14=r32 // rp
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
#endif
|
||||
mov r9=pr };;
|
||||
{ .mii; mov r15=r33 // ap
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
mov ar.lc=r10
|
||||
mov ar.ec=6 }
|
||||
{ .mib; mov r16=r34 // bp
|
||||
{ .mib;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r16=0,r34 // bp
|
||||
#else
|
||||
mov r16=r34 // bp
|
||||
#endif
|
||||
mov pr.rot=1<<16 };;
|
||||
|
||||
.L_bn_sub_words_ctop:
|
||||
@@ -227,7 +286,7 @@ bn_sub_words:
|
||||
|
||||
{ .mii;
|
||||
(p59) add r8=1,r8 // return value
|
||||
mov pr=r9,-1
|
||||
mov pr=r9,0x1ffff
|
||||
mov ar.lc=r3 }
|
||||
{ .mbb; nop.b 0x0
|
||||
br.ret.sptk.many b0 };;
|
||||
@@ -253,7 +312,7 @@ bn_mul_words:
|
||||
#ifdef XMA_TEMPTATION
|
||||
{ .mfi; alloc r2=ar.pfs,4,0,0,0 };;
|
||||
#else
|
||||
{ .mfi; alloc r2=ar.pfs,4,4,0,8 };;
|
||||
{ .mfi; alloc r2=ar.pfs,4,12,0,16 };;
|
||||
#endif
|
||||
{ .mib; mov r8=r0 // return value
|
||||
cmp4.le p6,p0=r34,r0
|
||||
@@ -266,24 +325,30 @@ bn_mul_words:
|
||||
|
||||
.body
|
||||
{ .mib; setf.sig f8=r35 // w
|
||||
mov pr.rot=0x400001<<16
|
||||
// ------^----- serves as (p48) at first (p26)
|
||||
mov pr.rot=0x800001<<16
|
||||
// ------^----- serves as (p50) at first (p27)
|
||||
brp.loop.imp .L_bn_mul_words_ctop,.L_bn_mul_words_cend-16
|
||||
}
|
||||
|
||||
#ifndef XMA_TEMPTATION
|
||||
|
||||
{ .mii; mov r14=r32 // rp
|
||||
mov r15=r33 // ap
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
mov ar.lc=r10 }
|
||||
{ .mii; mov r39=0 // serves as r33 at first (p26)
|
||||
mov ar.ec=12 };;
|
||||
{ .mii; mov r40=0 // serves as r35 at first (p27)
|
||||
mov ar.ec=13 };;
|
||||
|
||||
// This loop spins in 2*(n+11) ticks. It's scheduled for data in L2
|
||||
// cache (i.e. 9 ticks away) as floating point load/store instructions
|
||||
// This loop spins in 2*(n+12) ticks. It's scheduled for data in Itanium
|
||||
// L2 cache (i.e. 9 ticks away) as floating point load/store instructions
|
||||
// bypass L1 cache and L2 latency is actually best-case scenario for
|
||||
// ldf8. The loop is not scalable and shall run in 2*(n+11) even on
|
||||
// "wider" IA-64 implementations. It's a trade-off here. n+22 loop
|
||||
// ldf8. The loop is not scalable and shall run in 2*(n+12) even on
|
||||
// "wider" IA-64 implementations. It's a trade-off here. n+24 loop
|
||||
// would give us ~5% in *overall* performance improvement on "wider"
|
||||
// IA-64, but would hurt Itanium for about same because of longer
|
||||
// epilogue. As it's a matter of few percents in either case I've
|
||||
@@ -291,25 +356,25 @@ bn_mul_words:
|
||||
// this very instruction sequence in bn_mul_add_words loop which in
|
||||
// turn is scalable).
|
||||
.L_bn_mul_words_ctop:
|
||||
{ .mfi; (p25) getf.sig r36=f49 // low
|
||||
(p21) xmpy.lu f45=f37,f8
|
||||
(p27) cmp.ltu p52,p48=r39,r38 }
|
||||
{ .mfi; (p25) getf.sig r36=f52 // low
|
||||
(p21) xmpy.lu f48=f37,f8
|
||||
(p28) cmp.ltu p54,p50=r41,r39 }
|
||||
{ .mfi; (p16) ldf8 f32=[r15],8
|
||||
(p21) xmpy.hu f38=f37,f8
|
||||
(p21) xmpy.hu f40=f37,f8
|
||||
(p0) nop.i 0x0 };;
|
||||
{ .mii; (p26) getf.sig r32=f43 // high
|
||||
.pred.rel "mutex",p48,p52
|
||||
(p48) add r38=r37,r33 // (p26)
|
||||
(p52) add r38=r37,r33,1 } // (p26)
|
||||
{ .mfb; (p27) st8 [r14]=r39,8
|
||||
{ .mii; (p25) getf.sig r32=f44 // high
|
||||
.pred.rel "mutex",p50,p54
|
||||
(p50) add r40=r38,r35 // (p27)
|
||||
(p54) add r40=r38,r35,1 } // (p27)
|
||||
{ .mfb; (p28) st8 [r14]=r41,8
|
||||
(p0) nop.f 0x0
|
||||
br.ctop.sptk .L_bn_mul_words_ctop };;
|
||||
.L_bn_mul_words_cend:
|
||||
|
||||
{ .mii; nop.m 0x0
|
||||
.pred.rel "mutex",p49,p53
|
||||
(p49) add r8=r34,r0
|
||||
(p53) add r8=r34,r0,1 }
|
||||
.pred.rel "mutex",p51,p55
|
||||
(p51) add r8=r36,r0
|
||||
(p55) add r8=r36,r0,1 }
|
||||
{ .mfb; nop.m 0x0
|
||||
nop.f 0x0
|
||||
nop.b 0x0 }
|
||||
@@ -344,7 +409,7 @@ bn_mul_words:
|
||||
#endif // XMA_TEMPTATION
|
||||
|
||||
{ .mii; nop.m 0x0
|
||||
mov pr=r9,-1
|
||||
mov pr=r9,0x1ffff
|
||||
mov ar.lc=r3 }
|
||||
{ .mfb; rum 1<<5 // clear um.mfh
|
||||
nop.f 0x0
|
||||
@@ -376,59 +441,69 @@ bn_mul_add_words:
|
||||
|
||||
.body
|
||||
{ .mib; setf.sig f8=r35 // w
|
||||
mov pr.rot=0x400001<<16
|
||||
// ------^----- serves as (p48) at first (p26)
|
||||
mov pr.rot=0x800001<<16
|
||||
// ------^----- serves as (p50) at first (p27)
|
||||
brp.loop.imp .L_bn_mul_add_words_ctop,.L_bn_mul_add_words_cend-16
|
||||
}
|
||||
{ .mii; mov r14=r32 // rp
|
||||
mov r15=r33 // ap
|
||||
{ .mii;
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r14=0,r32 // rp
|
||||
addp4 r15=0,r33 // ap
|
||||
#else
|
||||
mov r14=r32 // rp
|
||||
mov r15=r33 // ap
|
||||
#endif
|
||||
mov ar.lc=r10 }
|
||||
{ .mii; mov r39=0 // serves as r33 at first (p26)
|
||||
mov r18=r32 // rp copy
|
||||
mov ar.ec=14 };;
|
||||
{ .mii; mov r40=0 // serves as r35 at first (p27)
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
addp4 r18=0,r32 // rp copy
|
||||
#else
|
||||
mov r18=r32 // rp copy
|
||||
#endif
|
||||
mov ar.ec=15 };;
|
||||
|
||||
// This loop spins in 3*(n+13) ticks on Itanium and should spin in
|
||||
// 2*(n+13) on "wider" IA-64 implementations (to be verified with new
|
||||
// This loop spins in 3*(n+14) ticks on Itanium and should spin in
|
||||
// 2*(n+14) on "wider" IA-64 implementations (to be verified with new
|
||||
// <EFBFBD>-architecture manuals as they become available). As usual it's
|
||||
// possible to compress the epilogue, down to 10 in this case, at the
|
||||
// cost of scalability. Compressed (and therefore non-scalable) loop
|
||||
// running at 3*(n+10) would buy you ~10% on Itanium but take ~35%
|
||||
// running at 3*(n+11) would buy you ~10% on Itanium but take ~35%
|
||||
// from "wider" IA-64 so let it be scalable! Special attention was
|
||||
// paid for having the loop body split at 64-byte boundary. ld8 is
|
||||
// scheduled for L1 cache as the data is more than likely there.
|
||||
// Indeed, bn_mul_words has put it there a moment ago:-)
|
||||
.L_bn_mul_add_words_ctop:
|
||||
{ .mfi; (p25) getf.sig r36=f49 // low
|
||||
(p21) xmpy.lu f45=f37,f8
|
||||
(p27) cmp.ltu p52,p48=r39,r38 }
|
||||
{ .mfi; (p25) getf.sig r36=f52 // low
|
||||
(p21) xmpy.lu f48=f37,f8
|
||||
(p28) cmp.ltu p54,p50=r41,r39 }
|
||||
{ .mfi; (p16) ldf8 f32=[r15],8
|
||||
(p21) xmpy.hu f38=f37,f8
|
||||
(p27) add r43=r43,r39 };;
|
||||
{ .mii; (p26) getf.sig r32=f43 // high
|
||||
.pred.rel "mutex",p48,p52
|
||||
(p48) add r38=r37,r33 // (p26)
|
||||
(p52) add r38=r37,r33,1 } // (p26)
|
||||
{ .mfb; (p27) cmp.ltu.unc p56,p0=r43,r39
|
||||
(p21) xmpy.hu f40=f37,f8
|
||||
(p28) add r45=r45,r41 };;
|
||||
{ .mii; (p25) getf.sig r32=f44 // high
|
||||
.pred.rel "mutex",p50,p54
|
||||
(p50) add r40=r38,r35 // (p27)
|
||||
(p54) add r40=r38,r35,1 } // (p27)
|
||||
{ .mfb; (p28) cmp.ltu.unc p60,p0=r45,r41
|
||||
(p0) nop.f 0x0
|
||||
(p0) nop.b 0x0 }
|
||||
{ .mii; (p26) ld8 r42=[r18],8
|
||||
(p58) cmp.eq.or p57,p0=-1,r44
|
||||
(p58) add r44=1,r44 }
|
||||
{ .mfb; (p29) st8 [r14]=r45,8
|
||||
{ .mii; (p27) ld8 r44=[r18],8
|
||||
(p62) cmp.eq.or p61,p0=-1,r46
|
||||
(p62) add r46=1,r46 }
|
||||
{ .mfb; (p30) st8 [r14]=r47,8
|
||||
(p0) nop.f 0x0
|
||||
br.ctop.sptk .L_bn_mul_add_words_ctop};;
|
||||
.L_bn_mul_add_words_cend:
|
||||
|
||||
{ .mii; nop.m 0x0
|
||||
.pred.rel "mutex",p51,p55
|
||||
(p51) add r8=r36,r0
|
||||
(p55) add r8=r36,r0,1 }
|
||||
.pred.rel "mutex",p53,p57
|
||||
(p53) add r8=r38,r0
|
||||
(p57) add r8=r38,r0,1 }
|
||||
{ .mfb; nop.m 0x0
|
||||
nop.f 0x0
|
||||
nop.b 0x0 };;
|
||||
{ .mii;
|
||||
(p59) add r8=1,r8
|
||||
mov pr=r9,-1
|
||||
(p63) add r8=1,r8
|
||||
mov pr=r9,0x1ffff
|
||||
mov ar.lc=r3 }
|
||||
{ .mfb; rum 1<<5 // clear um.mfh
|
||||
nop.f 0x0
|
||||
@@ -461,6 +536,10 @@ bn_sqr_words:
|
||||
mov r9=pr };;
|
||||
|
||||
.body
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
{ .mii; addp4 r32=0,r32
|
||||
addp4 r33=0,r33 };;
|
||||
#endif
|
||||
{ .mib;
|
||||
mov pr.rot=1<<16
|
||||
brp.loop.imp .L_bn_sqr_words_ctop,.L_bn_sqr_words_cend-16
|
||||
@@ -492,7 +571,7 @@ bn_sqr_words:
|
||||
.L_bn_sqr_words_cend:
|
||||
|
||||
{ .mii; nop.m 0x0
|
||||
mov pr=r9,-1
|
||||
mov pr=r9,0x1ffff
|
||||
mov ar.lc=r3 }
|
||||
{ .mfb; rum 1<<5 // clear um.mfh
|
||||
nop.f 0x0
|
||||
@@ -526,7 +605,14 @@ bn_sqr_comba8:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
{ .mii; alloc r2=ar.pfs,2,1,0,0
|
||||
addp4 r33=0,r33
|
||||
addp4 r32=0,r32 };;
|
||||
{ .mii;
|
||||
#else
|
||||
{ .mii; alloc r2=ar.pfs,2,1,0,0
|
||||
#endif
|
||||
mov r34=r33
|
||||
add r14=8,r33 };;
|
||||
.body
|
||||
@@ -587,7 +673,14 @@ bn_mul_comba8:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
{ .mii; alloc r2=ar.pfs,3,0,0,0
|
||||
addp4 r33=0,r33
|
||||
addp4 r34=0,r34 };;
|
||||
{ .mii; addp4 r32=0,r32
|
||||
#else
|
||||
{ .mii; alloc r2=ar.pfs,3,0,0,0
|
||||
#endif
|
||||
add r14=8,r33
|
||||
add r17=8,r34 }
|
||||
.body
|
||||
@@ -1138,7 +1231,14 @@ bn_sqr_comba4:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
{ .mii; alloc r2=ar.pfs,2,1,0,0
|
||||
addp4 r32=0,r32
|
||||
addp4 r33=0,r33 };;
|
||||
{ .mii;
|
||||
#else
|
||||
{ .mii; alloc r2=ar.pfs,2,1,0,0
|
||||
#endif
|
||||
mov r34=r33
|
||||
add r14=8,r33 };;
|
||||
.body
|
||||
@@ -1164,7 +1264,14 @@ bn_mul_comba4:
|
||||
.prologue
|
||||
.fframe 0
|
||||
.save ar.pfs,r2
|
||||
#if defined(_HPUX_SOURCE) && defined(_ILP32)
|
||||
{ .mii; alloc r2=ar.pfs,3,0,0,0
|
||||
addp4 r33=0,r33
|
||||
addp4 r34=0,r34 };;
|
||||
{ .mii; addp4 r32=0,r32
|
||||
#else
|
||||
{ .mii; alloc r2=ar.pfs,3,0,0,0
|
||||
#endif
|
||||
add r14=8,r33
|
||||
add r17=8,r34 }
|
||||
.body
|
||||
@@ -1464,7 +1571,7 @@ bn_div_words:
|
||||
or r8=r8,r33
|
||||
mov ar.pfs=r2 };;
|
||||
{ .mii; shr.u r9=H,I // remainder if anybody wants it
|
||||
mov pr=r10,-1 }
|
||||
mov pr=r10,0x1ffff }
|
||||
{ .mfb; br.ret.sptk.many b0 };;
|
||||
|
||||
// Unsigned 64 by 32 (well, by 64 for the moment) bit integer division
|
||||
|
@@ -747,8 +747,8 @@ bn_div_words
|
||||
.PROC
|
||||
.EXPORT bn_div_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR,LONG_RETURN
|
||||
.IMPORT BN_num_bits_word,CODE
|
||||
.IMPORT __iob,DATA
|
||||
.IMPORT fprintf,CODE
|
||||
;--- not PIC .IMPORT __iob,DATA
|
||||
;--- not PIC .IMPORT fprintf,CODE
|
||||
.IMPORT abort,CODE
|
||||
.IMPORT $$div2U,MILLICODE
|
||||
.CALLINFO CALLER,FRAME=144,ENTRY_GR=%r9,SAVE_RP,ARGS_SAVED,ORDERING_AWARE
|
||||
@@ -844,12 +844,12 @@ $0006001A
|
||||
MOVIB,TR 2,%r8,$0006001C ;offset 0xa18
|
||||
EXTRD,U %r3,63,32,%r7 ;offset 0xa1c
|
||||
$D2
|
||||
ADDIL LR'__iob-$global$,%r27,%r1 ;offset 0xa20
|
||||
LDIL LR'C$7,%r21 ;offset 0xa24
|
||||
LDO RR'__iob-$global$+32(%r1),%r26 ;offset 0xa28
|
||||
.CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR ;in=24,25,26;out=28;
|
||||
B,L fprintf,%r2 ;offset 0xa2c
|
||||
LDO RR'C$7(%r21),%r25 ;offset 0xa30
|
||||
;--- not PIC ADDIL LR'__iob-$global$,%r27,%r1 ;offset 0xa20
|
||||
;--- not PIC LDIL LR'C$7,%r21 ;offset 0xa24
|
||||
;--- not PIC LDO RR'__iob-$global$+32(%r1),%r26 ;offset 0xa28
|
||||
;--- not PIC .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR ;in=24,25,26;out=28;
|
||||
;--- not PIC B,L fprintf,%r2 ;offset 0xa2c
|
||||
;--- not PIC LDO RR'C$7(%r21),%r25 ;offset 0xa30
|
||||
.CALL ;
|
||||
B,L abort,%r2 ;offset 0xa34
|
||||
NOP ;offset 0xa38
|
||||
@@ -1605,14 +1605,14 @@ bn_mul_comba4
|
||||
.PROCEND
|
||||
|
||||
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
.SPACE $PRIVATE$,SORT=16
|
||||
.IMPORT $global$,DATA
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
.SUBSPA $LIT$,ACCESS=0x2c
|
||||
C$7
|
||||
.ALIGN 8
|
||||
.STRINGZ "Division would overflow (%d)\n"
|
||||
;--- not PIC .SPACE $TEXT$
|
||||
;--- not PIC .SUBSPA $CODE$
|
||||
;--- not PIC .SPACE $PRIVATE$,SORT=16
|
||||
;--- not PIC .IMPORT $global$,DATA
|
||||
;--- not PIC .SPACE $TEXT$
|
||||
;--- not PIC .SUBSPA $CODE$
|
||||
;--- not PIC .SUBSPA $LIT$,ACCESS=0x2c
|
||||
;--- not PIC C$7
|
||||
;--- not PIC .ALIGN 8
|
||||
;--- not PIC .STRINGZ "Division would overflow (%d)\n"
|
||||
.END
|
||||
|
@@ -248,6 +248,8 @@ typedef struct bn_blinding_st
|
||||
BIGNUM *A;
|
||||
BIGNUM *Ai;
|
||||
BIGNUM *mod; /* just a reference */
|
||||
unsigned long thread_id; /* added in OpenSSL 0.9.6j and 0.9.7b;
|
||||
* used only by crypto/rsa/rsa_eay.c, rsa_lib.c */
|
||||
} BN_BLINDING;
|
||||
|
||||
/* Used for montgomery multiplication */
|
||||
|
@@ -446,10 +446,6 @@ void bn_mul_low_recursive(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,int n2,
|
||||
BN_ULONG *t);
|
||||
void bn_mul_high(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,BN_ULONG *l,int n2,
|
||||
BN_ULONG *t);
|
||||
BN_ULONG bn_add_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b,
|
||||
int cl, int dl);
|
||||
BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b,
|
||||
int cl, int dl);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -224,7 +224,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn,
|
||||
int n, BN_ULONG *t)
|
||||
{
|
||||
int i,j,n2=n*2;
|
||||
unsigned int c1,c2,neg,zero;
|
||||
int c1,c2,neg,zero;
|
||||
BN_ULONG ln,lo,*p;
|
||||
|
||||
# ifdef BN_COUNT
|
||||
@@ -376,7 +376,7 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int tn,
|
||||
|
||||
/* The overflow will stop before we over write
|
||||
* words we should not overwrite */
|
||||
if (ln < c1)
|
||||
if (ln < (BN_ULONG)c1)
|
||||
{
|
||||
do {
|
||||
p++;
|
||||
|
@@ -140,6 +140,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
||||
BN_CTX *ctx;
|
||||
int checks = BN_prime_checks_for_size(bits);
|
||||
|
||||
BN_init(&t);
|
||||
ctx=BN_CTX_new();
|
||||
if (ctx == NULL) goto err;
|
||||
if (ret == NULL)
|
||||
@@ -148,7 +149,6 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
||||
}
|
||||
else
|
||||
rnd=ret;
|
||||
BN_init(&t);
|
||||
loop:
|
||||
/* make a random number and set the top and bottom bits */
|
||||
if (add == NULL)
|
||||
|
@@ -68,10 +68,6 @@
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#include "../bio/bss_file.c"
|
||||
#endif
|
||||
|
||||
const int num0 = 100; /* number of tests */
|
||||
const int num1 = 50; /* additional tests for some functions */
|
||||
const int num2 = 5; /* number of tests for slow functions */
|
||||
@@ -96,11 +92,6 @@ int test_sqrt(BIO *bp,BN_CTX *ctx);
|
||||
int rand_neg(void);
|
||||
static int results=0;
|
||||
|
||||
#ifdef OPENSSL_NO_STDIO
|
||||
#define APPS_WIN16
|
||||
#include "bss_file.c"
|
||||
#endif
|
||||
|
||||
static unsigned char lst[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8\xC9"
|
||||
"\x9B\x04\x5D\x48\x36\xC2\xFD\x16\xC9\x64\xF0";
|
||||
|
||||
|
@@ -66,9 +66,6 @@
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/err.h>
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#include "../bio/bss_file.c"
|
||||
#endif
|
||||
|
||||
#define NUM_BITS (BN_BITS*2)
|
||||
|
||||
|
@@ -52,14 +52,8 @@ lib: $(LIBOBJ)
|
||||
@touch lib
|
||||
|
||||
# elf
|
||||
asm/cx86-elf.o: asm/cx86unix.cpp
|
||||
$(CPP) -DELF -x c asm/cx86unix.cpp | as -o asm/cx86-elf.o
|
||||
|
||||
# solaris
|
||||
asm/cx86-sol.o: asm/cx86unix.cpp
|
||||
$(CC) -E -DSOL asm/cx86unix.cpp | sed 's/^#.*//' > asm/cx86-sol.s
|
||||
as -o asm/cx86-sol.o asm/cx86-sol.s
|
||||
rm -f asm/cx86-sol.s
|
||||
asm/cx86-elf.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) cast-586.pl elf $(CLAGS) $(PROCESSOR) > cx86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/cx86-out.o: asm/cx86unix.cpp
|
||||
@@ -104,7 +98,7 @@ dclean:
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/cx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
rm -f asm/cx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
|
@@ -63,7 +63,9 @@
|
||||
#include <openssl/dso.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/asn1.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
/* Load all OpenSSL builtin modules */
|
||||
|
||||
@@ -71,6 +73,8 @@ void OPENSSL_load_builtin_modules(void)
|
||||
{
|
||||
/* Add builtin modules here */
|
||||
ASN1_add_oid_module();
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE_add_conf_module();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,9 @@
|
||||
#include <openssl/dso.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/asn1.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
/* This is the automatic configuration loader: it is called automatically by
|
||||
* OpenSSL when any of a number of standard initialisation functions are called,
|
||||
@@ -78,8 +80,10 @@ void OPENSSL_config(const char *config_name)
|
||||
return;
|
||||
|
||||
OPENSSL_load_builtin_modules();
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
/* Need to load ENGINEs */
|
||||
ENGINE_load_builtin_engines();
|
||||
#endif
|
||||
/* Add others here? */
|
||||
|
||||
|
||||
|
@@ -66,30 +66,11 @@ des: des.o cbc3_enc.o lib
|
||||
$(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)
|
||||
|
||||
# elf
|
||||
asm/dx86-elf.o: asm/dx86unix.cpp
|
||||
$(CPP) -DELF \
|
||||
`(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
|
||||
-x c asm/dx86unix.cpp | as -o asm/dx86-elf.o
|
||||
asm/dx86-elf.s: asm/des-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) des-586.pl elf $(CFLAGS) > dx86-elf.s)
|
||||
|
||||
asm/yx86-elf.o: asm/yx86unix.cpp
|
||||
$(CPP) -DELF \
|
||||
`(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
|
||||
-x c asm/yx86unix.cpp | as -o asm/yx86-elf.o
|
||||
|
||||
# solaris
|
||||
asm/dx86-sol.o: asm/dx86unix.cpp
|
||||
$(CC) -E -DSOL \
|
||||
`(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
|
||||
asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
|
||||
as -o asm/dx86-sol.o asm/dx86-sol.s
|
||||
rm -f asm/dx86-sol.s
|
||||
|
||||
asm/yx86-sol.o: asm/yx86unix.cpp
|
||||
$(CC) -E -DSOL \
|
||||
`(echo $(CFLAGS) | egrep -ie '-[fK]PIC') > /dev/null 2>&1 && echo -DPIC; exit 0`\
|
||||
asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
|
||||
as -o asm/yx86-sol.o asm/yx86-sol.s
|
||||
rm -f asm/yx86-sol.s
|
||||
asm/yx86-elf.s: asm/crypt586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
|
||||
(cd asm; $(PERL) crypt586.pl elf $(CFLAGS) > yx86-elf.s)
|
||||
|
||||
# a.out
|
||||
asm/dx86-out.o: asm/dx86unix.cpp
|
||||
@@ -145,7 +126,7 @@ dclean:
|
||||
mv -f Makefile.new $(MAKEFILE)
|
||||
|
||||
clean:
|
||||
rm -f asm/dx86unix.cpp asm/yx86unix.cpp *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
|
||||
rm -f asm/dx86unix.cpp asm/yx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
|
@@ -1,2 +1,5 @@
|
||||
dx86unix.cpp
|
||||
yx86unix.cpp
|
||||
des_enc-sparc.S
|
||||
dx86-elf.s
|
||||
yx86-elf.s
|
||||
|
@@ -32,8 +32,9 @@ sub fcrypt_body
|
||||
&xor( $R, $R);
|
||||
|
||||
# PIC-ification:-)
|
||||
if ($cpp) { &picmeup("edx","DES_SPtrans"); }
|
||||
else { &lea("edx",&DWP("DES_SPtrans")); }
|
||||
&picmeup("edx","DES_SPtrans");
|
||||
#if ($cpp) { &picmeup("edx","DES_SPtrans"); }
|
||||
#else { &lea("edx",&DWP("DES_SPtrans")); }
|
||||
&push("edx"); # becomes &swtmp(1)
|
||||
#
|
||||
&mov($trans,&wparam(1)); # reloaded with DES_SPtrans in D_ENCRYPT
|
||||
|
@@ -73,8 +73,9 @@ sub DES_encrypt
|
||||
}
|
||||
|
||||
# PIC-ification:-)
|
||||
if ($cpp) { &picmeup($trans,"DES_SPtrans"); }
|
||||
else { &lea($trans,&DWP("DES_SPtrans")); }
|
||||
&picmeup($trans,"DES_SPtrans");
|
||||
#if ($cpp) { &picmeup($trans,"DES_SPtrans"); }
|
||||
#else { &lea($trans,&DWP("DES_SPtrans")); }
|
||||
|
||||
&mov( "ecx", &wparam(1) );
|
||||
&cmp("ebx","0");
|
||||
|
@@ -93,5 +93,14 @@ DES_LONG DES_cbc_cksum(const unsigned char *in, DES_cblock *output,
|
||||
l2c(tout1,out);
|
||||
}
|
||||
tout0=tin0=tin1=tin[0]=tin[1]=0;
|
||||
/*
|
||||
Transform the data in tout1 so that it will
|
||||
match the return value that the MIT Kerberos
|
||||
mit_des_cbc_cksum API returns.
|
||||
*/
|
||||
tout1 = ((tout1 >> 24L) & 0x000000FF)
|
||||
| ((tout1 >> 8L) & 0x0000FF00)
|
||||
| ((tout1 << 8L) & 0x00FF0000)
|
||||
| ((tout1 << 24L) & 0xFF000000);
|
||||
return(tout1);
|
||||
}
|
||||
|
@@ -64,32 +64,22 @@
|
||||
* the second. The second 12 bits will come from the 3rd and half the 4th
|
||||
* byte.
|
||||
*/
|
||||
/* WARNING WARNING: this uses in and out in 8-byte chunks regardless of
|
||||
* length */
|
||||
/* Until Aug 1 2003 this function did not correctly implement CFB-r, so it
|
||||
* will not be compatible with any encryption prior to that date. Ben. */
|
||||
void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec, int enc)
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int enc)
|
||||
{
|
||||
register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8;
|
||||
register DES_LONG mask0,mask1;
|
||||
register unsigned long l=length;
|
||||
register int num=numbits;
|
||||
DES_LONG ti[2];
|
||||
unsigned char *iv;
|
||||
unsigned char ovec[16];
|
||||
|
||||
if (num > 64) return;
|
||||
if (num > 32)
|
||||
{
|
||||
mask0=0xffffffffL;
|
||||
if (num == 64)
|
||||
mask1=mask0;
|
||||
else mask1=(1L<<(num-32))-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 32)
|
||||
mask0=0xffffffffL;
|
||||
else mask0=(1L<<num)-1;
|
||||
mask1=0x00000000L;
|
||||
}
|
||||
|
||||
iv = &(*ivec)[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
@@ -103,8 +93,8 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
DES_encrypt1((DES_LONG *)ti,schedule,DES_ENCRYPT);
|
||||
c2ln(in,d0,d1,n);
|
||||
in+=n;
|
||||
d0=(d0^ti[0])&mask0;
|
||||
d1=(d1^ti[1])&mask1;
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
/* 30-08-94 - eay - changed because l>>32 and
|
||||
@@ -113,15 +103,25 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else if (num > 32) /* && num != 64 */
|
||||
else
|
||||
{
|
||||
v0=((v1>>(num-32))|(d0<<(64-num)))&0xffffffffL;
|
||||
v1=((d0>>(num-32))|(d1<<(64-num)))&0xffffffffL;
|
||||
}
|
||||
else /* num < 32 */
|
||||
{
|
||||
v0=((v0>>num)|(v1<<(32-num)))&0xffffffffL;
|
||||
v1=((v1>>num)|(d0<<(32-num)))&0xffffffffL;
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(n=0 ; n < 8 ; ++n)
|
||||
{
|
||||
ovec[n]<<=num%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,18 +141,28 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else if (num > 32) /* && num != 64 */
|
||||
else
|
||||
{
|
||||
v0=((v1>>(num-32))|(d0<<(64-num)))&0xffffffffL;
|
||||
v1=((d0>>(num-32))|(d1<<(64-num)))&0xffffffffL;
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(n=0 ; n < 8 ; ++n)
|
||||
{
|
||||
ovec[n]<<=num%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
else /* num < 32 */
|
||||
{
|
||||
v0=((v0>>num)|(v1<<(32-num)))&0xffffffffL;
|
||||
v1=((v1>>num)|(d0<<(32-num)))&0xffffffffL;
|
||||
}
|
||||
d0=(d0^ti[0])&mask0;
|
||||
d1=(d1^ti[1])&mask1;
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
}
|
||||
|
@@ -162,7 +162,7 @@
|
||||
|
||||
#if defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER)
|
||||
#define ROTATE(a,n) (_lrotr(a,n))
|
||||
#elif defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(NO_ASM) && !defined(NO_INLINE_ASM)
|
||||
#elif defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC)
|
||||
# if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__)
|
||||
# define ROTATE(a,n) ({ register unsigned int ret; \
|
||||
asm ("rorl %1,%0" \
|
||||
|
@@ -320,7 +320,11 @@ static unsigned char ofb_cipher[24]=
|
||||
0x3d,0x6d,0x5b,0xe3,0x25,0x5a,0xf8,0xc3
|
||||
};
|
||||
|
||||
#if 0
|
||||
static DES_LONG cbc_cksum_ret=0xB462FEF7L;
|
||||
#else
|
||||
static DES_LONG cbc_cksum_ret=0xF7FE62B4L;
|
||||
#endif
|
||||
static unsigned char cbc_cksum_data[8]={0x1D,0x26,0x93,0x97,0xf7,0xfe,0x62,0xb4};
|
||||
|
||||
static char *pt(unsigned char *p);
|
||||
@@ -427,7 +431,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
#ifndef LIBDES_LIT
|
||||
printf("Doing ede ecb\n");
|
||||
for (i=0; i<(NUM_TESTS-1); i++)
|
||||
for (i=0; i<(NUM_TESTS-2); i++)
|
||||
{
|
||||
DES_set_key_unchecked(&key_data[i],&ks);
|
||||
DES_set_key_unchecked(&key_data[i+1],&ks2);
|
||||
|
@@ -112,17 +112,14 @@ dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dh_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
|
||||
dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dh_gen.o: ../cryptlib.h dh_gen.c
|
||||
dh_key.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
dh_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dh_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
dh_key.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
dh_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dh_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dh_key.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
dh_key.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os2.h
|
||||
dh_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dh_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
dh_key.o: ../cryptlib.h dh_key.c
|
||||
dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h dh_key.c
|
||||
dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
|
@@ -61,7 +61,6 @@
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/engine.h>
|
||||
|
||||
static int generate_key(DH *dh);
|
||||
static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
|
||||
|
@@ -60,7 +60,9 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/dh.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
const char *DH_version="Diffie-Hellman" OPENSSL_VERSION_PTEXT;
|
||||
|
||||
@@ -85,11 +87,13 @@ int DH_set_method(DH *dh, const DH_METHOD *meth)
|
||||
const DH_METHOD *mtmp;
|
||||
mtmp = dh->meth;
|
||||
if (mtmp->finish) mtmp->finish(dh);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (dh->engine)
|
||||
{
|
||||
ENGINE_finish(dh->engine);
|
||||
dh->engine = NULL;
|
||||
}
|
||||
#endif
|
||||
dh->meth = meth;
|
||||
if (meth->init) meth->init(dh);
|
||||
return 1;
|
||||
@@ -112,6 +116,7 @@ DH *DH_new_method(ENGINE *engine)
|
||||
}
|
||||
|
||||
ret->meth = DH_get_default_method();
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (engine)
|
||||
{
|
||||
if (!ENGINE_init(engine))
|
||||
@@ -135,6 +140,7 @@ DH *DH_new_method(ENGINE *engine)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
ret->pad=0;
|
||||
ret->version=0;
|
||||
@@ -154,8 +160,10 @@ DH *DH_new_method(ENGINE *engine)
|
||||
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_DH, ret, &ret->ex_data);
|
||||
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (ret->engine)
|
||||
ENGINE_finish(ret->engine);
|
||||
#endif
|
||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DH, ret, &ret->ex_data);
|
||||
OPENSSL_free(ret);
|
||||
ret=NULL;
|
||||
@@ -182,8 +190,10 @@ void DH_free(DH *r)
|
||||
|
||||
if (r->meth->finish)
|
||||
r->meth->finish(r);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (r->engine)
|
||||
ENGINE_finish(r->engine);
|
||||
#endif
|
||||
|
||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DH, r, &r->ex_data);
|
||||
|
||||
|
@@ -62,9 +62,6 @@
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#include "../bio/bss_file.c"
|
||||
#endif
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/bn.h>
|
||||
@@ -87,10 +84,6 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
static void MS_CALLBACK cb(int p, int n, void *arg);
|
||||
#ifdef OPENSSL_NO_STDIO
|
||||
#define APPS_WIN16
|
||||
#include "bss_file.c"
|
||||
#endif
|
||||
|
||||
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
|
||||
|
||||
|
@@ -143,35 +143,29 @@ dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
dsa_ossl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dsa_ossl.o: ../../include/openssl/opensslconf.h
|
||||
dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
dsa_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dsa_ossl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
dsa_ossl.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
dsa_ossl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_ossl.o: ../cryptlib.h dsa_ossl.c
|
||||
dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dsa_sign.o: ../../include/openssl/opensslconf.h
|
||||
dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dsa_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
dsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
dsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_sign.o: ../cryptlib.h dsa_sign.c
|
||||
dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
|
||||
dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
dsa_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
dsa_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
dsa_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_vrf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dsa_vrf.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dsa_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
dsa_vrf.o: ../cryptlib.h dsa_vrf.c
|
||||
dsa_vrf.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_vrf.c
|
||||
|
@@ -63,7 +63,9 @@
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/asn1.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
|
||||
const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT;
|
||||
|
||||
@@ -93,11 +95,13 @@ int DSA_set_method(DSA *dsa, const DSA_METHOD *meth)
|
||||
const DSA_METHOD *mtmp;
|
||||
mtmp = dsa->meth;
|
||||
if (mtmp->finish) mtmp->finish(dsa);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (dsa->engine)
|
||||
{
|
||||
ENGINE_finish(dsa->engine);
|
||||
dsa->engine = NULL;
|
||||
}
|
||||
#endif
|
||||
dsa->meth = meth;
|
||||
if (meth->init) meth->init(dsa);
|
||||
return 1;
|
||||
@@ -114,6 +118,7 @@ DSA *DSA_new_method(ENGINE *engine)
|
||||
return(NULL);
|
||||
}
|
||||
ret->meth = DSA_get_default_method();
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (engine)
|
||||
{
|
||||
if (!ENGINE_init(engine))
|
||||
@@ -138,6 +143,7 @@ DSA *DSA_new_method(ENGINE *engine)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
ret->pad=0;
|
||||
ret->version=0;
|
||||
@@ -158,8 +164,10 @@ DSA *DSA_new_method(ENGINE *engine)
|
||||
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_DSA, ret, &ret->ex_data);
|
||||
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (ret->engine)
|
||||
ENGINE_finish(ret->engine);
|
||||
#endif
|
||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, ret, &ret->ex_data);
|
||||
OPENSSL_free(ret);
|
||||
ret=NULL;
|
||||
@@ -189,8 +197,10 @@ void DSA_free(DSA *r)
|
||||
|
||||
if(r->meth->finish)
|
||||
r->meth->finish(r);
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if(r->engine)
|
||||
ENGINE_finish(r->engine);
|
||||
#endif
|
||||
|
||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data);
|
||||
|
||||
|
@@ -64,7 +64,6 @@
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/engine.h>
|
||||
|
||||
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
||||
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
|
||||
@@ -106,13 +105,15 @@ static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
||||
int i,reason=ERR_R_BN_LIB;
|
||||
DSA_SIG *ret=NULL;
|
||||
|
||||
BN_init(&m);
|
||||
BN_init(&xr);
|
||||
|
||||
if (!dsa->p || !dsa->q || !dsa->g)
|
||||
{
|
||||
reason=DSA_R_MISSING_PARAMETERS;
|
||||
goto err;
|
||||
}
|
||||
BN_init(&m);
|
||||
BN_init(&xr);
|
||||
|
||||
s=BN_new();
|
||||
if (s == NULL) goto err;
|
||||
|
||||
@@ -178,6 +179,9 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
DSAerr(DSA_F_DSA_SIGN_SETUP,DSA_R_MISSING_PARAMETERS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BN_init(&k);
|
||||
|
||||
if (ctx_in == NULL)
|
||||
{
|
||||
if ((ctx=BN_CTX_new()) == NULL) goto err;
|
||||
@@ -185,7 +189,6 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
else
|
||||
ctx=ctx_in;
|
||||
|
||||
BN_init(&k);
|
||||
if ((r=BN_new()) == NULL) goto err;
|
||||
kinv=NULL;
|
||||
|
||||
@@ -241,11 +244,12 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((ctx=BN_CTX_new()) == NULL) goto err;
|
||||
BN_init(&u1);
|
||||
BN_init(&u2);
|
||||
BN_init(&t1);
|
||||
|
||||
if ((ctx=BN_CTX_new()) == NULL) goto err;
|
||||
|
||||
if (BN_is_zero(sig->r) || sig->r->neg || BN_ucmp(sig->r, dsa->q) >= 0)
|
||||
{
|
||||
ret = 0;
|
||||
|
@@ -64,7 +64,6 @@
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/engine.h>
|
||||
|
||||
DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
||||
{
|
||||
|
@@ -65,7 +65,6 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/engine.h>
|
||||
|
||||
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
||||
DSA *dsa)
|
||||
|
@@ -103,7 +103,7 @@ main()
|
||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||
|
||||
memcpy(seed_buf,seed,20);
|
||||
dsa=DSA_generate_parameters(1024,seed,20,&counter,&h,cb);
|
||||
dsa=DSA_generate_parameters(1024,seed,20,&counter,&h,cb,bio_err);
|
||||
|
||||
if (dsa == NULL)
|
||||
DSA_print(bio_err,dsa,0);
|
||||
|
@@ -68,10 +68,6 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/engine.h>
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
#include "../bio/bss_file.c"
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_NO_DSA
|
||||
int main(int argc, char *argv[])
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user