Compare commits
445 Commits
OpenSSL-en
...
OpenSSL-en
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cae350ad1 | ||
|
|
cfebe39d42 | ||
|
|
eb80f91278 | ||
|
|
7a0c6536e2 | ||
|
|
b5b000d77e | ||
|
|
6c2650a6fc | ||
|
|
02b7ec88bb | ||
|
|
e2cdf9c994 | ||
|
|
0af9a89cef | ||
|
|
290416db2a | ||
|
|
db802c60e3 | ||
|
|
503f3b1a21 | ||
|
|
402bcde847 | ||
|
|
ff192dce10 | ||
|
|
8b98de6653 | ||
|
|
ec9ea6a3c8 | ||
|
|
7e6617611f | ||
|
|
ca6dde5d3d | ||
|
|
8e6cbcd7c0 | ||
|
|
9335a5f7c0 | ||
|
|
32bf74e30e | ||
|
|
6643f275e2 | ||
|
|
cd4c36adb8 | ||
|
|
311e209931 | ||
|
|
951d8e0d6b | ||
|
|
fe5eb6707f | ||
|
|
f5db08e57a | ||
|
|
8cfdb960f0 | ||
|
|
ebccb429de | ||
|
|
7dbed652fc | ||
|
|
6789b41d86 | ||
|
|
0487cb234c | ||
|
|
80e1495b99 | ||
|
|
041843e47e | ||
|
|
c2aa4f2081 | ||
|
|
b23f50e67e | ||
|
|
7fe03ed3a3 | ||
|
|
9466fa6750 | ||
|
|
cead7f36da | ||
|
|
cbecb3ac37 | ||
|
|
5dbd3efce7 | ||
|
|
876811e2af | ||
|
|
b57c98df7b | ||
|
|
c4da6dd38a | ||
|
|
2edcb4ac71 | ||
|
|
0c4d9b2fbc | ||
|
|
5012158adf | ||
|
|
5c9396e37c | ||
|
|
7b63c0fa8c | ||
|
|
063a8905bf | ||
|
|
cd7562091d | ||
|
|
d1d0be3cd2 | ||
|
|
2c8ad4f1af | ||
|
|
121dea3f85 | ||
|
|
ea4f109c99 | ||
|
|
7650934f21 | ||
|
|
40c5cae24a | ||
|
|
cce9396dc9 | ||
|
|
47f3eafb8d | ||
|
|
53fc93dda6 | ||
|
|
17085b022c | ||
|
|
4367eb8706 | ||
|
|
0a8a99785b | ||
|
|
a9d96b98cb | ||
|
|
ae689b6b27 | ||
|
|
60d160da2d | ||
|
|
05086644c4 | ||
|
|
fb96d9d90d | ||
|
|
e1a32c1807 | ||
|
|
5585f4eca4 | ||
|
|
e8b4d05f61 | ||
|
|
0df748e7e2 | ||
|
|
1fbcfbe693 | ||
|
|
34ab17b669 | ||
|
|
b99e18bbec | ||
|
|
4942ef6f0e | ||
|
|
9ae08a9c04 | ||
|
|
76f8a1f51d | ||
|
|
9d358821e5 | ||
|
|
49b10f72ec | ||
|
|
a6c6874a1a | ||
|
|
a947f2d2b6 | ||
|
|
94e19e7111 | ||
|
|
04677ce024 | ||
|
|
407adb5b17 | ||
|
|
da0616cd13 | ||
|
|
1c02ca537a | ||
|
|
3f2f3d4264 | ||
|
|
c4c2c61e8c | ||
|
|
5f3d6f70f6 | ||
|
|
ece0bdf1fd | ||
|
|
97e4b1883e | ||
|
|
a2b38b3022 | ||
|
|
d51092f42b | ||
|
|
bdb6171334 | ||
|
|
1d4547a43d | ||
|
|
65ee74fbc7 | ||
|
|
c21506ba02 | ||
|
|
00f1628eac | ||
|
|
c69d103956 | ||
|
|
d56f92ee78 | ||
|
|
d5492d9b47 | ||
|
|
451dc18f10 | ||
|
|
23f0541263 | ||
|
|
127dca46a0 | ||
|
|
e888074bb4 | ||
|
|
1ef5026ef9 | ||
|
|
40889b9cd3 | ||
|
|
99889b46c9 | ||
|
|
82869b3c8d | ||
|
|
e8233e699b | ||
|
|
04cc76660a | ||
|
|
e1f7ea25d2 | ||
|
|
8586df1efb | ||
|
|
b8e0e12399 | ||
|
|
254ef80db1 | ||
|
|
f9de8446a0 | ||
|
|
d15711efc6 | ||
|
|
25ace3ed25 | ||
|
|
012c86ab74 | ||
|
|
458c29175e | ||
|
|
8a5dbb0a2e | ||
|
|
532203cdb0 | ||
|
|
870d3d5595 | ||
|
|
c6c0e4cb32 | ||
|
|
8f6f347848 | ||
|
|
0f7b63c834 | ||
|
|
64ed18ef20 | ||
|
|
345731731a | ||
|
|
b2c04539a1 | ||
|
|
72645b83bb | ||
|
|
d13363af60 | ||
|
|
b6fc2386f0 | ||
|
|
9f353dd662 | ||
|
|
b49053cae2 | ||
|
|
c8062c3a5e | ||
|
|
05c08fc708 | ||
|
|
0990a0851a | ||
|
|
bb0db9c491 | ||
|
|
966a753997 | ||
|
|
0f829bd111 | ||
|
|
a5200a1b8f | ||
|
|
6631a7e7f1 | ||
|
|
010da5c015 | ||
|
|
fbb56e5b1d | ||
|
|
78055aa6a5 | ||
|
|
e6bd5e8a6d | ||
|
|
94f1b50c0f | ||
|
|
bd54d55c1d | ||
|
|
09c70c3261 | ||
|
|
1ed0c6621b | ||
|
|
5f8453587e | ||
|
|
b57e656095 | ||
|
|
d6e2d12c74 | ||
|
|
305a1afcf7 | ||
|
|
9cdf87f194 | ||
|
|
a81e9d3dc4 | ||
|
|
6b7e0a9987 | ||
|
|
8b57fb1208 | ||
|
|
2551fc047c | ||
|
|
2962243d19 | ||
|
|
dbdc5d14d3 | ||
|
|
6cbe638294 | ||
|
|
07c08ed42c | ||
|
|
17b226a672 | ||
|
|
f33ca23e2f | ||
|
|
a0f6331507 | ||
|
|
6d79659dd7 | ||
|
|
c56fb0f1a3 | ||
|
|
08241a5814 | ||
|
|
3d27b1fa85 | ||
|
|
71aa7c586b | ||
|
|
7462f2644c | ||
|
|
6298bf9073 | ||
|
|
9a26adf598 | ||
|
|
64ad04eb2d | ||
|
|
349b293353 | ||
|
|
fd91256316 | ||
|
|
a9a025d08c | ||
|
|
b605e3ada3 | ||
|
|
02cbedc387 | ||
|
|
e5d814d040 | ||
|
|
b09f4fb271 | ||
|
|
1f4eada3b4 | ||
|
|
b935754cb0 | ||
|
|
396bc53593 | ||
|
|
7711de24f9 | ||
|
|
eee6c81af8 | ||
|
|
b89670ef0e | ||
|
|
0fccb00b5b | ||
|
|
72da660ddb | ||
|
|
46ffee4792 | ||
|
|
c0a953650b | ||
|
|
0424fe1a8f | ||
|
|
544a2aea4b | ||
|
|
60e5f36d27 | ||
|
|
2469361c0f | ||
|
|
6fa865a325 | ||
|
|
e9ba69631b | ||
|
|
d80a8d1919 | ||
|
|
d0ff2a237b | ||
|
|
6e5dd63c77 | ||
|
|
dc014d43af | ||
|
|
2f9cf160e4 | ||
|
|
69043fa13f | ||
|
|
336c35dc9e | ||
|
|
72b5215645 | ||
|
|
e0b110267d | ||
|
|
8f1e8d274e | ||
|
|
06bed64317 | ||
|
|
a09d349071 | ||
|
|
c559759265 | ||
|
|
b4000e8ad8 | ||
|
|
e27fd320fc | ||
|
|
21d5ed98d5 | ||
|
|
e9a182fa30 | ||
|
|
b6db386ffd | ||
|
|
2c975b501d | ||
|
|
279fe3b1c5 | ||
|
|
98a9092af1 | ||
|
|
87108f5af9 | ||
|
|
f257d984b7 | ||
|
|
b889d6a8e8 | ||
|
|
47234cd3d2 | ||
|
|
2c8d0dccfc | ||
|
|
a4f576a378 | ||
|
|
3def5a010e | ||
|
|
294bd1e2f3 | ||
|
|
253ef2187c | ||
|
|
c0455cbb18 | ||
|
|
17e2c77a77 | ||
|
|
b52f3818f4 | ||
|
|
cc12975514 | ||
|
|
9738f395c6 | ||
|
|
d4294c8984 | ||
|
|
8df61b5011 | ||
|
|
f1e6643751 | ||
|
|
6991bf196c | ||
|
|
822a4c1bdb | ||
|
|
a5868b3fe2 | ||
|
|
4edfacb983 | ||
|
|
c6efe6f59e | ||
|
|
35c2b3a9ac | ||
|
|
af9675e75a | ||
|
|
66ae107a14 | ||
|
|
8b2f9cdfad | ||
|
|
01682a8b3c | ||
|
|
8b07f23c30 | ||
|
|
45932ad508 | ||
|
|
ce94682ce1 | ||
|
|
2d7ab7e9ea | ||
|
|
6176df94ed | ||
|
|
a8f8788248 | ||
|
|
d5d007abe3 | ||
|
|
32e692ce07 | ||
|
|
151457ab16 | ||
|
|
a5232ab0a0 | ||
|
|
dde3e83129 | ||
|
|
8f182fdc69 | ||
|
|
1064acafc4 | ||
|
|
d2f64ef725 | ||
|
|
842931098f | ||
|
|
a7a71d0ec9 | ||
|
|
faff87fd64 | ||
|
|
46ca653c83 | ||
|
|
c1fb6557e5 | ||
|
|
ff8e412ceb | ||
|
|
e9cbcb1d98 | ||
|
|
ea7fc0311c | ||
|
|
30911232c1 | ||
|
|
2940a1298e | ||
|
|
f916052eab | ||
|
|
2fb3f002d0 | ||
|
|
82b0bf0b87 | ||
|
|
3a7cef3e76 | ||
|
|
592c0e0273 | ||
|
|
08b977b5a5 | ||
|
|
85fb12d554 | ||
|
|
7525ac5aba | ||
|
|
b975183c41 | ||
|
|
083100e2ab | ||
|
|
241d2ba1da | ||
|
|
e4fb49775b | ||
|
|
381a146dc6 | ||
|
|
b4a262832a | ||
|
|
6d498d478e | ||
|
|
d0561b5c2d | ||
|
|
4f4b192402 | ||
|
|
0ae1661ba2 | ||
|
|
4e9ef338fc | ||
|
|
4b3d91f350 | ||
|
|
d16e1131b4 | ||
|
|
6175b37578 | ||
|
|
a18894d159 | ||
|
|
dfee50ecd9 | ||
|
|
10189984f9 | ||
|
|
d8425465a3 | ||
|
|
1fc02dcf6a | ||
|
|
83d092f785 | ||
|
|
4825092bbe | ||
|
|
bbd79bdf03 | ||
|
|
d007411335 | ||
|
|
9a78b3db52 | ||
|
|
d553eb9616 | ||
|
|
a096e9b719 | ||
|
|
e874ee0850 | ||
|
|
c20f373558 | ||
|
|
192060947c | ||
|
|
c14688ec73 | ||
|
|
ddab25a90d | ||
|
|
ffbe98b763 | ||
|
|
d7a9bb0a2a | ||
|
|
0d81c69b8e | ||
|
|
401cd0af0f | ||
|
|
c7b41e67f0 | ||
|
|
003144a8e8 | ||
|
|
af1cb47e65 | ||
|
|
e8e7fbdb16 | ||
|
|
d5c21afd4b | ||
|
|
1afa967909 | ||
|
|
85b7b80434 | ||
|
|
fe0f662310 | ||
|
|
90453438ff | ||
|
|
2e63f3b733 | ||
|
|
125cc35b59 | ||
|
|
7e58aa7d71 | ||
|
|
be3d90de02 | ||
|
|
82652aaf17 | ||
|
|
17d6bb8158 | ||
|
|
11c26ecf81 | ||
|
|
99d5b23023 | ||
|
|
611ba3f4a1 | ||
|
|
af28dd6c75 | ||
|
|
e79ec456be | ||
|
|
3e268d2717 | ||
|
|
c46acbacde | ||
|
|
304d90425f | ||
|
|
bfaa8a89e1 | ||
|
|
de941e289e | ||
|
|
1d28453529 | ||
|
|
690ecff795 | ||
|
|
234c73767d | ||
|
|
497810cae7 | ||
|
|
cbc9d9713d | ||
|
|
98fa4fe8c5 | ||
|
|
0b4c91c0fc | ||
|
|
b9b43196e1 | ||
|
|
bf6a9e66d6 | ||
|
|
0c372b94f7 | ||
|
|
26e1237380 | ||
|
|
4882171df5 | ||
|
|
ff0a0c46a7 | ||
|
|
c568a9820a | ||
|
|
931627e6a0 | ||
|
|
274a2c9970 | ||
|
|
493de5ad2a | ||
|
|
006fcc22a8 | ||
|
|
709c51c424 | ||
|
|
9bc448546e | ||
|
|
0dc092334b | ||
|
|
36c194638e | ||
|
|
45fb737950 | ||
|
|
a01273bae3 | ||
|
|
2c17323e15 | ||
|
|
870694b3da | ||
|
|
87a4b4d1f4 | ||
|
|
8ecf5104b3 | ||
|
|
2b3aeffbbd | ||
|
|
2c2f9e2cc3 | ||
|
|
2d9b1b3ffa | ||
|
|
f070480275 | ||
|
|
49f1597de2 | ||
|
|
b44e425f39 | ||
|
|
93683c3cf8 | ||
|
|
a08ee55e2d | ||
|
|
3bac6d9479 | ||
|
|
5c5143de48 | ||
|
|
c8cd7d9e0f | ||
|
|
e0a6cdcf30 | ||
|
|
b76b87fdf5 | ||
|
|
a0ecb9b8fc | ||
|
|
4bf4bc784f | ||
|
|
30bd8e3e1f | ||
|
|
b98a984294 | ||
|
|
9437fef8cc | ||
|
|
16b0384bd2 | ||
|
|
dac7098464 | ||
|
|
87ebdd8a71 | ||
|
|
7d68189d8a | ||
|
|
26414ee013 | ||
|
|
5c62f68e14 | ||
|
|
0d22b5dace | ||
|
|
023ec151df | ||
|
|
59dbdb51dc | ||
|
|
92d1bc09cb | ||
|
|
d62bfb39cd | ||
|
|
ce4b274aa1 | ||
|
|
334f1842fc | ||
|
|
b12540520d | ||
|
|
0d7b9b8b7e | ||
|
|
56cf45f968 | ||
|
|
31188ee1a8 | ||
|
|
b435c38af2 | ||
|
|
4a3e6bce79 | ||
|
|
a3829cb720 | ||
|
|
e84be9b495 | ||
|
|
3a3ca3f515 | ||
|
|
032c49b8b3 | ||
|
|
3208ff58ca | ||
|
|
6707d22a40 | ||
|
|
3647bee263 | ||
|
|
e2aebccba1 | ||
|
|
3e563bcea7 | ||
|
|
92f91ff48b | ||
|
|
b3dfaaa143 | ||
|
|
5b7848a345 | ||
|
|
915c6a21ba | ||
|
|
58706d595b | ||
|
|
236be53269 | ||
|
|
1fc1bd382b | ||
|
|
a60033f106 | ||
|
|
3613e6fc57 | ||
|
|
f8e21776f9 | ||
|
|
006723cf76 | ||
|
|
aa89bcd279 | ||
|
|
f19759a182 | ||
|
|
d009bcbfb6 | ||
|
|
4b71f63ac0 | ||
|
|
3adb8c3854 | ||
|
|
02e666d59f | ||
|
|
5b2d6ff07e | ||
|
|
877b2fbd3c | ||
|
|
afeab58a3c | ||
|
|
744c49a81b | ||
|
|
9c5b91fd0b | ||
|
|
290d3eab76 | ||
|
|
46dae77c23 | ||
|
|
a6cd870784 | ||
|
|
97879bcd57 | ||
|
|
ab1dee1efc | ||
|
|
e072aa535d | ||
|
|
48f9859d2a | ||
|
|
48b5083ca0 | ||
|
|
cd64618674 | ||
|
|
5d7e960adf |
123
CHANGES
123
CHANGES
@@ -2,7 +2,125 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.6c and 0.9.6d [XX xxx XXXX]
|
||||
Changes between 0.9.6d and 0.9.6e [30 Jul 2002]
|
||||
|
||||
*) 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).
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Fix EVP_dsa_sha macro.
|
||||
[Nils Larsch]
|
||||
|
||||
*) New option
|
||||
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
|
||||
for disabling the SSL 3.0/TLS 1.0 CBC vulnerability countermeasure
|
||||
that was added in OpenSSL 0.9.6d.
|
||||
|
||||
As the countermeasure turned out to be incompatible with some
|
||||
broken SSL implementations, the new option is part of SSL_OP_ALL.
|
||||
SSL_OP_ALL is usually employed when compatibility with weird SSL
|
||||
implementations is desired (e.g. '-bugs' option to 's_client' and
|
||||
's_server'), so the new option is automatically set in many
|
||||
applications.
|
||||
[Bodo Moeller]
|
||||
|
||||
|
||||
*) Changes in security patch:
|
||||
|
||||
Changes marked "(CHATS)" were sponsored by the Defense Advanced
|
||||
Research Projects Agency (DARPA) and Air Force Research Laboratory,
|
||||
Air Force Materiel Command, USAF, under agreement number
|
||||
F30602-01-2-0537.
|
||||
|
||||
*) 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>]
|
||||
|
||||
*) Assertions for various potential buffer overflows, not known to
|
||||
happen in practice.
|
||||
[Ben Laurie (CHATS)]
|
||||
|
||||
*) Various temporary buffers to hold ASCII versions of integers were
|
||||
too small for 64 bit platforms. (CAN-2002-0655)
|
||||
[Matthew Byng-Maddick <mbm@aldigital.co.uk> and Ben Laurie (CHATS)>
|
||||
|
||||
*) Remote buffer overflow in SSL3 protocol - an attacker could
|
||||
supply an oversized session ID to a client. (CAN-2002-0656)
|
||||
[Ben Laurie (CHATS)]
|
||||
|
||||
*) Remote buffer overflow in SSL2 protocol - an attacker could
|
||||
supply an oversized client master key. (CAN-2002-0656)
|
||||
[Ben Laurie (CHATS)]
|
||||
|
||||
Changes between 0.9.6c and 0.9.6d [9 May 2002]
|
||||
|
||||
*) Fix crypto/asn1/a_sign.c so that 'parameters' is omitted (not
|
||||
encoded as NULL) with id-dsa-with-sha1.
|
||||
[Nils Larsch <nla@trustcenter.de>; problem pointed out by Bodo Moeller]
|
||||
|
||||
*) Check various X509_...() return values in apps/req.c.
|
||||
[Nils Larsch <nla@trustcenter.de>]
|
||||
|
||||
*) Fix BASE64 decode (EVP_DecodeUpdate) for data with CR/LF ended lines:
|
||||
an end-of-file condition would erronously be flagged, when the CRLF
|
||||
was just at the end of a processed block. The bug was discovered when
|
||||
processing data through a buffering memory BIO handing the data to a
|
||||
BASE64-decoding BIO. Bug fund and patch submitted by Pavel Tsekov
|
||||
<ptsekov@syntrex.com> and Nedelcho Stanev.
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Implement a countermeasure against a vulnerability recently found
|
||||
in CBC ciphersuites in SSL 3.0/TLS 1.0: Send an empty fragment
|
||||
before application data chunks to avoid the use of known IVs
|
||||
with data potentially chosen by the attacker.
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Fix length checks in ssl3_get_client_hello().
|
||||
[Bodo Moeller]
|
||||
|
||||
*) TLS/SSL library bugfix: use s->s3->in_read_app_data differently
|
||||
to prevent ssl3_read_internal() from incorrectly assuming that
|
||||
ssl3_read_bytes() found application data while handshake
|
||||
processing was enabled when in fact s->s3->in_read_app_data was
|
||||
merely automatically cleared during the initial handshake.
|
||||
[Bodo Moeller; problem pointed out by Arne Ansper <arne@ats.cyber.ee>]
|
||||
|
||||
*) Fix object definitions for Private and Enterprise: they were not
|
||||
recognized in their shortname (=lowercase) representation. Extend
|
||||
obj_dat.pl to issue an error when using undefined keywords instead
|
||||
of silently ignoring the problem (Svenning Sorensen
|
||||
<sss@sss.dnsalias.net>).
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Fix DH_generate_parameters() so that it works for 'non-standard'
|
||||
generators, i.e. generators other than 2 and 5. (Previously, the
|
||||
code did not properly initialise the 'add' and 'rem' values to
|
||||
BN_generate_prime().)
|
||||
|
||||
In the new general case, we do not insist that 'generator' is
|
||||
actually a primitive root: This requirement is rather pointless;
|
||||
a generator of the order-q subgroup is just as good, if not
|
||||
better.
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Map new X509 verification errors to alerts. Discovered and submitted by
|
||||
Tom Wu <tom@arcot.com>.
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Fix ssl3_pending() (ssl/s3_lib.c) to prevent SSL_pending() from
|
||||
returning non-zero before the data has been completely received
|
||||
when using non-blocking I/O.
|
||||
[Bodo Moeller; problem pointed out by John Hughes]
|
||||
|
||||
*) Some of the ciphers missed the strength entry (SSL_LOW etc).
|
||||
[Ben Laurie, Lutz Jaenicke]
|
||||
|
||||
*) Fix bug in SSL_clear(): bad sessions were not removed (found by
|
||||
Yoram Zahavi <YoramZ@gilian.com>).
|
||||
[Lutz Jaenicke]
|
||||
|
||||
*) Add information about CygWin 1.3 and on, and preserve proper
|
||||
configuration for the versions before that.
|
||||
@@ -23,7 +141,8 @@
|
||||
value is 0.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Fix a crashbug and a logic bug in hwcrhk_load_pubkey()
|
||||
*) [In 0.9.6c-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.
|
||||
|
||||
39
Configure
39
Configure
@@ -154,6 +154,7 @@ my %table=(
|
||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-sparcv9-gcc31","gcc:-mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
|
||||
# but keep the assembler modules.
|
||||
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -179,10 +180,10 @@ my %table=(
|
||||
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
# assisted with debugging of following two configs.
|
||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o::::",
|
||||
"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
|
||||
# -Wa,-Av8plus should do the trick no matter what.
|
||||
"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o:",
|
||||
"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W::-D_REENTRANT:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# !!!Folowing can't be even tested yet!!!
|
||||
# We have to wait till 64-bit glibc for SPARC is operational!!!
|
||||
#"linux64-sparcv9","sparc64-linux-gcc:-m64 -mcpu=v9 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o:",
|
||||
@@ -238,6 +239,7 @@ my %table=(
|
||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||
#
|
||||
@@ -345,7 +347,7 @@ my %table=(
|
||||
# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
|
||||
# bn86-elf.o file file since it is hand tweaked assembler.
|
||||
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
|
||||
@@ -406,7 +408,7 @@ my %table=(
|
||||
"aix43-gcc", "gcc:-O3 -DAIX -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR::::::::::dlfcn:",
|
||||
|
||||
#
|
||||
# Cray T90 (SDSC)
|
||||
# Cray T90 and similar (SDSC)
|
||||
# It's Big-endian, but the algorithms work properly when B_ENDIAN is NOT
|
||||
# defined. The T90 ints and longs are 8 bytes long, and apparently the
|
||||
# B_ENDIAN code assumes 4 byte ints. Fortunately, the non-B_ENDIAN and
|
||||
@@ -416,7 +418,10 @@ my %table=(
|
||||
#'Taking the address of a bit field is not allowed. '
|
||||
#'An expression with bit field exists as the operand of "sizeof" '
|
||||
# (written by Wayne Schroeder <schroede@SDSC.EDU>)
|
||||
"cray-t90-cc", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT:::",
|
||||
#
|
||||
# j90 is considered the base machine type for unicos machines,
|
||||
# so this configuration is now called "cray-j90" ...
|
||||
"cray-j90", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT:::",
|
||||
|
||||
#
|
||||
# Cray T3E (Research Center Juelich, beckman@acl.lanl.gov)
|
||||
@@ -442,7 +447,7 @@ my %table=(
|
||||
"sco5-cc-pentium", "cc:-Kpentium::(unknown):-lsocket:${x86_gcc_des} ${x86_gcc_opts}:::", # des options?
|
||||
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
|
||||
"sco5-cc-shared","cc:-belf:::-lsocket -lresolv -lnsl:MD2_CHAR RC4_INDEX ${x86_gcc_des}::::::::::dlfcn:svr3-shared:-Kpic",
|
||||
"sco5-gcc-shared","gcc:-O3 -DFILIO_H -fomit-frame-pointer:::-lsocket -lresolv -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC",
|
||||
"sco5-gcc-shared","gcc:-O3 -fomit-frame-pointer:::-lsocket -lresolv -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:svr3-shared:-fPIC", # the SCO assembler doesn't seem to like our assembler files ...
|
||||
|
||||
# Sinix/ReliantUNIX RM400
|
||||
# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */
|
||||
@@ -477,6 +482,9 @@ my %table=(
|
||||
# and its library files in util/pl/*)
|
||||
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
|
||||
# UWIN
|
||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
|
||||
# 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",
|
||||
@@ -495,11 +503,14 @@ my %table=(
|
||||
|
||||
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
|
||||
"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::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"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",
|
||||
|
||||
##### 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:::::",
|
||||
|
||||
);
|
||||
|
||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
|
||||
@@ -915,6 +926,10 @@ if ($rmd160_obj =~ /\.o$/)
|
||||
$cflags.=" -DRMD160_ASM";
|
||||
}
|
||||
|
||||
# "Stringify" the C flags string. This permits it to be made part of a string
|
||||
# and works as well on command lines.
|
||||
$cflags =~ s/([\\\"])/\\\1/g;
|
||||
|
||||
my $version = "unknown";
|
||||
my $major = "unknown";
|
||||
my $minor = "unknown";
|
||||
@@ -997,13 +1012,21 @@ while (<IN>)
|
||||
if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/)
|
||||
{
|
||||
my $sotmp = $1;
|
||||
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/
|
||||
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
|
||||
}
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.dylib$/)
|
||||
{
|
||||
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.dylib/;
|
||||
}
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
|
||||
{
|
||||
my $sotmp = $1;
|
||||
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||
}
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
|
||||
{
|
||||
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.\$(SHLIB_MAJOR).dylib .dylib/;
|
||||
}
|
||||
s/^SHARED_LDFLAGS=.*/SHARED_LDFLAGS=$shared_ldflag/;
|
||||
print OUT $_."\n";
|
||||
}
|
||||
|
||||
57
FAQ
57
FAQ
@@ -38,6 +38,8 @@ OpenSSL - Frequently Asked Questions
|
||||
* 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++?
|
||||
* What is special about OpenSSL on Redhat?
|
||||
* Why does the OpenSSL test suite fail on MacOS X?
|
||||
|
||||
[PROG] Questions about programming with OpenSSL
|
||||
|
||||
@@ -59,7 +61,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.6c was released on December 21st, 2001.
|
||||
OpenSSL 0.9.6e was released on 30 May, 2002.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -215,8 +217,11 @@ For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested
|
||||
installing the SUNski package from Sun patch 105710-01 (Sparc) which
|
||||
adds a /dev/random device and make sure it gets used, usually through
|
||||
$RANDFILE. There are probably similar patches for the other Solaris
|
||||
versions. However, be warned that /dev/random is usually a blocking
|
||||
device, which may have some effects on OpenSSL.
|
||||
versions. An official statement from Sun with respect to /dev/random
|
||||
support can be found at
|
||||
http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski
|
||||
However, be warned that /dev/random is usually a blocking device, which
|
||||
may have some effects on OpenSSL.
|
||||
|
||||
|
||||
* Why do I get an "unable to write 'random state'" error message?
|
||||
@@ -451,6 +456,52 @@ under 'Program Files'). This needs to be done prior to running NMAKE,
|
||||
and the changes are only valid for the current DOS session.
|
||||
|
||||
|
||||
* What is special about OpenSSL on Redhat?
|
||||
|
||||
Red Hat Linux (release 7.0 and later) include a preinstalled limited
|
||||
version of OpenSSL. For patent reasons, support for IDEA, RC5 and MDC2
|
||||
is disabled in this version. The same may apply to other Linux distributions.
|
||||
Users may therefore wish to install more or all of the features left out.
|
||||
|
||||
To do this you MUST ensure that you do not overwrite the openssl that is in
|
||||
/usr/bin on your Red Hat machine. Several packages depend on this file,
|
||||
including sendmail and ssh. /usr/local/bin is a good alternative choice. The
|
||||
libraries that come with Red Hat 7.0 onwards have different names and so are
|
||||
not affected. (eg For Red Hat 7.2 they are /lib/libssl.so.0.9.6b and
|
||||
/lib/libcrypto.so.0.9.6b with symlinks /lib/libssl.so.2 and
|
||||
/lib/libcrypto.so.2 respectively).
|
||||
|
||||
Please note that we have been advised by Red Hat attempting to recompile the
|
||||
openssl rpm with all the cryptography enabled will not work. All other
|
||||
packages depend on the original Red Hat supplied openssl package. It is also
|
||||
worth noting that due to the way Red Hat supplies its packages, updates to
|
||||
openssl on each distribution never change the package version, only the
|
||||
build number. For example, on Red Hat 7.1, the latest openssl package has
|
||||
version number 0.9.6 and build number 9 even though it contains all the
|
||||
relevant updates in packages up to and including 0.9.6b.
|
||||
|
||||
A possible way around this is to persuade Red Hat to produce a non-US
|
||||
version of Red Hat Linux.
|
||||
|
||||
FYI: Patent numbers and expiry dates of US patents:
|
||||
MDC-2: 4,908,861 13/03/2007
|
||||
IDEA: 5,214,703 25/05/2010
|
||||
RC5: 5,724,428 03/03/2015
|
||||
|
||||
|
||||
* Why does the OpenSSL test suite fail on MacOS X?
|
||||
|
||||
If the failure happens when running 'make test' and the RC4 test fails,
|
||||
it's very probable that you have OpenSSL 0.9.6b delivered with the
|
||||
operating system (you can find out by running '/usr/bin/openssl version')
|
||||
and that you were trying to build OpenSSL 0.9.6d. The problem is that
|
||||
the loader ('ld') in MacOS X has a misfeature that's quite difficult to
|
||||
go around and has linked the programs "openssl" and the test programs
|
||||
with /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib instead of the
|
||||
libraries you just built.
|
||||
Look in the file PROBLEMS for a more detailed explanation and for possible
|
||||
solutions.
|
||||
|
||||
[PROG] ========================================================================
|
||||
|
||||
* Is OpenSSL thread-safe?
|
||||
|
||||
15
INSTALL
15
INSTALL
@@ -131,8 +131,11 @@
|
||||
the failure that aren't problems in OpenSSL itself (like missing
|
||||
standard headers). If it is a problem with OpenSSL itself, please
|
||||
report the problem to <openssl-bugs@openssl.org> (note that your
|
||||
message will be forwarded to a public mailing list). Include the
|
||||
output of "make report" in your message.
|
||||
message will be recorded in the request tracker publicly readable
|
||||
via http://www.openssl.org/rt2.html and will be forwarded to a public
|
||||
mailing list). Include the output of "make report" in your message.
|
||||
Please check out the request tracker. Maybe the bug was already
|
||||
reported or has already been fixed.
|
||||
|
||||
[If you encounter assembler error messages, try the "no-asm"
|
||||
configuration option as an immediate fix.]
|
||||
@@ -150,7 +153,8 @@
|
||||
try removing any compiler optimization flags from the CFLAGS line
|
||||
in Makefile.ssl and run "make clean; make". Please send a bug
|
||||
report to <openssl-bugs@openssl.org>, including the output of
|
||||
"make report".
|
||||
"make report" in order to be added to the request tracker at
|
||||
http://www.openssl.org/rt2.html.
|
||||
|
||||
4. If everything tests ok, install OpenSSL with
|
||||
|
||||
@@ -272,6 +276,11 @@
|
||||
Note on shared libraries
|
||||
------------------------
|
||||
|
||||
Shared library is currently an experimental feature. The only reason to
|
||||
have them would be to conserve memory on systems where several program
|
||||
are using OpenSSL. Binary backward compatibility can't be guaranteed
|
||||
before OpenSSL version 1.0.
|
||||
|
||||
For some systems, the OpenSSL Configure script knows what is needed to
|
||||
build shared libraries for libcrypto and libssl. On these systems,
|
||||
the shared libraries are currently not created by default, but giving
|
||||
|
||||
50
INSTALL.W32
50
INSTALL.W32
@@ -6,15 +6,15 @@
|
||||
of this is tested on Win32 but it may also work in Win 3.1 with some
|
||||
modification.
|
||||
|
||||
You need Perl for Win32. Unless you will build on CygWin32, you will need
|
||||
You need Perl for Win32. Unless you will build on Cygwin, you will need
|
||||
ActiveState Perl, available from http://www.activestate.com/ActivePerl.
|
||||
For CygWin32 users, there's more info in the CygWin32 section.
|
||||
For Cygwin users, there's more info in the Cygwin section.
|
||||
|
||||
and one of the following C compilers:
|
||||
|
||||
* Visual C++
|
||||
* Borland C
|
||||
* GNU C (Mingw32 or Cygwin32)
|
||||
* GNU C (Mingw32 or Cygwin)
|
||||
|
||||
If you want to compile in the assembly language routines with Visual C++ then
|
||||
you will need an assembler. This is worth doing because it will result in
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
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 mk1mk.pl lines in the do_* batch file then debugging symbols will be
|
||||
to the mk1mf.pl lines in the do_* batch file then debugging symbols will be
|
||||
compiled in.
|
||||
|
||||
The default Win32 environment is to leave out any Windows NT specific
|
||||
@@ -94,6 +94,18 @@
|
||||
You can also build a static version of the library using the Makefile
|
||||
ms\nt.mak
|
||||
|
||||
Borland C++ builder 5
|
||||
---------------------
|
||||
|
||||
* Configure for building with Borland Builder:
|
||||
> perl Configure BC-32
|
||||
|
||||
* Create the appropriate makefile
|
||||
> ms\do_nasm
|
||||
|
||||
* Build
|
||||
> make -f ms\bcb.mak
|
||||
|
||||
Borland C++ builder 3 and 4
|
||||
---------------------------
|
||||
|
||||
@@ -137,30 +149,30 @@
|
||||
> cd out
|
||||
> ..\ms\test
|
||||
|
||||
GNU C (CygWin32)
|
||||
---------------
|
||||
GNU C (Cygwin)
|
||||
--------------
|
||||
|
||||
CygWin32 provides a bash shell and GNU tools environment running on
|
||||
Cygwin provides a bash shell and GNU tools environment running on
|
||||
NT 4.0, Windows 9x and Windows 2000. Consequently, a make of OpenSSL
|
||||
with CygWin is closer to a GNU bash environment such as Linux rather
|
||||
with Cygwin is closer to a GNU bash environment such as Linux rather
|
||||
than other W32 makes that are based on a single makefile approach.
|
||||
CygWin32 implements Posix/Unix calls through cygwin1.dll, and is
|
||||
Cygwin implements Posix/Unix calls through cygwin1.dll, and is
|
||||
contrasted to Mingw32 which links dynamically to msvcrt.dll or
|
||||
crtdll.dll.
|
||||
|
||||
To build OpenSSL using CygWin32:
|
||||
To build OpenSSL using Cygwin:
|
||||
|
||||
* Install CygWin32 (see http://sourceware.cygnus.com/cygwin)
|
||||
* Install Cygwin (see http://sourceware.cygnus.com/cygwin)
|
||||
|
||||
* Install Perl and ensure it is in the path (recent Cygwin perl
|
||||
(version 5.6.1-2 of the latter has been reported to work) or
|
||||
ActivePerl)
|
||||
|
||||
* Run the CygWin bash shell
|
||||
* Run the Cygwin bash shell
|
||||
|
||||
* $ tar zxvf openssl-x.x.x.tar.gz
|
||||
$ cd openssl-x.x.x
|
||||
$ ./Configure no-threads CygWin32
|
||||
$ ./config
|
||||
[...]
|
||||
$ make
|
||||
[...]
|
||||
@@ -169,26 +181,26 @@
|
||||
|
||||
This will create a default install in /usr/local/ssl.
|
||||
|
||||
CygWin32 Notes:
|
||||
Cygwin Notes:
|
||||
|
||||
"make test" and normal file operations may fail in directories
|
||||
mounted as text (i.e. mount -t c:\somewhere /home) due to CygWin
|
||||
mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
|
||||
stripping of carriage returns. To avoid this ensure that a binary
|
||||
mount is used, e.g. mount -b c:\somewhere /home.
|
||||
|
||||
As of version 1.1.1 CygWin32 is relatively unstable in its handling
|
||||
As of version 1.1.1 Cygwin is relatively unstable in its handling
|
||||
of cr/lf issues. These make procedures succeeded with versions 1.1 and
|
||||
the snapshot 20000524 (Slow!).
|
||||
|
||||
"bc" is not provided in the CygWin32 distribution. This causes a
|
||||
"bc" is not provided in the Cygwin distribution. This causes a
|
||||
non-fatal error in "make test" but is otherwise harmless. If
|
||||
desired, GNU bc can be built with CygWin32 without change.
|
||||
desired, GNU bc can be built with Cygwin without change.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
If you used the CygWin procedure above, you have already installed and
|
||||
If you used the Cygwin procedure above, you have already installed and
|
||||
can skip this section. For all other procedures, there's currently no real
|
||||
installation procedure for Win32. There are, however, some suggestions:
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -12,7 +12,7 @@
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-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
|
||||
|
||||
40
Makefile.org
40
Makefile.org
@@ -262,6 +262,7 @@ do_gnu-shared:
|
||||
( set -x; ${CC} ${SHARED_LDFLAGS} \
|
||||
-shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-soname=lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
libs="$$libs -l$$i"; \
|
||||
@@ -288,6 +289,7 @@ do_darwin-shared:
|
||||
do_cygwin-shared:
|
||||
libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||
( set -x; ${CC} -shared -o cyg$$i.dll \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--whole-archive lib$$i.a \
|
||||
-Wl,--out-implib,lib$$i.dll.a \
|
||||
-Wl,--no-whole-archive $$libs ) || exit 1; \
|
||||
@@ -418,6 +420,7 @@ do_hpux-shared:
|
||||
-b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
-Fl lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} ; \
|
||||
libs="$$libs -L. -l$$i"; \
|
||||
done
|
||||
|
||||
@@ -428,6 +431,7 @@ do_hpux64-shared:
|
||||
-b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||
+forceload lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||
chmod a=rx lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} ; \
|
||||
libs="$$libs -L. -l$$i"; \
|
||||
done
|
||||
|
||||
@@ -543,7 +547,7 @@ test: tests
|
||||
|
||||
tests: rehash
|
||||
@(cd test && echo "testing..." && \
|
||||
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' 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}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' EXE_EXT='${EXE_EXT}' tests );
|
||||
$(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}' OPENSSL_DEBUG_MEMORY=on tests );
|
||||
@apps/openssl version -a
|
||||
|
||||
report:
|
||||
@@ -554,7 +558,7 @@ depend:
|
||||
do \
|
||||
if [ -d "$$i" ]; then \
|
||||
(cd $$i && echo "making dependencies $$i..." && \
|
||||
$(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
|
||||
$(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' PERL='${PERL}' depend ) || exit 1; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
@@ -599,20 +603,26 @@ TABLE: Configure
|
||||
|
||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
|
||||
|
||||
# Build distribution tar-file. As the list of files returned by "find" is
|
||||
# pretty long, on several platforms a "too many arguments" error or similar
|
||||
# would occur. Therefore the list of files is temporarily stored into a file
|
||||
# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
|
||||
# tar does not support the --files-from option.
|
||||
tar:
|
||||
@$(TAR) $(TARFLAGS) -cvf - \
|
||||
`find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\
|
||||
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 \
|
||||
--group_number=0 --group_name=openssl \
|
||||
--prefix=openssl-$(VERSION) - |\
|
||||
gzip --best >../$(TARFILE).gz; \
|
||||
rm -f ../$(TARFILE).list; \
|
||||
ls -l ../$(TARFILE).gz
|
||||
|
||||
dist:
|
||||
$(PERL) Configure dist
|
||||
@$(MAKE) dist_pem_h
|
||||
@$(MAKE) SDIRS='${SDIRS}' clean
|
||||
@$(MAKE) tar
|
||||
@$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
|
||||
|
||||
dist_pem_h:
|
||||
(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
|
||||
@@ -644,7 +654,7 @@ install: all install_docs
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
fi \
|
||||
fi; \
|
||||
done
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
tmp="$(SHARED_LIBS)"; \
|
||||
@@ -654,7 +664,7 @@ install: all install_docs
|
||||
( echo installing $$i; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib/cyg/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
@@ -662,7 +672,7 @@ install: all install_docs
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
fi ); \
|
||||
fi \
|
||||
fi; \
|
||||
done; \
|
||||
( here="`pwd`"; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
@@ -679,18 +689,20 @@ install_docs:
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
|
||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||
(cd `dirname $$i`; \
|
||||
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`) \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
--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 \
|
||||
fn=`basename $$i .pod`; \
|
||||
if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
|
||||
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||
(cd `dirname $$i`; \
|
||||
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`) \
|
||||
(cd `$(PERL) util/dirname.pl $$i`; \
|
||||
sh -c "$(PERL) `cd ../../util; ./pod2mantest ignore` \
|
||||
--section=$$sec --center=OpenSSL \
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||
done
|
||||
|
||||
|
||||
11
NEWS
11
NEWS
@@ -5,7 +5,12 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c:
|
||||
Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d:
|
||||
|
||||
o Various SSL/TLS library bugfixes.
|
||||
o Fix DH parameter generation for 'non-standard' generators.
|
||||
|
||||
Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c:
|
||||
|
||||
o Various SSL/TLS library bugfixes.
|
||||
o BIGNUM library fixes.
|
||||
@@ -18,7 +23,7 @@
|
||||
Broadcom and Cryptographic Appliance's keyserver
|
||||
[in 0.9.6c-engine release].
|
||||
|
||||
Changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b:
|
||||
Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b:
|
||||
|
||||
o Security fix: PRNG improvements.
|
||||
o Security fix: RSA OAEP check.
|
||||
@@ -51,7 +56,7 @@
|
||||
o Bug fixes for Win32, HP/UX and Irix.
|
||||
o Bug fixes in BIGNUM, SSL, PKCS#7, PKCS#12, X.509, CONF and
|
||||
memory checking routines.
|
||||
o Bug fixes for RSA operations in threaded enviroments.
|
||||
o Bug fixes for RSA operations in threaded environments.
|
||||
o Bug fixes in misc. openssl applications.
|
||||
o Remove a few potential memory leaks.
|
||||
o Add tighter checks of BIGNUM routines.
|
||||
|
||||
34
PROBLEMS
Normal file
34
PROBLEMS
Normal file
@@ -0,0 +1,34 @@
|
||||
* System libcrypto.dylib and libssl.dylib are used by system ld on MacOS X.
|
||||
[NOTE: This is currently undergoing tests, and may be removed soon]
|
||||
|
||||
This is really a misfeature in ld, which seems to look for .dylib libraries
|
||||
along the whole library path before it bothers looking for .a libraries. This
|
||||
means that -L switches won't matter unless OpenSSL is built with shared
|
||||
library support.
|
||||
|
||||
The workaround may be to change the following lines in apps/Makefile.ssl and
|
||||
test/Makefile.ssl:
|
||||
|
||||
LIBCRYPTO=-L.. -lcrypto
|
||||
LIBSSL=-L.. -lssl
|
||||
|
||||
to:
|
||||
|
||||
LIBCRYPTO=../libcrypto.a
|
||||
LIBSSL=../libssl.a
|
||||
|
||||
It's possible that something similar is needed for shared library support
|
||||
as well. That hasn't been well tested yet.
|
||||
|
||||
|
||||
Another solution that many seem to recommend is to move the libraries
|
||||
/usr/lib/libcrypto.0.9.dylib, /usr/lib/libssl.0.9.dylib to a different
|
||||
directory, build and install OpenSSL and anything that depends on your
|
||||
build, then move libcrypto.0.9.dylib and libssl.0.9.dylib back to their
|
||||
original places. Note that the version numbers on those two libraries
|
||||
may differ on your machine.
|
||||
|
||||
|
||||
As long as Apple doesn't fix the problem with ld, this problem building
|
||||
OpenSSL will remain as is.
|
||||
|
||||
19
README
19
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.6d-dev [engine] XX xxx XXXX
|
||||
OpenSSL 0.9.6e [engine] 30 July 2002
|
||||
|
||||
Copyright (c) 1998-2002 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
@@ -122,6 +122,13 @@
|
||||
lists the functions; you will probably have to look at the code to work out
|
||||
how to use them. Look at the example programs.
|
||||
|
||||
PROBLEMS
|
||||
--------
|
||||
|
||||
For some platforms, there are some known problems that may affect the user
|
||||
or application author. We try to collect those in doc/PROBLEMS, with current
|
||||
thoughts on how they should be solved in a future of OpenSSL.
|
||||
|
||||
SUPPORT
|
||||
-------
|
||||
|
||||
@@ -146,11 +153,13 @@
|
||||
- Problem Description (steps that will reproduce the problem, if known)
|
||||
- Stack Traceback (if the application dumps core)
|
||||
|
||||
Report the bug to the OpenSSL project at:
|
||||
Report the bug to the OpenSSL project via the Request Tracker
|
||||
(http://www.openssl.org/rt2.html) by mail to:
|
||||
|
||||
openssl-bugs@openssl.org
|
||||
|
||||
Note that mail to openssl-bugs@openssl.org is forwarded to a public
|
||||
Note that mail to openssl-bugs@openssl.org is recorded in the publicly
|
||||
readable request tracker database and is forwarded to a public
|
||||
mailing list. Confidential mail may be sent to openssl-security@openssl.org
|
||||
(PGP key available from the key servers).
|
||||
|
||||
@@ -164,7 +173,9 @@
|
||||
textual explanation of what your patch does.
|
||||
|
||||
Note: For legal reasons, contributions from the US can be accepted only
|
||||
if a copy of the patch is sent to crypt@bxa.doc.gov
|
||||
if a TSA notification and a copy of the patch is sent to crypt@bis.doc.gov;
|
||||
see http://www.bis.doc.gov/Encryption/PubAvailEncSourceCodeNofify.html [sic]
|
||||
and http://w3.access.gpo.gov/bis/ear/pdf/740.pdf (EAR Section 740.13(e)).
|
||||
|
||||
The preferred format for changes is "diff -u" output. You might
|
||||
generate it like this:
|
||||
|
||||
8
STATUS
8
STATUS
@@ -1,10 +1,12 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2001/12/21 03:23:29 $
|
||||
______________ $Date: 2002/07/30 10:38:17 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.7: Under development...
|
||||
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
|
||||
o OpenSSL 0.9.6b: Released on July 9th, 2001
|
||||
o OpenSSL 0.9.6a: Released on April 5th, 2001
|
||||
@@ -48,10 +50,6 @@
|
||||
|
||||
o apps/ca.c: "Sign the certificate?" - "n" creates empty certificate file
|
||||
|
||||
o OpenSSL_0_9_6-stable:
|
||||
#include <openssl/e_os.h> in exported header files is illegal since
|
||||
e_os.h is suitable only for library-internal use.
|
||||
|
||||
o Whenever strncpy is used, make sure the resulting string is NULL-terminated
|
||||
or an error is reported
|
||||
|
||||
|
||||
188
TABLE
188
TABLE
@@ -621,6 +621,29 @@ $shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** UWIN
|
||||
$cc = cc
|
||||
$cflags = -DTERMIOS -DL_ENDIAN -O -Wall
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** VC-MSDOS
|
||||
$cc = cl
|
||||
$cflags =
|
||||
@@ -1035,6 +1058,29 @@ $shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** cray-j90
|
||||
$cc = cc
|
||||
$cflags = -DBIT_FIELD_LIMITS -DTERMIOS
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** cray-t3e
|
||||
$cc = cc
|
||||
$cflags = -DBIT_FIELD_LIMITS -DTERMIOS
|
||||
@@ -1058,32 +1104,9 @@ $shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** cray-t90-cc
|
||||
$cc = cc
|
||||
$cflags = -DBIT_FIELD_LIMITS -DTERMIOS
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** darwin-ppc-cc
|
||||
$cc = cc
|
||||
$cflags = -O3 -D_DARWIN -DB_ENDIAN
|
||||
$cflags = -O3 -D_DARWIN -DB_ENDIAN -fno-common
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags =
|
||||
@@ -1100,8 +1123,8 @@ $rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target= darwin-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
|
||||
$shared_extension =
|
||||
$shared_ldflag =
|
||||
$shared_extension = .$(SHLIB_MAJOR).$(SHLIB_MINOR).dylib
|
||||
$ranlib =
|
||||
|
||||
*** debug
|
||||
@@ -1261,8 +1284,8 @@ $rc5_obj = asm/r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$shared_extension =
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
|
||||
*** debug-linux-elf-noefence
|
||||
@@ -1909,6 +1932,29 @@ $shared_ldflag =
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
|
||||
*** hpux64-parisc-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux64-shared
|
||||
$shared_cflag = -fpic
|
||||
$shared_ldflag =
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
|
||||
*** hpux64-parisc2-cc
|
||||
$cc = cc
|
||||
$cflags = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
@@ -2443,7 +2489,7 @@ $cc = gcc
|
||||
$cflags = -mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags =
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$bn_obj = asm/sparcv8.o
|
||||
$des_obj =
|
||||
@@ -2454,11 +2500,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-sparcv9
|
||||
@@ -2466,7 +2512,7 @@ $cc = gcc
|
||||
$cflags = -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags =
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
|
||||
$bn_obj = asm/sparcv8plus.o
|
||||
$des_obj =
|
||||
@@ -2477,11 +2523,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 =
|
||||
|
||||
*** ncr-scde
|
||||
@@ -2785,20 +2831,20 @@ $ranlib =
|
||||
|
||||
*** sco5-gcc-shared
|
||||
$cc = gcc
|
||||
$cflags = -O3 -DFILIO_H -fomit-frame-pointer
|
||||
$cflags = -O3 -fomit-frame-pointer
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$lflags = -lsocket -lresolv -lnsl
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
$bf_obj = asm/bx86-elf.o
|
||||
$md5_obj = asm/mx86-elf.o
|
||||
$sha1_obj = asm/sx86-elf.o
|
||||
$cast_obj = asm/cx86-elf.o
|
||||
$rc4_obj = asm/rx86-elf.o
|
||||
$rmd160_obj = asm/rm86-elf.o
|
||||
$rc5_obj = asm/r586-elf.o
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= svr3-shared
|
||||
$shared_cflag = -fPIC
|
||||
@@ -3059,6 +3105,29 @@ $shared_ldflag = -xarch=v9
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib = /usr/ccs/bin/ar rs
|
||||
|
||||
*** solaris64-sparcv9-gcc31
|
||||
$cc = gcc
|
||||
$cflags = -mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DULTRASPARC
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj = asm/md5-sparcv9.o
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -m64
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
|
||||
*** sunos-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -mv8 -Dssize_t=int
|
||||
@@ -3334,3 +3403,26 @@ $shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
*** vxworks-ppc405
|
||||
$cc = ccppc
|
||||
$cflags = -g -msoft-float -mlongcall -DVXWORKS -DCPU=PPC405 -I$(WIND_BASE)/target/h
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$lflags = -r
|
||||
$bn_ops =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
|
||||
1175
apps/Makefile.ssl
1175
apps/Makefile.ssl
File diff suppressed because it is too large
Load Diff
20
apps/apps.c
20
apps/apps.c
@@ -230,9 +230,16 @@ void program_name(char *in, char *out, int size)
|
||||
|
||||
q=strrchr(p,'.');
|
||||
if (q == NULL)
|
||||
q = in+size;
|
||||
strncpy(out,p,q-p);
|
||||
out[q-p]='\0';
|
||||
q = p + strlen(p);
|
||||
strncpy(out,p,size-1);
|
||||
if (q-p >= size)
|
||||
{
|
||||
out[size-1]='\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
out[q-p]='\0';
|
||||
}
|
||||
}
|
||||
#else
|
||||
void program_name(char *in, char *out, int size)
|
||||
@@ -757,7 +764,7 @@ int set_name_ex(unsigned long *flags, const char *arg)
|
||||
|
||||
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
|
||||
{
|
||||
char buf[256];
|
||||
char *buf;
|
||||
char mline = 0;
|
||||
int indent = 0;
|
||||
if(title) BIO_puts(out, title);
|
||||
@@ -766,9 +773,10 @@ void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
|
||||
indent = 4;
|
||||
}
|
||||
if(lflags == XN_FLAG_COMPAT) {
|
||||
X509_NAME_oneline(nm,buf,256);
|
||||
BIO_puts(out,buf);
|
||||
buf = X509_NAME_oneline(nm, 0, 0);
|
||||
BIO_puts(out, buf);
|
||||
BIO_puts(out, "\n");
|
||||
OPENSSL_free(buf);
|
||||
} else {
|
||||
if(mline) BIO_puts(out, "\n");
|
||||
X509_NAME_print_ex(out, nm, indent, lflags);
|
||||
|
||||
@@ -181,7 +181,7 @@ bad:
|
||||
BIO_printf(bio_err,"where options are\n");
|
||||
BIO_printf(bio_err," -inform arg input format - one of DER TXT PEM\n");
|
||||
BIO_printf(bio_err," -in arg input file\n");
|
||||
BIO_printf(bio_err," -out arg output file\n");
|
||||
BIO_printf(bio_err," -out arg output file (output format is always DER\n");
|
||||
BIO_printf(bio_err," -noout arg don't produce any output\n");
|
||||
BIO_printf(bio_err," -offset arg offset into file\n");
|
||||
BIO_printf(bio_err," -length arg length of section in file\n");
|
||||
@@ -192,7 +192,6 @@ bad:
|
||||
BIO_printf(bio_err," -strparse offset\n");
|
||||
BIO_printf(bio_err," a series of these can be used to 'dig' into multiple\n");
|
||||
BIO_printf(bio_err," ASN1 blob wrappings\n");
|
||||
BIO_printf(bio_err," -out filename output DER encoding to file\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
# else
|
||||
# include <unixlib.h>
|
||||
# endif
|
||||
# else
|
||||
# elif !defined(VXWORKS)
|
||||
# include <sys/file.h>
|
||||
# endif
|
||||
#endif
|
||||
@@ -1135,7 +1135,7 @@ bad:
|
||||
}
|
||||
if ((crldays == 0) && (crlhours == 0))
|
||||
{
|
||||
BIO_printf(bio_err,"cannot lookup how long until the next CRL is issuer\n");
|
||||
BIO_printf(bio_err,"cannot lookup how long until the next CRL is issued\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ int MAIN(int argc, char **argv)
|
||||
BIO *bmd=NULL;
|
||||
BIO *out = NULL;
|
||||
const char *name;
|
||||
#define PROG_NAME_SIZE 16
|
||||
char pname[PROG_NAME_SIZE];
|
||||
#define PROG_NAME_SIZE 39
|
||||
char pname[PROG_NAME_SIZE+1];
|
||||
int separator=0;
|
||||
int debug=0;
|
||||
const char *outfile = NULL, *keyfile = NULL;
|
||||
|
||||
@@ -176,7 +176,7 @@ bad:
|
||||
BIO_printf(bio_err," -outform arg output format - DER or PEM\n");
|
||||
BIO_printf(bio_err," -in arg input file\n");
|
||||
BIO_printf(bio_err," -out arg output file\n");
|
||||
BIO_printf(bio_err," -text print the key in text\n");
|
||||
BIO_printf(bio_err," -text print as text\n");
|
||||
BIO_printf(bio_err," -C Output C code\n");
|
||||
BIO_printf(bio_err," -noout no output\n");
|
||||
BIO_printf(bio_err," -rand files to use for random number input\n");
|
||||
|
||||
@@ -101,8 +101,8 @@ int MAIN(int argc, char **argv)
|
||||
const EVP_CIPHER *cipher=NULL,*c;
|
||||
char *inf=NULL,*outf=NULL;
|
||||
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
|
||||
#define PROG_NAME_SIZE 16
|
||||
char pname[PROG_NAME_SIZE];
|
||||
#define PROG_NAME_SIZE 39
|
||||
char pname[PROG_NAME_SIZE+1];
|
||||
char *engine = NULL;
|
||||
|
||||
apps_startup();
|
||||
|
||||
@@ -88,8 +88,8 @@ BIO *bio_err=NULL;
|
||||
int main(int Argc, char *Argv[])
|
||||
{
|
||||
ARGS arg;
|
||||
#define PROG_NAME_SIZE 16
|
||||
char pname[PROG_NAME_SIZE];
|
||||
#define PROG_NAME_SIZE 39
|
||||
char pname[PROG_NAME_SIZE+1];
|
||||
FUNCTION f,*fp;
|
||||
MS_STATIC char *prompt,buf[1024],config_name[256];
|
||||
int n,i,ret=0;
|
||||
|
||||
@@ -772,7 +772,10 @@ int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass,
|
||||
print_attribs (out, bag->attrib, "Bag Attributes");
|
||||
if (!(p8 = M_PKCS12_decrypt_skey (bag, pass, passlen)))
|
||||
return 0;
|
||||
if (!(pkey = EVP_PKCS82PKEY (p8))) return 0;
|
||||
if (!(pkey = EVP_PKCS82PKEY (p8))) {
|
||||
PKCS8_PRIV_KEY_INFO_free(p8);
|
||||
return 0;
|
||||
}
|
||||
print_attribs (out, p8->attributes, "Key Attributes");
|
||||
PKCS8_PRIV_KEY_INFO_free(p8);
|
||||
PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL, pempass);
|
||||
|
||||
@@ -90,7 +90,7 @@ int MAIN(int argc, char **argv)
|
||||
int informat,outformat;
|
||||
char *infile,*outfile,*prog;
|
||||
int print_certs=0,text=0,noout=0;
|
||||
int ret=0;
|
||||
int ret=1;
|
||||
char *engine=NULL;
|
||||
|
||||
apps_startup();
|
||||
|
||||
19
apps/req.c
19
apps/req.c
@@ -291,7 +291,7 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
dtmp=X509_get_pubkey(xtmp);
|
||||
if ((dtmp=X509_get_pubkey(xtmp)) == NULL) goto end;
|
||||
if (dtmp->type == EVP_PKEY_DSA)
|
||||
dsa_params=DSAparams_dup(dtmp->pkey.dsa);
|
||||
EVP_PKEY_free(dtmp);
|
||||
@@ -758,17 +758,14 @@ loop:
|
||||
|
||||
/* Set version to V3 */
|
||||
if(!X509_set_version(x509ss, 2)) goto end;
|
||||
ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L);
|
||||
if (!ASN1_INTEGER_set(X509_get_serialNumber(x509ss),0L)) goto end;
|
||||
|
||||
X509_set_issuer_name(x509ss,
|
||||
X509_REQ_get_subject_name(req));
|
||||
X509_gmtime_adj(X509_get_notBefore(x509ss),0);
|
||||
X509_gmtime_adj(X509_get_notAfter(x509ss),
|
||||
(long)60*60*24*days);
|
||||
X509_set_subject_name(x509ss,
|
||||
X509_REQ_get_subject_name(req));
|
||||
if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end;
|
||||
if (!X509_gmtime_adj(X509_get_notBefore(x509ss),0)) goto end;
|
||||
if (!X509_gmtime_adj(X509_get_notAfter(x509ss), (long)60*60*24*days)) goto end;
|
||||
if (!X509_set_subject_name(x509ss, X509_REQ_get_subject_name(req))) goto end;
|
||||
tmppkey = X509_REQ_get_pubkey(req);
|
||||
X509_set_pubkey(x509ss,tmppkey);
|
||||
if (!tmppkey || !X509_set_pubkey(x509ss,tmppkey)) goto end;
|
||||
EVP_PKEY_free(tmppkey);
|
||||
|
||||
/* Set up V3 context struct */
|
||||
@@ -999,7 +996,7 @@ static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, int attribs)
|
||||
else i = prompt_info(req, dn_sk, dn_sect, attr_sk, attr_sect, attribs);
|
||||
if(!i) goto err;
|
||||
|
||||
X509_REQ_set_pubkey(req,pkey);
|
||||
if (!X509_REQ_set_pubkey(req,pkey)) goto err;
|
||||
|
||||
ret=1;
|
||||
err:
|
||||
|
||||
@@ -91,7 +91,7 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
ENGINE *e = NULL;
|
||||
ENGINE *eng = NULL;
|
||||
int ret=1;
|
||||
RSA *rsa=NULL;
|
||||
int i,badops=0, sgckey=0;
|
||||
@@ -211,20 +211,20 @@ bad:
|
||||
|
||||
if (engine != NULL)
|
||||
{
|
||||
if((e = ENGINE_by_id(engine)) == NULL)
|
||||
if((eng = ENGINE_by_id(engine)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
||||
engine);
|
||||
goto end;
|
||||
}
|
||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
||||
if(!ENGINE_set_default(eng, ENGINE_METHOD_ALL))
|
||||
{
|
||||
BIO_printf(bio_err,"can't use that engine\n");
|
||||
goto end;
|
||||
}
|
||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
||||
/* Free our "structural" reference. */
|
||||
ENGINE_free(e);
|
||||
ENGINE_free(eng);
|
||||
}
|
||||
|
||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||
|
||||
@@ -418,7 +418,7 @@ int MAIN(int argc, char *argv[])
|
||||
int state=0;
|
||||
SSL_METHOD *meth=NULL;
|
||||
char *inrand=NULL;
|
||||
char *engine_id=NULL;
|
||||
char *engine=NULL;
|
||||
ENGINE *e=NULL;
|
||||
#ifndef NO_DH
|
||||
DH *dh=NULL;
|
||||
@@ -582,7 +582,7 @@ int MAIN(int argc, char *argv[])
|
||||
else if (strcmp(*argv,"-engine") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
engine_id= *(++argv);
|
||||
engine = *(++argv);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -635,9 +635,9 @@ bad:
|
||||
SSL_load_error_strings();
|
||||
OpenSSL_add_ssl_algorithms();
|
||||
|
||||
if (engine_id != NULL)
|
||||
if (engine != NULL)
|
||||
{
|
||||
if((e = ENGINE_by_id(engine_id)) == NULL)
|
||||
if((e = ENGINE_by_id(engine)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"invalid engine\n");
|
||||
ERR_print_errors(bio_err);
|
||||
@@ -654,7 +654,7 @@ bad:
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine_id);
|
||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
||||
ENGINE_free(e);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
#include "wintext.h"
|
||||
#endif
|
||||
|
||||
#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
|
||||
#if !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC)) || defined (_DARWIN)
|
||||
#define TIMES
|
||||
#endif
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
#undef TIMES
|
||||
#endif
|
||||
|
||||
#ifndef TIMES
|
||||
#if !defined(TIMES) && !defined(VXWORKS)
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
@@ -139,6 +139,8 @@
|
||||
#undef BUFSIZZ
|
||||
#define BUFSIZZ 1024*10
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
@@ -368,6 +370,22 @@ static double tm_Time_F(int s)
|
||||
ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
|
||||
return((ret == 0.0)?1e-6:ret);
|
||||
}
|
||||
#elif defined(VXWORKS)
|
||||
{
|
||||
static unsigned long tick_start, tick_end;
|
||||
|
||||
if( s == START )
|
||||
{
|
||||
tick_start = tickGet();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tick_end = tickGet();
|
||||
ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();
|
||||
return((ret == 0.0)?1e-6:ret);
|
||||
}
|
||||
}
|
||||
#else /* !times() */
|
||||
static struct timeb tstart,tend;
|
||||
long i;
|
||||
|
||||
@@ -441,7 +441,10 @@ int MAIN(int argc, char **argv)
|
||||
p7 = PKCS7_encrypt(encerts, in, cipher, flags);
|
||||
} else if(operation == SMIME_SIGN) {
|
||||
p7 = PKCS7_sign(signer, key, other, in, flags);
|
||||
BIO_reset(in);
|
||||
if (BIO_reset(in) != 0 && (flags & PKCS7_DETACHED)) {
|
||||
BIO_printf(bio_err, "Can't rewind input file\n");
|
||||
goto end;
|
||||
}
|
||||
} else {
|
||||
if(informat == FORMAT_SMIME)
|
||||
p7 = SMIME_read_PKCS7(in, &indata);
|
||||
@@ -481,9 +484,9 @@ int MAIN(int argc, char **argv)
|
||||
} else if(operation == SMIME_VERIFY) {
|
||||
STACK_OF(X509) *signers;
|
||||
if(PKCS7_verify(p7, other, store, indata, out, flags)) {
|
||||
BIO_printf(bio_err, "Verification Successful\n");
|
||||
BIO_printf(bio_err, "Verification successful\n");
|
||||
} else {
|
||||
BIO_printf(bio_err, "Verification Failure\n");
|
||||
BIO_printf(bio_err, "Verification failure\n");
|
||||
goto end;
|
||||
}
|
||||
signers = PKCS7_get0_signers(p7, other, flags);
|
||||
|
||||
29
apps/speed.c
29
apps/speed.c
@@ -85,10 +85,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(_DARWIN)
|
||||
# define USE_TOD
|
||||
#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
|
||||
#elif !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC))
|
||||
# define TIMES
|
||||
#endif
|
||||
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN)
|
||||
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN) && !defined(VXWORKS)
|
||||
# define TIMEB
|
||||
#endif
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD)
|
||||
#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) && !defined(VXWORKS)
|
||||
#error "It seems neither struct tms nor struct timeb is supported in this platform!"
|
||||
#endif
|
||||
|
||||
@@ -225,7 +225,7 @@ static double Time_F(int s, int usertime)
|
||||
|
||||
#ifdef USE_TOD
|
||||
if(usertime)
|
||||
{
|
||||
{
|
||||
static struct rusage tstart,tend;
|
||||
|
||||
if (s == START)
|
||||
@@ -285,7 +285,23 @@ static double Time_F(int s, int usertime)
|
||||
# if defined(TIMES) && defined(TIMEB)
|
||||
else
|
||||
# endif
|
||||
# ifdef TIMEB
|
||||
# ifdef VXWORKS
|
||||
{
|
||||
static unsigned long tick_start, tick_end;
|
||||
|
||||
if( s == START )
|
||||
{
|
||||
tick_start = tickGet();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tick_end = tickGet();
|
||||
ret = (double)(tick_end - tick_start) / (double)sysClkRateGet();
|
||||
return((ret < 0.001)?0.001:ret);
|
||||
}
|
||||
}
|
||||
# elif defined(TIMEB)
|
||||
{
|
||||
static struct timeb tstart,tend;
|
||||
long i;
|
||||
@@ -304,6 +320,7 @@ static double Time_F(int s, int usertime)
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -320,7 +337,9 @@ int MAIN(int argc, char **argv)
|
||||
#define DSA_NUM 3
|
||||
long count,rsa_count;
|
||||
int i,j,k;
|
||||
#ifndef NO_RSA
|
||||
unsigned rsa_num;
|
||||
#endif
|
||||
#ifndef NO_MD2
|
||||
unsigned char md2[MD2_DIGEST_LENGTH];
|
||||
#endif
|
||||
|
||||
@@ -237,7 +237,7 @@ int MAIN(int argc, char **argv)
|
||||
else if (strcmp(*argv,"-CAkeyform") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
CAformat=str2fmt(*(++argv));
|
||||
CAkeyformat=str2fmt(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv,"-days") == 0)
|
||||
{
|
||||
|
||||
47
config
47
config
@@ -310,6 +310,13 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*"CRAY T3E")
|
||||
echo "t3e-cray-unicosmk"; exit 0;
|
||||
;;
|
||||
|
||||
*CRAY*)
|
||||
echo "j90-cray-unicos"; exit 0;
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
@@ -374,17 +381,29 @@ done
|
||||
|
||||
# figure out if gcc is available and if so we use it otherwise
|
||||
# we fallback to whatever cc does on the system
|
||||
GCCVER=`(gcc --version) 2>/dev/null`
|
||||
GCCVER=`(gcc -dumpversion) 2>/dev/null`
|
||||
if [ "$GCCVER" != "" ]; then
|
||||
CC=gcc
|
||||
# then strip off whatever prefix Cygnus prepends the number with...
|
||||
GCCVER=`echo $GCCVER | sed 's/^[a-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.
|
||||
# peak single digit before and after first dot, e.g. 2.95.1 gives 29
|
||||
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
|
||||
else
|
||||
CC=cc
|
||||
fi
|
||||
|
||||
if [ "$SYSTEM" = "HP-UX" ];then
|
||||
# By default gcc is a ILP32 compiler (with long long == 64).
|
||||
GCC_BITS="32"
|
||||
if [ $GCCVER -ge 30 ]; then
|
||||
# PA64 support only came in with gcc 3.0.x.
|
||||
# We look for the preprocessor symbol __LP64__ indicating
|
||||
# 64bit bit long and pointer. sizeof(int) == 32 on HPUX64.
|
||||
if gcc -v -E -x c /dev/null 2>&1 | grep __LP64__ > /dev/null; then
|
||||
GCC_BITS="64"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$SYSTEM" = "SunOS" ]; then
|
||||
# check for WorkShop C, expected output is "cc: blah-blah C x.x"
|
||||
CCVER=`(cc -V 2>&1) 2>/dev/null | \
|
||||
@@ -490,6 +509,10 @@ EOF
|
||||
${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
|
||||
rm dummy dummy.c
|
||||
;;
|
||||
ppc64-*-linux2)
|
||||
#Use the standard target for PPC architecture until we create a
|
||||
#special one for the 64bit architecture.
|
||||
OUT="linux-ppc" ;;
|
||||
ppc-*-linux2) OUT="linux-ppc" ;;
|
||||
m68k-*-linux*) OUT="linux-m68k" ;;
|
||||
ia64-*-linux?) OUT="linux-ia64" ;;
|
||||
@@ -582,8 +605,18 @@ EOF
|
||||
BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
|
||||
RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
|
||||
*-siemens-sysv4) OUT="SINIX" ;;
|
||||
*-hpux1*) OUT="hpux-parisc-$CC"
|
||||
options="$options -D_REENTRANT" ;;
|
||||
*-hpux1*)
|
||||
if [ $CC = "gcc" ];
|
||||
then
|
||||
if [ $GCC_BITS = "64" ]; then
|
||||
OUT="hpux64-parisc-gcc"
|
||||
else
|
||||
OUT="hpux-parisc-gcc"
|
||||
fi
|
||||
else
|
||||
OUT="hpux-parisc-$CC"
|
||||
fi
|
||||
options="$options -D_REENTRANT" ;;
|
||||
*-hpux) OUT="hpux-parisc-$CC" ;;
|
||||
# these are all covered by the catchall below
|
||||
# *-aix) OUT="aix-$CC" ;;
|
||||
@@ -591,6 +624,8 @@ EOF
|
||||
mips-sony-newsos4) OUT="newsos4-gcc" ;;
|
||||
*-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
|
||||
*-*-cygwin) OUT="Cygwin" ;;
|
||||
t3e-cray-unicosmk) OUT="cray-t3e" ;;
|
||||
j90-cray-unicos) OUT="cray-j90" ;;
|
||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ DIR= crypto
|
||||
TOP= ..
|
||||
CC= cc
|
||||
INCLUDE= -I. -I../include
|
||||
INCLUDES= -I.. -I../../include
|
||||
INCLUDES= -I.. -I../.. -I../../include
|
||||
CFLAG= -g
|
||||
INSTALL_PREFIX=
|
||||
OPENSSLDIR= /usr/local/ssl
|
||||
@@ -51,11 +51,11 @@ all: buildinf.h lib subdirs
|
||||
|
||||
buildinf.h: ../Makefile.ssl
|
||||
( echo "#ifndef MK1MF_BUILD"; \
|
||||
echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
|
||||
echo " #define CFLAGS \"$(CC) $(CFLAG)\""; \
|
||||
echo " #define PLATFORM \"$(PLATFORM)\""; \
|
||||
echo " #define DATE \"`date`\""; \
|
||||
echo "#endif" ) >buildinf.h
|
||||
echo ' /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */'; \
|
||||
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
|
||||
echo ' #define PLATFORM "$(PLATFORM)"'; \
|
||||
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
||||
echo '#endif' ) >buildinf.h
|
||||
|
||||
testapps:
|
||||
if echo ${SDIRS} | fgrep ' des '; \
|
||||
@@ -134,7 +134,7 @@ depend:
|
||||
@for i in $(SDIRS) ;\
|
||||
do \
|
||||
(cd $$i; echo "making depend in crypto/$$i..."; \
|
||||
$(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
|
||||
$(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' PERL='${PERL}' depend ); \
|
||||
done;
|
||||
|
||||
clean:
|
||||
|
||||
@@ -936,40 +936,40 @@ t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_bitst.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
t_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||
t_bitst.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
t_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
t_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
t_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
t_bitst.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
t_bitst.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
t_bitst.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||
t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
t_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
t_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
t_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
||||
t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
t_bitst.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
t_bitst.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
t_bitst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
t_bitst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
t_bitst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
t_bitst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_bitst.o: ../cryptlib.h
|
||||
t_crl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
t_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
t_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_crl.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||
t_crl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
t_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
t_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
t_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
t_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
t_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||
t_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
t_crl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
t_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
t_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
t_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
t_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
||||
t_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
t_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
t_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
t_crl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
t_crl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
t_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
t_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
t_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
t_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_crl.o: ../cryptlib.h
|
||||
t_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
t_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
t_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
@@ -985,20 +985,20 @@ t_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_req.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||
t_req.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
t_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
t_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
t_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
t_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
t_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||
t_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
t_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
t_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
t_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
t_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
t_req.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
||||
t_req.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
t_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
t_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
t_req.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
t_req.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
t_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
t_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
t_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_req.o: ../cryptlib.h
|
||||
t_spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||
t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
@@ -1024,20 +1024,20 @@ t_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
t_x509.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||
t_x509.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
t_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
t_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
t_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
t_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
t_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||
t_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
t_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
t_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
t_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
t_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
t_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
||||
t_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
t_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
t_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
t_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
t_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
t_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
t_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
t_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
t_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
t_x509.o: ../cryptlib.h
|
||||
t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||
t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
t_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
@@ -1310,21 +1310,20 @@ x_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
x_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
|
||||
x_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
x_x509.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h
|
||||
x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
x_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
x_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
x_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
x_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
x_x509.o: ../cryptlib.h
|
||||
x_x509.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
x_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
x_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
x_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
x_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
x_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
x_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||
x_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
x_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
||||
x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||
x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
x_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
|
||||
@@ -89,8 +89,6 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
|
||||
if (a == NULL) return(0);
|
||||
|
||||
len=a->length;
|
||||
ret=1+len;
|
||||
if (pp == NULL) return(ret);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
@@ -118,6 +116,10 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
|
||||
}
|
||||
else
|
||||
bits=0;
|
||||
|
||||
ret=1+len;
|
||||
if (pp == NULL) return(ret);
|
||||
|
||||
p= *pp;
|
||||
|
||||
*(p++)=(unsigned char)bits;
|
||||
|
||||
@@ -205,7 +205,18 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
|
||||
else ret->type=V_ASN1_ENUMERATED;
|
||||
j=BN_num_bits(bn);
|
||||
len=((j == 0)?0:((j/8)+1));
|
||||
ret->data=(unsigned char *)OPENSSL_malloc(len+4);
|
||||
if (ret->length < len+4)
|
||||
{
|
||||
unsigned char *new_data=
|
||||
OPENSSL_realloc(ret->data, len+4);
|
||||
if (!new_data)
|
||||
{
|
||||
ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
ret->data=new_data;
|
||||
}
|
||||
|
||||
ret->length=BN_bn2bin(bn,ret->data);
|
||||
return(ret);
|
||||
err:
|
||||
|
||||
@@ -451,7 +451,16 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
|
||||
else ret->type=V_ASN1_INTEGER;
|
||||
j=BN_num_bits(bn);
|
||||
len=((j == 0)?0:((j/8)+1));
|
||||
ret->data=(unsigned char *)OPENSSL_malloc(len+4);
|
||||
if (ret->length < len+4)
|
||||
{
|
||||
unsigned char *new_data= OPENSSL_realloc(ret->data, len+4);
|
||||
if (!new_data)
|
||||
{
|
||||
ASN1err(ASN1_F_BN_TO_ASN1_INTEGER,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
ret->data=new_data;
|
||||
}
|
||||
ret->length=BN_bn2bin(bn,ret->data);
|
||||
return(ret);
|
||||
err:
|
||||
|
||||
@@ -116,7 +116,7 @@ int i2d_ASN1_SET(STACK *a, unsigned char **pp, int (*func)(), int ex_tag,
|
||||
}
|
||||
|
||||
pStart = p; /* Catch the beg of Setblobs*/
|
||||
rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)); /* In this array
|
||||
if (!(rgSetBlob = (MYBLOB *)OPENSSL_malloc( sk_num(a) * sizeof(MYBLOB)))) return 0; /* In this array
|
||||
we will store the SET blobs */
|
||||
|
||||
for (i=0; i<sk_num(a); i++)
|
||||
@@ -133,7 +133,7 @@ SetBlob
|
||||
/* Now we have to sort the blobs. I am using a simple algo.
|
||||
*Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/
|
||||
qsort( rgSetBlob, sk_num(a), sizeof(MYBLOB), SetBlobCmp);
|
||||
pTempMem = OPENSSL_malloc(totSize);
|
||||
if (!(pTempMem = OPENSSL_malloc(totSize))) return 0;
|
||||
|
||||
/* Copy to temp mem */
|
||||
p = pTempMem;
|
||||
|
||||
@@ -55,6 +55,59 @@
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-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
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
@@ -87,7 +140,14 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
|
||||
else
|
||||
a=algor2;
|
||||
if (a == NULL) continue;
|
||||
if ( (a->parameter == NULL) ||
|
||||
if (type->pkey_type == NID_dsaWithSHA1)
|
||||
{
|
||||
/* special case: RFC 2459 tells us to omit 'parameters'
|
||||
* with id-dsa-with-sha1 */
|
||||
ASN1_TYPE_free(a->parameter);
|
||||
a->parameter = NULL;
|
||||
}
|
||||
else if ((a->parameter == NULL) ||
|
||||
(a->parameter->type != V_ASN1_NULL))
|
||||
{
|
||||
ASN1_TYPE_free(a->parameter);
|
||||
|
||||
@@ -270,6 +270,9 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
||||
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
||||
{
|
||||
struct tm *tm;
|
||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN)
|
||||
struct tm data;
|
||||
#endif
|
||||
int offset;
|
||||
int year;
|
||||
|
||||
@@ -287,7 +290,8 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
||||
t -= offset*60; /* FIXME: may overflow in extreme cases */
|
||||
|
||||
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN)
|
||||
{ struct tm data; gmtime_r(&t, &data); tm = &data; }
|
||||
gmtime_r(&t, &data);
|
||||
tm = &data;
|
||||
#else
|
||||
tm = gmtime(&t);
|
||||
#endif
|
||||
|
||||
@@ -124,15 +124,13 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
|
||||
(int)(omax+ *pp));
|
||||
|
||||
#endif
|
||||
#if 0
|
||||
if ((p+ *plength) > (omax+ *pp))
|
||||
if (*plength > (omax - (*pp - p)))
|
||||
{
|
||||
ASN1err(ASN1_F_ASN1_GET_OBJECT,ASN1_R_TOO_LONG);
|
||||
/* Set this so that even if things are not long enough
|
||||
* the values are set correctly */
|
||||
ret|=0x80;
|
||||
}
|
||||
#endif
|
||||
*pp=p;
|
||||
return(ret|inf);
|
||||
err:
|
||||
@@ -159,6 +157,8 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
|
||||
i= *p&0x7f;
|
||||
if (*(p++) & 0x80)
|
||||
{
|
||||
if (i > sizeof(long))
|
||||
return 0;
|
||||
if (max-- == 0) return(0);
|
||||
while (i-- > 0)
|
||||
{
|
||||
@@ -170,6 +170,8 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
|
||||
else
|
||||
ret=i;
|
||||
}
|
||||
if (ret < 0)
|
||||
return 0;
|
||||
*pp=p;
|
||||
*rl=ret;
|
||||
return(1);
|
||||
@@ -407,7 +409,7 @@ int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b)
|
||||
|
||||
void asn1_add_error(unsigned char *address, int offset)
|
||||
{
|
||||
char buf1[16],buf2[16];
|
||||
char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1];
|
||||
|
||||
sprintf(buf1,"%lu",(unsigned long)address);
|
||||
sprintf(buf2,"%d",offset);
|
||||
|
||||
@@ -87,6 +87,7 @@ DH *d2i_DHparams(DH **a, unsigned char **pp, long length)
|
||||
}
|
||||
|
||||
M_ASN1_BIT_STRING_free(bs);
|
||||
bs = NULL;
|
||||
|
||||
M_ASN1_D2I_Finish_2(a);
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length)
|
||||
if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn;
|
||||
|
||||
M_ASN1_BIT_STRING_free(bs);
|
||||
bs = NULL;
|
||||
|
||||
M_ASN1_D2I_Finish_2(a);
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length)
|
||||
goto err_bn;
|
||||
|
||||
M_ASN1_INTEGER_free(bs);
|
||||
bs = NULL;
|
||||
|
||||
M_ASN1_D2I_Finish_2(a);
|
||||
err_bn:
|
||||
|
||||
@@ -96,10 +96,34 @@ int RSA_print(BIO *bp, RSA *x, int off)
|
||||
char str[128];
|
||||
const char *s;
|
||||
unsigned char *m=NULL;
|
||||
int i,ret=0;
|
||||
int ret=0;
|
||||
size_t buf_len=0, i;
|
||||
|
||||
i=RSA_size(x);
|
||||
m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10);
|
||||
if (x->n)
|
||||
buf_len = (size_t)BN_num_bytes(x->n);
|
||||
if (x->e)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->e)))
|
||||
buf_len = i;
|
||||
if (x->d)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->d)))
|
||||
buf_len = i;
|
||||
if (x->p)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->p)))
|
||||
buf_len = i;
|
||||
if (x->q)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->q)))
|
||||
buf_len = i;
|
||||
if (x->dmp1)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->dmp1)))
|
||||
buf_len = i;
|
||||
if (x->dmq1)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->dmq1)))
|
||||
buf_len = i;
|
||||
if (x->iqmp)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->iqmp)))
|
||||
buf_len = i;
|
||||
|
||||
m=(unsigned char *)OPENSSL_malloc(buf_len+10);
|
||||
if (m == NULL)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PRINT,ERR_R_MALLOC_FAILURE);
|
||||
@@ -161,22 +185,25 @@ int DSA_print(BIO *bp, DSA *x, int off)
|
||||
{
|
||||
char str[128];
|
||||
unsigned char *m=NULL;
|
||||
int i,ret=0;
|
||||
BIGNUM *bn=NULL;
|
||||
int ret=0;
|
||||
size_t buf_len=0,i;
|
||||
|
||||
if (x->p != NULL)
|
||||
bn=x->p;
|
||||
else if (x->priv_key != NULL)
|
||||
bn=x->priv_key;
|
||||
else if (x->pub_key != NULL)
|
||||
bn=x->pub_key;
|
||||
|
||||
/* larger than needed but what the hell :-) */
|
||||
if (bn != NULL)
|
||||
i=BN_num_bytes(bn)*2;
|
||||
else
|
||||
i=256;
|
||||
m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10);
|
||||
if (x->p)
|
||||
buf_len = (size_t)BN_num_bytes(x->p);
|
||||
if (x->q)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->q)))
|
||||
buf_len = i;
|
||||
if (x->g)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->g)))
|
||||
buf_len = i;
|
||||
if (x->priv_key)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->priv_key)))
|
||||
buf_len = i;
|
||||
if (x->pub_key)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->pub_key)))
|
||||
buf_len = i;
|
||||
|
||||
m=(unsigned char *)OPENSSL_malloc(buf_len+10);
|
||||
if (m == NULL)
|
||||
{
|
||||
DSAerr(DSA_F_DSA_PRINT,ERR_R_MALLOC_FAILURE);
|
||||
@@ -281,10 +308,15 @@ int DHparams_print_fp(FILE *fp, DH *x)
|
||||
int DHparams_print(BIO *bp, DH *x)
|
||||
{
|
||||
unsigned char *m=NULL;
|
||||
int reason=ERR_R_BUF_LIB,i,ret=0;
|
||||
int reason=ERR_R_BUF_LIB,ret=0;
|
||||
size_t buf_len=0, i;
|
||||
|
||||
i=BN_num_bytes(x->p);
|
||||
m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10);
|
||||
if (x->p)
|
||||
buf_len = (size_t)BN_num_bytes(x->p);
|
||||
if (x->g)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->g)))
|
||||
buf_len = i;
|
||||
m=(unsigned char *)OPENSSL_malloc(buf_len+10);
|
||||
if (m == NULL)
|
||||
{
|
||||
reason=ERR_R_MALLOC_FAILURE;
|
||||
@@ -334,10 +366,18 @@ int DSAparams_print_fp(FILE *fp, DSA *x)
|
||||
int DSAparams_print(BIO *bp, DSA *x)
|
||||
{
|
||||
unsigned char *m=NULL;
|
||||
int reason=ERR_R_BUF_LIB,i,ret=0;
|
||||
int reason=ERR_R_BUF_LIB,ret=0;
|
||||
size_t buf_len=0, i;
|
||||
|
||||
i=BN_num_bytes(x->p);
|
||||
m=(unsigned char *)OPENSSL_malloc((unsigned int)i+10);
|
||||
if (x->p)
|
||||
buf_len = (size_t)BN_num_bytes(x->p);
|
||||
if (x->q)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->q)))
|
||||
buf_len = i;
|
||||
if (x->g)
|
||||
if (buf_len < (i = (size_t)BN_num_bytes(x->g)))
|
||||
buf_len = i;
|
||||
m=(unsigned char *)OPENSSL_malloc(buf_len+10);
|
||||
if (m == NULL)
|
||||
{
|
||||
reason=ERR_R_MALLOC_FAILURE;
|
||||
|
||||
@@ -156,7 +156,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
|
||||
dsa->write_params=0;
|
||||
ASN1_TYPE_free(a->parameter);
|
||||
i=i2d_DSAparams(dsa,NULL);
|
||||
p=(unsigned char *)OPENSSL_malloc(i);
|
||||
if ((p=(unsigned char *)OPENSSL_malloc(i)) == NULL) goto err;
|
||||
pp=p;
|
||||
i2d_DSAparams(dsa,&pp);
|
||||
a->parameter=ASN1_TYPE_new();
|
||||
|
||||
@@ -56,6 +56,13 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
/* disable assert() unless BIO_DEBUG has been defined */
|
||||
#ifndef BIO_DEBUG
|
||||
# ifndef NDEBUG
|
||||
# define NDEBUG
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Stolen from tjh's ssl/ssl_trc.c stuff.
|
||||
*/
|
||||
@@ -716,12 +723,13 @@ doapr_outch(
|
||||
if (buffer) {
|
||||
while (*currlen >= *maxlen) {
|
||||
if (*buffer == NULL) {
|
||||
assert(*sbuffer != NULL);
|
||||
if (*maxlen == 0)
|
||||
*maxlen = 1024;
|
||||
*buffer = OPENSSL_malloc(*maxlen);
|
||||
if (*currlen > 0)
|
||||
if (*currlen > 0) {
|
||||
assert(*sbuffer != NULL);
|
||||
memcpy(*buffer, *sbuffer, *currlen);
|
||||
}
|
||||
*sbuffer = NULL;
|
||||
} else {
|
||||
*maxlen += 1024;
|
||||
@@ -761,7 +769,9 @@ int BIO_vprintf (BIO *bio, const char *format, va_list args)
|
||||
{
|
||||
int ret;
|
||||
size_t retlen;
|
||||
MS_STATIC char hugebuf[1024*10];
|
||||
char hugebuf[1024*2]; /* Was previously 10k, which is unreasonable
|
||||
in small-stack environments, like threads
|
||||
or DOS programs. */
|
||||
char *hugebufp = hugebuf;
|
||||
size_t hugebufsize = sizeof(hugebuf);
|
||||
char *dynbuf = NULL;
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef SO_MAXCONN
|
||||
#define MAX_LISTEN SOMAXCONN
|
||||
#elif defined(SO_MAXCONN)
|
||||
#define MAX_LISTEN SO_MAXCONN
|
||||
#elif defined(SOMAXCONN)
|
||||
#define MAX_LISTEN SOMAXCONN
|
||||
#else
|
||||
#define MAX_LISTEN 32
|
||||
#endif
|
||||
|
||||
@@ -200,7 +200,7 @@ static int linebuffer_write(BIO *b, const char *in, int inl)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
BIO_write(b->next_bio, "<*<", 3);
|
||||
#endif
|
||||
i=BIO_write(b->next_bio,
|
||||
@@ -210,13 +210,13 @@ BIO_write(b->next_bio, "<*<", 3);
|
||||
ctx->obuf_len = orig_olen;
|
||||
BIO_copy_next_retry(b);
|
||||
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
BIO_write(b->next_bio, ">*>", 3);
|
||||
#endif
|
||||
if (i < 0) return((num > 0)?num:i);
|
||||
if (i == 0) return(num);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
BIO_write(b->next_bio, ">*>", 3);
|
||||
#endif
|
||||
if (i < ctx->obuf_len)
|
||||
@@ -229,20 +229,20 @@ BIO_write(b->next_bio, ">*>", 3);
|
||||
buffer if a NL was found and there is anything to write. */
|
||||
if ((foundnl || p - in > ctx->obuf_size) && p - in > 0)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
BIO_write(b->next_bio, "<*<", 3);
|
||||
#endif
|
||||
i=BIO_write(b->next_bio,in,p - in);
|
||||
if (i <= 0)
|
||||
{
|
||||
BIO_copy_next_retry(b);
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
BIO_write(b->next_bio, ">*>", 3);
|
||||
#endif
|
||||
if (i < 0) return((num > 0)?num:i);
|
||||
if (i == 0) return(num);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
BIO_write(b->next_bio, ">*>", 3);
|
||||
#endif
|
||||
num+=i;
|
||||
|
||||
@@ -104,7 +104,7 @@ static int nbiof_new(BIO *bi)
|
||||
{
|
||||
NBIO_TEST *nt;
|
||||
|
||||
nt=(NBIO_TEST *)OPENSSL_malloc(sizeof(NBIO_TEST));
|
||||
if (!(nt=(NBIO_TEST *)OPENSSL_malloc(sizeof(NBIO_TEST)))) return(0);
|
||||
nt->lrn= -1;
|
||||
nt->lwn= -1;
|
||||
bi->ptr=(char *)nt;
|
||||
|
||||
@@ -7,9 +7,18 @@
|
||||
* for which no specific BIO method is available.
|
||||
* See ssl/ssltest.c for some hints on how this can be used. */
|
||||
|
||||
/* BIO_DEBUG implies BIO_PAIR_DEBUG */
|
||||
#ifdef BIO_DEBUG
|
||||
# ifndef BIO_PAIR_DEBUG
|
||||
# define BIO_PAIR_DEBUG
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* disable assert() unless BIO_PAIR_DEBUG has been defined */
|
||||
#ifndef BIO_PAIR_DEBUG
|
||||
# undef NDEBUG /* avoid conflicting definitions */
|
||||
# define NDEBUG
|
||||
# ifndef NDEBUG
|
||||
# define NDEBUG
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
@@ -23,7 +32,12 @@
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#include "openssl/e_os.h"
|
||||
#ifndef SSIZE_MAX
|
||||
|
||||
/* VxWorks defines SSiZE_MAX with an empty value causing compile errors */
|
||||
#if defined(VXWORKS)
|
||||
# undef SSIZE_MAX
|
||||
# define SSIZE_MAX INT_MAX
|
||||
#elif !defined(SSIZE_MAX)
|
||||
# define SSIZE_MAX INT_MAX
|
||||
#endif
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
# include <starlet.h>
|
||||
#elif defined(__ultrix)
|
||||
# include <sys/syslog.h>
|
||||
#elif !defined(MSDOS) /* Unix */
|
||||
#elif !defined(MSDOS) && !defined(VXWORKS) /* Unix */
|
||||
# include <syslog.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ extern "C" {
|
||||
#define BN_BYTES 4
|
||||
#define BN_BITS2 32
|
||||
#define BN_BITS4 16
|
||||
#ifdef WIN32
|
||||
#ifdef _MSC_VER
|
||||
/* VC++ doesn't like the LL suffix */
|
||||
#define BN_MASK (0xffffffffffffffffL)
|
||||
#else
|
||||
|
||||
@@ -190,10 +190,10 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
|
||||
|
||||
/* First we normalise the numbers */
|
||||
norm_shift=BN_BITS2-((BN_num_bits(divisor))%BN_BITS2);
|
||||
BN_lshift(sdiv,divisor,norm_shift);
|
||||
if (!(BN_lshift(sdiv,divisor,norm_shift))) goto err;
|
||||
sdiv->neg=0;
|
||||
norm_shift+=BN_BITS2;
|
||||
BN_lshift(snum,num,norm_shift);
|
||||
if (!(BN_lshift(snum,num,norm_shift))) goto err;
|
||||
snum->neg=0;
|
||||
div_n=sdiv->top;
|
||||
num_n=snum->top;
|
||||
@@ -315,7 +315,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
|
||||
tmp->top=j;
|
||||
|
||||
j=wnum.top;
|
||||
BN_sub(&wnum,&wnum,tmp);
|
||||
if (!BN_sub(&wnum,&wnum,tmp)) goto err;
|
||||
|
||||
snum->top=snum->top+wnum.top-j;
|
||||
|
||||
@@ -323,7 +323,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
|
||||
{
|
||||
q--;
|
||||
j=wnum.top;
|
||||
BN_add(&wnum,&wnum,sdiv);
|
||||
if (!BN_add(&wnum,&wnum,sdiv)) goto err;
|
||||
snum->top+=wnum.top-j;
|
||||
}
|
||||
*(resp--)=q;
|
||||
|
||||
@@ -168,8 +168,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *in, BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
|
||||
R=in;
|
||||
if (R == NULL) goto err;
|
||||
|
||||
BN_zero(X);
|
||||
BN_one(Y);
|
||||
if (!BN_zero(X)) goto err;
|
||||
if (!BN_one(Y)) goto err;
|
||||
if (BN_copy(A,a) == NULL) goto err;
|
||||
if (BN_copy(B,n) == NULL) goto err;
|
||||
sign=1;
|
||||
|
||||
@@ -224,7 +224,7 @@ int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont,
|
||||
|
||||
if (!BN_mul(t1,t2,&mont->N,ctx)) goto err;
|
||||
if (!BN_add(t2,a,t1)) goto err;
|
||||
BN_rshift(ret,t2,mont->ri);
|
||||
if (!BN_rshift(ret,t2,mont->ri)) goto err;
|
||||
#endif /* MONT_WORD */
|
||||
|
||||
if (BN_ucmp(ret, &(mont->N)) >= 0)
|
||||
@@ -284,8 +284,8 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
|
||||
BN_ULONG buf[2];
|
||||
|
||||
mont->ri=(BN_num_bits(mod)+(BN_BITS2-1))/BN_BITS2*BN_BITS2;
|
||||
BN_zero(R);
|
||||
BN_set_bit(R,BN_BITS2); /* R */
|
||||
if (!(BN_zero(R))) goto err;
|
||||
if (!(BN_set_bit(R,BN_BITS2))) goto err; /* R */
|
||||
|
||||
buf[0]=mod->d[0]; /* tmod = N mod word size */
|
||||
buf[1]=0;
|
||||
@@ -296,36 +296,44 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
|
||||
/* Ri = R^-1 mod N*/
|
||||
if ((BN_mod_inverse(&Ri,R,&tmod,ctx)) == NULL)
|
||||
goto err;
|
||||
BN_lshift(&Ri,&Ri,BN_BITS2); /* R*Ri */
|
||||
/* R*Ri */
|
||||
if (!(BN_lshift(&Ri,&Ri,BN_BITS2))) goto err;
|
||||
if (!BN_is_zero(&Ri))
|
||||
BN_sub_word(&Ri,1);
|
||||
{
|
||||
if (!BN_sub_word(&Ri,1)) goto err;
|
||||
}
|
||||
else /* if N mod word size == 1 */
|
||||
BN_set_word(&Ri,BN_MASK2); /* Ri-- (mod word size) */
|
||||
BN_div(&Ri,NULL,&Ri,&tmod,ctx); /* Ni = (R*Ri-1)/N,
|
||||
* keep only least significant word: */
|
||||
/* Ri-- (mod word size) */
|
||||
{
|
||||
if (!BN_set_word(&Ri,BN_MASK2)) goto err;
|
||||
}
|
||||
/* Ni = (R*Ri-1)/N, keep only least significant word: */
|
||||
if (!(BN_div(&Ri,NULL,&Ri,&tmod,ctx))) goto err;
|
||||
mont->n0=Ri.d[0];
|
||||
BN_free(&Ri);
|
||||
}
|
||||
#else /* !MONT_WORD */
|
||||
{ /* bignum version */
|
||||
mont->ri=BN_num_bits(mod);
|
||||
BN_zero(R);
|
||||
BN_set_bit(R,mont->ri); /* R = 2^ri */
|
||||
if (!(BN_zero(R))) goto err;
|
||||
/* R = 2^ri */
|
||||
if (!(BN_set_bit(R,mont->ri))) goto err;
|
||||
/* Ri = R^-1 mod N*/
|
||||
if ((BN_mod_inverse(&Ri,R,mod,ctx)) == NULL)
|
||||
goto err;
|
||||
BN_lshift(&Ri,&Ri,mont->ri); /* R*Ri */
|
||||
BN_sub_word(&Ri,1);
|
||||
/* R*Ri */
|
||||
if (!(BN_lshift(&Ri,&Ri,mont->ri))) goto err;
|
||||
if (!(BN_sub_word(&Ri,1))) goto err;
|
||||
/* Ni = (R*Ri-1) / N */
|
||||
BN_div(&(mont->Ni),NULL,&Ri,mod,ctx);
|
||||
if (!(BN_div(&(mont->Ni),NULL,&Ri,mod,ctx))) goto err;
|
||||
BN_free(&Ri);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* setup RR for conversions */
|
||||
BN_zero(&(mont->RR));
|
||||
BN_set_bit(&(mont->RR),mont->ri*2);
|
||||
BN_mod(&(mont->RR),&(mont->RR),&(mont->N),ctx);
|
||||
if (!(BN_zero(&(mont->RR)))) goto err;
|
||||
if (!(BN_set_bit(&(mont->RR),mont->ri*2))) goto err;
|
||||
if (!(BN_mod(&(mont->RR),&(mont->RR),&(mont->N),ctx))) goto err;
|
||||
|
||||
return(1);
|
||||
err:
|
||||
@@ -336,9 +344,9 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from)
|
||||
{
|
||||
if (to == from) return(to);
|
||||
|
||||
BN_copy(&(to->RR),&(from->RR));
|
||||
BN_copy(&(to->N),&(from->N));
|
||||
BN_copy(&(to->Ni),&(from->Ni));
|
||||
if (!(BN_copy(&(to->RR),&(from->RR)))) return NULL;
|
||||
if (!(BN_copy(&(to->N),&(from->N)))) return NULL;
|
||||
if (!(BN_copy(&(to->Ni),&(from->Ni)))) return NULL;
|
||||
to->ri=from->ri;
|
||||
to->n0=from->n0;
|
||||
return(to);
|
||||
|
||||
@@ -634,7 +634,7 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
|
||||
|
||||
if ((al == 0) || (bl == 0))
|
||||
{
|
||||
BN_zero(r);
|
||||
if (!BN_zero(r)) goto err;
|
||||
return(1);
|
||||
}
|
||||
top=al+bl;
|
||||
@@ -677,14 +677,14 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
|
||||
{
|
||||
if (i == 1 && !BN_get_flags(b,BN_FLG_STATIC_DATA))
|
||||
{
|
||||
bn_wexpand(b,al);
|
||||
if (bn_wexpand(b,al) == NULL) goto err;
|
||||
b->d[bl]=0;
|
||||
bl++;
|
||||
i--;
|
||||
}
|
||||
else if (i == -1 && !BN_get_flags(a,BN_FLG_STATIC_DATA))
|
||||
{
|
||||
bn_wexpand(a,bl);
|
||||
if (bn_wexpand(a,bl) == NULL) goto err;
|
||||
a->d[al]=0;
|
||||
al++;
|
||||
i++;
|
||||
@@ -699,16 +699,16 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
|
||||
t = BN_CTX_get(ctx);
|
||||
if (al == j) /* exact multiple */
|
||||
{
|
||||
bn_wexpand(t,k*2);
|
||||
bn_wexpand(rr,k*2);
|
||||
if (bn_wexpand(t,k*2) == NULL) goto err;
|
||||
if (bn_wexpand(rr,k*2) == NULL) goto err;
|
||||
bn_mul_recursive(rr->d,a->d,b->d,al,t->d);
|
||||
}
|
||||
else
|
||||
{
|
||||
bn_wexpand(a,k);
|
||||
bn_wexpand(b,k);
|
||||
bn_wexpand(t,k*4);
|
||||
bn_wexpand(rr,k*4);
|
||||
if (bn_wexpand(a,k) == NULL ) goto err;
|
||||
if (bn_wexpand(b,k) == NULL ) goto err;
|
||||
if (bn_wexpand(t,k*4) == NULL ) goto err;
|
||||
if (bn_wexpand(rr,k*4) == NULL ) goto err;
|
||||
for (i=a->top; i<k; i++)
|
||||
a->d[i]=0;
|
||||
for (i=b->top; i<k; i++)
|
||||
|
||||
@@ -93,17 +93,14 @@ conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
conf_def.o: conf_def.h
|
||||
conf_def.o: ../cryptlib.h conf_def.h
|
||||
conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
|
||||
conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
|
||||
conf_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
conf_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
conf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/err.h
|
||||
conf_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslv.h
|
||||
conf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
conf_err.o: ../../include/openssl/symhacks.h
|
||||
conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h
|
||||
conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h
|
||||
conf_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
conf_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
conf_lib.o: ../../include/openssl/opensslconf.h
|
||||
conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
|
||||
@@ -56,14 +56,13 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CONF_H
|
||||
#ifndef HEADER_CONF_H
|
||||
#define HEADER_CONF_H
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/stack.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/e_os.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -86,14 +85,14 @@ typedef struct conf_method_st CONF_METHOD;
|
||||
struct conf_method_st
|
||||
{
|
||||
const char *name;
|
||||
CONF *(MS_FAR *create)(CONF_METHOD *meth);
|
||||
int (MS_FAR *init)(CONF *conf);
|
||||
int (MS_FAR *destroy)(CONF *conf);
|
||||
int (MS_FAR *destroy_data)(CONF *conf);
|
||||
int (MS_FAR *load)(CONF *conf, BIO *bp, long *eline);
|
||||
int (MS_FAR *dump)(CONF *conf, BIO *bp);
|
||||
int (MS_FAR *is_number)(CONF *conf, char c);
|
||||
int (MS_FAR *to_int)(CONF *conf, char c);
|
||||
CONF *(*create)(CONF_METHOD *meth);
|
||||
int (*init)(CONF *conf);
|
||||
int (*destroy)(CONF *conf);
|
||||
int (*destroy_data)(CONF *conf);
|
||||
int (*load)(CONF *conf, BIO *bp, long *eline);
|
||||
int (*dump)(CONF *conf, BIO *bp);
|
||||
int (*is_number)(CONF *conf, char c);
|
||||
int (*to_int)(CONF *conf, char c);
|
||||
};
|
||||
|
||||
int CONF_set_default_method(CONF_METHOD *meth);
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <string.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/conf_api.h>
|
||||
#include "openssl/e_os.h"
|
||||
|
||||
static void value_free_hash(CONF_VALUE *a, LHASH *conf);
|
||||
static void value_free_stack(CONF_VALUE *a,LHASH *conf);
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "conf_def.h"
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/err.h>
|
||||
#include "cryptlib.h"
|
||||
|
||||
static char *eat_ws(CONF *conf, char *p);
|
||||
static char *eat_alpha_numeric(CONF *conf, char *p);
|
||||
@@ -180,12 +181,12 @@ static int def_destroy_data(CONF *conf)
|
||||
static int def_load(CONF *conf, BIO *in, long *line)
|
||||
{
|
||||
#define BUFSIZE 512
|
||||
char btmp[16];
|
||||
int bufnum=0,i,ii;
|
||||
BUF_MEM *buff=NULL;
|
||||
char *s,*p,*end;
|
||||
int again,n;
|
||||
long eline=0;
|
||||
char btmp[DECIMAL_SIZE(eline)+1];
|
||||
CONF_VALUE *v=NULL,*tv;
|
||||
CONF_VALUE *sv=NULL;
|
||||
char *section=NULL,*buf;
|
||||
|
||||
@@ -491,3 +491,11 @@ BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||
{
|
||||
fprintf(stderr,"%s(%d): OpenSSL internal error, assertion failed: %s\n",
|
||||
file,line,assertion);
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,14 @@ extern "C" {
|
||||
#define X509_CERT_DIR_EVP "SSL_CERT_DIR"
|
||||
#define X509_CERT_FILE_EVP "SSL_CERT_FILE"
|
||||
|
||||
/* size of string represenations */
|
||||
#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
|
||||
|
||||
@@ -208,7 +208,7 @@ $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
|
||||
"dso_openssl,dso_win32,dso_vms"
|
||||
$ LIB_ENGINE = "engine_err,engine_lib,engine_list,engine_openssl,"+ -
|
||||
"hw_atalla,hw_cswift,hw_ncipher,hw_aep,hw_sureware,"+ -
|
||||
"hw_ubsec"
|
||||
"hw_ubsec,hw_keyclient"
|
||||
$ LIB_BUFFER = "buffer,buf_err"
|
||||
$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
|
||||
"bss_mem,bss_null,bss_fd,"+ -
|
||||
@@ -626,6 +626,7 @@ $ WRITE SYS$OUTPUT " ",APPLICATION,".exe"
|
||||
$!
|
||||
$! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
|
||||
$!
|
||||
$ ON ERROR THEN GOTO NEXT_APPLICATION
|
||||
$ IF (RSAREF.EQS."TRUE")
|
||||
$ THEN
|
||||
$!
|
||||
|
||||
@@ -189,7 +189,7 @@ int des_enc_write(int fd,const void *buf,int len,des_key_schedule sched,
|
||||
des_cblock *iv);
|
||||
char *des_fcrypt(const char *buf,const char *salt, char *ret);
|
||||
char *des_crypt(const char *buf,const char *salt);
|
||||
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT)
|
||||
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(_UWIN)
|
||||
char *crypt(const char *buf,const char *salt);
|
||||
#endif
|
||||
void des_ofb_encrypt(const unsigned char *in,unsigned char *out,int numbits,
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
|
||||
#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32) && !defined(VXWORKS)
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifdef OPENSSL_UNISTD
|
||||
# include OPENSSL_UNISTD
|
||||
@@ -133,6 +133,12 @@
|
||||
#define SGTTY
|
||||
#endif
|
||||
|
||||
#if defined(VXWORKS)
|
||||
#undef TERMIOS
|
||||
#undef TERMIO
|
||||
#undef SGTTY
|
||||
#endif
|
||||
|
||||
#ifdef TERMIOS
|
||||
#include <termios.h>
|
||||
#define TTY_STRUCT struct termios
|
||||
@@ -240,7 +246,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||
long status;
|
||||
unsigned short channel = 0;
|
||||
#else
|
||||
#ifndef MSDOS
|
||||
#if !defined(MSDOS) && !defined(VXWORKS)
|
||||
TTY_STRUCT tty_orig,tty_new;
|
||||
#endif
|
||||
#endif
|
||||
@@ -268,7 +274,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||
#ifdef MSDOS
|
||||
if ((tty=fopen("con","r")) == NULL)
|
||||
tty=stdin;
|
||||
#elif defined(MAC_OS_pre_X)
|
||||
#elif defined(MAC_OS_pre_X) || defined(VXWORKS)
|
||||
tty=stdin;
|
||||
#else
|
||||
#ifndef MPE
|
||||
@@ -366,7 +372,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||
|
||||
error:
|
||||
fprintf(stderr,"\n");
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
perror("fgets(tty)");
|
||||
#endif
|
||||
/* What can we do if there is an error? */
|
||||
|
||||
@@ -204,6 +204,7 @@ void ERR_load_DH_strings(void);
|
||||
#define DH_F_DH_NEW 105
|
||||
|
||||
/* Reason codes. */
|
||||
#define DH_R_BAD_GENERATOR 101
|
||||
#define DH_R_NO_PRIVATE_VALUE 100
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/dh/dh_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
|
||||
@@ -77,6 +77,7 @@ static ERR_STRING_DATA DH_str_functs[]=
|
||||
|
||||
static ERR_STRING_DATA DH_str_reasons[]=
|
||||
{
|
||||
{DH_R_BAD_GENERATOR ,"bad generator"},
|
||||
{DH_R_NO_PRIVATE_VALUE ,"no private value"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -82,7 +82,10 @@
|
||||
* Since DH should be using a safe prime (both p and q are prime),
|
||||
* this generator function can take a very very long time to run.
|
||||
*/
|
||||
|
||||
/* Actually there is no reason to insist that 'generator' be a generator.
|
||||
* It's just as OK (and in some sense better) to use a generator of the
|
||||
* order-q subgroup.
|
||||
*/
|
||||
DH *DH_generate_parameters(int prime_len, int generator,
|
||||
void (*callback)(int,int,void *), void *cb_arg)
|
||||
{
|
||||
@@ -100,30 +103,43 @@ DH *DH_generate_parameters(int prime_len, int generator,
|
||||
t2 = BN_CTX_get(ctx);
|
||||
if (t1 == NULL || t2 == NULL) goto err;
|
||||
|
||||
if (generator <= 1)
|
||||
{
|
||||
DHerr(DH_F_DH_GENERATE_PARAMETERS, DH_R_BAD_GENERATOR);
|
||||
goto err;
|
||||
}
|
||||
if (generator == DH_GENERATOR_2)
|
||||
{
|
||||
BN_set_word(t1,24);
|
||||
BN_set_word(t2,11);
|
||||
if (!BN_set_word(t1,24)) goto err;
|
||||
if (!BN_set_word(t2,11)) goto err;
|
||||
g=2;
|
||||
}
|
||||
#ifdef undef /* does not work for safe primes */
|
||||
#if 0 /* does not work for safe primes */
|
||||
else if (generator == DH_GENERATOR_3)
|
||||
{
|
||||
BN_set_word(t1,12);
|
||||
BN_set_word(t2,5);
|
||||
if (!BN_set_word(t1,12)) goto err;
|
||||
if (!BN_set_word(t2,5)) goto err;
|
||||
g=3;
|
||||
}
|
||||
#endif
|
||||
else if (generator == DH_GENERATOR_5)
|
||||
{
|
||||
BN_set_word(t1,10);
|
||||
BN_set_word(t2,3);
|
||||
if (!BN_set_word(t1,10)) goto err;
|
||||
if (!BN_set_word(t2,3)) goto err;
|
||||
/* BN_set_word(t3,7); just have to miss
|
||||
* out on these ones :-( */
|
||||
g=5;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* in the general case, don't worry if 'generator' is a
|
||||
* generator or not: since we are using safe primes,
|
||||
* it will generate either an order-q or an order-2q group,
|
||||
* which both is OK */
|
||||
if (!BN_set_word(t1,2)) goto err;
|
||||
if (!BN_set_word(t2,1)) goto err;
|
||||
g=generator;
|
||||
}
|
||||
|
||||
p=BN_generate_prime(NULL,prime_len,1,t1,t2,callback,cb_arg);
|
||||
if (p == NULL) goto err;
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#ifdef NO_DH
|
||||
int main(int argc, char *argv[])
|
||||
@@ -112,6 +113,16 @@ int main(int argc, char *argv[])
|
||||
a=DH_generate_parameters(64,DH_GENERATOR_5,cb,out);
|
||||
if (a == NULL) goto err;
|
||||
|
||||
if (!DH_check(a, &i)) goto err;
|
||||
if (i & DH_CHECK_P_NOT_PRIME)
|
||||
BIO_puts(out, "p value is not prime\n");
|
||||
if (i & DH_CHECK_P_NOT_SAFE_PRIME)
|
||||
BIO_puts(out, "p value is not a safe prime\n");
|
||||
if (i & DH_UNABLE_TO_CHECK_GENERATOR)
|
||||
BIO_puts(out, "unable to check the generator value\n");
|
||||
if (i & DH_NOT_SUITABLE_GENERATOR)
|
||||
BIO_puts(out, "the g value is not a generator\n");
|
||||
|
||||
BIO_puts(out,"\np =");
|
||||
BN_print(out,a->p);
|
||||
BIO_puts(out,"\ng =");
|
||||
@@ -170,6 +181,8 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
ret=0;
|
||||
err:
|
||||
ERR_print_errors_fp(stderr);
|
||||
|
||||
if (abuf != NULL) OPENSSL_free(abuf);
|
||||
if (bbuf != NULL) OPENSSL_free(bbuf);
|
||||
if(b != NULL) DH_free(b);
|
||||
|
||||
@@ -84,6 +84,7 @@ DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, unsigned char **pp, long length)
|
||||
if ((ret->s=BN_bin2bn(bs->data,bs->length,ret->s)) == NULL)
|
||||
goto err_bn;
|
||||
M_ASN1_BIT_STRING_free(bs);
|
||||
bs = NULL;
|
||||
M_ASN1_D2I_Finish_2(a);
|
||||
|
||||
err_bn:
|
||||
|
||||
@@ -112,7 +112,7 @@ DSO_METHOD *DSO_METHOD_dlfcn(void)
|
||||
* as we don't have autoconf yet, I'm implementing a hack that could
|
||||
* be hacked further relatively easily to deal with cases as we find
|
||||
* them. Initially this is to cope with OpenBSD. */
|
||||
#ifdef __OpenBSD__
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
# ifdef DL_LAZY
|
||||
# define DLOPEN_FLAG DL_LAZY
|
||||
# else
|
||||
|
||||
@@ -211,7 +211,7 @@ ascii2ebcdic(void *dest, const void *srce, size_t count)
|
||||
}
|
||||
|
||||
#else /*CHARSET_EBCDIC*/
|
||||
#if defined(PEDANTIC) || defined(VMS) || defined(__VMS)
|
||||
#if defined(PEDANTIC) || defined(VMS) || defined(__VMS) || defined(_DARWIN)
|
||||
static void *dummy=&dummy;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/engine.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
@@ -195,9 +196,9 @@ int main(int argc, char *argv[])
|
||||
for(loop = 0; loop < 512; loop++)
|
||||
{
|
||||
sprintf(buf, "id%i", loop);
|
||||
id = strdup(buf);
|
||||
id = BUF_strdup(buf);
|
||||
sprintf(buf, "Fake engine type %i", loop);
|
||||
name = strdup(buf);
|
||||
name = BUF_strdup(buf);
|
||||
if(((block[loop] = ENGINE_new()) == NULL) ||
|
||||
!ENGINE_set_id(block[loop], id) ||
|
||||
!ENGINE_set_name(block[loop], name))
|
||||
|
||||
@@ -81,17 +81,18 @@ typedef int pid_t;
|
||||
#include "vendor_defns/aep.h"
|
||||
#endif
|
||||
|
||||
static int aep_init(void);
|
||||
static int aep_finish(void);
|
||||
|
||||
static int aep_init();
|
||||
static int aep_finish();
|
||||
static AEP_RV aep_get_connection(AEP_CONNECTION_HNDL_PTR hConnection);
|
||||
static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection);
|
||||
static AEP_RV aep_close_connection(AEP_CONNECTION_HNDL hConnection);
|
||||
static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use);
|
||||
|
||||
/* BIGNUM stuff */
|
||||
static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx);
|
||||
static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
|
||||
static AEP_RV aep_mod_exp_crt(BIGNUM *r, BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *q,
|
||||
const BIGNUM *dmp1, const BIGNUM *dmq1,
|
||||
const BIGNUM *iqmp, BN_CTX *ctx);
|
||||
@@ -239,6 +240,8 @@ static AEP_U8 rand_block[RAND_BLK_SIZE];
|
||||
static AEP_U32 rand_block_bytes = 0;
|
||||
#endif
|
||||
|
||||
static int max_key_len = 2176;
|
||||
|
||||
|
||||
/* As this is only ever called once, there's no need for locking
|
||||
* (indeed - the lock will already be held by our caller!!!) */
|
||||
@@ -331,7 +334,7 @@ static t_AEP_Finalize *p_AEP_Finalize = NULL;
|
||||
static t_AEP_SetBNCallBacks *p_AEP_SetBNCallBacks = NULL;
|
||||
|
||||
/* (de)initialisation functions. */
|
||||
static int aep_init()
|
||||
static int aep_init(void)
|
||||
{
|
||||
t_AEP_ModExp *p1;
|
||||
t_AEP_ModExpCrt *p2;
|
||||
@@ -416,7 +419,7 @@ static int aep_init()
|
||||
|
||||
}
|
||||
|
||||
static int aep_finish()
|
||||
static int aep_finish(void)
|
||||
{
|
||||
int to_return = 0, in_use;
|
||||
AEP_RV rv;
|
||||
@@ -474,15 +477,31 @@ static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx)
|
||||
{
|
||||
int to_return = 0;
|
||||
|
||||
int r_len = 0;
|
||||
AEP_CONNECTION_HNDL hConnection;
|
||||
AEP_RV rv;
|
||||
|
||||
r_len = BN_num_bits(m);
|
||||
|
||||
/* Perform in software if modulus is too large for hardware. */
|
||||
|
||||
if (r_len > max_key_len)
|
||||
{
|
||||
ENGINE *e;
|
||||
e = ENGINE_openssl();
|
||||
to_return = e->bn_mod_exp(r, a, p, m, ctx);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*Grab a connection from the pool*/
|
||||
rv = aep_get_connection(&hConnection);
|
||||
if (rv != AEP_R_OK)
|
||||
{
|
||||
{
|
||||
ENGINE *e;
|
||||
ENGINEerr(ENGINE_F_AEP_MOD_EXP,ENGINE_R_GET_HANDLE_FAILED);
|
||||
|
||||
e = ENGINE_openssl();
|
||||
to_return = e->bn_mod_exp(r, a, p, m, ctx);
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -491,8 +510,15 @@ static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
|
||||
if (rv != AEP_R_OK)
|
||||
{
|
||||
ENGINE *e;
|
||||
|
||||
aep_close_connection(hConnection);
|
||||
|
||||
ENGINEerr(ENGINE_F_AEP_MOD_EXP,ENGINE_R_MOD_EXP_FAILED);
|
||||
rv = aep_return_connection(hConnection);
|
||||
|
||||
e = ENGINE_openssl();
|
||||
to_return = e->bn_mod_exp(r, a, p, m, ctx);
|
||||
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -501,7 +527,7 @@ static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
if (rv != AEP_R_OK)
|
||||
{
|
||||
ENGINEerr(ENGINE_F_AEP_RAND,ENGINE_R_RETURN_CONNECTION_FAILED);
|
||||
goto err;
|
||||
goto err;
|
||||
}
|
||||
|
||||
to_return = 1;
|
||||
@@ -509,7 +535,7 @@ static int aep_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
return to_return;
|
||||
}
|
||||
|
||||
static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
|
||||
static AEP_RV aep_mod_exp_crt(BIGNUM *r, BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *q ,
|
||||
const BIGNUM *dmp1,const BIGNUM *dmq1,
|
||||
const BIGNUM *iqmp, BN_CTX *ctx)
|
||||
@@ -517,11 +543,30 @@ static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
|
||||
AEP_RV rv = AEP_R_OK;
|
||||
AEP_CONNECTION_HNDL hConnection;
|
||||
|
||||
/* Perform in software if modulus is too large for hardware. */
|
||||
|
||||
if (BN_num_bits(p) > max_key_len || BN_num_bits(q) > max_key_len){
|
||||
ENGINE *e;
|
||||
e = ENGINE_openssl();
|
||||
rv = e->bn_mod_exp_crt(r, a, p, q, dmp1, dmq1, iqmp, ctx);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*Grab a connection from the pool*/
|
||||
rv = aep_get_connection(&hConnection);
|
||||
if (rv != AEP_R_OK)
|
||||
{
|
||||
ENGINE *e;
|
||||
|
||||
ENGINEerr(ENGINE_F_AEP_MOD_EXP_CRT,ENGINE_R_GET_HANDLE_FAILED);
|
||||
|
||||
e = ENGINE_openssl();
|
||||
|
||||
if (e->bn_mod_exp_crt(r, a, p, q, dmp1, dmq1, iqmp, ctx) > 0)
|
||||
rv = AEP_R_OK;
|
||||
else
|
||||
rv = AEP_R_GENERAL_ERROR;
|
||||
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -529,11 +574,22 @@ static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
|
||||
rv = p_AEP_ModExpCrt(hConnection,(void*)a, (void*)p, (void*)q, (void*)dmp1,(void*)dmq1,
|
||||
(void*)iqmp,(void*)r,NULL);
|
||||
if (rv != AEP_R_OK)
|
||||
{
|
||||
{
|
||||
ENGINE *e;
|
||||
|
||||
aep_close_connection(hConnection);
|
||||
|
||||
ENGINEerr(ENGINE_F_AEP_MOD_EXP_CRT,ENGINE_R_MOD_EXP_CRT_FAILED);
|
||||
rv = aep_return_connection(hConnection);
|
||||
|
||||
e = ENGINE_openssl();
|
||||
|
||||
if (e->bn_mod_exp_crt(r, a, p, q, dmp1, dmq1, iqmp, ctx) > 0)
|
||||
rv = AEP_R_OK;
|
||||
else
|
||||
rv = AEP_R_GENERAL_ERROR;
|
||||
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/*Return the connection to the pool*/
|
||||
rv = aep_return_connection(hConnection);
|
||||
@@ -546,7 +602,6 @@ static AEP_RV aep_mod_exp_crt(BIGNUM *r, const BIGNUM *a,
|
||||
err:
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
#ifdef AEPRAND
|
||||
static int aep_rand(unsigned char *buf,int len )
|
||||
@@ -646,7 +701,7 @@ static int aep_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
|
||||
{
|
||||
rv = aep_mod_exp_crt(r0,I,rsa->p,rsa->q, rsa->dmp1,rsa->dmq1,rsa->iqmp,ctx);
|
||||
if (rv != AEP_R_OK)
|
||||
goto err;
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -837,7 +892,6 @@ static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection)
|
||||
/*Find the connection item that matches this connection handle*/
|
||||
for(count = 0;count < MAX_PROCESS_CONNECTIONS;count ++)
|
||||
{
|
||||
|
||||
if (aep_app_conn_table[count].conn_hndl == hConnection)
|
||||
{
|
||||
aep_app_conn_table[count].conn_state = Connected;
|
||||
@@ -850,10 +904,36 @@ static AEP_RV aep_return_connection(AEP_CONNECTION_HNDL hConnection)
|
||||
return AEP_R_OK;
|
||||
}
|
||||
|
||||
static AEP_RV aep_close_connection(AEP_CONNECTION_HNDL hConnection)
|
||||
{
|
||||
int count;
|
||||
AEP_RV rv = AEP_R_OK;
|
||||
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||
|
||||
/*Find the connection item that matches this connection handle*/
|
||||
for(count = 0;count < MAX_PROCESS_CONNECTIONS;count ++)
|
||||
{
|
||||
if (aep_app_conn_table[count].conn_hndl == hConnection)
|
||||
{
|
||||
rv = p_AEP_CloseConnection(aep_app_conn_table[count].conn_hndl);
|
||||
if (rv != AEP_R_OK)
|
||||
goto end;
|
||||
aep_app_conn_table[count].conn_state = NotConnected;
|
||||
aep_app_conn_table[count].conn_hndl = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
||||
return AEP_R_OK;
|
||||
}
|
||||
|
||||
static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use)
|
||||
{
|
||||
int count;
|
||||
AEP_RV rv;
|
||||
AEP_RV rv = AEP_R_OK;
|
||||
|
||||
*in_use = 0;
|
||||
if (use_engine_lock) CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
||||
@@ -864,7 +944,7 @@ static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use)
|
||||
case Connected:
|
||||
rv = p_AEP_CloseConnection(aep_app_conn_table[count].conn_hndl);
|
||||
if (rv != AEP_R_OK)
|
||||
return rv;
|
||||
goto end;
|
||||
aep_app_conn_table[count].conn_state = NotConnected;
|
||||
aep_app_conn_table[count].conn_hndl = 0;
|
||||
break;
|
||||
@@ -875,12 +955,13 @@ static AEP_RV aep_close_all_connections(int use_engine_lock, int *in_use)
|
||||
break;
|
||||
}
|
||||
}
|
||||
end:
|
||||
if (use_engine_lock) CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
||||
return AEP_R_OK;
|
||||
}
|
||||
|
||||
/*BigNum call back functions, used to convert OpenSSL bignums into AEP bignums.
|
||||
Note only 32bit Openssl build support*/
|
||||
Note only 32bit Openssl build support*/
|
||||
|
||||
static AEP_RV GetBigNumSize(AEP_VOID_PTR ArbBigNum, AEP_U32* BigNumSize)
|
||||
{
|
||||
@@ -892,7 +973,8 @@ static AEP_RV GetBigNumSize(AEP_VOID_PTR ArbBigNum, AEP_U32* BigNumSize)
|
||||
#ifdef SIXTY_FOUR_BIT_LONG
|
||||
*BigNumSize = bn->top << 3;
|
||||
#else
|
||||
/*Size of the bignum in bytes is equal to the bn->top (no of 32 bit words) multiplies by 4*/
|
||||
/*Size of the bignum in bytes is equal to the bn->top (no of 32 bit
|
||||
words) multiplies by 4*/
|
||||
*BigNumSize = bn->top << 2;
|
||||
#endif
|
||||
|
||||
@@ -921,7 +1003,8 @@ static AEP_RV MakeAEPBigNum(AEP_VOID_PTR ArbBigNum, AEP_U32 BigNumSize,
|
||||
{
|
||||
buf = (unsigned char*)&bn->d[i];
|
||||
|
||||
*((AEP_U32*)AEP_BigNum) = (AEP_U32) ((unsigned) buf[1] << 8 | buf[0]) |
|
||||
*((AEP_U32*)AEP_BigNum) = (AEP_U32)
|
||||
((unsigned) buf[1] << 8 | buf[0]) |
|
||||
((unsigned) buf[3] << 8 | buf[2]) << 16;
|
||||
|
||||
AEP_BigNum += 4;
|
||||
@@ -959,7 +1042,8 @@ static AEP_RV ConvertAEPBigNum(void* ArbBigNum, AEP_U32 BigNumSize,
|
||||
|
||||
for(i=0;i<bn->top;i++)
|
||||
{
|
||||
bn->d[i] = (AEP_U32) ((unsigned) AEP_BigNum[3] << 8 | AEP_BigNum[2]) << 16 |
|
||||
bn->d[i] = (AEP_U32)
|
||||
((unsigned) AEP_BigNum[3] << 8 | AEP_BigNum[2]) << 16 |
|
||||
((unsigned) AEP_BigNum[1] << 8 | AEP_BigNum[0]);
|
||||
AEP_BigNum += 4;
|
||||
}
|
||||
|
||||
@@ -1005,13 +1005,13 @@ static int hwcrhk_get_pass(const char *prompt_info,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hwcrhk_log_message(void *logstream, const char *message)
|
||||
static void hwcrhk_log_message(void *_logstream, const char *message)
|
||||
{
|
||||
BIO *lstream = NULL;
|
||||
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_BIO);
|
||||
if (logstream)
|
||||
lstream=*(BIO **)logstream;
|
||||
if (_logstream)
|
||||
lstream=*(BIO **)_logstream;
|
||||
if (lstream)
|
||||
{
|
||||
BIO_write(lstream, message, strlen(message));
|
||||
|
||||
@@ -92,8 +92,10 @@ static EVP_PKEY *surewarehk_load_pubkey(const char *key_id,
|
||||
const char *passphrase);
|
||||
static void surewarehk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
|
||||
int index,long argl, void *argp);
|
||||
#if 0
|
||||
static void surewarehk_dh_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
|
||||
int index,long argl, void *argp);
|
||||
#endif
|
||||
|
||||
/* This function is aliased to mod_exp (with the mont stuff dropped). */
|
||||
static int surewarehk_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
@@ -570,7 +572,9 @@ static EVP_PKEY* sureware_load_public(const char *key_id,char *hptr,unsigned lon
|
||||
if (!rsatmp->e || rsatmp->e->dmax!=(int)(el/sizeof(BN_ULONG))||
|
||||
!rsatmp->n || rsatmp->n->dmax!=(int)(el/sizeof(BN_ULONG)))
|
||||
goto err;
|
||||
ret=p_surewarehk_Load_Rsa_Pubkey(msg,key_id,el,rsatmp->n->d, rsatmp->e->d);
|
||||
ret=p_surewarehk_Load_Rsa_Pubkey(msg,key_id,el,
|
||||
(unsigned long *)rsatmp->n->d,
|
||||
(unsigned long *)rsatmp->e->d);
|
||||
surewarehk_error_handling(msg,ENGINE_F_SUREWAREHK_LOAD_PUBLIC_KEY,ret);
|
||||
if (ret!=1)
|
||||
{
|
||||
@@ -608,10 +612,10 @@ static EVP_PKEY* sureware_load_public(const char *key_id,char *hptr,unsigned lon
|
||||
goto err;
|
||||
|
||||
ret=p_surewarehk_Load_Dsa_Pubkey(msg,key_id,el,
|
||||
dsatmp->pub_key->d,
|
||||
dsatmp->p->d,
|
||||
dsatmp->q->d,
|
||||
dsatmp->g->d);
|
||||
(unsigned long *)dsatmp->pub_key->d,
|
||||
(unsigned long *)dsatmp->p->d,
|
||||
(unsigned long *)dsatmp->q->d,
|
||||
(unsigned long *)dsatmp->g->d);
|
||||
surewarehk_error_handling(msg,ENGINE_F_SUREWAREHK_LOAD_PUBLIC_KEY,ret);
|
||||
if (ret!=1)
|
||||
{
|
||||
@@ -715,6 +719,8 @@ static void surewarehk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
|
||||
else
|
||||
p_surewarehk_Free((char *)item,0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* This cleans up an DH KM key (destroys the key into hardware),
|
||||
called when ex_data is freed */
|
||||
static void surewarehk_dh_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
|
||||
@@ -727,6 +733,8 @@ static void surewarehk_dh_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad,
|
||||
else
|
||||
p_surewarehk_Free((char *)item,1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* return number of decrypted bytes
|
||||
*/
|
||||
@@ -860,7 +868,10 @@ static DSA_SIG * surewarehk_dsa_do_sign(const unsigned char *from, int flen, DSA
|
||||
if (!psign->r || psign->r->dmax!=20/sizeof(BN_ULONG) ||
|
||||
!psign->s || psign->s->dmax!=20/sizeof(BN_ULONG))
|
||||
goto err;
|
||||
ret=p_surewarehk_Dsa_Sign(msg,flen,from,psign->r->d,psign->s->d,hptr);
|
||||
ret=p_surewarehk_Dsa_Sign(msg,flen,from,
|
||||
(unsigned long *)psign->r->d,
|
||||
(unsigned long *)psign->s->d,
|
||||
hptr);
|
||||
surewarehk_error_handling(msg,ENGINE_F_SUREWAREHK_DSA_DO_SIGN,ret);
|
||||
}
|
||||
psign->r->top=20/sizeof(BN_ULONG);
|
||||
@@ -891,8 +902,14 @@ static int surewarehk_modexp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
||||
if (r && r->dmax==m->top)
|
||||
{
|
||||
/* do it*/
|
||||
ret=p_surewarehk_Mod_Exp(msg,m->top*sizeof(BN_ULONG),m->d,p->top*sizeof(BN_ULONG),
|
||||
p->d,a->top*sizeof(BN_ULONG),a->d,r->d);
|
||||
ret=p_surewarehk_Mod_Exp(msg,
|
||||
m->top*sizeof(BN_ULONG),
|
||||
(unsigned long *)m->d,
|
||||
p->top*sizeof(BN_ULONG),
|
||||
(unsigned long *)p->d,
|
||||
a->top*sizeof(BN_ULONG),
|
||||
(unsigned long *)a->d,
|
||||
(unsigned long *)r->d);
|
||||
surewarehk_error_handling(msg,ENGINE_F_SUREWAREHK_MOD_EXP,ret);
|
||||
if (ret==1)
|
||||
{
|
||||
|
||||
@@ -92,22 +92,21 @@ err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
err_all.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
err_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
err_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
err_all.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
err_all.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
err_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/pem2.h
|
||||
err_all.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
|
||||
err_all.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
err_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
err_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
err_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
err_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
err_all.o: ../../include/openssl/x509v3.h
|
||||
err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
||||
err_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
err_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
err_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
err_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
err_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
err_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h
|
||||
err_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
err_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
err_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
err_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
err_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
err_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
err_prn.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
err_prn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
|
||||
err_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
|
||||
@@ -106,8 +106,8 @@ static int enc_new(BIO *bi)
|
||||
BIO_ENC_CTX *ctx;
|
||||
|
||||
ctx=(BIO_ENC_CTX *)OPENSSL_malloc(sizeof(BIO_ENC_CTX));
|
||||
EVP_CIPHER_CTX_init(&ctx->cipher);
|
||||
if (ctx == NULL) return(0);
|
||||
EVP_CIPHER_CTX_init(&ctx->cipher);
|
||||
|
||||
ctx->buf_len=0;
|
||||
ctx->buf_off=0;
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
|
||||
void OpenSSL_add_all_ciphers(void)
|
||||
{
|
||||
static int done=0;
|
||||
|
||||
if (done) return;
|
||||
done=1;
|
||||
#ifndef NO_DES
|
||||
EVP_add_cipher(EVP_des_cfb());
|
||||
EVP_add_cipher(EVP_des_ede_cfb());
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
|
||||
void OpenSSL_add_all_digests(void)
|
||||
{
|
||||
static int done=0;
|
||||
|
||||
if (done) return;
|
||||
done=1;
|
||||
#ifndef NO_MD2
|
||||
EVP_add_digest(EVP_md2());
|
||||
#endif
|
||||
|
||||
@@ -277,6 +277,13 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
||||
eof++;
|
||||
}
|
||||
|
||||
if (v == B64_CR)
|
||||
{
|
||||
ln = 0;
|
||||
if (exp_nl)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* eoln */
|
||||
if (v == B64_EOLN)
|
||||
{
|
||||
|
||||
@@ -228,7 +228,7 @@ typedef struct evp_pkey_md_st
|
||||
EVP_rsa_octet_string(),EVP_mdc2())
|
||||
#define EVP_dsa_sha() \
|
||||
EVP_PKEY_MD_add(NID_dsaWithSHA,\
|
||||
EVP_dsa(),EVP_mdc2())
|
||||
EVP_dsa(),EVP_sha())
|
||||
#define EVP_dsa_sha1() \
|
||||
EVP_PKEY_MD_add(NID_dsaWithSHA1,\
|
||||
EVP_dsa(),EVP_sha1())
|
||||
|
||||
@@ -75,7 +75,6 @@ main()
|
||||
buf[0]='\0';
|
||||
fgets(buf,256,stdin);
|
||||
if (buf[0] == '\0') break;
|
||||
buf[256]='\0';
|
||||
i=strlen(buf);
|
||||
p=OPENSSL_malloc(i+1);
|
||||
memcpy(p,buf,i+1);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# SSLeay/crypto/md/Makefile
|
||||
#
|
||||
|
||||
DIR= md
|
||||
DIR= md2
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
INCLUDES=
|
||||
|
||||
@@ -61,6 +61,8 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
|
||||
{
|
||||
MemCheck_off();
|
||||
name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS));
|
||||
MemCheck_on();
|
||||
if (!name_funcs) return(0);
|
||||
name_funcs->hash_func = lh_strhash;
|
||||
name_funcs->cmp_func = (int (*)())strcmp;
|
||||
name_funcs->free_func = 0; /* NULL is often declared to
|
||||
@@ -68,6 +70,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
|
||||
* to Compaq C is not really
|
||||
* compatible with a function
|
||||
* pointer. -- Richard Levitte*/
|
||||
MemCheck_off();
|
||||
sk_NAME_FUNCS_push(name_funcs_stack,name_funcs);
|
||||
MemCheck_on();
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ int OBJ_add_object(ASN1_OBJECT *obj)
|
||||
if (added == NULL)
|
||||
if (!init_added()) return(0);
|
||||
if ((o=OBJ_dup(obj)) == NULL) goto err;
|
||||
ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ));
|
||||
if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err;
|
||||
if ((o->length != 0) && (obj->data != NULL))
|
||||
ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ));
|
||||
if (o->sn != NULL)
|
||||
@@ -428,7 +428,7 @@ int OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *a, int no_name)
|
||||
unsigned long l;
|
||||
unsigned char *p;
|
||||
const char *s;
|
||||
char tbuf[32];
|
||||
char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2];
|
||||
|
||||
if (buf_len <= 0) return(0);
|
||||
|
||||
@@ -437,8 +437,7 @@ int OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *a, int no_name)
|
||||
return(0);
|
||||
}
|
||||
|
||||
nid=OBJ_obj2nid(a);
|
||||
if ((nid == NID_undef) || no_name) {
|
||||
if (no_name || (nid=OBJ_obj2nid(a)) == NID_undef) {
|
||||
len=a->length;
|
||||
p=a->data;
|
||||
|
||||
@@ -645,6 +644,8 @@ int OBJ_create(char *oid, char *sn, char *ln)
|
||||
return(0);
|
||||
}
|
||||
i=a2d_ASN1_OBJECT(buf,i,oid,-1);
|
||||
if (i == 0)
|
||||
goto err;
|
||||
op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln);
|
||||
if (op == NULL)
|
||||
goto err;
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
*/
|
||||
|
||||
#define NUM_NID 404
|
||||
#define NUM_SN 403
|
||||
#define NUM_LN 403
|
||||
#define NUM_OBJ 377
|
||||
#define NUM_SN 402
|
||||
#define NUM_LN 402
|
||||
#define NUM_OBJ 376
|
||||
|
||||
static unsigned char lvalues[2949]={
|
||||
static unsigned char lvalues[2951]={
|
||||
0x00, /* [ 0] OBJ_undef */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
|
||||
@@ -391,60 +391,59 @@ static unsigned char lvalues[2949]={
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x08,0x01, /* [2583] OBJ_id_on_personalData */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x01, /* [2591] OBJ_id_pda_dateOfBirth */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x02, /* [2599] OBJ_id_pda_placeOfBirth */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x03, /* [2607] OBJ_id_pda_pseudonym */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x04, /* [2615] OBJ_id_pda_gender */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x05, /* [2623] OBJ_id_pda_countryOfCitizenship */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x06, /* [2631] OBJ_id_pda_countryOfResidence */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x01, /* [2639] OBJ_id_aca_authenticationInfo */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x02, /* [2647] OBJ_id_aca_accessIdentity */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x03, /* [2655] OBJ_id_aca_chargingIdentity */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x04, /* [2663] OBJ_id_aca_group */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x05, /* [2671] OBJ_id_aca_role */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0B,0x01, /* [2679] OBJ_id_qcs_pkixQCSyntax_v1 */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x01, /* [2687] OBJ_id_cct_crs */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x02, /* [2695] OBJ_id_cct_PKIData */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x03, /* [2703] OBJ_id_cct_PKIResponse */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x03, /* [2711] OBJ_ad_timeStamping */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x04, /* [2719] OBJ_ad_dvcs */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x01,/* [2727] OBJ_id_pkix_OCSP_basic */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x02,/* [2736] OBJ_id_pkix_OCSP_Nonce */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x03,/* [2745] OBJ_id_pkix_OCSP_CrlID */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x04,/* [2754] OBJ_id_pkix_OCSP_acceptableResponses */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x05,/* [2763] OBJ_id_pkix_OCSP_noCheck */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x06,/* [2772] OBJ_id_pkix_OCSP_archiveCutoff */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x07,/* [2781] OBJ_id_pkix_OCSP_serviceLocator */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x08,/* [2790] OBJ_id_pkix_OCSP_extendedStatus */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x09,/* [2799] OBJ_id_pkix_OCSP_valid */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0A,/* [2808] OBJ_id_pkix_OCSP_path */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0B,/* [2817] OBJ_id_pkix_OCSP_trustRoot */
|
||||
0x2B,0x0E,0x03,0x02, /* [2826] OBJ_algorithm */
|
||||
0x2B,0x0E,0x03,0x02,0x0B, /* [2830] OBJ_rsaSignature */
|
||||
0x55,0x08, /* [2835] OBJ_X500algorithms */
|
||||
0x2B, /* [2837] OBJ_org */
|
||||
0x2B,0x06, /* [2838] OBJ_dod */
|
||||
0x2B,0x06,0x01, /* [2840] OBJ_iana */
|
||||
0x2B,0x06,0x01,0x01, /* [2843] OBJ_Directory */
|
||||
0x2B,0x06,0x01,0x02, /* [2847] OBJ_Management */
|
||||
0x2B,0x06,0x01,0x03, /* [2851] OBJ_Experimental */
|
||||
0x2B,0x06,0x01,0x04, /* [2855] OBJ_Private */
|
||||
0x2B,0x06,0x01,0x05, /* [2859] OBJ_Security */
|
||||
0x2B,0x06,0x01,0x06, /* [2863] OBJ_SNMPv2 */
|
||||
0x2B,0x06,0x01,0x07, /* [2867] OBJ_Mail */
|
||||
0x01, /* [2871] OBJ_Enterprises */
|
||||
0xBA,0x82,0x58, /* [2872] OBJ_dcObject */
|
||||
0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,/* [2875] OBJ_domainComponent */
|
||||
0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0D,/* [2885] OBJ_Domain */
|
||||
0x50, /* [2895] OBJ_joint_iso_ccitt */
|
||||
0x55,0x01,0x05, /* [2896] OBJ_selected_attribute_types */
|
||||
0x55,0x01,0x05,0x37, /* [2899] OBJ_clearance */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x03,/* [2903] OBJ_md4WithRSAEncryption */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0A, /* [2912] OBJ_ac_proxying */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0B, /* [2920] OBJ_sinfo_access */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x06, /* [2928] OBJ_id_aca_encAttrs */
|
||||
0x55,0x04,0x48, /* [2936] OBJ_role */
|
||||
0x55,0x1D,0x24, /* [2939] OBJ_policy_constraints */
|
||||
0x55,0x1D,0x37, /* [2942] OBJ_target_information */
|
||||
0x55,0x1D,0x38, /* [2945] OBJ_no_rev_avail */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x03, /* [2607] OBJ_id_pda_gender */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x04, /* [2615] OBJ_id_pda_countryOfCitizenship */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x05, /* [2623] OBJ_id_pda_countryOfResidence */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x01, /* [2631] OBJ_id_aca_authenticationInfo */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x02, /* [2639] OBJ_id_aca_accessIdentity */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x03, /* [2647] OBJ_id_aca_chargingIdentity */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x04, /* [2655] OBJ_id_aca_group */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x05, /* [2663] OBJ_id_aca_role */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0B,0x01, /* [2671] OBJ_id_qcs_pkixQCSyntax_v1 */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x01, /* [2679] OBJ_id_cct_crs */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x02, /* [2687] OBJ_id_cct_PKIData */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x03, /* [2695] OBJ_id_cct_PKIResponse */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x03, /* [2703] OBJ_ad_timeStamping */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x04, /* [2711] OBJ_ad_dvcs */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x01,/* [2719] OBJ_id_pkix_OCSP_basic */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x02,/* [2728] OBJ_id_pkix_OCSP_Nonce */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x03,/* [2737] OBJ_id_pkix_OCSP_CrlID */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x04,/* [2746] OBJ_id_pkix_OCSP_acceptableResponses */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x05,/* [2755] OBJ_id_pkix_OCSP_noCheck */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x06,/* [2764] OBJ_id_pkix_OCSP_archiveCutoff */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x07,/* [2773] OBJ_id_pkix_OCSP_serviceLocator */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x08,/* [2782] OBJ_id_pkix_OCSP_extendedStatus */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x09,/* [2791] OBJ_id_pkix_OCSP_valid */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0A,/* [2800] OBJ_id_pkix_OCSP_path */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0B,/* [2809] OBJ_id_pkix_OCSP_trustRoot */
|
||||
0x2B,0x0E,0x03,0x02, /* [2818] OBJ_algorithm */
|
||||
0x2B,0x0E,0x03,0x02,0x0B, /* [2822] OBJ_rsaSignature */
|
||||
0x55,0x08, /* [2827] OBJ_X500algorithms */
|
||||
0x2B, /* [2829] OBJ_org */
|
||||
0x2B,0x06, /* [2830] OBJ_dod */
|
||||
0x2B,0x06,0x01, /* [2832] OBJ_iana */
|
||||
0x2B,0x06,0x01,0x01, /* [2835] OBJ_Directory */
|
||||
0x2B,0x06,0x01,0x02, /* [2839] OBJ_Management */
|
||||
0x2B,0x06,0x01,0x03, /* [2843] OBJ_Experimental */
|
||||
0x2B,0x06,0x01,0x04, /* [2847] OBJ_Private */
|
||||
0x2B,0x06,0x01,0x05, /* [2851] OBJ_Security */
|
||||
0x2B,0x06,0x01,0x06, /* [2855] OBJ_SNMPv2 */
|
||||
0x2B,0x06,0x01,0x07, /* [2859] OBJ_Mail */
|
||||
0x2B,0x06,0x01,0x04,0x01, /* [2863] OBJ_Enterprises */
|
||||
0x2B,0x06,0x01,0x04,0x01,0x8B,0x3A,0x82,0x58,/* [2868] OBJ_dcObject */
|
||||
0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,/* [2877] OBJ_domainComponent */
|
||||
0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0D,/* [2887] OBJ_Domain */
|
||||
0x50, /* [2897] OBJ_joint_iso_ccitt */
|
||||
0x55,0x01,0x05, /* [2898] OBJ_selected_attribute_types */
|
||||
0x55,0x01,0x05,0x37, /* [2901] OBJ_clearance */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x03,/* [2905] OBJ_md4WithRSAEncryption */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0A, /* [2914] OBJ_ac_proxying */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0B, /* [2922] OBJ_sinfo_access */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x06, /* [2930] OBJ_id_aca_encAttrs */
|
||||
0x55,0x04,0x48, /* [2938] OBJ_role */
|
||||
0x55,0x1D,0x24, /* [2941] OBJ_policy_constraints */
|
||||
0x55,0x1D,0x37, /* [2944] OBJ_target_information */
|
||||
0x55,0x1D,0x38, /* [2947] OBJ_no_rev_avail */
|
||||
};
|
||||
|
||||
static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
@@ -998,85 +997,84 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
&(lvalues[2591]),0},
|
||||
{"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth,
|
||||
8,&(lvalues[2599]),0},
|
||||
{"id-pda-pseudonym","id-pda-pseudonym",NID_id_pda_pseudonym,8,
|
||||
&(lvalues[2607]),0},
|
||||
{"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2615]),0},
|
||||
{NULL,NULL,NID_undef,0,NULL},
|
||||
{"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2607]),0},
|
||||
{"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship",
|
||||
NID_id_pda_countryOfCitizenship,8,&(lvalues[2623]),0},
|
||||
NID_id_pda_countryOfCitizenship,8,&(lvalues[2615]),0},
|
||||
{"id-pda-countryOfResidence","id-pda-countryOfResidence",
|
||||
NID_id_pda_countryOfResidence,8,&(lvalues[2631]),0},
|
||||
NID_id_pda_countryOfResidence,8,&(lvalues[2623]),0},
|
||||
{"id-aca-authenticationInfo","id-aca-authenticationInfo",
|
||||
NID_id_aca_authenticationInfo,8,&(lvalues[2639]),0},
|
||||
NID_id_aca_authenticationInfo,8,&(lvalues[2631]),0},
|
||||
{"id-aca-accessIdentity","id-aca-accessIdentity",
|
||||
NID_id_aca_accessIdentity,8,&(lvalues[2647]),0},
|
||||
NID_id_aca_accessIdentity,8,&(lvalues[2639]),0},
|
||||
{"id-aca-chargingIdentity","id-aca-chargingIdentity",
|
||||
NID_id_aca_chargingIdentity,8,&(lvalues[2655]),0},
|
||||
{"id-aca-group","id-aca-group",NID_id_aca_group,8,&(lvalues[2663]),0},
|
||||
{"id-aca-role","id-aca-role",NID_id_aca_role,8,&(lvalues[2671]),0},
|
||||
NID_id_aca_chargingIdentity,8,&(lvalues[2647]),0},
|
||||
{"id-aca-group","id-aca-group",NID_id_aca_group,8,&(lvalues[2655]),0},
|
||||
{"id-aca-role","id-aca-role",NID_id_aca_role,8,&(lvalues[2663]),0},
|
||||
{"id-qcs-pkixQCSyntax-v1","id-qcs-pkixQCSyntax-v1",
|
||||
NID_id_qcs_pkixQCSyntax_v1,8,&(lvalues[2679]),0},
|
||||
{"id-cct-crs","id-cct-crs",NID_id_cct_crs,8,&(lvalues[2687]),0},
|
||||
NID_id_qcs_pkixQCSyntax_v1,8,&(lvalues[2671]),0},
|
||||
{"id-cct-crs","id-cct-crs",NID_id_cct_crs,8,&(lvalues[2679]),0},
|
||||
{"id-cct-PKIData","id-cct-PKIData",NID_id_cct_PKIData,8,
|
||||
&(lvalues[2695]),0},
|
||||
&(lvalues[2687]),0},
|
||||
{"id-cct-PKIResponse","id-cct-PKIResponse",NID_id_cct_PKIResponse,8,
|
||||
&(lvalues[2703]),0},
|
||||
&(lvalues[2695]),0},
|
||||
{"ad_timestamping","AD Time Stamping",NID_ad_timeStamping,8,
|
||||
&(lvalues[2711]),0},
|
||||
{"AD_DVCS","ad dvcs",NID_ad_dvcs,8,&(lvalues[2719]),0},
|
||||
&(lvalues[2703]),0},
|
||||
{"AD_DVCS","ad dvcs",NID_ad_dvcs,8,&(lvalues[2711]),0},
|
||||
{"basicOCSPResponse","Basic OCSP Response",NID_id_pkix_OCSP_basic,9,
|
||||
&(lvalues[2727]),0},
|
||||
{"Nonce","OCSP Nonce",NID_id_pkix_OCSP_Nonce,9,&(lvalues[2736]),0},
|
||||
{"CrlID","OCSP CRL ID",NID_id_pkix_OCSP_CrlID,9,&(lvalues[2745]),0},
|
||||
&(lvalues[2719]),0},
|
||||
{"Nonce","OCSP Nonce",NID_id_pkix_OCSP_Nonce,9,&(lvalues[2728]),0},
|
||||
{"CrlID","OCSP CRL ID",NID_id_pkix_OCSP_CrlID,9,&(lvalues[2737]),0},
|
||||
{"acceptableResponses","Acceptable OCSP Responses",
|
||||
NID_id_pkix_OCSP_acceptableResponses,9,&(lvalues[2754]),0},
|
||||
{"noCheck","noCheck",NID_id_pkix_OCSP_noCheck,9,&(lvalues[2763]),0},
|
||||
NID_id_pkix_OCSP_acceptableResponses,9,&(lvalues[2746]),0},
|
||||
{"noCheck","noCheck",NID_id_pkix_OCSP_noCheck,9,&(lvalues[2755]),0},
|
||||
{"archiveCutoff","OCSP Archive Cutoff",NID_id_pkix_OCSP_archiveCutoff,
|
||||
9,&(lvalues[2772]),0},
|
||||
9,&(lvalues[2764]),0},
|
||||
{"serviceLocator","OCSP Service Locator",
|
||||
NID_id_pkix_OCSP_serviceLocator,9,&(lvalues[2781]),0},
|
||||
NID_id_pkix_OCSP_serviceLocator,9,&(lvalues[2773]),0},
|
||||
{"extendedStatus","Extended OCSP Status",
|
||||
NID_id_pkix_OCSP_extendedStatus,9,&(lvalues[2790]),0},
|
||||
{"valid","valid",NID_id_pkix_OCSP_valid,9,&(lvalues[2799]),0},
|
||||
{"path","path",NID_id_pkix_OCSP_path,9,&(lvalues[2808]),0},
|
||||
NID_id_pkix_OCSP_extendedStatus,9,&(lvalues[2782]),0},
|
||||
{"valid","valid",NID_id_pkix_OCSP_valid,9,&(lvalues[2791]),0},
|
||||
{"path","path",NID_id_pkix_OCSP_path,9,&(lvalues[2800]),0},
|
||||
{"trustRoot","Trust Root",NID_id_pkix_OCSP_trustRoot,9,
|
||||
&(lvalues[2817]),0},
|
||||
{"algorithm","algorithm",NID_algorithm,4,&(lvalues[2826]),0},
|
||||
{"rsaSignature","rsaSignature",NID_rsaSignature,5,&(lvalues[2830]),0},
|
||||
&(lvalues[2809]),0},
|
||||
{"algorithm","algorithm",NID_algorithm,4,&(lvalues[2818]),0},
|
||||
{"rsaSignature","rsaSignature",NID_rsaSignature,5,&(lvalues[2822]),0},
|
||||
{"X500algorithms","directory services - algorithms",
|
||||
NID_X500algorithms,2,&(lvalues[2835]),0},
|
||||
{"ORG","org",NID_org,1,&(lvalues[2837]),0},
|
||||
{"DOD","dod",NID_dod,2,&(lvalues[2838]),0},
|
||||
{"IANA","iana",NID_iana,3,&(lvalues[2840]),0},
|
||||
{"directory","Directory",NID_Directory,4,&(lvalues[2843]),0},
|
||||
{"mgmt","Management",NID_Management,4,&(lvalues[2847]),0},
|
||||
{"experimental","Experimental",NID_Experimental,4,&(lvalues[2851]),0},
|
||||
{"private","Private",NID_Private,4,&(lvalues[2855]),0},
|
||||
{"security","Security",NID_Security,4,&(lvalues[2859]),0},
|
||||
{"snmpv2","SNMPv2",NID_SNMPv2,4,&(lvalues[2863]),0},
|
||||
{"mail","Mail",NID_Mail,4,&(lvalues[2867]),0},
|
||||
{"enterprises","Enterprises",NID_Enterprises,1,&(lvalues[2871]),0},
|
||||
{"dcobject","dcObject",NID_dcObject,3,&(lvalues[2872]),0},
|
||||
{"DC","domainComponent",NID_domainComponent,10,&(lvalues[2875]),0},
|
||||
{"domain","Domain",NID_Domain,10,&(lvalues[2885]),0},
|
||||
NID_X500algorithms,2,&(lvalues[2827]),0},
|
||||
{"ORG","org",NID_org,1,&(lvalues[2829]),0},
|
||||
{"DOD","dod",NID_dod,2,&(lvalues[2830]),0},
|
||||
{"IANA","iana",NID_iana,3,&(lvalues[2832]),0},
|
||||
{"directory","Directory",NID_Directory,4,&(lvalues[2835]),0},
|
||||
{"mgmt","Management",NID_Management,4,&(lvalues[2839]),0},
|
||||
{"experimental","Experimental",NID_Experimental,4,&(lvalues[2843]),0},
|
||||
{"private","Private",NID_Private,4,&(lvalues[2847]),0},
|
||||
{"security","Security",NID_Security,4,&(lvalues[2851]),0},
|
||||
{"snmpv2","SNMPv2",NID_SNMPv2,4,&(lvalues[2855]),0},
|
||||
{"mail","Mail",NID_Mail,4,&(lvalues[2859]),0},
|
||||
{"enterprises","Enterprises",NID_Enterprises,5,&(lvalues[2863]),0},
|
||||
{"dcobject","dcObject",NID_dcObject,9,&(lvalues[2868]),0},
|
||||
{"DC","domainComponent",NID_domainComponent,10,&(lvalues[2877]),0},
|
||||
{"domain","Domain",NID_Domain,10,&(lvalues[2887]),0},
|
||||
{"JOINT-ISO-CCITT","joint-iso-ccitt",NID_joint_iso_ccitt,1,
|
||||
&(lvalues[2895]),0},
|
||||
&(lvalues[2897]),0},
|
||||
{"selected-attribute-types","Selected Attribute Types",
|
||||
NID_selected_attribute_types,3,&(lvalues[2896]),0},
|
||||
{"clearance","clearance",NID_clearance,4,&(lvalues[2899]),0},
|
||||
NID_selected_attribute_types,3,&(lvalues[2898]),0},
|
||||
{"clearance","clearance",NID_clearance,4,&(lvalues[2901]),0},
|
||||
{"RSA-MD4","md4WithRSAEncryption",NID_md4WithRSAEncryption,9,
|
||||
&(lvalues[2903]),0},
|
||||
{"ac-proxying","ac-proxying",NID_ac_proxying,8,&(lvalues[2912]),0},
|
||||
&(lvalues[2905]),0},
|
||||
{"ac-proxying","ac-proxying",NID_ac_proxying,8,&(lvalues[2914]),0},
|
||||
{"subjectInfoAccess","Subject Information Access",NID_sinfo_access,8,
|
||||
&(lvalues[2920]),0},
|
||||
&(lvalues[2922]),0},
|
||||
{"id-aca-encAttrs","id-aca-encAttrs",NID_id_aca_encAttrs,8,
|
||||
&(lvalues[2928]),0},
|
||||
{"role","role",NID_role,3,&(lvalues[2936]),0},
|
||||
&(lvalues[2930]),0},
|
||||
{"role","role",NID_role,3,&(lvalues[2938]),0},
|
||||
{"policyConstraints","X509v3 Policy Constraints",
|
||||
NID_policy_constraints,3,&(lvalues[2939]),0},
|
||||
NID_policy_constraints,3,&(lvalues[2941]),0},
|
||||
{"targetInformation","X509v3 AC Targeting",NID_target_information,3,
|
||||
&(lvalues[2942]),0},
|
||||
&(lvalues[2944]),0},
|
||||
{"noRevAvail","X509v3 No Revocation Available",NID_no_rev_avail,3,
|
||||
&(lvalues[2945]),0},
|
||||
&(lvalues[2947]),0},
|
||||
};
|
||||
|
||||
static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
@@ -1311,7 +1309,6 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[348]),/* "id-pda-dateOfBirth" */
|
||||
&(nid_objs[351]),/* "id-pda-gender" */
|
||||
&(nid_objs[349]),/* "id-pda-placeOfBirth" */
|
||||
&(nid_objs[350]),/* "id-pda-pseudonym" */
|
||||
&(nid_objs[175]),/* "id-pe" */
|
||||
&(nid_objs[261]),/* "id-pkip" */
|
||||
&(nid_objs[258]),/* "id-pkix-mod" */
|
||||
@@ -1703,7 +1700,6 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[348]),/* "id-pda-dateOfBirth" */
|
||||
&(nid_objs[351]),/* "id-pda-gender" */
|
||||
&(nid_objs[349]),/* "id-pda-placeOfBirth" */
|
||||
&(nid_objs[350]),/* "id-pda-pseudonym" */
|
||||
&(nid_objs[175]),/* "id-pe" */
|
||||
&(nid_objs[261]),/* "id-pkip" */
|
||||
&(nid_objs[258]),/* "id-pkix-mod" */
|
||||
@@ -1893,7 +1889,6 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
|
||||
static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[ 0]),/* OBJ_undef 0 */
|
||||
&(nid_objs[389]),/* OBJ_Enterprises 1 */
|
||||
&(nid_objs[181]),/* OBJ_iso 1 */
|
||||
&(nid_objs[182]),/* OBJ_member_body 1 2 */
|
||||
&(nid_objs[379]),/* OBJ_org 1 3 */
|
||||
@@ -1939,7 +1934,6 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[126]),/* OBJ_ext_key_usage 2 5 29 37 */
|
||||
&(nid_objs[402]),/* OBJ_target_information 2 5 29 55 */
|
||||
&(nid_objs[403]),/* OBJ_no_rev_avail 2 5 29 56 */
|
||||
&(nid_objs[390]),/* OBJ_dcObject 1466 344 */
|
||||
&(nid_objs[382]),/* OBJ_Directory 1 3 6 1 1 */
|
||||
&(nid_objs[383]),/* OBJ_Management 1 3 6 1 2 */
|
||||
&(nid_objs[384]),/* OBJ_Experimental 1 3 6 1 3 */
|
||||
@@ -1953,6 +1947,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */
|
||||
&(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */
|
||||
&(nid_objs[184]),/* OBJ_X9_57 1 2 840 10040 */
|
||||
&(nid_objs[389]),/* OBJ_Enterprises 1 3 6 1 4 1 */
|
||||
&(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */
|
||||
&(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */
|
||||
&(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */
|
||||
@@ -2090,10 +2085,9 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[347]),/* OBJ_id_on_personalData 1 3 6 1 5 5 7 8 1 */
|
||||
&(nid_objs[348]),/* OBJ_id_pda_dateOfBirth 1 3 6 1 5 5 7 9 1 */
|
||||
&(nid_objs[349]),/* OBJ_id_pda_placeOfBirth 1 3 6 1 5 5 7 9 2 */
|
||||
&(nid_objs[350]),/* OBJ_id_pda_pseudonym 1 3 6 1 5 5 7 9 3 */
|
||||
&(nid_objs[351]),/* OBJ_id_pda_gender 1 3 6 1 5 5 7 9 4 */
|
||||
&(nid_objs[352]),/* OBJ_id_pda_countryOfCitizenship 1 3 6 1 5 5 7 9 5 */
|
||||
&(nid_objs[353]),/* OBJ_id_pda_countryOfResidence 1 3 6 1 5 5 7 9 6 */
|
||||
&(nid_objs[351]),/* OBJ_id_pda_gender 1 3 6 1 5 5 7 9 3 */
|
||||
&(nid_objs[352]),/* OBJ_id_pda_countryOfCitizenship 1 3 6 1 5 5 7 9 4 */
|
||||
&(nid_objs[353]),/* OBJ_id_pda_countryOfResidence 1 3 6 1 5 5 7 9 5 */
|
||||
&(nid_objs[354]),/* OBJ_id_aca_authenticationInfo 1 3 6 1 5 5 7 10 1 */
|
||||
&(nid_objs[355]),/* OBJ_id_aca_accessIdentity 1 3 6 1 5 5 7 10 2 */
|
||||
&(nid_objs[356]),/* OBJ_id_aca_chargingIdentity 1 3 6 1 5 5 7 10 3 */
|
||||
@@ -2147,6 +2141,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[188]),/* OBJ_SMIME 1 2 840 113549 1 9 16 */
|
||||
&(nid_objs[156]),/* OBJ_friendlyName 1 2 840 113549 1 9 20 */
|
||||
&(nid_objs[157]),/* OBJ_localKeyID 1 2 840 113549 1 9 21 */
|
||||
&(nid_objs[390]),/* OBJ_dcObject 1 3 6 1 4 1 1466 344 */
|
||||
&(nid_objs[91]),/* OBJ_bf_cbc 1 3 6 1 4 1 3029 1 2 */
|
||||
&(nid_objs[315]),/* OBJ_id_regCtrl_regToken 1 3 6 1 5 5 7 5 1 1 */
|
||||
&(nid_objs[316]),/* OBJ_id_regCtrl_authenticator 1 3 6 1 5 5 7 5 1 2 */
|
||||
|
||||
@@ -1257,21 +1257,17 @@
|
||||
#define NID_id_pda_placeOfBirth 349
|
||||
#define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L
|
||||
|
||||
#define SN_id_pda_pseudonym "id-pda-pseudonym"
|
||||
#define NID_id_pda_pseudonym 350
|
||||
#define OBJ_id_pda_pseudonym OBJ_id_pda,3L
|
||||
|
||||
#define SN_id_pda_gender "id-pda-gender"
|
||||
#define NID_id_pda_gender 351
|
||||
#define OBJ_id_pda_gender OBJ_id_pda,4L
|
||||
#define OBJ_id_pda_gender OBJ_id_pda,3L
|
||||
|
||||
#define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship"
|
||||
#define NID_id_pda_countryOfCitizenship 352
|
||||
#define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,5L
|
||||
#define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,4L
|
||||
|
||||
#define SN_id_pda_countryOfResidence "id-pda-countryOfResidence"
|
||||
#define NID_id_pda_countryOfResidence 353
|
||||
#define OBJ_id_pda_countryOfResidence OBJ_id_pda,6L
|
||||
#define OBJ_id_pda_countryOfResidence OBJ_id_pda,5L
|
||||
|
||||
#define SN_id_aca_authenticationInfo "id-aca-authenticationInfo"
|
||||
#define NID_id_aca_authenticationInfo 354
|
||||
@@ -1821,12 +1817,12 @@
|
||||
#define SN_Enterprises "enterprises"
|
||||
#define LN_Enterprises "Enterprises"
|
||||
#define NID_Enterprises 389
|
||||
#define OBJ_Enterprises OBJ_private,1L
|
||||
#define OBJ_Enterprises OBJ_Private,1L
|
||||
|
||||
#define SN_dcObject "dcobject"
|
||||
#define LN_dcObject "dcObject"
|
||||
#define NID_dcObject 390
|
||||
#define OBJ_dcObject OBJ_enterprises,1466L,344L
|
||||
#define OBJ_dcObject OBJ_Enterprises,1466L,344L
|
||||
|
||||
#define SN_domainComponent "DC"
|
||||
#define LN_domainComponent "domainComponent"
|
||||
|
||||
@@ -208,6 +208,8 @@ sub process_oid
|
||||
if (!($a[0] =~ /^[0-9]+$/))
|
||||
{
|
||||
$a[0] =~ s/-/_/g;
|
||||
if (!defined($obj{$a[0]}))
|
||||
{ die "$ARGV[0]:$o:Undefined identifier ",$a[0],"\n"; }
|
||||
$pref_oid = "OBJ_" . $a[0];
|
||||
$pref_sep = ",";
|
||||
shift @a;
|
||||
|
||||
@@ -593,10 +593,10 @@ internet 5 : security : Security
|
||||
internet 6 : snmpv2 : SNMPv2
|
||||
internet 7 : mail : Mail
|
||||
|
||||
private 1 : enterprises : Enterprises
|
||||
Private 1 : enterprises : Enterprises
|
||||
|
||||
# RFC 2247
|
||||
enterprises 1466 344 : dcobject : dcObject
|
||||
Enterprises 1466 344 : dcobject : dcObject
|
||||
|
||||
# Stray OIDs we don't know the full name of each step for
|
||||
# RFC 2247
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x00906040L
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6d-dev [engine] XX xxx XXXX"
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090605fL
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6e [engine] 30 Jul 2002"
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef HEADER_PEM_H
|
||||
void ERR_load_PEM_strings(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc,
|
||||
/* create the right magic header stuff */
|
||||
buf[0]='\0';
|
||||
PEM_proc_type(buf,PEM_TYPE_ENCRYPTED);
|
||||
PEM_dek_info(buf,objstr,8,(char *)iv);
|
||||
PEM_dek_info(buf,objstr,enc->iv_len,(char *)iv);
|
||||
|
||||
/* use the normal code to write things out */
|
||||
i=PEM_write_bio(bp,PEM_STRING_RSA,buf,data,i);
|
||||
@@ -346,7 +346,7 @@ int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc,
|
||||
}
|
||||
|
||||
/* if we have a certificate then write it out now */
|
||||
if ((xi->x509 != NULL) || (PEM_write_bio_X509(bp,xi->x509) <= 0))
|
||||
if ((xi->x509 != NULL) && (PEM_write_bio_X509(bp,xi->x509) <= 0))
|
||||
goto err;
|
||||
|
||||
/* we are ignoring anything else that is loaded into the X509_INFO
|
||||
|
||||
@@ -258,6 +258,7 @@ char *PEM_ASN1_read_bio(char *(*d2i)(), const char *name, BIO *bp, char **x,
|
||||
PKCS8_PRIV_KEY_INFO *p8inf;
|
||||
p8inf=d2i_PKCS8_PRIV_KEY_INFO(
|
||||
(PKCS8_PRIV_KEY_INFO **) x, &p, len);
|
||||
if(!p8inf) goto p8err;
|
||||
ret = (char *)EVP_PKCS82PKEY(p8inf);
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
} else if (strcmp(nm,PEM_STRING_PKCS8) == 0) {
|
||||
@@ -373,7 +374,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x,
|
||||
kstr=(unsigned char *)buf;
|
||||
}
|
||||
RAND_add(data,i,0);/* put in the RSA key. */
|
||||
if (RAND_pseudo_bytes(iv,8) < 0) /* Generate a salt */
|
||||
if (RAND_pseudo_bytes(iv,enc->iv_len) < 0) /* Generate a salt */
|
||||
goto err;
|
||||
/* The 'iv' is used as the iv and as a salt. It is
|
||||
* NOT taken from the BytesToKey function */
|
||||
@@ -383,7 +384,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x,
|
||||
|
||||
buf[0]='\0';
|
||||
PEM_proc_type(buf,PEM_TYPE_ENCRYPTED);
|
||||
PEM_dek_info(buf,objstr,8,(char *)iv);
|
||||
PEM_dek_info(buf,objstr,enc->iv_len,(char *)iv);
|
||||
/* k=strlen(buf); */
|
||||
|
||||
EVP_EncryptInit(&ctx,enc,key,iv);
|
||||
@@ -506,7 +507,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
|
||||
PEMerr(PEM_F_PEM_GET_EVP_CIPHER_INFO,PEM_R_UNSUPPORTED_ENCRYPTION);
|
||||
return(0);
|
||||
}
|
||||
if (!load_iv((unsigned char **)&header,&(cipher->iv[0]),8)) return(0);
|
||||
if (!load_iv((unsigned char **)&header,&(cipher->iv[0]),enc->iv_len)) return(0);
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ sub using486
|
||||
|
||||
sub main'file
|
||||
{
|
||||
push(@out, "segment .text\n");
|
||||
push(@out, "segment .text use32\n");
|
||||
}
|
||||
|
||||
sub main'function_begin
|
||||
|
||||
@@ -141,8 +141,8 @@ union {
|
||||
#define PKCS12_ERROR 0
|
||||
#define PKCS12_OK 1
|
||||
|
||||
#define M_PKCS12_bag_type(bag) OBJ_obj2nid(bag->type)
|
||||
#define M_PKCS12_cert_bag_type(bag) OBJ_obj2nid(bag->value.bag->type)
|
||||
#define M_PKCS12_bag_type(bg) OBJ_obj2nid((bg)->type)
|
||||
#define M_PKCS12_cert_bag_type(bg) OBJ_obj2nid((bg)->value.bag->type)
|
||||
#define M_PKCS12_crl_bag_type M_PKCS12_cert_bag_type
|
||||
|
||||
#define M_PKCS12_x5092certbag(x509) \
|
||||
|
||||
@@ -123,13 +123,12 @@ pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
pk7_doit.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||
pk7_doit.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
pk7_doit.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
pk7_doit.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
pk7_doit.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
pk7_doit.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
pk7_doit.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
pk7_doit.o: ../../include/openssl/opensslconf.h
|
||||
pk7_doit.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
pk7_doit.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
pk7_doit.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
pk7_doit.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
pk7_doit.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
pk7_doit.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
pk7_doit.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
pk7_doit.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||
pk7_doit.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
@@ -183,12 +182,12 @@ pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
pk7_smime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||
pk7_smime.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
pk7_smime.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
pk7_smime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
pk7_smime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
pk7_smime.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
pk7_smime.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
pk7_smime.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
pk7_smime.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
pk7_smime.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
pk7_smime.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
pk7_smime.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
pk7_smime.o: ../../include/openssl/objects.h
|
||||
pk7_smime.o: ../../include/openssl/opensslconf.h
|
||||
pk7_smime.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
pk7_smime.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
|
||||
@@ -621,7 +621,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
|
||||
x=i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,NULL,
|
||||
i2d_X509_ATTRIBUTE,
|
||||
V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET);
|
||||
pp=(unsigned char *)OPENSSL_malloc(x);
|
||||
if (!(pp=(unsigned char *)OPENSSL_malloc(x))) goto err;
|
||||
p=pp;
|
||||
i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,&p,
|
||||
i2d_X509_ATTRIBUTE,
|
||||
@@ -817,7 +817,7 @@ for (ii=0; ii<md_len; ii++) printf("%02X",md_dat[ii]); printf(" calc\n");
|
||||
*/
|
||||
i=i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,NULL,i2d_X509_ATTRIBUTE,
|
||||
V_ASN1_SET,V_ASN1_UNIVERSAL, IS_SEQUENCE);
|
||||
pp=OPENSSL_malloc(i);
|
||||
if (!(pp=OPENSSL_malloc(i))) goto err;
|
||||
p=pp;
|
||||
i2d_ASN1_SET_OF_X509_ATTRIBUTE(sk,&p,i2d_X509_ATTRIBUTE,
|
||||
V_ASN1_SET,V_ASN1_UNIVERSAL, IS_SEQUENCE);
|
||||
|
||||
@@ -179,10 +179,11 @@ char *argv[];
|
||||
{
|
||||
ASN1_UTCTIME *tm;
|
||||
char *str1,*str2;
|
||||
int rc;
|
||||
|
||||
si=sk_PKCS7_SIGNER_INFO_value(sk,i);
|
||||
i=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si);
|
||||
if (i <= 0)
|
||||
rc=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si);
|
||||
if (rc <= 0)
|
||||
goto err;
|
||||
printf("signer info\n");
|
||||
if ((tm=get_signed_time(si)) != NULL)
|
||||
|
||||
@@ -75,7 +75,11 @@ int RAND_egd_bytes(const char *path,int bytes)
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#ifndef NO_SYS_UN_H
|
||||
#include <sys/un.h>
|
||||
# ifdef VXWORKS
|
||||
# include <streams/un.h>
|
||||
# else
|
||||
# include <sys/un.h>
|
||||
# endif
|
||||
#else
|
||||
struct sockaddr_un {
|
||||
short sun_family; /* AF_UNIX */
|
||||
|
||||
@@ -311,7 +311,7 @@ int RAND_poll(void)
|
||||
if (gen(hProvider, sizeof(buf), buf) != 0)
|
||||
{
|
||||
RAND_add(buf, sizeof(buf), sizeof(buf));
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
printf("randomness from PROV_RSA_FULL\n");
|
||||
#endif
|
||||
}
|
||||
@@ -324,7 +324,7 @@ int RAND_poll(void)
|
||||
if (gen(hProvider, sizeof(buf), buf) != 0)
|
||||
{
|
||||
RAND_add(buf, sizeof(buf), sizeof(buf));
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
printf("randomness from PROV_INTEL_SEC\n");
|
||||
#endif
|
||||
}
|
||||
@@ -510,7 +510,7 @@ int RAND_poll(void)
|
||||
FreeLibrary(kernel);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
printf("Exiting RAND_poll\n");
|
||||
#endif
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user