Compare commits
481 Commits
OpenSSL-en
...
OpenSSL-en
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c086616c3e | ||
![]() |
f87ab7a42d | ||
![]() |
696335ab46 | ||
![]() |
322f190a18 | ||
![]() |
c4a150c242 | ||
![]() |
a3c5420b28 | ||
![]() |
c99f9b8ff3 | ||
![]() |
22b3a95d5c | ||
![]() |
63e86149c1 | ||
![]() |
ca8f05d093 | ||
![]() |
df29cc8f77 | ||
![]() |
ec7164133d | ||
![]() |
ba8ad07490 | ||
![]() |
17582ccf21 | ||
![]() |
31be2daa06 | ||
![]() |
de868e0b94 | ||
![]() |
15994b034a | ||
![]() |
922fa76e26 | ||
![]() |
19aa370573 | ||
![]() |
d020e701bb | ||
![]() |
364ff369d1 | ||
![]() |
8a09b3866a | ||
![]() |
137445140b | ||
![]() |
6a8afe2201 | ||
![]() |
1e3a9b650f | ||
![]() |
229dc0ee31 | ||
![]() |
fcc764639d | ||
![]() |
821385ad00 | ||
![]() |
b0fc31b390 | ||
![]() |
25ff76d565 | ||
![]() |
9801fb61d0 | ||
![]() |
20199ca809 | ||
![]() |
711f1a3c26 | ||
![]() |
a1d85309ee | ||
![]() |
450cee5c3a | ||
![]() |
a2dbcf3644 | ||
![]() |
4663355496 | ||
![]() |
9dc610495c | ||
![]() |
055076cd4f | ||
![]() |
527497a722 | ||
![]() |
32d21c1ef6 | ||
![]() |
629b58b7fb | ||
![]() |
7fa2a81d34 | ||
![]() |
7f66ab4783 | ||
![]() |
95189389b0 | ||
![]() |
b4b82ab465 | ||
![]() |
89618e7a0d | ||
![]() |
b87e2576b5 | ||
![]() |
0bf23d9b20 | ||
![]() |
813f256783 | ||
![]() |
bfa96bc20e | ||
![]() |
6f17f16fd5 | ||
![]() |
84034f7aec | ||
![]() |
6ceffdd121 | ||
![]() |
acce40c585 | ||
![]() |
6dc78bf7e8 | ||
![]() |
9c8fd367c4 | ||
![]() |
ce4f169ff9 | ||
![]() |
c566205319 | ||
![]() |
eaf6c61c9f | ||
![]() |
4c53d11d7f | ||
![]() |
1d647444e3 | ||
![]() |
c1eeb6078f | ||
![]() |
953db08416 | ||
![]() |
0a5942093e | ||
![]() |
d78254aa28 | ||
![]() |
af67804bef | ||
![]() |
35a6db8640 | ||
![]() |
56dc24d483 | ||
![]() |
84d828ab70 | ||
![]() |
cfae3d94e9 | ||
![]() |
b9c23cca01 | ||
![]() |
c863201780 | ||
![]() |
cb21d001c9 | ||
![]() |
c7faede37b | ||
![]() |
d4e573f305 | ||
![]() |
e20afbb340 | ||
![]() |
2b2ab52354 | ||
![]() |
8d6e60486f | ||
![]() |
1f30946481 | ||
![]() |
b1697f189b | ||
![]() |
17a202add7 | ||
![]() |
3bd16a8902 | ||
![]() |
555d75252a | ||
![]() |
eaad02a747 | ||
![]() |
97101fafd5 | ||
![]() |
403f1bdc70 | ||
![]() |
d574d83993 | ||
![]() |
83411793b6 | ||
![]() |
65caee44ff | ||
![]() |
738554331b | ||
![]() |
3f083ef0eb | ||
![]() |
17ed6c06a7 | ||
![]() |
c112323dd5 | ||
![]() |
0709385d3c | ||
![]() |
54a656ef08 | ||
![]() |
8f797f14b8 | ||
![]() |
c0d64de660 | ||
![]() |
c1ce8cf3b8 | ||
![]() |
2d780dfd81 | ||
![]() |
b6fee5c2fb | ||
![]() |
10fa047622 | ||
![]() |
04f0a6ba39 | ||
![]() |
78a0aebbd8 | ||
![]() |
eb43641dd3 | ||
![]() |
d479dc1d02 | ||
![]() |
7fb8d254fe | ||
![]() |
c99935e32c | ||
![]() |
2232e262bf | ||
![]() |
137e7e3aa1 | ||
![]() |
ba36b61d3d | ||
![]() |
ccb13ded84 | ||
![]() |
9ea1b87862 | ||
![]() |
688cf84d1f | ||
![]() |
69ce48c307 | ||
![]() |
06b7c8d5ba | ||
![]() |
6722b62b36 | ||
![]() |
7d80b27949 | ||
![]() |
d742bd882e | ||
![]() |
97a06ad9ef | ||
![]() |
756b9a0046 | ||
![]() |
96c930dd2f | ||
![]() |
14f4feb05b | ||
![]() |
c81a15099a | ||
![]() |
a8c125550c | ||
![]() |
3782350c14 | ||
![]() |
d6257073aa | ||
![]() |
ddff68bee7 | ||
![]() |
491659c436 | ||
![]() |
8d6fc30bc7 | ||
![]() |
56824b9658 | ||
![]() |
3ba2b94a6b | ||
![]() |
892e9625d3 | ||
![]() |
e2916b2540 | ||
![]() |
53b80e2e43 | ||
![]() |
1810d2088e | ||
![]() |
d618f703ec | ||
![]() |
896e4fef30 | ||
![]() |
38c7271a39 | ||
![]() |
5e3247d8bc | ||
![]() |
b53e44e572 | ||
![]() |
e5f4d8279d | ||
![]() |
86e8b56ac4 | ||
![]() |
bff1567623 | ||
![]() |
db199abd9e | ||
![]() |
b6d0defb98 | ||
![]() |
ad22b914d6 | ||
![]() |
f216fae545 | ||
![]() |
7fff663991 | ||
![]() |
242823c9bc | ||
![]() |
40efa67248 | ||
![]() |
3df44c0571 | ||
![]() |
769fedc3ad | ||
![]() |
9c3db400dc | ||
![]() |
d9ec9d990f | ||
![]() |
7d5376fdae | ||
![]() |
b5148cf1f7 | ||
![]() |
90a617e050 | ||
![]() |
259cdf2af9 | ||
![]() |
6c950e0dc9 | ||
![]() |
62dd6f161a | ||
![]() |
6aba658cd8 | ||
![]() |
accb0c6edb | ||
![]() |
e0db2eed8d | ||
![]() |
7c99da56cf | ||
![]() |
00a357ab20 | ||
![]() |
8ee4845b65 | ||
![]() |
19b8d06a79 | ||
![]() |
5c6bf03117 | ||
![]() |
f72ed6153b | ||
![]() |
d652a0957f | ||
![]() |
fbcd27907b | ||
![]() |
a551bea52e | ||
![]() |
6cb686208e | ||
![]() |
bd1fb77245 | ||
![]() |
d610d27f30 | ||
![]() |
96b35c9e26 | ||
![]() |
907a8f1e6e | ||
![]() |
e1c191fe44 | ||
![]() |
5aa3429c5d | ||
![]() |
ffd418f217 | ||
![]() |
0711be1696 | ||
![]() |
7521ab3d0b | ||
![]() |
0587ec2645 | ||
![]() |
b76d66fbf6 | ||
![]() |
06f851f721 | ||
![]() |
f6661d391c | ||
![]() |
284b216b3a | ||
![]() |
05dbe6ee1f | ||
![]() |
871d0f5126 | ||
![]() |
5be1264b7e | ||
![]() |
311d8d84bd | ||
![]() |
314c667050 | ||
![]() |
28c8a911bd | ||
![]() |
437d1ed49f | ||
![]() |
12fd8be2c4 | ||
![]() |
8258f7b361 | ||
![]() |
e15ea3d9e1 | ||
![]() |
677532629d | ||
![]() |
57d8ff79b2 | ||
![]() |
4b14ed760d | ||
![]() |
79a6260a11 | ||
![]() |
a0bf8f2008 | ||
![]() |
408bf2f0c4 | ||
![]() |
874fee478c | ||
![]() |
90d9a69bb1 | ||
![]() |
4006c56036 | ||
![]() |
1729588435 | ||
![]() |
6f7c2cb31e | ||
![]() |
8fd54b07a8 | ||
![]() |
a4629f4136 | ||
![]() |
56b5f687e4 | ||
![]() |
caa4f47f61 | ||
![]() |
36757b4438 | ||
![]() |
75871dda4b | ||
![]() |
506fec1a95 | ||
![]() |
aae329c447 | ||
![]() |
02acf1409e | ||
![]() |
6ac3309c74 | ||
![]() |
1b15cfa11d | ||
![]() |
76dfca879f | ||
![]() |
7cdc7bacea | ||
![]() |
fbd78b5c08 | ||
![]() |
fbcd0da597 | ||
![]() |
665dc3924d | ||
![]() |
4bdacff25b | ||
![]() |
ecd45314b8 | ||
![]() |
3e06fb754e | ||
![]() |
b2e20a31ea | ||
![]() |
38e19a4220 | ||
![]() |
f28164fefd | ||
![]() |
2eaabb718b | ||
![]() |
5572f482e7 | ||
![]() |
729f0a277e | ||
![]() |
c55d759168 | ||
![]() |
b7910992d8 | ||
![]() |
cf3b8b52f1 | ||
![]() |
42b06fbaca | ||
![]() |
2245cd87d4 | ||
![]() |
c199837c54 | ||
![]() |
83699c4784 | ||
![]() |
30afcc072a | ||
![]() |
832f9304fd | ||
![]() |
fa4bde98d2 | ||
![]() |
ca80756c70 | ||
![]() |
ef0baf60aa | ||
![]() |
7ba3a4c3d2 | ||
![]() |
29e48c18b7 | ||
![]() |
982dfb7d10 | ||
![]() |
8c4b69d3ab | ||
![]() |
0e2cc42cfb | ||
![]() |
1e5c205ccb | ||
![]() |
4c82171a8e | ||
![]() |
88c80b3e75 | ||
![]() |
3ae068316b | ||
![]() |
27bad5ad3d | ||
![]() |
6a89a25c27 | ||
![]() |
001ab3abad | ||
![]() |
ec8ad2bb96 | ||
![]() |
5fbb02fcb1 | ||
![]() |
4e1b50e219 | ||
![]() |
d7b2342a6a | ||
![]() |
7e9db7cefc | ||
![]() |
d30e4c5b0b | ||
![]() |
9de6bb8abc | ||
![]() |
72e04bd13f | ||
![]() |
4ec0448122 | ||
![]() |
842d8e209b | ||
![]() |
292fcd5c7b | ||
![]() |
74e3931f84 | ||
![]() |
12dadc555f | ||
![]() |
b75b2225e5 | ||
![]() |
12f27bd414 | ||
![]() |
69deec58fb | ||
![]() |
1e976bdc46 | ||
![]() |
9946fceb9d | ||
![]() |
6fed88113b | ||
![]() |
97ebe047d0 | ||
![]() |
fc6a6a1030 | ||
![]() |
3d840c827f | ||
![]() |
a2a1a04e53 | ||
![]() |
f86abc2e80 | ||
![]() |
7104c376ae | ||
![]() |
0638ced5cc | ||
![]() |
e984b2af64 | ||
![]() |
70e96dcf59 | ||
![]() |
2c696b2ddc | ||
![]() |
9a48b07ee4 | ||
![]() |
230fd6b7b6 | ||
![]() |
fd1c27897c | ||
![]() |
20b33a015f | ||
![]() |
293d5082c7 | ||
![]() |
929f116733 | ||
![]() |
ba5ba5490d | ||
![]() |
b8565a9af9 | ||
![]() |
c4a24b13f3 | ||
![]() |
94960c8421 | ||
![]() |
6859cf7459 | ||
![]() |
2018681b33 | ||
![]() |
e204516178 | ||
![]() |
153aecf91a | ||
![]() |
cd98ab6491 | ||
![]() |
b3823ac64b | ||
![]() |
5d9470ff8e | ||
![]() |
e78f137899 | ||
![]() |
40e66398db | ||
![]() |
bb298120c9 | ||
![]() |
6e32d0a74b | ||
![]() |
a4f53a1c73 | ||
![]() |
a90ae02454 | ||
![]() |
4c8f79a33e | ||
![]() |
7cc6ec7af7 | ||
![]() |
c2bbf275b2 | ||
![]() |
9226e2187c | ||
![]() |
48921e00fc | ||
![]() |
f804930150 | ||
![]() |
3403caf3da | ||
![]() |
ba11121731 | ||
![]() |
ed5e37c309 | ||
![]() |
65b1d31df5 | ||
![]() |
b499ed06d2 | ||
![]() |
6ff7c95843 | ||
![]() |
41cc7096b8 | ||
![]() |
c237de058f | ||
![]() |
e2aeb8174b | ||
![]() |
34f1f2a81c | ||
![]() |
c96f0fd2d1 | ||
![]() |
8aefe253a7 | ||
![]() |
7e31164ae0 | ||
![]() |
ad55f581f9 | ||
![]() |
d4a8f90cab | ||
![]() |
41ab00bedf | ||
![]() |
fc85ac20c7 | ||
![]() |
e88479243c | ||
![]() |
c787525ac8 | ||
![]() |
9a2601033d | ||
![]() |
fbb311a7d2 | ||
![]() |
f309c1ae50 | ||
![]() |
82a20fb0f0 | ||
![]() |
428112ef10 | ||
![]() |
64376cd8ff | ||
![]() |
cc8aa08b02 | ||
![]() |
1c4e4e4f56 | ||
![]() |
3f6db7f518 | ||
![]() |
8435a755fd | ||
![]() |
52c29b7b99 | ||
![]() |
c6bf63da7c | ||
![]() |
0fd05a2f0f | ||
![]() |
1fd0338b49 | ||
![]() |
b2be73e4e8 | ||
![]() |
37f5fcf85c | ||
![]() |
f742e497dd | ||
![]() |
dcc426fcfe | ||
![]() |
7eb18f1237 | ||
![]() |
265e892fed | ||
![]() |
c3bfe3f4cb | ||
![]() |
623e9e66c0 | ||
![]() |
90f5a2b6fe | ||
![]() |
bf625abe29 | ||
![]() |
b44069730b | ||
![]() |
749d055eba | ||
![]() |
49a0f77867 | ||
![]() |
2af52de7b5 | ||
![]() |
629d860cbc | ||
![]() |
056cc163f5 | ||
![]() |
e09efcf71a | ||
![]() |
763b4dcc66 | ||
![]() |
83348e0b80 | ||
![]() |
f13ddd5d0a | ||
![]() |
18a31aa861 | ||
![]() |
b2a4e959c9 | ||
![]() |
f17ef241d1 | ||
![]() |
aa1e56b0b9 | ||
![]() |
7ef524ea1c | ||
![]() |
0c7141a343 | ||
![]() |
5488bb6197 | ||
![]() |
8e28c67155 | ||
![]() |
36969082bb | ||
![]() |
4fde69b066 | ||
![]() |
fd9a4dbe94 | ||
![]() |
f0db0ed35d | ||
![]() |
6d24cbf452 | ||
![]() |
5454829ae6 | ||
![]() |
da0bca6466 | ||
![]() |
4705bd9b37 | ||
![]() |
5bd90983bc | ||
![]() |
329f981582 | ||
![]() |
d84a727178 | ||
![]() |
cece7adcee | ||
![]() |
74cc4903ef | ||
![]() |
41fdcfa71e | ||
![]() |
e463adeff8 | ||
![]() |
60cc56b1a9 | ||
![]() |
f912e9293f | ||
![]() |
56939728b7 | ||
![]() |
e39238e403 | ||
![]() |
ea26226046 | ||
![]() |
17f6279317 | ||
![]() |
e172d60ddb | ||
![]() |
ecdf154993 | ||
![]() |
f8fe7fa491 | ||
![]() |
fbe792f0ac | ||
![]() |
5d92a7bef1 | ||
![]() |
8246c0607a | ||
![]() |
bfce617770 | ||
![]() |
14a7cfb32a | ||
![]() |
7a8645d171 | ||
![]() |
5bf738737d | ||
![]() |
415e03aa6f | ||
![]() |
ac120e20e3 | ||
![]() |
3f90e45079 | ||
![]() |
9dcc441a5f | ||
![]() |
db4f691f9f | ||
![]() |
d28735a05b | ||
![]() |
183847747a | ||
![]() |
bac6012308 | ||
![]() |
aaa384ca1a | ||
![]() |
f908226898 | ||
![]() |
909abce800 | ||
![]() |
33d4e690cc | ||
![]() |
848c849584 | ||
![]() |
102c8f47bf | ||
![]() |
d3bcbba45c | ||
![]() |
0903e56196 | ||
![]() |
95ecacf8a2 | ||
![]() |
be8a280e0b | ||
![]() |
6fb60a84dd | ||
![]() |
5af7d1a3b8 | ||
![]() |
35b73a1f20 | ||
![]() |
9e4f9b36fc | ||
![]() |
84d7e365a0 | ||
![]() |
64c3da230f | ||
![]() |
7793f30e09 | ||
![]() |
714df32e33 | ||
![]() |
1dc920c8de | ||
![]() |
16dc1cfb5c | ||
![]() |
819ff32dc4 | ||
![]() |
5574e0ed41 | ||
![]() |
1ce60f02d3 | ||
![]() |
042e57d562 | ||
![]() |
bb34d6de74 | ||
![]() |
89918b5c17 | ||
![]() |
ba8fb52183 | ||
![]() |
f6f9961819 | ||
![]() |
e74e9c48de | ||
![]() |
179add2b07 | ||
![]() |
456bc309d8 | ||
![]() |
a7535a2727 | ||
![]() |
44c09667ff | ||
![]() |
da9b972466 | ||
![]() |
bd45950f4a | ||
![]() |
f70cf11819 | ||
![]() |
5575f781ad | ||
![]() |
0472883cc2 | ||
![]() |
87e8feca95 | ||
![]() |
e70a39830c | ||
![]() |
ba25198517 | ||
![]() |
6297bcd74c | ||
![]() |
dd7ab82e75 | ||
![]() |
c046fffa16 | ||
![]() |
3aecef7697 | ||
![]() |
b218af2b27 | ||
![]() |
46859bf421 | ||
![]() |
77c46bbf29 | ||
![]() |
02750ff56f | ||
![]() |
0bee0e6294 | ||
![]() |
12593e6f45 | ||
![]() |
819a040f44 | ||
![]() |
546405bece | ||
![]() |
f013c7f2a6 | ||
![]() |
1cc67fa80c | ||
![]() |
eefa6e4e2b | ||
![]() |
6d9116f83d | ||
![]() |
8be4e173e8 | ||
![]() |
648765ba2f | ||
![]() |
c6ccf055ba | ||
![]() |
1649d85d10 | ||
![]() |
cd72dcd925 | ||
![]() |
7a5ed919ad | ||
![]() |
799d7a34cf | ||
![]() |
20adcfa058 |
101
CHANGES
101
CHANGES
@@ -2,8 +2,102 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.6g and 0.9.6h [21 Dec 2002]
|
||||
|
||||
*) New function OPENSSL_cleanse(), which is used to cleanse a section of
|
||||
memory from it's contents. This is done with a counter that will
|
||||
place alternating values in each byte. This can be used to solve
|
||||
two issues: 1) the removal of calls to memset() by highly optimizing
|
||||
compilers, and 2) cleansing with other values than 0, since those can
|
||||
be read through on certain media, for example a swap space on disk.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) Bugfix: client side session caching did not work with external caching,
|
||||
because the session->cipher setting was not restored when reloading
|
||||
from the external cache. This problem was masked, when
|
||||
SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG (part of SSL_OP_ALL) was set.
|
||||
(Found by Steve Haslam <steve@araqnid.ddts.net>.)
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Fix client_certificate (ssl/s2_clnt.c): The permissible total
|
||||
length of the REQUEST-CERTIFICATE message is 18 .. 34, not 17 .. 33.
|
||||
[Zeev Lieber <zeev-l@yahoo.com>]
|
||||
|
||||
*) Undo an undocumented change introduced in 0.9.6e which caused
|
||||
repeated calls to OpenSSL_add_all_ciphers() and
|
||||
OpenSSL_add_all_digests() to be ignored, even after calling
|
||||
EVP_cleanup().
|
||||
[Richard Levitte]
|
||||
|
||||
*) Change the default configuration reader to deal with last line not
|
||||
being properly terminated.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Change X509_NAME_cmp() so it applies the special rules on handling
|
||||
DN values that are of type PrintableString, as well as RDNs of type
|
||||
emailAddress where the value has the type ia5String.
|
||||
[stefank@valicert.com via Richard Levitte]
|
||||
|
||||
*) Add a SSL_SESS_CACHE_NO_INTERNAL_STORE flag to take over half
|
||||
the job SSL_SESS_CACHE_NO_INTERNAL_LOOKUP was inconsistently
|
||||
doing, define a new flag (SSL_SESS_CACHE_NO_INTERNAL) to be
|
||||
the bitwise-OR of the two for use by the majority of applications
|
||||
wanting this behaviour, and update the docs. The documented
|
||||
behaviour and actual behaviour were inconsistent and had been
|
||||
changing anyway, so this is more a bug-fix than a behavioural
|
||||
change.
|
||||
[Geoff Thorpe, diagnosed by Nadav Har'El]
|
||||
|
||||
*) Don't impose a 16-byte length minimum on session IDs in ssl/s3_clnt.c
|
||||
(the SSL 3.0 and TLS 1.0 specifications allow any length up to 32 bytes).
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Fix initialization code race conditions in
|
||||
SSLv23_method(), SSLv23_client_method(), SSLv23_server_method(),
|
||||
SSLv2_method(), SSLv2_client_method(), SSLv2_server_method(),
|
||||
SSLv3_method(), SSLv3_client_method(), SSLv3_server_method(),
|
||||
TLSv1_method(), TLSv1_client_method(), TLSv1_server_method(),
|
||||
ssl2_get_cipher_by_char(),
|
||||
ssl3_get_cipher_by_char().
|
||||
[Patrick McCormick <patrick@tellme.com>, Bodo Moeller]
|
||||
|
||||
*) Reorder cleanup sequence in SSL_CTX_free(): only remove the ex_data after
|
||||
the cached sessions are flushed, as the remove_cb() might use ex_data
|
||||
contents. Bug found by Sam Varshavchik <mrsam@courier-mta.com>
|
||||
(see [openssl.org #212]).
|
||||
[Geoff Thorpe, Lutz Jaenicke]
|
||||
|
||||
*) Fix typo in OBJ_txt2obj which incorrectly passed the content
|
||||
length, instead of the encoding length to d2i_ASN1_OBJECT.
|
||||
[Steve Henson]
|
||||
|
||||
Changes between 0.9.6f and 0.9.6g [9 Aug 2002]
|
||||
|
||||
*) [In 0.9.6g-engine release:]
|
||||
Fix crypto/engine/vendor_defns/cswift.h for WIN32 (use '_stdcall').
|
||||
[Lynn Gazis <lgazis@rainbow.com>]
|
||||
|
||||
Changes between 0.9.6e and 0.9.6f [8 Aug 2002]
|
||||
|
||||
*) Fix ASN1 checks. Check for overflow by comparing with LONG_MAX
|
||||
and get fix the header length calculation.
|
||||
[Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>,
|
||||
Alon Kantor <alonk@checkpoint.com> (and others),
|
||||
Steve Henson]
|
||||
|
||||
*) Use proper error handling instead of 'assertions' in buffer
|
||||
overflow checks added in 0.9.6e. This prevents DoS (the
|
||||
assertions could call abort()).
|
||||
[Arne Ansper <arne@ats.cyber.ee>, Bodo Moeller]
|
||||
|
||||
Changes between 0.9.6d and 0.9.6e [30 Jul 2002]
|
||||
|
||||
*) Add various sanity checks to asn1_get_length() to reject
|
||||
the ASN1 length bytes if they exceed sizeof(long), will appear
|
||||
negative or the content length exceeds the length of the
|
||||
supplied buffer.
|
||||
[Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
|
||||
|
||||
*) Fix cipher selection routines: ciphers without encryption had no flags
|
||||
for the cipher strength set and where therefore not handled correctly
|
||||
by the selection routines (PR #130).
|
||||
@@ -25,7 +119,6 @@
|
||||
applications.
|
||||
[Bodo Moeller]
|
||||
|
||||
|
||||
*) Changes in security patch:
|
||||
|
||||
Changes marked "(CHATS)" were sponsored by the Defense Advanced
|
||||
@@ -36,7 +129,7 @@
|
||||
*) Add various sanity checks to asn1_get_length() to reject
|
||||
the ASN1 length bytes if they exceed sizeof(long), will appear
|
||||
negative or the content length exceeds the length of the
|
||||
supplied buffer.
|
||||
supplied buffer. (CAN-2002-0659)
|
||||
[Steve Henson, Adi Stav <stav@mercury.co.il>, James Yonan <jim@ntlp.com>]
|
||||
|
||||
*) Assertions for various potential buffer overflows, not known to
|
||||
@@ -141,8 +234,8 @@
|
||||
value is 0.
|
||||
[Richard Levitte]
|
||||
|
||||
*) [In 0.9.6c-engine release:]
|
||||
Fix a crashbug and a logic bug in hwcrhk_load_pubkey()
|
||||
*) [In 0.9.6d-engine release:]
|
||||
Fix a crashbug and a logic bug in hwcrhk_load_pubkey().
|
||||
[Toomas Kiisk <vix@cyber.ee> via Richard Levitte]
|
||||
|
||||
*) Add the configuration target linux-s390x.
|
||||
|
40
Configure
40
Configure
@@ -132,7 +132,7 @@ my %table=(
|
||||
"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -DBIO_PAIR_DEBUG -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:-ldl:::::::::::dlfcn",
|
||||
"debug-levitte-linux-elf","gcc:-DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -pipe::-D_REENTRANT:-ldl:::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"dist", "cc:-O::(unknown):::::",
|
||||
|
||||
# Basic configs that should work on any (32 and less bit) box
|
||||
@@ -354,8 +354,8 @@ my %table=(
|
||||
"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
|
||||
"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 -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
||||
"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::SIXTY_FOUR_BIT_LONG:::::::::::linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"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)",
|
||||
"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)",
|
||||
@@ -405,7 +405,7 @@ my %table=(
|
||||
"aix-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown)::BN_LLONG RC4_CHAR:::",
|
||||
"aix-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR:::",
|
||||
"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown)::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
"aix43-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
"aix43-gcc", "gcc:-O1 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
|
||||
#
|
||||
# Cray T90 and similar (SDSC)
|
||||
@@ -487,7 +487,7 @@ my %table=(
|
||||
|
||||
# Cygwin
|
||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -march=i486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared:::.dll",
|
||||
|
||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
|
||||
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::",
|
||||
@@ -505,12 +505,18 @@ my %table=(
|
||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
"darwin-ppc-cc","cc:-O3 -D_DARWIN -DB_ENDIAN -fno-common::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
||||
##### A/UX
|
||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
|
||||
##### Sony NEWS-OS 4.x
|
||||
"newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||
|
||||
##### VxWorks for various targets
|
||||
"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DVXWORKS -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::-r:::::",
|
||||
|
||||
##### 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:::",
|
||||
|
||||
);
|
||||
|
||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
|
||||
@@ -587,6 +593,7 @@ my $libs;
|
||||
my $target;
|
||||
my $options;
|
||||
my $symlink;
|
||||
my $make_depend=0;
|
||||
|
||||
my @argvcopy=@ARGV;
|
||||
my $argvstring="";
|
||||
@@ -641,7 +648,7 @@ PROCESS_ARGS:
|
||||
{ $threads=1; }
|
||||
elsif (/^no-shared$/)
|
||||
{ $no_shared=1; }
|
||||
elsif (/^shared$/)
|
||||
elsif (/^shared$/ || /^-shared$/ || /^--shared$/)
|
||||
{ $no_shared=0; }
|
||||
elsif (/^no-symlinks$/)
|
||||
{ $symlink=0; }
|
||||
@@ -1210,11 +1217,13 @@ if($IsWindows) {
|
||||
EOF
|
||||
close(OUT);
|
||||
} else {
|
||||
(system "make -f Makefile.ssl PERL=\'$perl\' links") == 0 or exit $?
|
||||
if $symlink;
|
||||
### (system 'make depend') == 0 or exit $? if $depflags ne "";
|
||||
# Run "make depend" manually if you want to be able to delete
|
||||
# the source code files of ciphers you left out.
|
||||
my $make_command = "make -f Makefile.ssl PERL=\'$perl\'";
|
||||
my $make_targets = "";
|
||||
$make_targets .= " links" if $symlink;
|
||||
$make_targets .= " depend" if $depflags ne "" && $make_depend;
|
||||
$make_targets .= " gentests" if $symlink;
|
||||
(system $make_command.$make_targets) == 0 or exit $?
|
||||
if $make_targets ne "";
|
||||
if ( $perl =~ m@^/@) {
|
||||
&dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
||||
&dofile("apps/der_chop",$perl,'^#!/', '#!%s');
|
||||
@@ -1224,6 +1233,15 @@ EOF
|
||||
&dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";');
|
||||
&dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||
&dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
|
||||
}
|
||||
if ($depflags ne "" && !$make_depend) {
|
||||
print <<EOF;
|
||||
|
||||
Since you've disabled at least one algorithm, you need to do the following
|
||||
before building:
|
||||
|
||||
make depend
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
|
30
FAQ
30
FAQ
@@ -9,6 +9,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Where can I get a compiled version of OpenSSL?
|
||||
* Why aren't tools like 'autoconf' and 'libtool' used?
|
||||
* What is an 'engine' version?
|
||||
* How do I check the authenticity of the OpenSSL distribution?
|
||||
|
||||
[LEGAL] Legal questions
|
||||
|
||||
@@ -35,6 +36,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Why does the linker complain about undefined symbols?
|
||||
* Why does the OpenSSL test fail with "bc: command not found"?
|
||||
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
|
||||
* Why does the OpenSSL test fail with "bc: stack empty"?
|
||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
||||
* Why does the OpenSSL compilation fail on Win32 with VC++?
|
||||
@@ -61,7 +63,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.6e was released on 30 May, 2002.
|
||||
OpenSSL 0.9.6h was released on 5 December 2002.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -132,6 +134,19 @@ hardware. This was realized in a special release '0.9.6-engine'. With
|
||||
version 0.9.7 (not yet released) the changes were merged into the main
|
||||
development line, so that the special release is no longer necessary.
|
||||
|
||||
* How do I check the authenticity of the OpenSSL distribution?
|
||||
|
||||
We provide MD5 digests and ASC signatures of each tarball.
|
||||
Use MD5 to check that a tarball from a mirror site is identical:
|
||||
|
||||
md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5
|
||||
|
||||
You can check authenticity using pgp or gpg. You need the OpenSSL team
|
||||
member public key used to sign it (download it from a key server). Then
|
||||
just do:
|
||||
|
||||
pgp TARBALL.asc
|
||||
|
||||
[LEGAL] =======================================================================
|
||||
|
||||
* Do I need patent licenses to use OpenSSL?
|
||||
@@ -222,6 +237,8 @@ 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?
|
||||
@@ -392,6 +409,17 @@ and compile/install it. GNU bc (see http://www.gnu.org/software/software.html
|
||||
for download instructions) can be safely used, for example.
|
||||
|
||||
|
||||
* Why does the OpenSSL test fail with "bc: stack empty"?
|
||||
|
||||
On some DG/ux versions, bc seems to have a too small stack for calculations
|
||||
that the OpenSSL bntest throws at it. This gets triggered when you run the
|
||||
test suite (using "make test"). The message returned is "bc: stack empty".
|
||||
|
||||
The best way to deal with this is to find another implementation of bc
|
||||
and compile/install it. GNU bc (see http://www.gnu.org/software/software.html
|
||||
for download instructions) can be safely used, for example.
|
||||
|
||||
|
||||
* Why does the OpenSSL compilation fail on Alpha Tru64 Unix?
|
||||
|
||||
On some Alpha installations running Tru64 Unix and Compaq C, the compilation
|
||||
|
12
INSTALL
12
INSTALL
@@ -288,3 +288,15 @@
|
||||
targets for shared library creation, like linux-shared. Those targets
|
||||
can currently be used on their own just as well, but this is expected
|
||||
to change in future versions of OpenSSL.
|
||||
|
||||
Note on random number generation
|
||||
--------------------------------
|
||||
|
||||
Availability of cryptographically secure random numbers is required for
|
||||
secret key generation. OpenSSL provides several options to seed the
|
||||
internal PRNG. If not properly seeded, the internal PRNG will refuse
|
||||
to deliver random bytes and a "PRNG not seeded error" will occur.
|
||||
On systems without /dev/urandom (or similar) device, it may be necessary
|
||||
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.
|
||||
|
@@ -82,7 +82,8 @@
|
||||
There are various changes you can make to the Win32 compile environment. By
|
||||
default the library is not compiled with debugging symbols. If you add 'debug'
|
||||
to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
|
||||
compiled in.
|
||||
compiled in. Note that mk1mf.pl expects the platform to be the last argument
|
||||
on the command line, so 'debug' must appear before that, as all other options.
|
||||
|
||||
The default Win32 environment is to leave out any Windows NT specific
|
||||
features.
|
||||
|
@@ -1287,7 +1287,7 @@ EXITPOINT:
|
||||
|
||||
// Send some bytes
|
||||
|
||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength)
|
||||
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength)
|
||||
{
|
||||
OSErr errCode = noErr;
|
||||
int bytesSent = 0;
|
||||
@@ -1604,4 +1604,4 @@ EPInfo* epi = (EPInfo*) context;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
@@ -62,7 +62,7 @@ int MacSocket_recv(const int inSocketNum,void *outBuff,int outBuffLength,const B
|
||||
|
||||
// Call this to send data on a socket
|
||||
|
||||
int MacSocket_send(const int inSocketNum,void *inBuff,int inBuffLength);
|
||||
int MacSocket_send(const int inSocketNum,const void *inBuff,int inBuffLength);
|
||||
|
||||
|
||||
// If zero bytes were read in a call to MacSocket_recv(), it may be that the remote end has done a half-close
|
||||
|
50
Makefile.org
50
Makefile.org
@@ -247,7 +247,8 @@ link-shared:
|
||||
for i in $(SHLIBDIRS); do \
|
||||
prev=lib$$i$(SHLIB_EXT); \
|
||||
for j in $${tmp:-x}; do \
|
||||
( set -x; ln -f -s $$prev lib$$i$$j ); \
|
||||
( set -x; \
|
||||
rm -f lib$$i$$j; ln -s $$prev lib$$i$$j ); \
|
||||
prev=lib$$i$$j; \
|
||||
done; \
|
||||
done; \
|
||||
@@ -269,9 +270,7 @@ do_gnu-shared:
|
||||
done
|
||||
|
||||
DETECT_GNU_LD=${CC} -v 2>&1 | grep '^gcc' >/dev/null 2>&1 && \
|
||||
collect2=`gcc -print-prog-name=collect2 2>&1` && \
|
||||
[ -n "$$collect2" ] && \
|
||||
my_ld=`$$collect2 --help 2>&1 | grep Usage: | sed 's/^Usage: *\([^ ][^ ]*\).*/\1/'` && \
|
||||
my_ld=`${CC} -print-prog-name=ld 2>&1` && \
|
||||
[ -n "$$my_ld" ] && \
|
||||
$$my_ld -v 2>&1 | grep 'GNU ld' >/dev/null 2>&1
|
||||
|
||||
@@ -528,6 +527,10 @@ links:
|
||||
fi; \
|
||||
done;
|
||||
|
||||
gentests:
|
||||
@(cd test && echo "generating dummy tests (if needed)..." && \
|
||||
$(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 generate );
|
||||
|
||||
dclean:
|
||||
rm -f *.bak
|
||||
@for i in $(DIRS) ;\
|
||||
@@ -609,6 +612,9 @@ update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_
|
||||
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
|
||||
# tar does not support the --files-from option.
|
||||
tar:
|
||||
find . -type d -print | xargs chmod 755
|
||||
find . -type f -print | xargs chmod a+r
|
||||
find . -type f -perm -0100 -print | xargs chmod a+x
|
||||
find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
|
||||
$(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
|
||||
tardy --user_number=0 --user_name=openssl \
|
||||
@@ -651,9 +657,10 @@ install: all install_docs
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi; \
|
||||
done
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
@@ -663,20 +670,24 @@ install: all install_docs
|
||||
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
||||
( echo installing $$i; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib/cyg/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
mv $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
fi ); \
|
||||
fi; \
|
||||
done; \
|
||||
( here="`pwd`"; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
make -f $$here/Makefile link-shared ); \
|
||||
set $(MAKE); \
|
||||
$$1 -f $$here/Makefile link-shared ); \
|
||||
fi
|
||||
|
||||
install_docs:
|
||||
@@ -685,22 +696,23 @@ install_docs:
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||
$(INSTALL_PREFIX)$(MANDIR)/man7
|
||||
@for i in doc/apps/*.pod; do \
|
||||
@pod2man="`cd util; ./pod2mantest $(PERL)`"; \
|
||||
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/`basename $$i .pod`.$$sec"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||
done
|
||||
@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||
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/`basename $$i .pod`.$$sec"; \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
sh -c "$$pod2man \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||
|
27
NEWS
27
NEWS
@@ -5,6 +5,33 @@
|
||||
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.6g and OpenSSL 0.9.6h:
|
||||
|
||||
o New configuration targets for Tandem OSS and A/UX.
|
||||
o New OIDs for Microsoft attributes.
|
||||
o Better handling of SSL session caching.
|
||||
o Better comparison of distinguished names.
|
||||
o Better handling of shared libraries in a mixed GNU/non-GNU environment.
|
||||
o Support assembler code with Borland C.
|
||||
o Fixes for length problems.
|
||||
o Fixes for uninitialised variables.
|
||||
o Fixes for memory leaks, some unusual crashes and some race conditions.
|
||||
o Fixes for smaller building problems.
|
||||
o Updates of manuals, FAQ and other instructive documents.
|
||||
|
||||
Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g:
|
||||
|
||||
o Important building fixes on Unix.
|
||||
|
||||
Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f:
|
||||
|
||||
o Various important bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e:
|
||||
|
||||
o Important security related bugfixes.
|
||||
o Various SSL/TLS library bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d:
|
||||
|
||||
o Various SSL/TLS library bugfixes.
|
||||
|
24
PROBLEMS
24
PROBLEMS
@@ -32,3 +32,27 @@ may differ on your machine.
|
||||
As long as Apple doesn't fix the problem with ld, this problem building
|
||||
OpenSSL will remain as is.
|
||||
|
||||
|
||||
* Parallell make leads to errors
|
||||
|
||||
While running tests, running a parallell make is a bad idea. Many test
|
||||
scripts use the same name for output and input files, which means different
|
||||
will interfere with each other and lead to test failure.
|
||||
|
||||
The solution is simple for now: don't run parallell make when testing.
|
||||
|
||||
|
||||
* Bugs in gcc 3.0 triggered
|
||||
|
||||
According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
|
||||
header+=11;
|
||||
if (*header != '4') return(0); header++;
|
||||
if (*header != ',') return(0); header++;
|
||||
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
|
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.6e [engine] 30 July 2002
|
||||
OpenSSL 0.9.6h [engine] 5 Dec 2002
|
||||
|
||||
Copyright (c) 1998-2002 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
7
STATUS
7
STATUS
@@ -1,10 +1,13 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2002/07/30 10:38:17 $
|
||||
______________ $Date: 2002/12/05 22:50:27 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.7: Under development...
|
||||
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
|
||||
o OpenSSL 0.9.6e: Released on July 30th, 2002
|
||||
o OpenSSL 0.9.6d: Released on May 9th, 2002
|
||||
o OpenSSL 0.9.6c: Released on December 21st, 2001
|
||||
@@ -21,6 +24,8 @@
|
||||
|
||||
RELEASE SHOWSTOPPERS
|
||||
|
||||
o none
|
||||
|
||||
AVAILABLE PATCHES
|
||||
|
||||
o
|
||||
|
74
TABLE
74
TABLE
@@ -71,7 +71,7 @@ $ranlib =
|
||||
|
||||
*** Cygwin
|
||||
$cc = gcc
|
||||
$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -m486 -Wall
|
||||
$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$lflags =
|
||||
@@ -853,7 +853,7 @@ $ranlib =
|
||||
|
||||
*** aix43-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -DAIX -DB_ENDIAN
|
||||
$cflags = -O1 -DAIX -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$lflags =
|
||||
@@ -989,6 +989,29 @@ $shared_ldflag =
|
||||
$shared_extension = .so
|
||||
$ranlib =
|
||||
|
||||
*** aux3-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O2 -DTERMIO
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$lflags = -lbsd
|
||||
$bn_ops = RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$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 =
|
||||
|
||||
*** bsdi-elf-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
|
||||
@@ -1244,7 +1267,7 @@ $ranlib =
|
||||
|
||||
*** debug-levitte-linux-elf
|
||||
$cc = gcc
|
||||
$cflags = -DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe
|
||||
$cflags = -DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -pipe
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -ldl
|
||||
@@ -1259,10 +1282,10 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
|
||||
*** debug-linux-elf
|
||||
@@ -2417,10 +2440,10 @@ $ranlib =
|
||||
|
||||
*** linux-s390
|
||||
$cc = gcc
|
||||
$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||
$cflags = -DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags =
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2431,11 +2454,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 =
|
||||
|
||||
*** linux-s390x
|
||||
@@ -2443,7 +2466,7 @@ $cc = gcc
|
||||
$cflags = -DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -2454,7 +2477,7 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
@@ -3151,6 +3174,29 @@ $shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** tandem-c89
|
||||
$cc = c89
|
||||
$cflags = -Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$lflags =
|
||||
$bn_ops = THIRTY_TWO_BIT
|
||||
$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 =
|
||||
|
||||
*** ultrix-cc
|
||||
$cc = cc
|
||||
$cflags = -std1 -O -Olimit 1000 -DL_ENDIAN
|
||||
|
@@ -117,7 +117,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(SRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
@@ -128,10 +128,10 @@ clean:
|
||||
rm -f req
|
||||
|
||||
$(DLIBSSL):
|
||||
(cd ../ssl; $(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}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
|
||||
(cd ..; $(MAKE) DIRS=ssl all)
|
||||
|
||||
$(DLIBCRYPTO):
|
||||
(cd ../crypto; $(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}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
|
||||
(cd ..; $(MAKE) DIRS=crypto all)
|
||||
|
||||
$(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
$(RM) $(PROGRAM)
|
||||
|
@@ -92,8 +92,10 @@ int WIN32_rename(char *oldname,char *newname);
|
||||
#define MAIN(a,v) main(a,v)
|
||||
|
||||
#ifndef NON_MAIN
|
||||
LHASH *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
#else
|
||||
extern LHASH *config;
|
||||
extern BIO *bio_err;
|
||||
#endif
|
||||
|
||||
|
@@ -328,6 +328,6 @@ end:
|
||||
if (at != NULL) ASN1_TYPE_free(at);
|
||||
if (osk != NULL) sk_free(osk);
|
||||
OBJ_cleanup();
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
29
apps/ca.c
29
apps/ca.c
@@ -570,7 +570,7 @@ bad:
|
||||
goto err;
|
||||
}
|
||||
pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,key);
|
||||
if(key) memset(key,0,strlen(key));
|
||||
if(key) OPENSSL_cleanse(key,strlen(key));
|
||||
if (pkey == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"unable to load CA private key\n");
|
||||
@@ -633,12 +633,14 @@ bad:
|
||||
that to access(). However, time's too short to do that just
|
||||
now.
|
||||
*/
|
||||
#ifndef VXWORKS
|
||||
if (access(outdir,R_OK|W_OK|X_OK) != 0)
|
||||
{
|
||||
BIO_printf(bio_err,"I am unable to access the %s directory\n",outdir);
|
||||
perror(outdir);
|
||||
goto err;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (stat(outdir,&sb) != 0)
|
||||
{
|
||||
@@ -856,9 +858,14 @@ bad:
|
||||
}
|
||||
if (verbose)
|
||||
{
|
||||
if ((f=BN_bn2hex(serial)) == NULL) goto err;
|
||||
BIO_printf(bio_err,"next serial number is %s\n",f);
|
||||
OPENSSL_free(f);
|
||||
if (BN_is_zero(serial))
|
||||
BIO_printf(bio_err,"next serial number is 00\n");
|
||||
else
|
||||
{
|
||||
if ((f=BN_bn2hex(serial)) == NULL) goto err;
|
||||
BIO_printf(bio_err,"next serial number is %s\n",f);
|
||||
OPENSSL_free(f);
|
||||
}
|
||||
}
|
||||
|
||||
if ((attribs=CONF_get_section(conf,policy)) == NULL)
|
||||
@@ -1302,7 +1309,7 @@ err:
|
||||
X509_CRL_free(crl);
|
||||
CONF_free(conf);
|
||||
OBJ_cleanup();
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void lookup_fail(char *name, char *tag)
|
||||
@@ -1367,7 +1374,7 @@ static BIGNUM *load_serial(char *serialfile)
|
||||
ret=ASN1_INTEGER_to_BN(ai,NULL);
|
||||
if (ret == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"error converting number from bin to BIGNUM");
|
||||
BIO_printf(bio_err,"error converting number from bin to BIGNUM\n");
|
||||
goto err;
|
||||
}
|
||||
err:
|
||||
@@ -1755,7 +1762,10 @@ again2:
|
||||
BIO_printf(bio_err,"The subject name appears to be ok, checking data base for clashes\n");
|
||||
|
||||
row[DB_name]=X509_NAME_oneline(subject,NULL,0);
|
||||
row[DB_serial]=BN_bn2hex(serial);
|
||||
if (BN_is_zero(serial))
|
||||
row[DB_serial]=BUF_strdup("00");
|
||||
else
|
||||
row[DB_serial]=BN_bn2hex(serial);
|
||||
if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
|
||||
{
|
||||
BIO_printf(bio_err,"Memory allocation failure\n");
|
||||
@@ -2169,7 +2179,10 @@ static int do_revoke(X509 *x509, TXT_DB *db)
|
||||
row[i]=NULL;
|
||||
row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
|
||||
bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
|
||||
row[DB_serial]=BN_bn2hex(bn);
|
||||
if (BN_is_zero(bn))
|
||||
row[DB_serial]=BUF_strdup("00");
|
||||
else
|
||||
row[DB_serial]=BN_bn2hex(bn);
|
||||
BN_free(bn);
|
||||
if ((row[DB_name] == NULL) || (row[DB_serial] == NULL))
|
||||
{
|
||||
|
@@ -202,6 +202,6 @@ end:
|
||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||
if (ssl != NULL) SSL_free(ssl);
|
||||
if (STDout != NULL) BIO_free_all(STDout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
@@ -364,7 +364,7 @@ end:
|
||||
X509_STORE_CTX_cleanup(&ctx);
|
||||
X509_STORE_free(store);
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static X509_CRL *load_crl(char *infile, int format)
|
||||
|
@@ -166,7 +166,7 @@ bad:
|
||||
BIO_printf(bio_err," -certfile arg certificates file of chain to a trusted CA\n");
|
||||
BIO_printf(bio_err," (can be used more than once)\n");
|
||||
BIO_printf(bio_err," -nocrl no crl to load, just certs from '-certfile'\n");
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
@@ -278,7 +278,7 @@ end:
|
||||
if (p7 != NULL) PKCS7_free(p7);
|
||||
if (crl != NULL) X509_CRL_free(crl);
|
||||
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -354,7 +354,7 @@ int MAIN(int argc, char **argv)
|
||||
end:
|
||||
if (buf != NULL)
|
||||
{
|
||||
memset(buf,0,BUFSIZE);
|
||||
OPENSSL_cleanse(buf,BUFSIZE);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
if (in != NULL) BIO_free(in);
|
||||
@@ -362,7 +362,7 @@ end:
|
||||
EVP_PKEY_free(sigkey);
|
||||
if(sigbuf) OPENSSL_free(sigbuf);
|
||||
if (bmd != NULL) BIO_free(bmd);
|
||||
EXIT(err);
|
||||
OPENSSL_EXIT(err);
|
||||
}
|
||||
|
||||
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
|
||||
|
@@ -346,6 +346,6 @@ end:
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dh != NULL) DH_free(dh);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#endif
|
||||
|
@@ -532,7 +532,7 @@ end:
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dh != NULL) DH_free(dh);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
|
||||
|
@@ -320,6 +320,6 @@ end:
|
||||
if(dsa != NULL) DSA_free(dsa);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#endif
|
||||
|
@@ -357,7 +357,7 @@ end:
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dsa != NULL) DSA_free(dsa);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
||||
|
@@ -533,9 +533,9 @@ bad:
|
||||
* bug picked up by
|
||||
* Larry J. Hughes Jr. <hughes@indiana.edu> */
|
||||
if (str == strbuf)
|
||||
memset(str,0,SIZE);
|
||||
OPENSSL_cleanse(str,SIZE);
|
||||
else
|
||||
memset(str,0,strlen(str));
|
||||
OPENSSL_cleanse(str,strlen(str));
|
||||
}
|
||||
if ((hiv != NULL) && !set_hex(hiv,iv,8))
|
||||
{
|
||||
@@ -631,7 +631,7 @@ end:
|
||||
if (benc != NULL) BIO_free(benc);
|
||||
if (b64 != NULL) BIO_free(b64);
|
||||
if(pass) OPENSSL_free(pass);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
int set_hex(char *in, unsigned char *out, int size)
|
||||
|
@@ -121,5 +121,5 @@ int MAIN(int argc, char **argv)
|
||||
ret++;
|
||||
}
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
@@ -211,7 +211,7 @@ end:
|
||||
ERR_print_errors(bio_err);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dh != NULL) DH_free(dh);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
|
||||
|
@@ -247,6 +247,6 @@ end:
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (dsa != NULL) DSA_free(dsa);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#endif
|
||||
|
@@ -252,7 +252,7 @@ err:
|
||||
if(passout) OPENSSL_free(passout);
|
||||
if (ret != 0)
|
||||
ERR_print_errors(bio_err);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
|
||||
|
@@ -1077,7 +1077,7 @@ $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
|
||||
$!
|
||||
$! Show user the result
|
||||
$!
|
||||
$ WRITE SYS$OUTPUT "Main Compiling Command: ",CC
|
||||
$ WRITE/SYMBOL SYS$OUTPUT "Main Compiling Command: ",CC
|
||||
$!
|
||||
$! Special Threads For OpenVMS v7.1 Or Later
|
||||
$!
|
||||
|
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf (bio_err, "-in file input file\n");
|
||||
BIO_printf (bio_err, "-out file output file\n");
|
||||
BIO_printf (bio_err, "-toseq output NS Sequence file\n");
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
|
||||
if (infile) {
|
||||
@@ -162,6 +162,6 @@ end:
|
||||
BIO_free_all(out);
|
||||
NETSCAPE_CERT_SEQUENCE_free(seq);
|
||||
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
@@ -77,11 +77,11 @@ static unsigned long MS_CALLBACK hash(FUNCTION *a);
|
||||
static int MS_CALLBACK cmp(FUNCTION *a,FUNCTION *b);
|
||||
static LHASH *prog_init(void );
|
||||
static int do_cmd(LHASH *prog,int argc,char *argv[]);
|
||||
LHASH *config=NULL;
|
||||
char *default_config_file=NULL;
|
||||
|
||||
/* Make sure there is only one when MONOLITH is defined */
|
||||
#ifdef MONOLITH
|
||||
LHASH *config=NULL;
|
||||
BIO *bio_err=NULL;
|
||||
#endif
|
||||
|
||||
@@ -215,7 +215,7 @@ end:
|
||||
BIO_free(bio_err);
|
||||
bio_err=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
#define LIST_STANDARD_COMMANDS "list-standard-commands"
|
||||
|
@@ -284,7 +284,7 @@ err:
|
||||
BIO_free(in);
|
||||
if (out)
|
||||
BIO_free_all(out);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -498,6 +498,6 @@ err:
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
fputs("Program not available.\n", stderr)
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
#endif
|
||||
|
@@ -503,9 +503,10 @@ int MAIN(int argc, char **argv)
|
||||
/* Exclude verified certificate */
|
||||
for (i = 1; i < sk_X509_num (chain2) ; i++)
|
||||
sk_X509_push(certs, sk_X509_value (chain2, i));
|
||||
}
|
||||
sk_X509_free(chain2);
|
||||
if (vret) {
|
||||
/* Free first certificate */
|
||||
X509_free(sk_X509_value(chain2, 0));
|
||||
sk_X509_free(chain2);
|
||||
} else {
|
||||
BIO_printf (bio_err, "Error %s getting chain.\n",
|
||||
X509_verify_cert_error_string(vret));
|
||||
goto export_end;
|
||||
@@ -532,8 +533,6 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
sk_X509_pop_free(certs, X509_free);
|
||||
certs = NULL;
|
||||
/* ucert is part of certs so it is already freed */
|
||||
ucert = NULL;
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
@@ -621,7 +620,6 @@ int MAIN(int argc, char **argv)
|
||||
if (certs) sk_X509_pop_free(certs, X509_free);
|
||||
if (safes) sk_PKCS7_pop_free(safes, PKCS7_free);
|
||||
if (bags) sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free);
|
||||
if (ucert) X509_free(ucert);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_pop_info();
|
||||
@@ -691,7 +689,7 @@ int MAIN(int argc, char **argv)
|
||||
if (canames) sk_free(canames);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
|
||||
|
@@ -163,7 +163,7 @@ bad:
|
||||
BIO_printf(bio_err," -text print full details of certificates\n");
|
||||
BIO_printf(bio_err," -noout don't output encoded data\n");
|
||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
||||
EXIT(1);
|
||||
OPENSSL_EXIT(1);
|
||||
}
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
@@ -316,5 +316,5 @@ end:
|
||||
if (p7 != NULL) PKCS7_free(p7);
|
||||
if (in != NULL) BIO_free(in);
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
@@ -266,7 +266,8 @@ int MAIN(int argc, char **argv)
|
||||
if(passout) p8pass = passout;
|
||||
else {
|
||||
p8pass = pass;
|
||||
EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1);
|
||||
if (EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1))
|
||||
return (1);
|
||||
}
|
||||
app_RAND_load_file(NULL, bio_err, 0);
|
||||
if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,
|
||||
|
@@ -51,7 +51,7 @@ int MAIN(int argc, char **argv)
|
||||
else
|
||||
badopt = 1;
|
||||
}
|
||||
if (strcmp(argv[i], "-engine") == 0)
|
||||
else if (strcmp(argv[i], "-engine") == 0)
|
||||
{
|
||||
if ((argv[i+1] != NULL) && (engine == NULL))
|
||||
engine = argv[++i];
|
||||
@@ -173,5 +173,5 @@ err:
|
||||
ERR_print_errors(bio_err);
|
||||
if (out)
|
||||
BIO_free_all(out);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
@@ -431,7 +431,7 @@ bad:
|
||||
|
||||
if (template != NULL)
|
||||
{
|
||||
long errline;
|
||||
long errline = -1;
|
||||
|
||||
BIO_printf(bio_err,"Using configuration from %s\n",template);
|
||||
req_conf=CONF_load(NULL,template,&errline);
|
||||
@@ -949,7 +949,7 @@ end:
|
||||
#ifndef NO_DSA
|
||||
if (dsa_params != NULL) DSA_free(dsa_params);
|
||||
#endif
|
||||
EXIT(ex);
|
||||
OPENSSL_EXIT(ex);
|
||||
}
|
||||
|
||||
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, int attribs)
|
||||
|
@@ -416,7 +416,7 @@ end:
|
||||
if(rsa != NULL) RSA_free(rsa);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
if(passout) OPENSSL_free(passout);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
#else /* !NO_RSA */
|
||||
|
||||
|
@@ -800,14 +800,14 @@ end:
|
||||
if (con != NULL) SSL_free(con);
|
||||
if (con2 != NULL) SSL_free(con2);
|
||||
if (ctx != NULL) SSL_CTX_free(ctx);
|
||||
if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); OPENSSL_free(cbuf); }
|
||||
if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); OPENSSL_free(sbuf); }
|
||||
if (cbuf != NULL) { OPENSSL_cleanse(cbuf,BUFSIZZ); OPENSSL_free(cbuf); }
|
||||
if (sbuf != NULL) { OPENSSL_cleanse(sbuf,BUFSIZZ); OPENSSL_free(sbuf); }
|
||||
if (bio_c_out != NULL)
|
||||
{
|
||||
BIO_free(bio_c_out);
|
||||
bio_c_out=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -257,10 +257,10 @@ static char **local_argv;
|
||||
static int ebcdic_new(BIO *bi);
|
||||
static int ebcdic_free(BIO *a);
|
||||
static int ebcdic_read(BIO *b, char *out, int outl);
|
||||
static int ebcdic_write(BIO *b, char *in, int inl);
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr);
|
||||
static int ebcdic_write(BIO *b, const char *in, int inl);
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr);
|
||||
static int ebcdic_gets(BIO *bp, char *buf, int size);
|
||||
static int ebcdic_puts(BIO *bp, char *str);
|
||||
static int ebcdic_puts(BIO *bp, const char *str);
|
||||
|
||||
#define BIO_TYPE_EBCDIC_FILTER (18|0x0200)
|
||||
static BIO_METHOD methods_ebcdic=
|
||||
@@ -325,7 +325,7 @@ static int ebcdic_read(BIO *b, char *out, int outl)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static int ebcdic_write(BIO *b, char *in, int inl)
|
||||
static int ebcdic_write(BIO *b, const char *in, int inl)
|
||||
{
|
||||
EBCDIC_OUTBUFF *wbuf;
|
||||
int ret=0;
|
||||
@@ -358,7 +358,7 @@ static int ebcdic_write(BIO *b, char *in, int inl)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
|
||||
static long ebcdic_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
{
|
||||
long ret;
|
||||
|
||||
@@ -377,7 +377,7 @@ static long ebcdic_ctrl(BIO *b, int cmd, long num, char *ptr)
|
||||
|
||||
static int ebcdic_gets(BIO *bp, char *buf, int size)
|
||||
{
|
||||
int i, ret;
|
||||
int i, ret=0;
|
||||
if (bp->next_bio == NULL) return(0);
|
||||
/* return(BIO_gets(bp->next_bio,buf,size));*/
|
||||
for (i=0; i<size-1; ++i)
|
||||
@@ -396,7 +396,7 @@ static int ebcdic_gets(BIO *bp, char *buf, int size)
|
||||
return (ret < 0 && i == 0) ? ret : i;
|
||||
}
|
||||
|
||||
static int ebcdic_puts(BIO *bp, char *str)
|
||||
static int ebcdic_puts(BIO *bp, const char *str)
|
||||
{
|
||||
if (bp->next_bio == NULL) return(0);
|
||||
return ebcdic_write(bp, str, strlen(str));
|
||||
@@ -775,7 +775,7 @@ end:
|
||||
BIO_free(bio_s_out);
|
||||
bio_s_out=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
|
||||
@@ -1077,7 +1077,7 @@ err:
|
||||
BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
|
||||
if (buf != NULL)
|
||||
{
|
||||
memset(buf,0,bufsize);
|
||||
OPENSSL_cleanse(buf,bufsize);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
if (ret >= 0)
|
||||
@@ -1284,7 +1284,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
|
||||
else
|
||||
{
|
||||
BIO_printf(bio_s_out,"read R BLOCK\n");
|
||||
#ifndef MSDOS
|
||||
#if !defined(MSDOS) && !defined(VXWORKS)
|
||||
sleep(1);
|
||||
#endif
|
||||
continue;
|
||||
|
@@ -116,6 +116,11 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef VXWORKS
|
||||
#include <tickLib.h>
|
||||
#undef SIGALRM
|
||||
#endif
|
||||
|
||||
/* The following if from times(3) man page. It may need to be changed
|
||||
*/
|
||||
#ifndef HZ
|
||||
@@ -461,7 +466,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (tm_cipher == NULL ) {
|
||||
fprintf( stderr, "No CIPHER specified\n" );
|
||||
/* EXIT(1); */
|
||||
/* OPENSSL_EXIT(1); */
|
||||
}
|
||||
|
||||
if (!(perform & 1)) goto next;
|
||||
@@ -628,7 +633,7 @@ end:
|
||||
SSL_CTX_free(tm_ctx);
|
||||
tm_ctx=NULL;
|
||||
}
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@@ -272,7 +272,7 @@ bad:
|
||||
end:
|
||||
if (out != NULL) BIO_free_all(out);
|
||||
if (x != NULL) SSL_SESSION_free(x);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static SSL_SESSION *load_sess_id(char *infile, int format)
|
||||
|
@@ -724,7 +724,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
BIO_printf(bio_err,"\n");
|
||||
BIO_printf(bio_err,"Available options:\n");
|
||||
#ifdef TIMES
|
||||
#if defined(TIMES) || defined(USE_TOD)
|
||||
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
|
||||
#endif
|
||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
||||
@@ -1447,7 +1447,7 @@ end:
|
||||
if (dsa_key[i] != NULL)
|
||||
DSA_free(dsa_key[i]);
|
||||
#endif
|
||||
EXIT(mret);
|
||||
OPENSSL_EXIT(mret);
|
||||
}
|
||||
|
||||
static void print_message(char *s, long num, int length)
|
||||
|
@@ -315,5 +315,5 @@ end:
|
||||
BIO_free(key);
|
||||
EVP_PKEY_free(pkey);
|
||||
if(passin) OPENSSL_free(passin);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
@@ -239,7 +239,7 @@ end:
|
||||
if (cert_ctx != NULL) X509_STORE_free(cert_ctx);
|
||||
sk_X509_pop_free(untrusted, X509_free);
|
||||
sk_X509_pop_free(trusted, X509_free);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose)
|
||||
|
@@ -128,5 +128,5 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
if (cflags) printf("%s\n",SSLeay_version(SSLEAY_CFLAGS));
|
||||
end:
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
@@ -122,7 +122,7 @@ static char *x509_usage[]={
|
||||
" -CAkey arg - set the CA key, must be PEM format\n",
|
||||
" missing, it is assumed to be in the CA file.\n",
|
||||
" -CAcreateserial - create serial number file if it does not exist\n",
|
||||
" -CAserial - serial file\n",
|
||||
" -CAserial arg - serial file\n",
|
||||
" -text - print the certificate in text form\n",
|
||||
" -C - print out C code forms\n",
|
||||
" -md2/-md5/-sha1/-mdc2 - digest to use\n",
|
||||
@@ -474,7 +474,7 @@ bad:
|
||||
|
||||
if (extfile)
|
||||
{
|
||||
long errorline;
|
||||
long errorline = -1;
|
||||
X509V3_CTX ctx2;
|
||||
if (!(extconf=CONF_load(NULL,extfile,&errorline)))
|
||||
{
|
||||
@@ -988,7 +988,7 @@ end:
|
||||
sk_ASN1_OBJECT_pop_free(trust, ASN1_OBJECT_free);
|
||||
sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
|
||||
if (passin) OPENSSL_free(passin);
|
||||
EXIT(ret);
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
||||
|
18
config
18
config
@@ -317,6 +317,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
*CRAY*)
|
||||
echo "j90-cray-unicos"; exit 0;
|
||||
;;
|
||||
|
||||
NONSTOP_KERNEL*)
|
||||
echo "nsr-tandem-nsk"; exit 0;
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
@@ -384,6 +388,9 @@ done
|
||||
GCCVER=`(gcc -dumpversion) 2>/dev/null`
|
||||
if [ "$GCCVER" != "" ]; then
|
||||
CC=gcc
|
||||
# then strip off whatever prefix egcs prepends the number with...
|
||||
# Hopefully, this will work for any future prefixes as well.
|
||||
GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z]*\-//'`
|
||||
# Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
|
||||
# does give us what we want though, so we use that. We just just the
|
||||
# major and minor version numbers.
|
||||
@@ -392,6 +399,7 @@ if [ "$GCCVER" != "" ]; then
|
||||
else
|
||||
CC=cc
|
||||
fi
|
||||
GCCVER=${GCCVER:-0}
|
||||
if [ "$SYSTEM" = "HP-UX" ];then
|
||||
# By default gcc is a ILP32 compiler (with long long == 64).
|
||||
GCC_BITS="32"
|
||||
@@ -469,7 +477,8 @@ case "$GUESSOS" in
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure irix64-mips4-$CC' *manually*."
|
||||
echo " Type return if you want to continue, Ctrl-C to abort."
|
||||
read waste < /dev/tty
|
||||
# Do not stop if /dev/tty is unavailable
|
||||
(read waste < /dev/tty) || true
|
||||
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
|
||||
CPU=${CPU:-0}
|
||||
if [ $CPU -ge 5000 ]; then
|
||||
@@ -524,7 +533,8 @@ EOF
|
||||
#echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
#echo " invoke './Configure linux64-sparcv9' *manually*."
|
||||
#echo " Type return if you want to continue, Ctrl-C to abort."
|
||||
#read waste < /dev/tty
|
||||
# Do not stop if /dev/tty is unavailable
|
||||
#(read waste < /dev/tty) || true
|
||||
OUT="linux-sparcv9" ;;
|
||||
sparc-*-linux2)
|
||||
KARCH=`awk '/^type/{print$3}' /proc/cpuinfo`
|
||||
@@ -565,7 +575,8 @@ EOF
|
||||
echo "WARNING! If you wish to build 64-bit library, then you have to"
|
||||
echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
|
||||
echo " Type return if you want to continue, Ctrl-C to abort."
|
||||
read waste < /dev/tty
|
||||
# Do not stop if /dev/tty is unavailable
|
||||
(read waste < /dev/tty) || true
|
||||
fi
|
||||
OUT="solaris-sparcv9-$CC" ;;
|
||||
sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
@@ -626,6 +637,7 @@ EOF
|
||||
*-*-cygwin) OUT="Cygwin" ;;
|
||||
t3e-cray-unicosmk) OUT="cray-t3e" ;;
|
||||
j90-cray-unicos) OUT="cray-j90" ;;
|
||||
nsr-tandem-nsk) OUT="tandem-c89" ;;
|
||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||
esac
|
||||
|
||||
|
@@ -34,8 +34,8 @@ SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
||||
GENERAL=Makefile README crypto-lib.com install.com
|
||||
|
||||
LIB= $(TOP)/libcrypto.a
|
||||
LIBSRC= cryptlib.c mem.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o
|
||||
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c
|
||||
LIBOBJ= cryptlib.o mem.o mem_clr.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdic.o uid.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -129,7 +129,7 @@ lint:
|
||||
|
||||
depend:
|
||||
if [ ! -f buildinf.h ]; then touch buildinf.h; fi # fake buildinf.h if it does not exist
|
||||
$(MAKEDEPEND) $(INCLUDE) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
if [ ! -s buildinf.h ]; then rm buildinf.h; fi
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
@@ -185,6 +185,9 @@ mem.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
mem.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
|
||||
mem.o: ../include/openssl/opensslv.h ../include/openssl/safestack.h
|
||||
mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
|
||||
mem_clr.o: ../include/openssl/crypto.h ../include/openssl/opensslv.h
|
||||
mem_clr.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
mem_clr.o: ../include/openssl/symhacks.h
|
||||
mem_dbg.o: ../include/openssl/bio.h ../include/openssl/buffer.h
|
||||
mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os.h
|
||||
mem_dbg.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
|
@@ -104,7 +104,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -199,10 +199,10 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
signature->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
|
||||
signature->flags|=ASN1_STRING_FLAG_BITS_LEFT;
|
||||
err:
|
||||
memset(&ctx,0,sizeof(ctx));
|
||||
OPENSSL_cleanse(&ctx,sizeof(ctx));
|
||||
if (buf_in != NULL)
|
||||
{ memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
|
||||
{ OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
|
||||
if (buf_out != NULL)
|
||||
{ memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
|
||||
{ OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
|
||||
return(outl);
|
||||
}
|
||||
|
@@ -519,7 +519,7 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
{
|
||||
ASN1_STRING stmp, *str = &stmp;
|
||||
int mbflag, type, ret;
|
||||
if(!*out || !in) return -1;
|
||||
if(!in) return -1;
|
||||
type = in->type;
|
||||
if((type < 0) || (type > 30)) return -1;
|
||||
mbflag = tag2nbyte[type];
|
||||
@@ -528,6 +528,6 @@ int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in)
|
||||
stmp.data = NULL;
|
||||
ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
|
||||
if(ret < 0) return ret;
|
||||
if(out) *out = stmp.data;
|
||||
*out = stmp.data;
|
||||
return stmp.length;
|
||||
}
|
||||
|
@@ -246,6 +246,8 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
||||
ts=(struct tm *)localtime(&t);
|
||||
}
|
||||
#endif
|
||||
if (ts == NULL)
|
||||
return(NULL);
|
||||
p=(char *)s->data;
|
||||
if ((p == NULL) || (s->length < 14))
|
||||
{
|
||||
|
@@ -100,7 +100,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
|
||||
EVP_VerifyInit(&ctx,type);
|
||||
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
|
||||
|
||||
memset(buf_in,0,(unsigned int)inl);
|
||||
OPENSSL_cleanse(buf_in,(unsigned int)inl);
|
||||
OPENSSL_free(buf_in);
|
||||
|
||||
if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
|
||||
|
@@ -57,6 +57,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
@@ -124,7 +125,7 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
|
||||
(int)(omax+ *pp));
|
||||
|
||||
#endif
|
||||
if (*plength > (omax - (*pp - p)))
|
||||
if (*plength > (omax - (p - *pp)))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_GET_OBJECT,ASN1_R_TOO_LONG);
|
||||
/* Set this so that even if things are not long enough
|
||||
@@ -141,7 +142,7 @@ err:
|
||||
static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
|
||||
{
|
||||
unsigned char *p= *pp;
|
||||
long ret=0;
|
||||
unsigned long ret=0;
|
||||
int i;
|
||||
|
||||
if (max-- < 1) return(0);
|
||||
@@ -170,10 +171,10 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
|
||||
else
|
||||
ret=i;
|
||||
}
|
||||
if (ret < 0)
|
||||
if (ret > LONG_MAX)
|
||||
return 0;
|
||||
*pp=p;
|
||||
*rl=ret;
|
||||
*rl=(long)ret;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@@ -181,7 +181,7 @@ int i2d_RSA_NET(RSA *a, unsigned char **pp, int (*cb)(), int sgckey)
|
||||
}
|
||||
|
||||
EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
|
||||
memset(buf,0,256);
|
||||
OPENSSL_cleanse(buf,256);
|
||||
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
EVP_EncryptInit(&ctx,EVP_rc4(),key,NULL);
|
||||
@@ -292,7 +292,7 @@ RSA *d2i_RSA_NET_2(RSA **a, unsigned char **pp, long length,
|
||||
}
|
||||
|
||||
EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
|
||||
memset(buf,0,256);
|
||||
OPENSSL_cleanse(buf,256);
|
||||
|
||||
EVP_CIPHER_CTX_init(&ctx);
|
||||
EVP_DecryptInit(&ctx,EVP_rc4(),key,NULL);
|
||||
|
@@ -119,8 +119,8 @@ void PKCS8_PRIV_KEY_INFO_free (PKCS8_PRIV_KEY_INFO *a)
|
||||
X509_ALGOR_free(a->pkeyalg);
|
||||
/* Clear sensitive data */
|
||||
if (a->pkey->value.octet_string)
|
||||
memset (a->pkey->value.octet_string->data,
|
||||
0, a->pkey->value.octet_string->length);
|
||||
OPENSSL_cleanse(a->pkey->value.octet_string->data,
|
||||
a->pkey->value.octet_string->length);
|
||||
ASN1_TYPE_free (a->pkey);
|
||||
sk_X509_ATTRIBUTE_pop_free (a->attributes, X509_ATTRIBUTE_free);
|
||||
OPENSSL_free (a);
|
||||
|
@@ -96,7 +96,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -63,6 +63,8 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#ifdef NO_BF
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -275,7 +277,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
ret=test();
|
||||
|
||||
exit(ret);
|
||||
EXIT(ret);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -109,7 +109,7 @@
|
||||
* o ... (for OpenSSL)
|
||||
*/
|
||||
|
||||
#if HAVE_LONG_DOUBLE
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
#define LDOUBLE long double
|
||||
#else
|
||||
#define LDOUBLE double
|
||||
|
@@ -159,7 +159,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -155,7 +155,7 @@ extern "C" {
|
||||
#define BN_BYTES 4
|
||||
#define BN_BITS2 32
|
||||
#define BN_BITS4 16
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
/* VC++ doesn't like the LL suffix */
|
||||
#define BN_MASK (0xffffffffffffffffL)
|
||||
#else
|
||||
@@ -413,7 +413,7 @@ int BN_mod_mul_montgomery(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_MONT_CTX *mont,
|
||||
BN_CTX *ctx);
|
||||
int BN_from_montgomery(BIGNUM *r,BIGNUM *a,BN_MONT_CTX *mont,BN_CTX *ctx);
|
||||
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
||||
int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *modulus,BN_CTX *ctx);
|
||||
int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx);
|
||||
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from);
|
||||
|
||||
BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod);
|
||||
|
@@ -263,12 +263,12 @@ void BN_clear_free(BIGNUM *a)
|
||||
if (a == NULL) return;
|
||||
if (a->d != NULL)
|
||||
{
|
||||
memset(a->d,0,a->dmax*sizeof(a->d[0]));
|
||||
OPENSSL_cleanse(a->d,a->dmax*sizeof(a->d[0]));
|
||||
if (!(BN_get_flags(a,BN_FLG_STATIC_DATA)))
|
||||
OPENSSL_free(a->d);
|
||||
}
|
||||
i=BN_get_flags(a,BN_FLG_MALLOCED);
|
||||
memset(a,0,sizeof(BIGNUM));
|
||||
OPENSSL_cleanse(a,sizeof(BIGNUM));
|
||||
if (i)
|
||||
OPENSSL_free(a);
|
||||
}
|
||||
|
@@ -201,7 +201,7 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
|
||||
err:
|
||||
if (buf != NULL)
|
||||
{
|
||||
memset(buf,0,bytes);
|
||||
OPENSSL_cleanse(buf,bytes);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
return(ret);
|
||||
|
@@ -123,7 +123,10 @@ int BN_add_word(BIGNUM *a, BN_ULONG w)
|
||||
i=0;
|
||||
for (;;)
|
||||
{
|
||||
l=(a->d[i]+(BN_ULONG)w)&BN_MASK2;
|
||||
if (i >= a->top)
|
||||
l=w;
|
||||
else
|
||||
l=(a->d[i]+(BN_ULONG)w)&BN_MASK2;
|
||||
a->d[i]=l;
|
||||
if (w > l)
|
||||
w=1;
|
||||
|
@@ -139,10 +139,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
ctx=BN_CTX_new();
|
||||
if (ctx == NULL) exit(1);
|
||||
if (ctx == NULL) EXIT(1);
|
||||
|
||||
out=BIO_new(BIO_s_file());
|
||||
if (out == NULL) exit(1);
|
||||
if (out == NULL) EXIT(1);
|
||||
if (outfile == NULL)
|
||||
{
|
||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
|
||||
if (!BIO_write_filename(out,outfile))
|
||||
{
|
||||
perror(outfile);
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,14 +228,14 @@ int main(int argc, char *argv[])
|
||||
BIO_free(out);
|
||||
|
||||
/**/
|
||||
exit(0);
|
||||
EXIT(0);
|
||||
err:
|
||||
BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices
|
||||
* the failure, see test_bn in test/Makefile.ssl*/
|
||||
BIO_flush(out);
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors_fp(stderr);
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ int test_mod_mul(BIO *bp, BN_CTX *ctx)
|
||||
while ((l=ERR_get_error()))
|
||||
fprintf(stderr,"ERROR:%s\n",
|
||||
ERR_error_string(l,NULL));
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
}
|
||||
if (bp != NULL)
|
||||
{
|
||||
|
@@ -59,6 +59,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rand.h>
|
||||
@@ -86,7 +89,7 @@ int main(int argc, char *argv[])
|
||||
ERR_load_BN_strings();
|
||||
|
||||
ctx=BN_CTX_new();
|
||||
if (ctx == NULL) exit(1);
|
||||
if (ctx == NULL) EXIT(1);
|
||||
r_mont=BN_new();
|
||||
r_recp=BN_new();
|
||||
r_simple=BN_new();
|
||||
@@ -99,7 +102,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
out=BIO_new(BIO_s_file());
|
||||
|
||||
if (out == NULL) exit(1);
|
||||
if (out == NULL) EXIT(1);
|
||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||
|
||||
for (i=0; i<200; i++)
|
||||
@@ -124,7 +127,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
printf("BN_mod_exp_mont() problems\n");
|
||||
ERR_print_errors(out);
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
}
|
||||
|
||||
ret=BN_mod_exp_recp(r_recp,a,b,m,ctx);
|
||||
@@ -132,7 +135,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
printf("BN_mod_exp_recp() problems\n");
|
||||
ERR_print_errors(out);
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
}
|
||||
|
||||
ret=BN_mod_exp_simple(r_simple,a,b,m,ctx);
|
||||
@@ -140,7 +143,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
printf("BN_mod_exp_simple() problems\n");
|
||||
ERR_print_errors(out);
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
}
|
||||
|
||||
if (BN_cmp(r_simple, r_mont) == 0
|
||||
@@ -163,7 +166,7 @@ int main(int argc, char *argv[])
|
||||
printf("\nrecp ="); BN_print(out,r_recp);
|
||||
printf("\nmont ="); BN_print(out,r_mont);
|
||||
printf("\n");
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
}
|
||||
}
|
||||
BN_free(r_mont);
|
||||
@@ -177,11 +180,11 @@ int main(int argc, char *argv[])
|
||||
CRYPTO_mem_leaks(out);
|
||||
BIO_free(out);
|
||||
printf(" done\n");
|
||||
exit(0);
|
||||
EXIT(0);
|
||||
err:
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors(out);
|
||||
exit(1);
|
||||
EXIT(1);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@@ -68,7 +68,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -97,7 +97,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -60,6 +60,8 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#ifdef NO_CAST
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -224,7 +226,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
exit(err);
|
||||
EXIT(err);
|
||||
return(err);
|
||||
}
|
||||
#endif
|
||||
|
@@ -71,7 +71,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -69,7 +69,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -224,9 +224,9 @@ static int def_load(CONF *conf, BIO *in, long *line)
|
||||
section_sk=(STACK_OF(CONF_VALUE) *)sv->value;
|
||||
|
||||
bufnum=0;
|
||||
again=0;
|
||||
for (;;)
|
||||
{
|
||||
again=0;
|
||||
if (!BUF_MEM_grow(buff,bufnum+BUFSIZE))
|
||||
{
|
||||
CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB);
|
||||
@@ -237,7 +237,8 @@ static int def_load(CONF *conf, BIO *in, long *line)
|
||||
BIO_gets(in, p, BUFSIZE-1);
|
||||
p[BUFSIZE-1]='\0';
|
||||
ii=i=strlen(p);
|
||||
if (i == 0) break;
|
||||
if (i == 0 && !again) break;
|
||||
again=0;
|
||||
while (i > 0)
|
||||
{
|
||||
if ((p[i-1] != '\r') && (p[i-1] != '\n'))
|
||||
@@ -247,7 +248,7 @@ static int def_load(CONF *conf, BIO *in, long *line)
|
||||
}
|
||||
/* we removed some trailing stuff so there is a new
|
||||
* line on the end. */
|
||||
if (i == ii)
|
||||
if (ii && i == ii)
|
||||
again=1; /* long line */
|
||||
else
|
||||
{
|
||||
|
@@ -89,6 +89,7 @@ static const char* lock_names[CRYPTO_NUM_LOCKS] =
|
||||
"ssl_session",
|
||||
"ssl_sess_cert",
|
||||
"ssl",
|
||||
/* "ssl_method", */
|
||||
"rand",
|
||||
"rand2",
|
||||
"debug_malloc",
|
||||
@@ -459,7 +460,7 @@ const char *CRYPTO_get_lock_name(int type)
|
||||
return("dynamic");
|
||||
else if (type < CRYPTO_NUM_LOCKS)
|
||||
return(lock_names[type]);
|
||||
else if (type-CRYPTO_NUM_LOCKS >= sk_num(app_locks))
|
||||
else if (type-CRYPTO_NUM_LOCKS > sk_num(app_locks))
|
||||
return("ERROR");
|
||||
else
|
||||
return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));
|
||||
|
@@ -93,10 +93,6 @@ extern "C" {
|
||||
#define DECIMAL_SIZE(type) ((sizeof(type)*8+2)/3+1)
|
||||
#define HEX_SIZE(type) ((sizeof(type)*2)
|
||||
|
||||
/* die if we have to */
|
||||
void OpenSSLDie(const char *file,int line,const char *assertion);
|
||||
#define die(e) ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -174,7 +174,7 @@ $!
|
||||
$ APPS_DES = "DES/DES,CBC3_ENC"
|
||||
$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
|
||||
$
|
||||
$ LIB_ = "cryptlib,mem,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid"
|
||||
$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid"
|
||||
$ LIB_MD2 = "md2_dgst,md2_one"
|
||||
$ LIB_MD4 = "md4_dgst,md4_one"
|
||||
$ LIB_MD5 = "md5_dgst,md5_one"
|
||||
@@ -1333,7 +1333,7 @@ $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS
|
||||
$!
|
||||
$! Show user the result
|
||||
$!
|
||||
$ WRITE SYS$OUTPUT "Main C Compiling Command: ",CC
|
||||
$ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
|
||||
$!
|
||||
$! Else The User Entered An Invalid Arguement.
|
||||
$!
|
||||
@@ -1364,7 +1364,7 @@ $ IF ARCH .EQS. "AXP" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE
|
||||
$!
|
||||
$! Show user the result
|
||||
$!
|
||||
$ WRITE SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
|
||||
$ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
|
||||
$!
|
||||
$! Time to check the contents, and to make sure we get the correct library.
|
||||
$!
|
||||
|
@@ -95,36 +95,39 @@ extern "C" {
|
||||
* names in cryptlib.c
|
||||
*/
|
||||
|
||||
#define CRYPTO_LOCK_ERR 1
|
||||
#define CRYPTO_LOCK_ERR_HASH 2
|
||||
#define CRYPTO_LOCK_X509 3
|
||||
#define CRYPTO_LOCK_X509_INFO 4
|
||||
#define CRYPTO_LOCK_X509_PKEY 5
|
||||
#define CRYPTO_LOCK_ERR 1
|
||||
#define CRYPTO_LOCK_ERR_HASH 2
|
||||
#define CRYPTO_LOCK_X509 3
|
||||
#define CRYPTO_LOCK_X509_INFO 4
|
||||
#define CRYPTO_LOCK_X509_PKEY 5
|
||||
#define CRYPTO_LOCK_X509_CRL 6
|
||||
#define CRYPTO_LOCK_X509_REQ 7
|
||||
#define CRYPTO_LOCK_DSA 8
|
||||
#define CRYPTO_LOCK_RSA 9
|
||||
#define CRYPTO_LOCK_EVP_PKEY 10
|
||||
#define CRYPTO_LOCK_X509_STORE 11
|
||||
#define CRYPTO_LOCK_SSL_CTX 12
|
||||
#define CRYPTO_LOCK_SSL_CERT 13
|
||||
#define CRYPTO_LOCK_SSL_SESSION 14
|
||||
#define CRYPTO_LOCK_SSL_SESS_CERT 15
|
||||
#define CRYPTO_LOCK_SSL 16
|
||||
#define CRYPTO_LOCK_RAND 17
|
||||
#define CRYPTO_LOCK_RAND2 18
|
||||
#define CRYPTO_LOCK_MALLOC 19
|
||||
#define CRYPTO_LOCK_BIO 20
|
||||
#define CRYPTO_LOCK_GETHOSTBYNAME 21
|
||||
#define CRYPTO_LOCK_GETSERVBYNAME 22
|
||||
#define CRYPTO_LOCK_READDIR 23
|
||||
#define CRYPTO_LOCK_RSA_BLINDING 24
|
||||
#define CRYPTO_LOCK_DH 25
|
||||
#define CRYPTO_LOCK_MALLOC2 26
|
||||
#define CRYPTO_LOCK_DSO 27
|
||||
#define CRYPTO_LOCK_DYNLOCK 28
|
||||
#define CRYPTO_LOCK_ENGINE 29
|
||||
#define CRYPTO_NUM_LOCKS 30
|
||||
#define CRYPTO_LOCK_X509_STORE 11
|
||||
#define CRYPTO_LOCK_SSL_CTX 12
|
||||
#define CRYPTO_LOCK_SSL_CERT 13
|
||||
#define CRYPTO_LOCK_SSL_SESSION 14
|
||||
#define CRYPTO_LOCK_SSL_SESS_CERT 15
|
||||
#define CRYPTO_LOCK_SSL 16
|
||||
/* for binary compatibility between 0.9.6 minor versions,
|
||||
* reuse an existing lock (later version use a new one): */
|
||||
# define CRYPTO_LOCK_SSL_METHOD CRYPTO_LOCK_SSL_CTX
|
||||
#define CRYPTO_LOCK_RAND 17
|
||||
#define CRYPTO_LOCK_RAND2 18
|
||||
#define CRYPTO_LOCK_MALLOC 19
|
||||
#define CRYPTO_LOCK_BIO 20
|
||||
#define CRYPTO_LOCK_GETHOSTBYNAME 21
|
||||
#define CRYPTO_LOCK_GETSERVBYNAME 22
|
||||
#define CRYPTO_LOCK_READDIR 23
|
||||
#define CRYPTO_LOCK_RSA_BLINDING 24
|
||||
#define CRYPTO_LOCK_DH 25
|
||||
#define CRYPTO_LOCK_MALLOC2 26
|
||||
#define CRYPTO_LOCK_DSO 27
|
||||
#define CRYPTO_LOCK_DYNLOCK 28
|
||||
#define CRYPTO_LOCK_ENGINE 29
|
||||
#define CRYPTO_NUM_LOCKS 30
|
||||
|
||||
#define CRYPTO_LOCK 1
|
||||
#define CRYPTO_UNLOCK 2
|
||||
@@ -146,7 +149,7 @@ extern "C" {
|
||||
#endif
|
||||
#else
|
||||
#define CRYPTO_w_lock(a)
|
||||
#define CRYPTO_w_unlock(a)
|
||||
#define CRYPTO_w_unlock(a)
|
||||
#define CRYPTO_r_lock(a)
|
||||
#define CRYPTO_r_unlock(a)
|
||||
#define CRYPTO_add(a,b,c) ((*(a))+=(b))
|
||||
@@ -343,6 +346,8 @@ void CRYPTO_free(void *);
|
||||
void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
|
||||
void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
|
||||
|
||||
void OPENSSL_cleanse(void *ptr, size_t len);
|
||||
|
||||
void CRYPTO_set_mem_debug_options(long bits);
|
||||
long CRYPTO_get_mem_debug_options(void);
|
||||
|
||||
|
@@ -130,7 +130,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
@@ -192,8 +192,11 @@ qud_cksm.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
|
||||
qud_cksm.o: ../../include/openssl/opensslconf.h des_locl.h
|
||||
rand_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
|
||||
rand_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/rand.h
|
||||
read2pwd.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
|
||||
read2pwd.o: ../../include/openssl/opensslconf.h des_locl.h
|
||||
read2pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
read2pwd.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
read2pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
read2pwd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
read2pwd.o: des_locl.h
|
||||
read_pwd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
read_pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
read_pwd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
@@ -206,7 +209,10 @@ rpc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
|
||||
rpc_enc.o: ../../include/openssl/opensslconf.h des_locl.h des_ver.h rpc_des.h
|
||||
set_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
|
||||
set_key.o: ../../include/openssl/opensslconf.h des_locl.h
|
||||
str2key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
|
||||
str2key.o: ../../include/openssl/opensslconf.h des_locl.h
|
||||
str2key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
str2key.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
str2key.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
str2key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
str2key.o: des_locl.h
|
||||
xcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
|
||||
xcbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h
|
||||
|
@@ -423,7 +423,7 @@ void doencryption(void)
|
||||
k2[i-8]=k;
|
||||
}
|
||||
des_set_key_unchecked(&k2,ks2);
|
||||
memset(k2,0,sizeof(k2));
|
||||
OPENSSL_cleanse(k2,sizeof(k2));
|
||||
}
|
||||
else if (longk || flag3)
|
||||
{
|
||||
@@ -431,7 +431,7 @@ void doencryption(void)
|
||||
{
|
||||
des_string_to_2keys(key,&kk,&k2);
|
||||
des_set_key_unchecked(&k2,ks2);
|
||||
memset(k2,0,sizeof(k2));
|
||||
OPENSSL_cleanse(k2,sizeof(k2));
|
||||
}
|
||||
else
|
||||
des_string_to_key(key,&kk);
|
||||
@@ -453,8 +453,8 @@ void doencryption(void)
|
||||
}
|
||||
|
||||
des_set_key_unchecked(&kk,ks);
|
||||
memset(key,0,sizeof(key));
|
||||
memset(kk,0,sizeof(kk));
|
||||
OPENSSL_cleanse(key,sizeof(key));
|
||||
OPENSSL_cleanse(kk,sizeof(kk));
|
||||
/* woops - A bug that does not showup under unix :-( */
|
||||
memset(iv,0,sizeof(iv));
|
||||
memset(iv2,0,sizeof(iv2));
|
||||
@@ -662,18 +662,18 @@ void doencryption(void)
|
||||
if (l) fclose(CKSUM_OUT);
|
||||
}
|
||||
problems:
|
||||
memset(buf,0,sizeof(buf));
|
||||
memset(obuf,0,sizeof(obuf));
|
||||
memset(ks,0,sizeof(ks));
|
||||
memset(ks2,0,sizeof(ks2));
|
||||
memset(iv,0,sizeof(iv));
|
||||
memset(iv2,0,sizeof(iv2));
|
||||
memset(kk,0,sizeof(kk));
|
||||
memset(k2,0,sizeof(k2));
|
||||
memset(uubuf,0,sizeof(uubuf));
|
||||
memset(b,0,sizeof(b));
|
||||
memset(bb,0,sizeof(bb));
|
||||
memset(cksum,0,sizeof(cksum));
|
||||
OPENSSL_cleanse(buf,sizeof(buf));
|
||||
OPENSSL_cleanse(obuf,sizeof(obuf));
|
||||
OPENSSL_cleanse(ks,sizeof(ks));
|
||||
OPENSSL_cleanse(ks2,sizeof(ks2));
|
||||
OPENSSL_cleanse(iv,sizeof(iv));
|
||||
OPENSSL_cleanse(iv2,sizeof(iv2));
|
||||
OPENSSL_cleanse(kk,sizeof(kk));
|
||||
OPENSSL_cleanse(k2,sizeof(k2));
|
||||
OPENSSL_cleanse(uubuf,sizeof(uubuf));
|
||||
OPENSSL_cleanse(b,sizeof(b));
|
||||
OPENSSL_cleanse(bb,sizeof(bb));
|
||||
OPENSSL_cleanse(cksum,sizeof(cksum));
|
||||
if (Exit) EXIT(Exit);
|
||||
}
|
||||
|
||||
|
@@ -57,6 +57,7 @@
|
||||
*/
|
||||
|
||||
#include "des_locl.h"
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
int des_read_password(des_cblock *key, const char *prompt, int verify)
|
||||
{
|
||||
@@ -65,8 +66,8 @@ int des_read_password(des_cblock *key, const char *prompt, int verify)
|
||||
|
||||
if ((ok=des_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0)
|
||||
des_string_to_key(buf,key);
|
||||
memset(buf,0,BUFSIZ);
|
||||
memset(buff,0,BUFSIZ);
|
||||
OPENSSL_cleanse(buf,BUFSIZ);
|
||||
OPENSSL_cleanse(buff,BUFSIZ);
|
||||
return(ok);
|
||||
}
|
||||
|
||||
@@ -78,7 +79,7 @@ int des_read_2passwords(des_cblock *key1, des_cblock *key2, const char *prompt,
|
||||
|
||||
if ((ok=des_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0)
|
||||
des_string_to_2keys(buf,key1,key2);
|
||||
memset(buf,0,BUFSIZ);
|
||||
memset(buff,0,BUFSIZ);
|
||||
OPENSSL_cleanse(buf,BUFSIZ);
|
||||
OPENSSL_cleanse(buff,BUFSIZ);
|
||||
return(ok);
|
||||
}
|
||||
|
@@ -218,7 +218,7 @@ int des_read_pw_string(char *buf, int length, const char *prompt,
|
||||
int ret;
|
||||
|
||||
ret=des_read_pw(buf,buff,(length>BUFSIZ)?BUFSIZ:length,prompt,verify);
|
||||
memset(buff,0,BUFSIZ);
|
||||
OPENSSL_cleanse(buff,BUFSIZ);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@@ -56,6 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include "des_locl.h"
|
||||
|
||||
void des_string_to_key(const char *str, des_cblock *key)
|
||||
@@ -88,7 +89,7 @@ void des_string_to_key(const char *str, des_cblock *key)
|
||||
des_set_odd_parity(key);
|
||||
des_set_key_unchecked(key,ks);
|
||||
des_cbc_cksum((const unsigned char*)str,key,length,ks,key);
|
||||
memset(ks,0,sizeof(ks));
|
||||
OPENSSL_cleanse(ks,sizeof(ks));
|
||||
des_set_odd_parity(key);
|
||||
}
|
||||
|
||||
@@ -149,7 +150,7 @@ void des_string_to_2keys(const char *str, des_cblock *key1, des_cblock *key2)
|
||||
des_cbc_cksum((const unsigned char*)str,key1,length,ks,key1);
|
||||
des_set_key_unchecked(key2,ks);
|
||||
des_cbc_cksum((const unsigned char*)str,key2,length,ks,key2);
|
||||
memset(ks,0,sizeof(ks));
|
||||
OPENSSL_cleanse(ks,sizeof(ks));
|
||||
des_set_odd_parity(key1);
|
||||
des_set_odd_parity(key2);
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -59,6 +59,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#ifdef WINDOWS
|
||||
#include "../bio/bss_file.c"
|
||||
#endif
|
||||
@@ -107,7 +110,7 @@ int main(int argc, char *argv[])
|
||||
RAND_seed(rnd_seed, sizeof rnd_seed);
|
||||
|
||||
out=BIO_new(BIO_s_file());
|
||||
if (out == NULL) exit(1);
|
||||
if (out == NULL) EXIT(1);
|
||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||
|
||||
a=DH_generate_parameters(64,DH_GENERATOR_5,cb,out);
|
||||
@@ -188,7 +191,7 @@ err:
|
||||
if(b != NULL) DH_free(b);
|
||||
if(a != NULL) DH_free(a);
|
||||
BIO_free(out);
|
||||
exit(ret);
|
||||
EXIT(ret);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@@ -70,7 +70,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -61,6 +61,9 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/bio.h>
|
||||
@@ -207,10 +210,15 @@ end:
|
||||
BIO_free(bio_err);
|
||||
bio_err = NULL;
|
||||
}
|
||||
exit(!ret);
|
||||
EXIT(!ret);
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int cb_exit(int ec)
|
||||
{
|
||||
EXIT(ec);
|
||||
}
|
||||
|
||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
||||
{
|
||||
char c='*';
|
||||
@@ -226,7 +234,7 @@ static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
||||
if (!ok && (p == 0) && (num > 1))
|
||||
{
|
||||
BIO_printf((BIO *)arg,"error in dsatest\n");
|
||||
exit(1);
|
||||
cb_exit(1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -70,7 +70,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -431,6 +431,7 @@ void ERR_load_ENGINE_strings(void);
|
||||
#define ENGINE_R_INTERNAL_LIST_ERROR 110
|
||||
#define ENGINE_R_INVALID_PADDING 137
|
||||
#define ENGINE_R_KEY_TOO_LARGE 138
|
||||
#define ENGINE_R_LOCKING_MISSING 143
|
||||
#define ENGINE_R_MISSING_KEY_COMPONENTS 111
|
||||
#define ENGINE_R_MOD_EXP_CRT_FAILED 134
|
||||
#define ENGINE_R_MOD_EXP_FAILED 131
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* crypto/engine/engine_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
|
||||
@@ -205,6 +205,7 @@ static ERR_STRING_DATA ENGINE_str_reasons[]=
|
||||
{ENGINE_R_INTERNAL_LIST_ERROR ,"internal list error"},
|
||||
{ENGINE_R_INVALID_PADDING ,"invalid padding"},
|
||||
{ENGINE_R_KEY_TOO_LARGE ,"key too large"},
|
||||
{ENGINE_R_LOCKING_MISSING ,"locking missing"},
|
||||
{ENGINE_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
||||
{ENGINE_R_MOD_EXP_CRT_FAILED ,"mod exp crt failed"},
|
||||
{ENGINE_R_MOD_EXP_FAILED ,"mod exp failed"},
|
||||
|
@@ -224,28 +224,28 @@ ENGINE *ENGINE_get_first(void)
|
||||
{
|
||||
ENGINE *ret = NULL;
|
||||
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||
if(engine_internal_check())
|
||||
{
|
||||
ret = engine_list_head;
|
||||
if(ret)
|
||||
ret->struct_ref++;
|
||||
}
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
||||
return ret;
|
||||
}
|
||||
ENGINE *ENGINE_get_last(void)
|
||||
{
|
||||
ENGINE *ret = NULL;
|
||||
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||
if(engine_internal_check())
|
||||
{
|
||||
ret = engine_list_tail;
|
||||
if(ret)
|
||||
ret->struct_ref++;
|
||||
}
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -259,12 +259,12 @@ ENGINE *ENGINE_get_next(ENGINE *e)
|
||||
ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||
ret = e->next;
|
||||
e->struct_ref--;
|
||||
if(ret)
|
||||
ret->struct_ref++;
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
||||
return ret;
|
||||
}
|
||||
ENGINE *ENGINE_get_prev(ENGINE *e)
|
||||
@@ -276,12 +276,12 @@ ENGINE *ENGINE_get_prev(ENGINE *e)
|
||||
ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||
ret = e->prev;
|
||||
e->struct_ref--;
|
||||
if(ret)
|
||||
ret->struct_ref++;
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ ENGINE *ENGINE_by_id(const char *id)
|
||||
ERR_R_PASSED_NULL_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||
if(!engine_internal_check())
|
||||
ENGINEerr(ENGINE_F_ENGINE_BY_ID,
|
||||
ENGINE_R_INTERNAL_LIST_ERROR);
|
||||
@@ -354,7 +354,7 @@ ENGINE *ENGINE_by_id(const char *id)
|
||||
/* We need to return a structural reference */
|
||||
iterator->struct_ref++;
|
||||
}
|
||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
||||
if(iterator == NULL)
|
||||
ENGINEerr(ENGINE_F_ENGINE_BY_ID,
|
||||
ENGINE_R_NO_SUCH_ENGINE);
|
||||
@@ -421,7 +421,7 @@ int ENGINE_free(ENGINE *e)
|
||||
}
|
||||
i = CRYPTO_add(&e->struct_ref,-1,CRYPTO_LOCK_ENGINE);
|
||||
#ifdef REF_PRINT
|
||||
REF_PRINT("ENGINE",e);
|
||||
REF_PRINT2("ENGINE",e,struct_ref);
|
||||
#endif
|
||||
if (i > 0) return 1;
|
||||
#ifdef REF_CHECK
|
||||
|
@@ -435,15 +435,23 @@ static int hwcrhk_init()
|
||||
|
||||
/* Check if the application decided to support dynamic locks,
|
||||
and if it does, use them. */
|
||||
if (disable_mutex_callbacks == 0 &&
|
||||
CRYPTO_get_dynlock_create_callback() != NULL &&
|
||||
CRYPTO_get_dynlock_lock_callback() != NULL &&
|
||||
CRYPTO_get_dynlock_destroy_callback() != NULL)
|
||||
if (disable_mutex_callbacks == 0)
|
||||
{
|
||||
hwcrhk_globals.mutex_init = hwcrhk_mutex_init;
|
||||
hwcrhk_globals.mutex_acquire = hwcrhk_mutex_lock;
|
||||
hwcrhk_globals.mutex_release = hwcrhk_mutex_unlock;
|
||||
hwcrhk_globals.mutex_destroy = hwcrhk_mutex_destroy;
|
||||
if (CRYPTO_get_dynlock_create_callback() != NULL &&
|
||||
CRYPTO_get_dynlock_lock_callback() != NULL &&
|
||||
CRYPTO_get_dynlock_destroy_callback() != NULL)
|
||||
{
|
||||
hwcrhk_globals.mutex_init = hwcrhk_mutex_init;
|
||||
hwcrhk_globals.mutex_acquire = hwcrhk_mutex_lock;
|
||||
hwcrhk_globals.mutex_release = hwcrhk_mutex_unlock;
|
||||
hwcrhk_globals.mutex_destroy = hwcrhk_mutex_destroy;
|
||||
}
|
||||
else if (CRYPTO_get_locking_callback() != NULL)
|
||||
{
|
||||
ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_LOCKING_MISSING);
|
||||
ERR_add_error_data(1,"You HAVE to add dynamic locking callbacks via CRYPTO_set_dynlock_{create,lock,destroy}_callback()");
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Try and get a context - if not, we may have a DSO but no
|
||||
@@ -828,7 +836,7 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa)
|
||||
|
||||
/* Perform the operation */
|
||||
ret = p_hwcrhk_ModExpCRT(hwcrhk_context, m_a, m_p, m_q,
|
||||
m_dmp1, m_dmq1, m_iqmp, &m_r, NULL);
|
||||
m_dmp1, m_dmq1, m_iqmp, &m_r, &rmsg);
|
||||
|
||||
/* Convert the response */
|
||||
r->top = m_r.size / sizeof(BN_ULONG);
|
||||
@@ -1014,7 +1022,7 @@ static void hwcrhk_log_message(void *_logstream, const char *message)
|
||||
lstream=*(BIO **)_logstream;
|
||||
if (lstream)
|
||||
{
|
||||
BIO_write(lstream, message, strlen(message));
|
||||
BIO_printf(lstream, "%s\n", message);
|
||||
}
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_BIO);
|
||||
}
|
||||
|
@@ -800,7 +800,7 @@ static int surewarehk_rsa_priv_dec(int flen,unsigned char *from,unsigned char *t
|
||||
err:
|
||||
if (buf)
|
||||
{
|
||||
memset(buf,0,tlen);
|
||||
OPENSSL_cleanse(buf,tlen);
|
||||
OPENSSL_free(buf);
|
||||
}
|
||||
return ret;
|
||||
|
@@ -67,8 +67,8 @@
|
||||
#include "engine_int.h"
|
||||
#include <openssl/engine.h>
|
||||
|
||||
#ifndef OPENSSL_NO_HW
|
||||
#ifndef OPENSSL_NO_HW_UBSEC
|
||||
#ifndef NO_HW
|
||||
#ifndef NO_HW_UBSEC
|
||||
|
||||
#undef NOT_USED
|
||||
|
||||
@@ -86,13 +86,13 @@ static int ubsec_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
static int ubsec_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *q, const BIGNUM *dp,
|
||||
const BIGNUM *dq, const BIGNUM *qinv, BN_CTX *ctx);
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
static int ubsec_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa);
|
||||
#endif
|
||||
static int ubsec_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#if NOT_USED
|
||||
#ifndef NO_DSA
|
||||
#ifdef NOT_USED
|
||||
static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
|
||||
BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *in_mont);
|
||||
@@ -104,7 +104,7 @@ static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
||||
static int ubsec_dsa_verify(const unsigned char *dgst, int dgst_len,
|
||||
DSA_SIG *sig, DSA *dsa);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
static int ubsec_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
|
||||
BN_MONT_CTX *m_ctx);
|
||||
@@ -112,12 +112,12 @@ static int ubsec_dh_compute_key(unsigned char *key,BIGNUM *pub_key,DH *dh);
|
||||
static int ubsec_dh_generate_key(DH *dh);
|
||||
#endif
|
||||
|
||||
#if NOT_USED
|
||||
#ifdef NOT_USED
|
||||
static int ubsec_rand_bytes(unsigned char *buf, int num);
|
||||
static int ubsec_rand_status(void);
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
/* Our internal RSA_METHOD that we provide pointers to */
|
||||
static RSA_METHOD ubsec_rsa =
|
||||
{
|
||||
@@ -137,7 +137,7 @@ static RSA_METHOD ubsec_rsa =
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
/* Our internal DSA_METHOD that we provide pointers to */
|
||||
static DSA_METHOD ubsec_dsa =
|
||||
{
|
||||
@@ -154,7 +154,7 @@ static DSA_METHOD ubsec_dsa =
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
/* Our internal DH_METHOD that we provide pointers to */
|
||||
static DH_METHOD ubsec_dh =
|
||||
{
|
||||
@@ -181,52 +181,55 @@ static RAND_METHOD ubsec_rand = {
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Constants used when creating the ENGINE */
|
||||
static const char *engine_ubsec_id = "ubsec";
|
||||
static const char *engine_ubsec_name = "UBSEC hardware engine support";
|
||||
/* Our ENGINE structure. */
|
||||
static ENGINE engine_ubsec =
|
||||
{
|
||||
"ubsec",
|
||||
"UBSEC hardware engine support",
|
||||
#ifndef NO_RSA
|
||||
&ubsec_rsa,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
&ubsec_dsa,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
#ifndef NO_DH
|
||||
&ubsec_dh,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
NULL,
|
||||
ubsec_mod_exp,
|
||||
NULL,
|
||||
ubsec_init,
|
||||
ubsec_finish,
|
||||
ubsec_ctrl,
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* no flags */
|
||||
0, 0, /* no references */
|
||||
NULL, NULL /* unlinked */
|
||||
};
|
||||
|
||||
/* As this is only ever called once, there's no need for locking
|
||||
* (indeed - the lock will already be held by our caller!!!) */
|
||||
ENGINE *ENGINE_ubsec()
|
||||
{
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
const RSA_METHOD *meth1;
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
#ifndef HAVE_UBSEC_DH
|
||||
const DH_METHOD *meth3;
|
||||
#endif /* HAVE_UBSEC_DH */
|
||||
#endif
|
||||
|
||||
ENGINE *ret = ENGINE_new();
|
||||
|
||||
if(!ret)
|
||||
return NULL;
|
||||
|
||||
if(!ENGINE_set_id(ret, engine_ubsec_id) ||
|
||||
!ENGINE_set_name(ret, engine_ubsec_name) ||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
!ENGINE_set_RSA(ret, &ubsec_rsa) ||
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
!ENGINE_set_DSA(ret, &ubsec_dsa) ||
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DH
|
||||
!ENGINE_set_DH(ret, &ubsec_dh) ||
|
||||
#endif
|
||||
!ENGINE_set_BN_mod_exp(ret, ubsec_mod_exp) ||
|
||||
!ENGINE_set_BN_mod_exp_crt(ret, ubsec_mod_exp_crt) ||
|
||||
!ENGINE_set_init_function(ret, ubsec_init) ||
|
||||
!ENGINE_set_finish_function(ret, ubsec_finish) ||
|
||||
!ENGINE_set_ctrl_function(ret, ubsec_ctrl))
|
||||
{
|
||||
ENGINE_free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
/* We know that the "PKCS1_SSLeay()" functions hook properly
|
||||
* to the Broadcom-specific mod_exp and mod_exp_crt so we use
|
||||
* those functions. NB: We don't use ENGINE_openssl() or
|
||||
@@ -241,7 +244,7 @@ ENGINE *ENGINE_ubsec()
|
||||
ubsec_rsa.rsa_priv_dec = meth1->rsa_priv_dec;
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
#ifndef HAVE_UBSEC_DH
|
||||
/* Much the same for Diffie-Hellman */
|
||||
meth3 = DH_OpenSSL();
|
||||
@@ -250,7 +253,7 @@ ENGINE *ENGINE_ubsec()
|
||||
#endif /* HAVE_UBSEC_DH */
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
return &engine_ubsec;
|
||||
}
|
||||
|
||||
/* This is a process-global DSO handle used for loading and unloading
|
||||
@@ -268,14 +271,14 @@ static t_UBSEC_ubsec_bytes_to_bits *p_UBSEC_ubsec_bytes_to_bits = NULL;
|
||||
static t_UBSEC_ubsec_bits_to_bytes *p_UBSEC_ubsec_bits_to_bytes = NULL;
|
||||
static t_UBSEC_ubsec_open *p_UBSEC_ubsec_open = NULL;
|
||||
static t_UBSEC_ubsec_close *p_UBSEC_ubsec_close = NULL;
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
static t_UBSEC_diffie_hellman_generate_ioctl
|
||||
*p_UBSEC_diffie_hellman_generate_ioctl = NULL;
|
||||
static t_UBSEC_diffie_hellman_agree_ioctl *p_UBSEC_diffie_hellman_agree_ioctl = NULL;
|
||||
#endif
|
||||
static t_UBSEC_rsa_mod_exp_ioctl *p_UBSEC_rsa_mod_exp_ioctl = NULL;
|
||||
static t_UBSEC_rsa_mod_exp_crt_ioctl *p_UBSEC_rsa_mod_exp_crt_ioctl = NULL;
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
static t_UBSEC_dsa_sign_ioctl *p_UBSEC_dsa_sign_ioctl = NULL;
|
||||
static t_UBSEC_dsa_verify_ioctl *p_UBSEC_dsa_verify_ioctl = NULL;
|
||||
#endif
|
||||
@@ -295,15 +298,15 @@ static const char *UBSEC_F1 = "ubsec_bytes_to_bits";
|
||||
static const char *UBSEC_F2 = "ubsec_bits_to_bytes";
|
||||
static const char *UBSEC_F3 = "ubsec_open";
|
||||
static const char *UBSEC_F4 = "ubsec_close";
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
static const char *UBSEC_F5 = "diffie_hellman_generate_ioctl";
|
||||
static const char *UBSEC_F6 = "diffie_hellman_agree_ioctl";
|
||||
#endif
|
||||
/* #ifndef OPENSSL_NO_RSA */
|
||||
/* #ifndef NO_RSA */
|
||||
static const char *UBSEC_F7 = "rsa_mod_exp_ioctl";
|
||||
static const char *UBSEC_F8 = "rsa_mod_exp_crt_ioctl";
|
||||
/* #endif */
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
static const char *UBSEC_F9 = "dsa_sign_ioctl";
|
||||
static const char *UBSEC_F10 = "dsa_verify_ioctl";
|
||||
#endif
|
||||
@@ -318,13 +321,13 @@ static int ubsec_init(void)
|
||||
t_UBSEC_ubsec_bits_to_bytes *p2;
|
||||
t_UBSEC_ubsec_open *p3;
|
||||
t_UBSEC_ubsec_close *p4;
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
t_UBSEC_diffie_hellman_generate_ioctl *p5;
|
||||
t_UBSEC_diffie_hellman_agree_ioctl *p6;
|
||||
#endif
|
||||
t_UBSEC_rsa_mod_exp_ioctl *p7;
|
||||
t_UBSEC_rsa_mod_exp_crt_ioctl *p8;
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
t_UBSEC_dsa_sign_ioctl *p9;
|
||||
t_UBSEC_dsa_verify_ioctl *p10;
|
||||
#endif
|
||||
@@ -375,15 +378,15 @@ static int ubsec_init(void)
|
||||
p_UBSEC_ubsec_bits_to_bytes = p2;
|
||||
p_UBSEC_ubsec_open = p3;
|
||||
p_UBSEC_ubsec_close = p4;
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
p_UBSEC_diffie_hellman_generate_ioctl = p5;
|
||||
p_UBSEC_diffie_hellman_agree_ioctl = p6;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
p_UBSEC_rsa_mod_exp_ioctl = p7;
|
||||
p_UBSEC_rsa_mod_exp_crt_ioctl = p8;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
p_UBSEC_dsa_sign_ioctl = p9;
|
||||
p_UBSEC_dsa_verify_ioctl = p10;
|
||||
#endif
|
||||
@@ -414,15 +417,15 @@ err:
|
||||
p_UBSEC_ubsec_bits_to_bytes = NULL;
|
||||
p_UBSEC_ubsec_open = NULL;
|
||||
p_UBSEC_ubsec_close = NULL;
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
p_UBSEC_diffie_hellman_generate_ioctl = NULL;
|
||||
p_UBSEC_diffie_hellman_agree_ioctl = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
p_UBSEC_rsa_mod_exp_ioctl = NULL;
|
||||
p_UBSEC_rsa_mod_exp_crt_ioctl = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
p_UBSEC_dsa_sign_ioctl = NULL;
|
||||
p_UBSEC_dsa_verify_ioctl = NULL;
|
||||
#endif
|
||||
@@ -450,15 +453,15 @@ static int ubsec_finish(void )
|
||||
p_UBSEC_ubsec_bits_to_bytes = NULL;
|
||||
p_UBSEC_ubsec_open = NULL;
|
||||
p_UBSEC_ubsec_close = NULL;
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
p_UBSEC_diffie_hellman_generate_ioctl = NULL;
|
||||
p_UBSEC_diffie_hellman_agree_ioctl = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
p_UBSEC_rsa_mod_exp_ioctl = NULL;
|
||||
p_UBSEC_rsa_mod_exp_crt_ioctl = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
p_UBSEC_dsa_sign_ioctl = NULL;
|
||||
p_UBSEC_dsa_verify_ioctl = NULL;
|
||||
#endif
|
||||
@@ -615,7 +618,7 @@ static int ubsec_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
return(ret);
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
static int ubsec_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
|
||||
{
|
||||
BN_CTX *ctx;
|
||||
@@ -656,8 +659,8 @@ err:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#if NOT_USED
|
||||
#ifndef NO_DSA
|
||||
#ifdef NOT_USED
|
||||
static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
|
||||
BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
|
||||
BN_CTX *ctx, BN_MONT_CTX *in_mont)
|
||||
@@ -696,7 +699,7 @@ static int ubsec_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
int ret = 0;
|
||||
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
#ifndef NO_RSA
|
||||
/* Perform in software if the modulus is too large for hardware. */
|
||||
|
||||
if (BN_num_bits(m) > max_key_len)
|
||||
@@ -714,7 +717,7 @@ static int ubsec_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_DSA
|
||||
#ifndef NO_DSA
|
||||
static DSA_SIG *ubsec_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
||||
{
|
||||
DSA_SIG *ret = NULL;
|
||||
@@ -861,7 +864,7 @@ err:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DH
|
||||
#ifndef NO_DH
|
||||
/*
|
||||
* This function is aliased to mod_exp.
|
||||
*/
|
||||
@@ -1053,5 +1056,5 @@ static int ubsec_rand_status(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !OPENSSL_NO_HW_UBSEC */
|
||||
#endif /* !OPENSSL_NO_HW */
|
||||
#endif /* !NO_HW_UBSEC */
|
||||
#endif /* !NO_HW */
|
||||
|
@@ -196,6 +196,19 @@ typedef SW_U32 SW_CONTEXT_HANDLE; /* opaque context handle */
|
||||
|
||||
/* Now the OpenSSL bits, these function types are the for the function
|
||||
* pointers that will bound into the Rainbow shared libraries. */
|
||||
/********** Peng's modification begins **********/
|
||||
#if defined(WIN32) /* For WIN32 platform */
|
||||
typedef SW_STATUS _stdcall t_swAcquireAccContext(SW_CONTEXT_HANDLE *hac);
|
||||
typedef SW_STATUS _stdcall t_swAttachKeyParam(SW_CONTEXT_HANDLE hac,
|
||||
SW_PARAM *key_params);
|
||||
typedef SW_STATUS _stdcall t_swSimpleRequest(SW_CONTEXT_HANDLE hac,
|
||||
SW_COMMAND_CODE cmd,
|
||||
SW_LARGENUMBER pin[],
|
||||
SW_U32 pin_count,
|
||||
SW_LARGENUMBER pout[],
|
||||
SW_U32 pout_count);
|
||||
typedef SW_STATUS _stdcall t_swReleaseAccContext(SW_CONTEXT_HANDLE hac);
|
||||
#else /* For other platforms */
|
||||
typedef SW_STATUS t_swAcquireAccContext(SW_CONTEXT_HANDLE *hac);
|
||||
typedef SW_STATUS t_swAttachKeyParam(SW_CONTEXT_HANDLE hac,
|
||||
SW_PARAM *key_params);
|
||||
@@ -206,6 +219,9 @@ typedef SW_STATUS t_swSimpleRequest(SW_CONTEXT_HANDLE hac,
|
||||
SW_LARGENUMBER pout[],
|
||||
SW_U32 pout_count);
|
||||
typedef SW_STATUS t_swReleaseAccContext(SW_CONTEXT_HANDLE hac);
|
||||
#endif
|
||||
/********** Peng's modification ends **********/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
@@ -87,7 +87,7 @@ lint:
|
||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||
|
||||
depend:
|
||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(LIBSRC)
|
||||
$(MAKEDEPEND) -- $(INCLUDES) $(DEPFLAG) -- $(LIBSRC)
|
||||
|
||||
dclean:
|
||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user