Compare commits
261 Commits
OpenSSL_0_
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b8a2928af | ||
|
|
031774468c | ||
|
|
dd28d12add | ||
|
|
6c61ee8fe3 | ||
|
|
b86ebb55ff | ||
|
|
66956eaba3 | ||
|
|
444ff35029 | ||
|
|
ff2549be1d | ||
|
|
2557c6a812 | ||
|
|
aae48de0f7 | ||
|
|
766708f24b | ||
|
|
fbeb4a9d15 | ||
|
|
24fc4f656c | ||
|
|
c3c3b28818 | ||
|
|
06e2670a57 | ||
|
|
3798a4d059 | ||
|
|
5b8246d6eb | ||
|
|
2e24bc421d | ||
|
|
f244ed3ed2 | ||
|
|
50a095ed16 | ||
|
|
37aff2199e | ||
|
|
309aa5fbf3 | ||
|
|
5f40948714 | ||
|
|
c22050be29 | ||
|
|
54ca55fd81 | ||
|
|
d0e79d7e2c | ||
|
|
c1003dfd15 | ||
|
|
98809a1458 | ||
|
|
ccc3df8c33 | ||
|
|
593a6dbe19 | ||
|
|
efbe446f1a | ||
|
|
725745d105 | ||
|
|
c0e94f8292 | ||
|
|
ef4bd0167c | ||
|
|
7a8a3ef4f6 | ||
|
|
98c7b0367d | ||
|
|
9e5dea0ffd | ||
|
|
cb4823fdd6 | ||
|
|
17bb051628 | ||
|
|
59f44e810b | ||
|
|
7a014dceb6 | ||
|
|
1ff44a99a4 | ||
|
|
6cf61614e4 | ||
|
|
82e448b92b | ||
|
|
b172352b52 | ||
|
|
95b14fd803 | ||
|
|
553d2e3280 | ||
|
|
82fb4ee89d | ||
|
|
389fef6c9c | ||
|
|
b6622f9623 | ||
|
|
7f5448e3a8 | ||
|
|
5d965f0783 | ||
|
|
b14713c231 | ||
|
|
637e0ba420 | ||
|
|
9ac37cb018 | ||
|
|
fb7751b44f | ||
|
|
e333a8d673 | ||
|
|
89a6daac00 | ||
|
|
7e42945918 | ||
|
|
b61a87b26c | ||
|
|
2c6b141931 | ||
|
|
af13c50d51 | ||
|
|
65c2397fce | ||
|
|
16e7efe3c8 | ||
|
|
c2b78c31d6 | ||
|
|
a1dc0336dd | ||
|
|
d99a35f275 | ||
|
|
949fbf073a | ||
|
|
6156be4da3 | ||
|
|
d7d4325655 | ||
|
|
9f81ffe433 | ||
|
|
8164930816 | ||
|
|
2a8834cf89 | ||
|
|
e6e11f4ec3 | ||
|
|
452e41562c | ||
|
|
8c6dd96aed | ||
|
|
23a4ccd178 | ||
|
|
2b4d877a27 | ||
|
|
d916f92d6f | ||
|
|
b9b5134e19 | ||
|
|
9ef6fdab63 | ||
|
|
3a0b6de4d0 | ||
|
|
08896dc0bd | ||
|
|
ef62799783 | ||
|
|
8196257f00 | ||
|
|
ac923d3377 | ||
|
|
0ec529ac82 | ||
|
|
d5b0c872d8 | ||
|
|
2e8026b65a | ||
|
|
381a9f04a0 | ||
|
|
d7050b4424 | ||
|
|
91ca332058 | ||
|
|
ff095a8ac8 | ||
|
|
ae37f9f3a2 | ||
|
|
95d66bd867 | ||
|
|
6d73e9d8e8 | ||
|
|
fb5a4bbaa7 | ||
|
|
d402f6b66f | ||
|
|
36a38a7a27 | ||
|
|
2a4dc7e505 | ||
|
|
4e92353d23 | ||
|
|
0badc909ae | ||
|
|
3cc52ee97a | ||
|
|
822da9ccc3 | ||
|
|
96e20179e4 | ||
|
|
1dfa26bd84 | ||
|
|
9e6c97703c | ||
|
|
a0f6e0c1e7 | ||
|
|
edaa7a599a | ||
|
|
3b95629db1 | ||
|
|
afff063a14 | ||
|
|
e1246e1ad7 | ||
|
|
df0b451d91 | ||
|
|
07cb0a82d1 | ||
|
|
f2671f8ac4 | ||
|
|
43e9e1a160 | ||
|
|
d0969d24cf | ||
|
|
cf51a0dccb | ||
|
|
48b30bf0e2 | ||
|
|
17b08b6a64 | ||
|
|
197ab47bdd | ||
|
|
e8cce0babe | ||
|
|
11d655ef40 | ||
|
|
1da61e8051 | ||
|
|
da6ce18279 | ||
|
|
98f43a173b | ||
|
|
c202eda634 | ||
|
|
f78bcb8945 | ||
|
|
2a918d4cc0 | ||
|
|
2c83b24cad | ||
|
|
e75445f688 | ||
|
|
df51d79ec4 | ||
|
|
c21a427a14 | ||
|
|
c6e4ef2c6e | ||
|
|
6450908a35 | ||
|
|
a91cb2103d | ||
|
|
3acd3158e9 | ||
|
|
8a04c6f894 | ||
|
|
745565c69f | ||
|
|
fbc4a24633 | ||
|
|
4775a89760 | ||
|
|
3008a7d819 | ||
|
|
233f758523 | ||
|
|
3af16cf694 | ||
|
|
985b5ee735 | ||
|
|
4df7ade829 | ||
|
|
932858d5f9 | ||
|
|
c4b3503b4b | ||
|
|
f871545f7f | ||
|
|
136b5dc7c7 | ||
|
|
759b287f15 | ||
|
|
5fffb5b3d9 | ||
|
|
17620eec4c | ||
|
|
059230b320 | ||
|
|
19dac35e5f | ||
|
|
f5fe2a9f6c | ||
|
|
d36e9d160b | ||
|
|
e58e78cab2 | ||
|
|
b0080e3817 | ||
|
|
4d67d79273 | ||
|
|
83ece9f028 | ||
|
|
cec136c30d | ||
|
|
ded8aff2c8 | ||
|
|
76a268a43f | ||
|
|
6563b02980 | ||
|
|
32d4496c1e | ||
|
|
0b26e53c59 | ||
|
|
7cf69ed544 | ||
|
|
8b634ba029 | ||
|
|
526228b78e | ||
|
|
34d01a3b20 | ||
|
|
856f3005de | ||
|
|
6e2a14002e | ||
|
|
7852c6b075 | ||
|
|
2c5f3606d1 | ||
|
|
1649489834 | ||
|
|
b51291cba8 | ||
|
|
b29b576957 | ||
|
|
abe389fd28 | ||
|
|
e7e7f5de4b | ||
|
|
3dfa7416cd | ||
|
|
d733ef7a69 | ||
|
|
17e01d24bb | ||
|
|
f67f815624 | ||
|
|
ab8fe43fa2 | ||
|
|
5e4c2225ed | ||
|
|
167d2a1411 | ||
|
|
3f4802a14e | ||
|
|
9aecc3e5ff | ||
|
|
b8a4a5bcba | ||
|
|
6daac534d7 | ||
|
|
79649d380e | ||
|
|
51ebaa9f82 | ||
|
|
efaa569c3b | ||
|
|
15684f58c2 | ||
|
|
0e6c24ae4b | ||
|
|
0dc1b3c1fb | ||
|
|
1e53b797f6 | ||
|
|
1ddf691244 | ||
|
|
78074baadd | ||
|
|
7457642b8c | ||
|
|
d1e107702b | ||
|
|
19503ca653 | ||
|
|
14089b1d0f | ||
|
|
0b8eca58b9 | ||
|
|
c2f425a06a | ||
|
|
4930f8bbd9 | ||
|
|
a5668db68b | ||
|
|
996b80f990 | ||
|
|
1998f60546 | ||
|
|
13a4808ca4 | ||
|
|
a176be48a2 | ||
|
|
f47bce27e3 | ||
|
|
f86d65110d | ||
|
|
4730ea8a38 | ||
|
|
3e82dfdf2d | ||
|
|
b7d0d35a13 | ||
|
|
e12ceb2c92 | ||
|
|
e8d23950a0 | ||
|
|
d7c86198d9 | ||
|
|
76428da729 | ||
|
|
6bf4ca0840 | ||
|
|
efa59b8d59 | ||
|
|
e1a2bfaaa6 | ||
|
|
48f48d96ce | ||
|
|
085cb7cac0 | ||
|
|
9874ff33c3 | ||
|
|
73cfd9cce9 | ||
|
|
3166d16f06 | ||
|
|
26b82246b1 | ||
|
|
277ba3ebd2 | ||
|
|
3e9b2042d9 | ||
|
|
5d577d7eb0 | ||
|
|
05ee0523c1 | ||
|
|
43f392c9a1 | ||
|
|
01cb2049e3 | ||
|
|
a224fe14e9 | ||
|
|
00d5a5ff55 | ||
|
|
420312cec5 | ||
|
|
3c17fa3325 | ||
|
|
e3424084a0 | ||
|
|
d9a55422c7 | ||
|
|
374941f727 | ||
|
|
caeb429055 | ||
|
|
b00c36e366 | ||
|
|
1f9a128519 | ||
|
|
18df6b30b1 | ||
|
|
0d399f97dd | ||
|
|
3fdc2c906d | ||
|
|
a78ded0b61 | ||
|
|
0a629ddbd6 | ||
|
|
353cb367e4 | ||
|
|
6252f3bc7c | ||
|
|
4e319926d7 | ||
|
|
e4f456918f | ||
|
|
c342341ea1 | ||
|
|
9d396bee8e | ||
|
|
a9427c2536 | ||
|
|
7a746ecf3e | ||
|
|
aca8bf43ce | ||
|
|
7de0df694f |
168
CHANGES
168
CHANGES
@@ -2,6 +2,157 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.8l and 0.9.8m [xx XXX xxxx]
|
||||
|
||||
*) Handle TLS versions 2.0 and later properly and correctly use the
|
||||
highest version of TLS/SSL supported. Although TLS >= 2.0 is some way
|
||||
off ancient servers have a habit of sticking around for a while...
|
||||
[Steve Henson]
|
||||
|
||||
*) Modify compression code so it frees up structures without using the
|
||||
ex_data callbacks. This works around a problem where some applications
|
||||
call CRYPTO_free_all_ex_data() before application exit (e.g. when
|
||||
restarting) then use compression (e.g. SSL with compression) later.
|
||||
This results in significant per-connection memory leaks and
|
||||
has caused some security issues including CVE-2008-1678 and
|
||||
CVE-2009-4355.
|
||||
[Steve Henson]
|
||||
|
||||
*) Constify crypto/cast (i.e., <openssl/cast.h>): a CAST_KEY doesn't
|
||||
change when encrypting or decrypting.
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Add option SSL_OP_LEGACY_SERVER_CONNECT which will allow clients to
|
||||
connect (but not renegotiate) with servers which do not support RI.
|
||||
Until RI is more widely deployed this option is enabled by default.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add "missing" ssl ctrls to clear options and mode.
|
||||
[Steve Henson]
|
||||
|
||||
*) If client attempts to renegotiate and doesn't support RI respond with
|
||||
a no_renegotiation alert as required by draft-ietf-tls-renegotiation.
|
||||
Some renegotiating TLS clients will continue a connection gracefully
|
||||
when they receive the alert. Unfortunately OpenSSL mishandled
|
||||
this alert and would hang waiting for a server hello which it will never
|
||||
receive. Now we treat a received no_renegotiation alert as a fatal
|
||||
error. This is because applications requesting a renegotiation might well
|
||||
expect it to succeed and would have no code in place to handle the server
|
||||
denying it so the only safe thing to do is to terminate the connection.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add ctrl macro SSL_get_secure_renegotiation_support() which returns 1 if
|
||||
peer supports secure renegotiation and 0 otherwise. Print out peer
|
||||
renegotiation support in s_client/s_server.
|
||||
[Steve Henson]
|
||||
|
||||
*) Replace the highly broken and deprecated SPKAC certification method with
|
||||
the updated NID creation version. This should correctly handle UTF8.
|
||||
[Steve Henson]
|
||||
|
||||
*) Implement draft-ietf-tls-renegotiation-03. Re-enable
|
||||
renegotiation but require the extension as needed. Unfortunately,
|
||||
SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION turns out to be a
|
||||
bad idea. It has been replaced by
|
||||
SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION which can be set with
|
||||
SSL_CTX_set_options(). This is really not recommended unless you
|
||||
know what you are doing.
|
||||
[Eric Rescorla <ekr@networkresonance.com>, Ben Laurie, Steve Henson]
|
||||
|
||||
*) Fixes to stateless session resumption handling. Use initial_ctx when
|
||||
issuing and attempting to decrypt tickets in case it has changed during
|
||||
servername handling. Use a non-zero length session ID when attempting
|
||||
stateless session resumption: this makes it possible to determine if
|
||||
a resumption has occurred immediately after receiving server hello
|
||||
(several places in OpenSSL subtly assume this) instead of later in
|
||||
the handshake.
|
||||
[Steve Henson]
|
||||
|
||||
*) The functions ENGINE_ctrl(), OPENSSL_isservice(),
|
||||
CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error
|
||||
fixes for a few places where the return code is not checked
|
||||
correctly.
|
||||
[Julia Lawall <julia@diku.dk>]
|
||||
|
||||
*) Add --strict-warnings option to Configure script to include devteam
|
||||
warnings in other configurations.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add support for --libdir option and LIBDIR variable in makefiles. This
|
||||
makes it possible to install openssl libraries in locations which
|
||||
have names other than "lib", for example "/usr/lib64" which some
|
||||
systems need.
|
||||
[Steve Henson, based on patch from Jeremy Utley]
|
||||
|
||||
*) Don't allow the use of leading 0x80 in OIDs. This is a violation of
|
||||
X690 8.9.12 and can produce some misleading textual output of OIDs.
|
||||
[Steve Henson, reported by Dan Kaminsky]
|
||||
|
||||
*) Delete MD2 from algorithm tables. This follows the recommendation in
|
||||
several standards that it is not used in new applications due to
|
||||
several cryptographic weaknesses. For binary compatibility reasons
|
||||
the MD2 API is still compiled in by default.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add compression id to {d2i,i2d}_SSL_SESSION so it is correctly saved
|
||||
and restored.
|
||||
[Steve Henson]
|
||||
|
||||
*) Rename uni2asc and asc2uni functions to OPENSSL_uni2asc and
|
||||
OPENSSL_asc2uni conditionally on Netware platforms to avoid a name
|
||||
clash.
|
||||
[Guenter <lists@gknw.net>]
|
||||
|
||||
*) Fix the server certificate chain building code to use X509_verify_cert(),
|
||||
it used to have an ad-hoc builder which was unable to cope with anything
|
||||
other than a simple chain.
|
||||
[David Woodhouse <dwmw2@infradead.org>, Steve Henson]
|
||||
|
||||
*) Don't check self signed certificate signatures in X509_verify_cert()
|
||||
by default (a flag can override this): it just wastes time without
|
||||
adding any security. As a useful side effect self signed root CAs
|
||||
with non-FIPS digests are now usable in FIPS mode.
|
||||
[Steve Henson]
|
||||
|
||||
*) In dtls1_process_out_of_seq_message() the check if the current message
|
||||
is already buffered was missing. For every new message was memory
|
||||
allocated, allowing an attacker to perform an denial of service attack
|
||||
with sending out of seq handshake messages until there is no memory
|
||||
left. Additionally every future messege was buffered, even if the
|
||||
sequence number made no sense and would be part of another handshake.
|
||||
So only messages with sequence numbers less than 10 in advance will be
|
||||
buffered. (CVE-2009-1378)
|
||||
[Robin Seggelmann, discovered by Daniel Mentz]
|
||||
|
||||
*) Records are buffered if they arrive with a future epoch to be
|
||||
processed after finishing the corresponding handshake. There is
|
||||
currently no limitation to this buffer allowing an attacker to perform
|
||||
a DOS attack with sending records with future epochs until there is no
|
||||
memory left. This patch adds the pqueue_size() function to detemine
|
||||
the size of a buffer and limits the record buffer to 100 entries.
|
||||
(CVE-2009-1377)
|
||||
[Robin Seggelmann, discovered by Daniel Mentz]
|
||||
|
||||
*) Keep a copy of frag->msg_header.frag_len so it can be used after the
|
||||
parent structure is freed. (CVE-2009-1379)
|
||||
[Daniel Mentz]
|
||||
|
||||
*) Handle non-blocking I/O properly in SSL_shutdown() call.
|
||||
[Darryl Miles <darryl-mailinglists@netbauds.net>]
|
||||
|
||||
*) Add 2.5.4.* OIDs
|
||||
[Ilya O. <vrghost@gmail.com>]
|
||||
|
||||
Changes between 0.9.8k and 0.9.8l [5 Nov 2009]
|
||||
|
||||
*) Disable renegotiation completely - this fixes a severe security
|
||||
problem (CVE-2009-3555) at the cost of breaking all
|
||||
renegotiation. Renegotiation can be re-enabled by setting
|
||||
SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION in s3->flags at
|
||||
run-time. This is really not recommended unless you know what
|
||||
you're doing.
|
||||
[Ben Laurie]
|
||||
|
||||
Changes between 0.9.8j and 0.9.8k [25 Mar 2009]
|
||||
|
||||
*) Don't set val to NULL when freeing up structures, it is freed up by
|
||||
@@ -86,6 +237,10 @@
|
||||
|
||||
Changes between 0.9.8h and 0.9.8i [15 Sep 2008]
|
||||
|
||||
*) Fix NULL pointer dereference if a DTLS server received
|
||||
ChangeCipherSpec as first record (CVE-2009-1386).
|
||||
[PR #1679]
|
||||
|
||||
*) Fix a state transitition in s3_srvr.c and d1_srvr.c
|
||||
(was using SSL3_ST_CW_CLNT_HELLO_B, should be ..._ST_SW_SRVR_...).
|
||||
[Nagendra Modadugu]
|
||||
@@ -1489,19 +1644,6 @@
|
||||
differing sizes.
|
||||
[Richard Levitte]
|
||||
|
||||
Changes between 0.9.7m and 0.9.7n [xx XXX xxxx]
|
||||
|
||||
*) In the SSL/TLS server implementation, be strict about session ID
|
||||
context matching (which matters if an application uses a single
|
||||
external cache for different purposes). Previously,
|
||||
out-of-context reuse was forbidden only if SSL_VERIFY_PEER was
|
||||
set. This did ensure strict client verification, but meant that,
|
||||
with applications using a single external cache for quite
|
||||
different requirements, clients could circumvent ciphersuite
|
||||
restrictions for a given session ID context by starting a session
|
||||
in a different context.
|
||||
[Bodo Moeller]
|
||||
|
||||
Changes between 0.9.7l and 0.9.7m [23 Feb 2007]
|
||||
|
||||
*) Cleanse PEM buffers before freeing them since they may contain
|
||||
|
||||
84
Configure
84
Configure
@@ -106,6 +106,8 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimenta
|
||||
|
||||
my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED";
|
||||
|
||||
my $strict_warnings = 0;
|
||||
|
||||
my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL";
|
||||
|
||||
# MD2_CHAR slags pentium pros
|
||||
@@ -159,14 +161,15 @@ my %table=(
|
||||
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown):::::bn86-elf.o co86-elf.o",
|
||||
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||
"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
|
||||
"debug-ben-debug", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -g3 -O2 -pipe::(unknown)::::::",
|
||||
"debug-ben-debug", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -O2 -pipe::(unknown)::::::",
|
||||
"debug-ben-debug-noopt", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -pipe::(unknown)::::::",
|
||||
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
|
||||
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -march=i486 -pedantic -Wshadow -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
||||
"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll",
|
||||
"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
|
||||
"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT:${no_asm}:dlfcn:linux-shared",
|
||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -178,6 +181,9 @@ my %table=(
|
||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -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 -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -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-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"dist", "cc:-O::(unknown)::::::",
|
||||
|
||||
# Basic configs that should work on any (32 and less bit) box
|
||||
@@ -203,11 +209,11 @@ my %table=(
|
||||
# actually recommend to consider using gcc shared build even with vendor
|
||||
# compiler:-)
|
||||
# <appro@fy.chalmers.se>
|
||||
"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### Solaris x86 with Sun C setups
|
||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### SPARC Solaris with GNU C setups
|
||||
"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:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -337,7 +343,7 @@ my %table=(
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
# assisted with debugging of following two configs.
|
||||
@@ -390,7 +396,8 @@ my %table=(
|
||||
|
||||
# QNX
|
||||
"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:",
|
||||
"qnx6", "cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:",
|
||||
"QNX6", "gcc:-DTERMIOS::::-lsocket::${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"QNX6-i386", "gcc:-DL_ENDIAN -DTERMIOS -O2 -Wall::::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### SCO/Caldera targets.
|
||||
#
|
||||
@@ -520,7 +527,7 @@ my %table=(
|
||||
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc64.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
||||
##### A/UX
|
||||
@@ -581,9 +588,11 @@ my $idx_ranlib = $idx++;
|
||||
my $idx_arflags = $idx++;
|
||||
|
||||
my $prefix="";
|
||||
my $libdir="";
|
||||
my $openssldir="";
|
||||
my $exe_ext="";
|
||||
my $install_prefix="";
|
||||
my $install_prefix= "$ENV{'INSTALL_PREFIX'}";
|
||||
my $cross_compile_prefix="";
|
||||
my $fipslibdir="/usr/local/ssl/fips-1.0/lib/";
|
||||
my $nofipscanistercheck=0;
|
||||
my $fipsdso=0;
|
||||
@@ -747,6 +756,10 @@ PROCESS_ARGS:
|
||||
{
|
||||
exit(&test_sanity());
|
||||
}
|
||||
elsif (/^--strict-warnings/)
|
||||
{
|
||||
$strict_warnings = 1;
|
||||
}
|
||||
elsif (/^reconfigure/ || /^reconf/)
|
||||
{
|
||||
if (open(IN,"<$Makefile"))
|
||||
@@ -816,6 +829,10 @@ PROCESS_ARGS:
|
||||
{
|
||||
$prefix=$1;
|
||||
}
|
||||
elsif (/^--libdir=(.*)$/)
|
||||
{
|
||||
$libdir=$1;
|
||||
}
|
||||
elsif (/^--openssldir=(.*)$/)
|
||||
{
|
||||
$openssldir=$1;
|
||||
@@ -979,7 +996,8 @@ my $shared_target = $fields[$idx_shared_target];
|
||||
my $shared_cflag = $fields[$idx_shared_cflag];
|
||||
my $shared_ldflag = $fields[$idx_shared_ldflag];
|
||||
my $shared_extension = $fields[$idx_shared_extension];
|
||||
my $ranlib = $fields[$idx_ranlib];
|
||||
my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib];
|
||||
my $ar = $ENV{'AR'} || "ar";
|
||||
my $arflags = $fields[$idx_arflags];
|
||||
|
||||
if ($fips)
|
||||
@@ -1079,9 +1097,14 @@ if ($openssldir eq "" and $prefix eq "")
|
||||
}
|
||||
$prefix=$openssldir if $prefix eq "";
|
||||
|
||||
$libdir="lib" if $libdir eq "";
|
||||
|
||||
$default_ranlib= &which("ranlib") or $default_ranlib="true";
|
||||
$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl")
|
||||
or $perl="perl";
|
||||
my $make = $ENV{'MAKE'} || "make";
|
||||
|
||||
$cross_compile_prefix=$ENV{'CROSS_COMPILE'} if $cross_compile_prefix eq "";
|
||||
|
||||
chop $openssldir if $openssldir =~ /\/$/;
|
||||
chop $prefix if $prefix =~ /.\/$/;
|
||||
@@ -1434,6 +1457,16 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
|
||||
$shlib_minor=$2;
|
||||
}
|
||||
|
||||
if ($strict_warnings)
|
||||
{
|
||||
my $wopt;
|
||||
die "ERROR --strict-warnings requires gcc" unless ($cc =~ /gcc$/);
|
||||
foreach $wopt (split /\s+/, $gcc_devteam_warn)
|
||||
{
|
||||
$cflags .= " $wopt" unless ($cflags =~ /$wopt/)
|
||||
}
|
||||
}
|
||||
|
||||
open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
|
||||
unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
|
||||
open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
|
||||
@@ -1463,11 +1496,22 @@ while (<IN>)
|
||||
s/^SHLIB_EXT=.*/SHLIB_EXT=$shared_extension/;
|
||||
s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/;
|
||||
s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
|
||||
s/^LIBDIR=.*$/LIBDIR=$libdir/;
|
||||
s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
|
||||
s/^PLATFORM=.*$/PLATFORM=$target/;
|
||||
s/^OPTIONS=.*$/OPTIONS=$options/;
|
||||
s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/;
|
||||
s/^CC=.*$/CC= $cc/;
|
||||
if ($cross_compile_prefix)
|
||||
{
|
||||
s/^CC=.*$/CROSS_COMPILE= $cross_compile_prefix\nCC= \$\(CROSS_COMPILE\)$cc/;
|
||||
s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/;
|
||||
s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/;
|
||||
}
|
||||
else {
|
||||
s/^CC=.*$/CC= $cc/;
|
||||
s/^AR=\s*ar/AR= $ar/;
|
||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||
}
|
||||
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
|
||||
s/^CFLAG=.*$/CFLAG= $cflags/;
|
||||
s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
|
||||
@@ -1486,7 +1530,6 @@ while (<IN>)
|
||||
s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/;
|
||||
s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/;
|
||||
s/^PROCESSOR=.*/PROCESSOR= $processor/;
|
||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||
s/^ARFLAGS=.*/ARFLAGS= $arflags/;
|
||||
s/^PERL=.*/PERL= $perl/;
|
||||
s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/;
|
||||
@@ -1643,9 +1686,20 @@ print OUT "#define OPENSSL_CPUID_OBJ\n\n" if ($cpuid_obj);
|
||||
while (<IN>)
|
||||
{
|
||||
if (/^#define\s+OPENSSLDIR/)
|
||||
{ print OUT "#define OPENSSLDIR \"$openssldir\"\n"; }
|
||||
{
|
||||
my $foo = $openssldir;
|
||||
$foo =~ s/\\/\\\\/g;
|
||||
print OUT "#define OPENSSLDIR \"$foo\"\n";
|
||||
}
|
||||
elsif (/^#define\s+ENGINESDIR/)
|
||||
{ print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; }
|
||||
{
|
||||
# $foo is to become "$prefix/lib$multilib/engines";
|
||||
# as Makefile.org and engines/Makefile are adapted for
|
||||
# $multilib suffix.
|
||||
my $foo = "$prefix/lib/engines";
|
||||
$foo =~ s/\\/\\\\/g;
|
||||
print OUT "#define ENGINESDIR \"$foo\"\n";
|
||||
}
|
||||
elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/)
|
||||
{ printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n"
|
||||
if $export_var_as_fn;
|
||||
@@ -1750,7 +1804,7 @@ if($IsMK1MF) {
|
||||
EOF
|
||||
close(OUT);
|
||||
} else {
|
||||
my $make_command = "make PERL=\'$perl\'";
|
||||
my $make_command = "$make PERL=\'$perl\'";
|
||||
my $make_targets = "";
|
||||
$make_targets .= " links" if $symlink;
|
||||
$make_targets .= " depend" if $depflags ne $default_depflags && $make_depend;
|
||||
|
||||
80
Makefile.org
80
Makefile.org
@@ -71,6 +71,7 @@ PERL= perl
|
||||
TAR= tar
|
||||
TARFLAGS= --no-recursion
|
||||
MAKEDEPPROG=makedepend
|
||||
LIBDIR=lib
|
||||
|
||||
# We let the C compiler driver to take care of .s files. This is done in
|
||||
# order to be excused from maintaining a separate set of architecture
|
||||
@@ -112,7 +113,7 @@ LIBZLIB=
|
||||
# $(INSTALLTOP) for this build make be different so hard
|
||||
# code the path.
|
||||
|
||||
FIPSLIBDIR=/usr/local/ssl/lib/
|
||||
FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
|
||||
|
||||
# This is set to "y" if fipscanister.o is compiled internally as
|
||||
# opposed to coming from an external validated location.
|
||||
@@ -200,9 +201,10 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
|
||||
CC='${CC}' CFLAG='${CFLAG}' \
|
||||
AS='${CC}' ASFLAG='${CFLAG} -c' \
|
||||
AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}' \
|
||||
SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib' \
|
||||
SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/$(LIBDIR)' \
|
||||
INSTALL_PREFIX='${INSTALL_PREFIX}' \
|
||||
INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' \
|
||||
LIBDIR='${LIBDIR}' \
|
||||
MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
|
||||
DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}' \
|
||||
MAKEDEPPROG='${MAKEDEPPROG}' \
|
||||
@@ -333,15 +335,15 @@ build_crypto:
|
||||
dir=crypto; target=all; $(BUILD_ONE_CMD)
|
||||
build_fips:
|
||||
@dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
|
||||
build_ssl:
|
||||
build_ssl: build_crypto
|
||||
@dir=ssl; target=all; $(BUILD_ONE_CMD)
|
||||
build_engines:
|
||||
build_engines: build_crypto
|
||||
@dir=engines; target=all; $(BUILD_ONE_CMD)
|
||||
build_apps:
|
||||
build_apps: build_libs
|
||||
@dir=apps; target=all; $(BUILD_ONE_CMD)
|
||||
build_tests:
|
||||
build_tests: build_libs
|
||||
@dir=test; target=all; $(BUILD_ONE_CMD)
|
||||
build_tools:
|
||||
build_tools: build_libs
|
||||
@dir=tools; target=all; $(BUILD_ONE_CMD)
|
||||
|
||||
all_testapps: build_libs build_testapps
|
||||
@@ -357,7 +359,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
|
||||
$(AR) libcrypto.a fips/fipscanister.o ; \
|
||||
else \
|
||||
if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
|
||||
FIPSLD_CC=$(CC); CC=fips/fipsld; \
|
||||
FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
|
||||
export CC FIPSLD_CC; \
|
||||
fi; \
|
||||
$(MAKE) -e SHLIBDIRS='crypto' build-shared; \
|
||||
@@ -380,7 +382,7 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
||||
fips/fipscanister.o: build_fips
|
||||
libfips$(SHLIB_EXT): fips/fipscanister.o
|
||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||
FIPSLD_CC=$(CC); CC=fips/fipsld; export CC FIPSLD_CC; \
|
||||
FIPSLD_CC="$(CC)"; CC=fips/fipsld; export CC FIPSLD_CC; \
|
||||
$(MAKE) -f Makefile.shared -e $(BUILDENV) \
|
||||
CC=$${CC} LIBNAME=fips THIS=$@ \
|
||||
LIBEXTRAS=fips/fipscanister.o \
|
||||
@@ -436,7 +438,7 @@ do_$(SHLIB_TARGET):
|
||||
libcrypto.pc: Makefile
|
||||
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||
echo 'exec_prefix=$${prefix}'; \
|
||||
echo 'libdir=$${exec_prefix}/lib'; \
|
||||
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
||||
echo 'includedir=$${prefix}/include'; \
|
||||
echo ''; \
|
||||
echo 'Name: OpenSSL-libcrypto'; \
|
||||
@@ -449,7 +451,7 @@ libcrypto.pc: Makefile
|
||||
libssl.pc: Makefile
|
||||
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||
echo 'exec_prefix=$${prefix}'; \
|
||||
echo 'libdir=$${exec_prefix}/lib'; \
|
||||
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
||||
echo 'includedir=$${prefix}/include'; \
|
||||
echo ''; \
|
||||
echo 'Name: OpenSSL'; \
|
||||
@@ -462,7 +464,7 @@ libssl.pc: Makefile
|
||||
openssl.pc: Makefile
|
||||
@ ( echo 'prefix=$(INSTALLTOP)'; \
|
||||
echo 'exec_prefix=$${prefix}'; \
|
||||
echo 'libdir=$${exec_prefix}/lib'; \
|
||||
echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
|
||||
echo 'includedir=$${prefix}/include'; \
|
||||
echo ''; \
|
||||
echo 'Name: OpenSSL'; \
|
||||
@@ -517,12 +519,14 @@ dclean:
|
||||
@set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
|
||||
|
||||
rehash: rehash.time
|
||||
rehash.time: certs
|
||||
@(OPENSSL="`pwd`/util/opensslwrap.sh"; \
|
||||
OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
touch rehash.time
|
||||
rehash.time: certs apps
|
||||
@if [ -z "$(CROSS_COMPILE)" ]; then \
|
||||
(OPENSSL="`pwd`/util/opensslwrap.sh"; \
|
||||
OPENSSL_DEBUG_MEMORY=on; \
|
||||
export OPENSSL OPENSSL_DEBUG_MEMORY; \
|
||||
$(PERL) tools/c_rehash certs) && \
|
||||
touch rehash.time; \
|
||||
fi
|
||||
|
||||
test: tests
|
||||
|
||||
@@ -615,9 +619,9 @@ install: all install_docs install_sw
|
||||
|
||||
install_sw:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
|
||||
$(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
|
||||
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
|
||||
@@ -632,10 +636,10 @@ install_sw:
|
||||
do \
|
||||
if [ -f "$$i" ]; then \
|
||||
( echo installing $$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
|
||||
fi; \
|
||||
done;
|
||||
@set -e; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
@@ -645,22 +649,22 @@ install_sw:
|
||||
if [ -f "$$i" -o -f "$$i.a" ]; then \
|
||||
( echo installing $$i; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
|
||||
fi ); \
|
||||
fi; \
|
||||
done; \
|
||||
( here="`pwd`"; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||
cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
|
||||
$(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
|
||||
if [ "$(INSTALLTOP)" != "/usr" ]; then \
|
||||
echo 'OpenSSL shared libraries have been installed in:'; \
|
||||
@@ -669,12 +673,12 @@ install_sw:
|
||||
sed -e '1,/^$$/d' doc/openssl-shared.txt; \
|
||||
fi; \
|
||||
fi
|
||||
cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libcrypto.pc
|
||||
cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libssl.pc
|
||||
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
|
||||
cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
|
||||
cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
|
||||
cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
|
||||
|
||||
install_docs:
|
||||
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||
|
||||
14
NEWS
14
NEWS
@@ -5,6 +5,20 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m-beta1:
|
||||
|
||||
o Remove MD2 from algorithm tables.
|
||||
o SPKAC handling fixes.
|
||||
o Implement draft-ietf-tls-renegotiation-03.
|
||||
o Compression memory leak fixed.
|
||||
o Compression session resumption fixed.
|
||||
o Ticket and SNI coexistence fixes.
|
||||
o Many fixes to DTLS handling.
|
||||
|
||||
Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l:
|
||||
|
||||
o Temporary work around for CVE-2009-3555: disable renegotiation.
|
||||
|
||||
Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k:
|
||||
|
||||
o Fix various build issues.
|
||||
|
||||
27
README
27
README
@@ -1,7 +1,7 @@
|
||||
|
||||
OpenSSL 0.9.8k
|
||||
OpenSSL 0.9.8m-beta1
|
||||
|
||||
Copyright (c) 1998-2008 The OpenSSL Project
|
||||
Copyright (c) 1998-2009 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
All rights reserved.
|
||||
|
||||
@@ -112,8 +112,6 @@
|
||||
should be contacted if that algorithm is to be used; their web page is
|
||||
http://www.ascom.ch/.
|
||||
|
||||
The MDC2 algorithm is patented by IBM.
|
||||
|
||||
NTT and Mitsubishi have patents and pending patents on the Camellia
|
||||
algorithm, but allow use at no charge without requiring an explicit
|
||||
licensing agreement: http://info.isl.ntt.co.jp/crypt/eng/info/chiteki.html
|
||||
@@ -139,6 +137,9 @@
|
||||
SUPPORT
|
||||
-------
|
||||
|
||||
See the OpenSSL website www.openssl.org for details of how to obtain
|
||||
commercial technical support.
|
||||
|
||||
If you have any problems with OpenSSL then please take the following steps
|
||||
first:
|
||||
|
||||
@@ -165,6 +166,10 @@
|
||||
|
||||
openssl-bugs@openssl.org
|
||||
|
||||
Note that the request tracker should NOT be used for general assistance
|
||||
or support queries. Just because something doesn't work the way you expect
|
||||
does not mean it is necessarily a bug in OpenSSL.
|
||||
|
||||
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
|
||||
@@ -175,10 +180,22 @@
|
||||
|
||||
Development is coordinated on the openssl-dev mailing list (see
|
||||
http://www.openssl.org for information on subscribing). If you
|
||||
would like to submit a patch, send it to openssl-dev@openssl.org with
|
||||
would like to submit a patch, send it to openssl-bugs@openssl.org with
|
||||
the string "[PATCH]" in the subject. Please be sure to include a
|
||||
textual explanation of what your patch does.
|
||||
|
||||
If you are unsure as to whether a feature will be useful for the general
|
||||
OpenSSL community please discuss it on the openssl-dev mailing list first.
|
||||
Someone may be already working on the same thing or there may be a good
|
||||
reason as to why that feature isn't implemented.
|
||||
|
||||
Patches should be as up to date as possible, preferably relative to the
|
||||
current CVS or the last snapshot. They should follow the coding style of
|
||||
OpenSSL and compile without warnings. Some of the core team developer targets
|
||||
can be used for testing purposes, (debug-steve64, debug-geoff etc). OpenSSL
|
||||
compiles on many varied platforms: try to ensure you only use portable
|
||||
features.
|
||||
|
||||
Note: For legal reasons, contributions from the US can be accepted only
|
||||
if a TSU notification and a copy of the patch are sent to crypt@bis.doc.gov
|
||||
(formerly BXA) with a copy to the ENC Encryption Request Coordinator;
|
||||
|
||||
6
STATUS
6
STATUS
@@ -1,10 +1,12 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2009/03/25 10:46:55 $
|
||||
______________ $Date: 2010/01/20 17:26:01 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.9: Under development...
|
||||
o OpenSSL 1.0.0: Under development...
|
||||
o OpenSSL 0.9.8m-beta1: Released on January 20th, 2010
|
||||
o OpenSSL 0.9.8l: Released on November 5th, 2009
|
||||
o OpenSSL 0.9.8k: Released on March 25th, 2009
|
||||
o OpenSSL 0.9.8j: Released on January 7th, 2009
|
||||
o OpenSSL 0.9.8i: Released on September 15th, 2008
|
||||
|
||||
227
TABLE
227
TABLE
@@ -432,6 +432,60 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** QNX6
|
||||
$cc = gcc
|
||||
$cflags = -DTERMIOS
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = -lsocket
|
||||
$bn_ops =
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= bsd-gcc-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** QNX6-i386
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIOS -O2 -Wall
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = -lsocket
|
||||
$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$cpuid_obj = x86cpuid-elf.o
|
||||
$bn_obj = bn86-elf.o co86-elf.o MAYBE-MO86-elf.o
|
||||
$des_obj = dx86-elf.o yx86-elf.o
|
||||
$aes_obj = ax86-elf.o
|
||||
$bf_obj = bx86-elf.o
|
||||
$md5_obj = mx86-elf.o
|
||||
$sha1_obj = sx86-elf.o s512sse2-elf.o
|
||||
$cast_obj = cx86-elf.o
|
||||
$rc4_obj = rx86-elf.o rc4_skey.o
|
||||
$rmd160_obj = rm86-elf.o
|
||||
$rc5_obj = r586-elf.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= bsd-gcc-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** ReliantUNIX
|
||||
$cc = cc
|
||||
$cflags = -KPIC -g -DTERMIOS -DB_ENDIAN
|
||||
@@ -1033,7 +1087,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id = MACOSX
|
||||
$lflags = -Wl,-search_paths_first%
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -1163,7 +1217,34 @@ $arflags =
|
||||
|
||||
*** debug-ben-debug
|
||||
$cc = gcc
|
||||
$cflags = -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -g3 -O2 -pipe
|
||||
$cflags = -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -O2 -pipe
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops =
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-ben-debug-noopt
|
||||
$cc = gcc
|
||||
$cflags = -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -pipe
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
@@ -1539,6 +1620,60 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-linux-generic32
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-linux-generic64
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-linux-pentium
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall
|
||||
@@ -1593,6 +1728,33 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-linux-x86_64
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall -DMD32_REG_T=int
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj = x86_64cpuid.o
|
||||
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||
$des_obj =
|
||||
$aes_obj = aes-x86_64.o
|
||||
$bf_obj =
|
||||
$md5_obj = md5-x86_64.o
|
||||
$sha1_obj = sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-x86_64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -m64
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-rse
|
||||
$cc = cc
|
||||
$cflags = -DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall
|
||||
@@ -1789,7 +1951,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj = x86_64cpuid.o
|
||||
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||
$des_obj =
|
||||
@@ -1801,12 +1963,12 @@ $cast_obj =
|
||||
$rc4_obj = rc4-x86_64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = elf
|
||||
$shared_target= dlfcn
|
||||
$shared_cflag = linux-shared
|
||||
$shared_ldflag = -fPIC
|
||||
$shared_extension = -m64
|
||||
$ranlib = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -m64
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-steve32
|
||||
@@ -1843,7 +2005,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj = x86_64cpuid.o
|
||||
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||
$des_obj =
|
||||
@@ -1855,12 +2017,12 @@ $cast_obj =
|
||||
$rc4_obj = rc4-x86_64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = elf
|
||||
$shared_target= dlfcn
|
||||
$shared_cflag = linux-shared
|
||||
$shared_ldflag = -fPIC
|
||||
$shared_extension = -m64
|
||||
$ranlib = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -m64
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** debug-ulf
|
||||
@@ -3058,7 +3220,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj = x86_64cpuid.o
|
||||
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||
$des_obj =
|
||||
@@ -3564,33 +3726,6 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** qnx6
|
||||
$cc = cc
|
||||
$cflags = -DL_ENDIAN -DTERMIOS
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -lsocket
|
||||
$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** rhapsody-ppc-cc
|
||||
$cc = cc
|
||||
$cflags = -O3 -DB_ENDIAN
|
||||
@@ -3949,7 +4084,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj = x86_64cpuid.o
|
||||
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||
$des_obj =
|
||||
@@ -3976,7 +4111,7 @@ $unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL
|
||||
$cpuid_obj = x86_64cpuid.o
|
||||
$bn_obj = x86_64-gcc.o x86_64-mont.o
|
||||
$des_obj =
|
||||
|
||||
@@ -12,6 +12,14 @@ $ WRITE SYS$OUTPUT "Should be the directory where you want things installed.
|
||||
$ EXIT
|
||||
$ ENDIF
|
||||
$
|
||||
$ IF (F$GETSYI("CPU").LT.128)
|
||||
$ THEN
|
||||
$ ARCH := VAX
|
||||
$ ELSE
|
||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
||||
$ ENDIF
|
||||
$
|
||||
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
|
||||
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
|
||||
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
||||
@@ -19,13 +27,7 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
||||
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
|
||||
$
|
||||
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
|
||||
$ DEFINE/NOLOG WRK_SSLVLIB WRK_SSLROOT:[VAX_LIB]
|
||||
$ DEFINE/NOLOG WRK_SSLALIB WRK_SSLROOT:[ALPHA_LIB]
|
||||
$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
|
||||
$ DEFINE/NOLOG WRK_SSLVEXE WRK_SSLROOT:[VAX_EXE]
|
||||
$ DEFINE/NOLOG WRK_SSLAEXE WRK_SSLROOT:[ALPHA_EXE]
|
||||
$ DEFINE/NOLOG WRK_SSLCERTS WRK_SSLROOT:[CERTS]
|
||||
$ DEFINE/NOLOG WRK_SSLPRIVATE WRK_SSLROOT:[PRIVATE]
|
||||
$
|
||||
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLROOT:[000000]
|
||||
@@ -39,7 +41,7 @@ $ IF F$SEARCH("WRK_SSLINCLUDE:vms_idhacks.h") .NES. "" THEN -
|
||||
$
|
||||
$ OPEN/WRITE SF WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
|
||||
$ WRITE SYS$OUTPUT "%OPEN-I-CREATED, ",F$SEARCH("WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM")," created."
|
||||
$ WRITE SF "$! Startup file for Openssl 0.9.2-RL 15-Mar-1999"
|
||||
$ WRITE SF "$! Startup file for Openssl"
|
||||
$ WRITE SF "$!"
|
||||
$ WRITE SF "$! Do not edit this file, as it will be regenerated during next installation."
|
||||
$ WRITE SF "$! Instead, add or change SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
|
||||
@@ -47,8 +49,13 @@ $ WRITE SF "$!"
|
||||
$ WRITE SF "$! P1 a qualifier to DEFINE. For example ""/SYSTEM"" to get the logical names"
|
||||
$ WRITE SF "$! defined in the system logical name table."
|
||||
$ WRITE SF "$!"
|
||||
$ WRITE SF "$ ARCH = ""VAX"""
|
||||
$ WRITE SF "$ IF F$GETSYI(""CPU"") .GE. 128 THEN ARCH = ""ALPHA"""
|
||||
$ WRITE SF "$ IF (F$GETSYI(""CPU"").LT.128)"
|
||||
$ WRITE SF "$ THEN"
|
||||
$ WRITE SF "$ ARCH := VAX"
|
||||
$ WRITE SF "$ ELSE"
|
||||
$ WRITE SF "$ ARCH = F$EDIT( F$GETSYI( ""ARCH_NAME""), ""UPCASE"")"
|
||||
$ WRITE SF "$ IF (ARCH .EQS. """") THEN ARCH = ""UNK"""
|
||||
$ WRITE SF "$ ENDIF"
|
||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLROOT ",ROOT,".] /TRANS=CONC"
|
||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLLIB SSLROOT:['ARCH'_LIB]"
|
||||
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLINCLUDE SSLROOT:[INCLUDE]"
|
||||
|
||||
@@ -3,10 +3,10 @@ $!
|
||||
$! No command line parameters. This should be run at the start of the source
|
||||
$! tree (the same directory where one finds INSTALL.VMS).
|
||||
$!
|
||||
$! Input: [.UTIL]LIBEAY.NUM,[.AXP.EXE.CRYPTO]LIBCRYPTO.OLB
|
||||
$! [.UTIL]SSLEAY.NUM,[.AXP.EXE.SSL]LIBSSL.OLB
|
||||
$! Output: [.AXP.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
|
||||
$! [.AXP.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
|
||||
$! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB
|
||||
$! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]LIBSSL.OLB
|
||||
$! Output: [.xxx.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
|
||||
$! [.xxx.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
|
||||
$!
|
||||
$! So far, tests have only been made on VMS for Alpha. VAX will come in time.
|
||||
$! ===========================================================================
|
||||
@@ -19,31 +19,41 @@ $ write sys$error "ERROR: Couldn't find any library version info..."
|
||||
$ exit
|
||||
$ endif
|
||||
$
|
||||
$ if f$getsyi("CPU") .ge. 128
|
||||
$ if (f$getsyi("cpu").lt.128)
|
||||
$ then
|
||||
$ arch := VAX
|
||||
$ else
|
||||
$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
|
||||
$ if (arch .eqs. "") then arch = "UNK"
|
||||
$ endif
|
||||
$
|
||||
$ if arch .nes. "VAX"
|
||||
$ then
|
||||
$ arch_vax = 0
|
||||
$ libid = "Crypto"
|
||||
$ libnum = "[.UTIL]LIBEAY.NUM"
|
||||
$ libdir = "[.AXP.EXE.CRYPTO]"
|
||||
$ libdir = "[.''ARCH'.EXE.CRYPTO]"
|
||||
$ libolb = "''libdir'LIBCRYPTO.OLB"
|
||||
$ libopt = "''libdir'LIBCRYPTO.OPT"
|
||||
$ libmap = "''libdir'LIBCRYPTO.MAP"
|
||||
$ libgoal= "''libdir'LIBCRYPTO.EXE"
|
||||
$ libref = ""
|
||||
$ gosub create_axp_shr
|
||||
$ gosub create_nonvax_shr
|
||||
$ libid = "SSL"
|
||||
$ libnum = "[.UTIL]SSLEAY.NUM"
|
||||
$ libdir = "[.AXP.EXE.SSL]"
|
||||
$ libdir = "[.''ARCH'.EXE.SSL]"
|
||||
$ libolb = "''libdir'LIBSSL.OLB"
|
||||
$ libopt = "''libdir'LIBSSL.OPT"
|
||||
$ libmap = "''libdir'LIBSSL.MAP"
|
||||
$ libgoal= "''libdir'LIBSSL.EXE"
|
||||
$ libref = "[.AXP.EXE.CRYPTO]LIBCRYPTO.EXE"
|
||||
$ gosub create_axp_shr
|
||||
$ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE"
|
||||
$ gosub create_nonvax_shr
|
||||
$ else
|
||||
$ arch_vax = 1
|
||||
$ libtit = "CRYPTO_TRANSFER_VECTOR"
|
||||
$ libid = "Crypto"
|
||||
$ libnum = "[.UTIL]LIBEAY.NUM"
|
||||
$ libdir = "[.VAX.EXE.CRYPTO]"
|
||||
$ libdir = "[.''ARCH'.EXE.CRYPTO]"
|
||||
$ libmar = "''libdir'LIBCRYPTO.MAR"
|
||||
$ libolb = "''libdir'LIBCRYPTO.OLB"
|
||||
$ libopt = "''libdir'LIBCRYPTO.OPT"
|
||||
@@ -56,22 +66,22 @@ $ gosub create_vax_shr
|
||||
$ libtit = "SSL_TRANSFER_VECTOR"
|
||||
$ libid = "SSL"
|
||||
$ libnum = "[.UTIL]SSLEAY.NUM"
|
||||
$ libdir = "[.VAX.EXE.SSL]"
|
||||
$ libdir = "[.''ARCH'.EXE.SSL]"
|
||||
$ libmar = "''libdir'LIBSSL.MAR"
|
||||
$ libolb = "''libdir'LIBSSL.OLB"
|
||||
$ libopt = "''libdir'LIBSSL.OPT"
|
||||
$ libobj = "''libdir'LIBSSL.OBJ"
|
||||
$ libmap = "''libdir'LIBSSL.MAP"
|
||||
$ libgoal= "''libdir'LIBSSL.EXE"
|
||||
$ libref = "[.VAX.EXE.CRYPTO]LIBCRYPTO.EXE"
|
||||
$ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE"
|
||||
$ libvec = "LIBSSL"
|
||||
$ gosub create_vax_shr
|
||||
$ endif
|
||||
$ exit
|
||||
$
|
||||
$! ----- Soubroutines to actually build the shareable libraries
|
||||
$! The way things work, there's a main shareable library creator for each
|
||||
$! supported architecture, which is called from the main code above.
|
||||
$! ----- Soubroutines to build the shareable libraries
|
||||
$! For each supported architecture, there's a main shareable library
|
||||
$! creator, which is called from the main code above.
|
||||
$! The creator will define a number of variables to tell the next levels of
|
||||
$! subroutines what routines to use to write to the option files, call the
|
||||
$! main processor, read_func_num, and when that is done, it will write version
|
||||
@@ -97,10 +107,10 @@ $! read_func_num depends on the following variables from the creator:
|
||||
$! libwriter The name of the writer routine to call for each .num file line
|
||||
$! -----
|
||||
$
|
||||
$! ----- Subroutines for AXP
|
||||
$! ----- Subroutines for non-VAX
|
||||
$! -----
|
||||
$! The creator routine
|
||||
$ create_axp_shr:
|
||||
$ create_nonvax_shr:
|
||||
$ open/write opt 'libopt'
|
||||
$ write opt "identification=""",libid," ",libverstr,""""
|
||||
$ write opt libolb,"/lib"
|
||||
@@ -108,7 +118,7 @@ $ if libref .nes. "" then write opt libref,"/SHARE"
|
||||
$ write opt "SYMBOL_VECTOR=(-"
|
||||
$ libfirstentry := true
|
||||
$ libwrch := opt
|
||||
$ libwriter := write_axp_transfer_entry
|
||||
$ libwriter := write_nonvax_transfer_entry
|
||||
$ textcount = 0
|
||||
$ gosub read_func_num
|
||||
$ write opt ")"
|
||||
@@ -118,7 +128,7 @@ $ link/map='libmap'/full/share='libgoal' 'libopt'/option
|
||||
$ return
|
||||
$
|
||||
$! The record writer routine
|
||||
$ write_axp_transfer_entry:
|
||||
$ write_nonvax_transfer_entry:
|
||||
$ if libentry .eqs. ".dummy" then return
|
||||
$ if info_kind .eqs. "VARIABLE"
|
||||
$ then
|
||||
@@ -144,7 +154,7 @@ $ libfirstentry := false
|
||||
$ textcount = textcount + textcount_this
|
||||
$ return
|
||||
$
|
||||
$! ----- Subroutines for AXP
|
||||
$! ----- Subroutines for VAX
|
||||
$! -----
|
||||
$! The creator routine
|
||||
$ create_vax_shr:
|
||||
@@ -264,8 +274,15 @@ $ truesum = truesum + 1
|
||||
$ if plat_entry .eqs. "!EXPORT_VAR_AS_FUNCTION" then -
|
||||
$ falsesum = falsesum + 1
|
||||
$ endif
|
||||
$ if plat_entry .eqs. "VMS" then truesum = truesum + 1
|
||||
$ if plat_entry .eqs. "!VMS" then falsesum = falsesum + 1
|
||||
$!
|
||||
$ if ((plat_entry .eqs. "VMS") .or. -
|
||||
(arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then -
|
||||
truesum = truesum + 1
|
||||
$!
|
||||
$ if ((plat_entry .eqs. "!VMS") .or. -
|
||||
(arch_vax .and. (plat_entry .eqs. "!VMSVAX"))) then -
|
||||
falsesum = falsesum + 1
|
||||
$!
|
||||
$ goto loop1
|
||||
$ endif
|
||||
$ endloop1:
|
||||
|
||||
@@ -8,31 +8,39 @@ $!
|
||||
$!
|
||||
$! Slightly modified by Richard Levitte <richard@levitte.org>
|
||||
$!
|
||||
$!
|
||||
$! Always define OPENSSL. Others are optional (non-null P1).
|
||||
$!
|
||||
$ OPENSSL :== $SSLEXE:OPENSSL
|
||||
$ VERIFY :== $SSLEXE:OPENSSL VERIFY
|
||||
$ ASN1PARSE:== $SSLEXE:OPENSSL ASN1PARS
|
||||
$ REQ :== $SSLEXE:OPENSSL REQ
|
||||
$ DGST :== $SSLEXE:OPENSSL DGST
|
||||
$ DH :== $SSLEXE:OPENSSL DH
|
||||
$ ENC :== $SSLEXE:OPENSSL ENC
|
||||
$ GENDH :== $SSLEXE:OPENSSL GENDH
|
||||
$ ERRSTR :== $SSLEXE:OPENSSL ERRSTR
|
||||
$ CA :== $SSLEXE:OPENSSL CA
|
||||
$ CRL :== $SSLEXE:OPENSSL CRL
|
||||
$ RSA :== $SSLEXE:OPENSSL RSA
|
||||
$ DSA :== $SSLEXE:OPENSSL DSA
|
||||
$ DSAPARAM :== $SSLEXE:OPENSSL DSAPARAM
|
||||
$ X509 :== $SSLEXE:OPENSSL X509
|
||||
$ GENRSA :== $SSLEXE:OPENSSL GENRSA
|
||||
$ GENDSA :== $SSLEXE:OPENSSL GENDSA
|
||||
$ S_SERVER :== $SSLEXE:OPENSSL S_SERVER
|
||||
$ S_CLIENT :== $SSLEXE:OPENSSL S_CLIENT
|
||||
$ SPEED :== $SSLEXE:OPENSSL SPEED
|
||||
$ S_TIME :== $SSLEXE:OPENSSL S_TIME
|
||||
$ VERSION :== $SSLEXE:OPENSSL VERSION
|
||||
$ PKCS7 :== $SSLEXE:OPENSSL PKCS7
|
||||
$ CRL2PKCS7:== $SSLEXE:OPENSSL CRL2P7
|
||||
$ SESS_ID :== $SSLEXE:OPENSSL SESS_ID
|
||||
$ CIPHERS :== $SSLEXE:OPENSSL CIPHERS
|
||||
$ NSEQ :== $SSLEXE:OPENSSL NSEQ
|
||||
$ PKCS12 :== $SSLEXE:OPENSSL PKCS12
|
||||
$
|
||||
$ IF (P1 .NES. "")
|
||||
$ THEN
|
||||
$ VERIFY :== $SSLEXE:OPENSSL VERIFY
|
||||
$ ASN1PARSE:== $SSLEXE:OPENSSL ASN1PARS
|
||||
$! REQ could conflict with REQUEST.
|
||||
$ OREQ :== $SSLEXE:OPENSSL REQ
|
||||
$ DGST :== $SSLEXE:OPENSSL DGST
|
||||
$ DH :== $SSLEXE:OPENSSL DH
|
||||
$ ENC :== $SSLEXE:OPENSSL ENC
|
||||
$ GENDH :== $SSLEXE:OPENSSL GENDH
|
||||
$ ERRSTR :== $SSLEXE:OPENSSL ERRSTR
|
||||
$ CA :== $SSLEXE:OPENSSL CA
|
||||
$ CRL :== $SSLEXE:OPENSSL CRL
|
||||
$ RSA :== $SSLEXE:OPENSSL RSA
|
||||
$ DSA :== $SSLEXE:OPENSSL DSA
|
||||
$ DSAPARAM :== $SSLEXE:OPENSSL DSAPARAM
|
||||
$ X509 :== $SSLEXE:OPENSSL X509
|
||||
$ GENRSA :== $SSLEXE:OPENSSL GENRSA
|
||||
$ GENDSA :== $SSLEXE:OPENSSL GENDSA
|
||||
$ S_SERVER :== $SSLEXE:OPENSSL S_SERVER
|
||||
$ S_CLIENT :== $SSLEXE:OPENSSL S_CLIENT
|
||||
$ SPEED :== $SSLEXE:OPENSSL SPEED
|
||||
$ S_TIME :== $SSLEXE:OPENSSL S_TIME
|
||||
$ VERSION :== $SSLEXE:OPENSSL VERSION
|
||||
$ PKCS7 :== $SSLEXE:OPENSSL PKCS7
|
||||
$ CRL2PKCS7:== $SSLEXE:OPENSSL CRL2P7
|
||||
$ SESS_ID :== $SSLEXE:OPENSSL SESS_ID
|
||||
$ CIPHERS :== $SSLEXE:OPENSSL CIPHERS
|
||||
$ NSEQ :== $SSLEXE:OPENSSL NSEQ
|
||||
$ PKCS12 :== $SSLEXE:OPENSSL PKCS12
|
||||
$ ENDIF
|
||||
|
||||
121
apps/CA.sh
121
apps/CA.sh
@@ -5,10 +5,10 @@
|
||||
# things easier between now and when Eric is convinced to fix it :-)
|
||||
#
|
||||
# CA -newca ... will setup the right stuff
|
||||
# CA -newreq ... will generate a certificate request
|
||||
# CA -sign ... will sign the generated request and output
|
||||
# CA -newreq ... will generate a certificate request
|
||||
# CA -sign ... will sign the generated request and output
|
||||
#
|
||||
# At the end of that grab newreq.pem and newcert.pem (one has the key
|
||||
# At the end of that grab newreq.pem and newcert.pem (one has the key
|
||||
# and the other the certificate) and cat them together and that is what
|
||||
# you want/need ... I'll make even this a little cleaner later.
|
||||
#
|
||||
@@ -16,8 +16,8 @@
|
||||
# 12-Jan-96 tjh Added more things ... including CA -signcert which
|
||||
# converts a certificate to a request and then signs it.
|
||||
# 10-Jan-96 eay Fixed a few more bugs and added the SSLEAY_CONFIG
|
||||
# environment variable so this can be driven from
|
||||
# a script.
|
||||
# environment variable so this can be driven from
|
||||
# a script.
|
||||
# 25-Jul-96 eay Cleaned up filenames some more.
|
||||
# 11-Jun-96 eay Fixed a few filename missmatches.
|
||||
# 03-May-96 eay Modified to use 'ssleay cmd' instead of 'cmd'.
|
||||
@@ -29,52 +29,87 @@
|
||||
|
||||
# default openssl.cnf file has setup as per the following
|
||||
# demoCA ... where everything is stored
|
||||
cp_pem() {
|
||||
infile=$1
|
||||
outfile=$2
|
||||
bound=$3
|
||||
flag=0
|
||||
exec <$infile;
|
||||
while read line; do
|
||||
if [ $flag -eq 1 ]; then
|
||||
echo $line|grep "^-----END.*$bound" 2>/dev/null 1>/dev/null
|
||||
if [ $? -eq 0 ] ; then
|
||||
echo $line >>$outfile
|
||||
break
|
||||
else
|
||||
echo $line >>$outfile
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $line|grep "^-----BEGIN.*$bound" 2>/dev/null 1>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo $line >$outfile
|
||||
flag=1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify" >&2
|
||||
}
|
||||
|
||||
if [ -z "$OPENSSL" ]; then OPENSSL=openssl; fi
|
||||
|
||||
DAYS="-days 365" # 1 year
|
||||
if [ -z "$DAYS" ] ; then DAYS="-days 365" ; fi # 1 year
|
||||
CADAYS="-days 1095" # 3 years
|
||||
REQ="$OPENSSL req $SSLEAY_CONFIG"
|
||||
CA="$OPENSSL ca $SSLEAY_CONFIG"
|
||||
VERIFY="$OPENSSL verify"
|
||||
X509="$OPENSSL x509"
|
||||
PKCS12="openssl pkcs12"
|
||||
|
||||
CATOP=./demoCA
|
||||
if [ -z "$CATOP" ] ; then CATOP=./demoCA ; fi
|
||||
CAKEY=./cakey.pem
|
||||
CAREQ=./careq.pem
|
||||
CACERT=./cacert.pem
|
||||
|
||||
for i
|
||||
do
|
||||
case $i in
|
||||
RET=0
|
||||
|
||||
while [ "$1" != "" ] ; do
|
||||
case $1 in
|
||||
-\?|-h|-help)
|
||||
echo "usage: CA -newcert|-newreq|-newca|-sign|-verify" >&2
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-newcert)
|
||||
-newcert)
|
||||
# create a certificate
|
||||
$REQ -new -x509 -keyout newkey.pem -out newcert.pem $DAYS
|
||||
RET=$?
|
||||
echo "Certificate is in newcert.pem, private key is in newkey.pem"
|
||||
;;
|
||||
-newreq)
|
||||
-newreq)
|
||||
# create a certificate request
|
||||
$REQ -new -keyout newkey.pem -out newreq.pem $DAYS
|
||||
RET=$?
|
||||
echo "Request is in newreq.pem, private key is in newkey.pem"
|
||||
;;
|
||||
-newca)
|
||||
-newreq-nodes)
|
||||
# create a certificate request
|
||||
$REQ -new -nodes -keyout newreq.pem -out newreq.pem $DAYS
|
||||
RET=$?
|
||||
echo "Request (and private key) is in newreq.pem"
|
||||
;;
|
||||
-newca)
|
||||
# if explicitly asked for or it doesn't exist then setup the directory
|
||||
# structure that Eric likes to manage things
|
||||
# structure that Eric likes to manage things
|
||||
NEW="1"
|
||||
if [ "$NEW" -o ! -f ${CATOP}/serial ]; then
|
||||
# create the directory hierarchy
|
||||
mkdir ${CATOP}
|
||||
mkdir ${CATOP}/certs
|
||||
mkdir ${CATOP}/crl
|
||||
mkdir ${CATOP}/newcerts
|
||||
mkdir ${CATOP}/private
|
||||
echo "00" > ${CATOP}/serial
|
||||
mkdir -p ${CATOP}
|
||||
mkdir -p ${CATOP}/certs
|
||||
mkdir -p ${CATOP}/crl
|
||||
mkdir -p ${CATOP}/newcerts
|
||||
mkdir -p ${CATOP}/private
|
||||
touch ${CATOP}/index.txt
|
||||
fi
|
||||
if [ ! -f ${CATOP}/private/$CAKEY ]; then
|
||||
@@ -83,37 +118,60 @@ case $i in
|
||||
|
||||
# ask user for existing CA certificate
|
||||
if [ "$FILE" ]; then
|
||||
cp $FILE ${CATOP}/private/$CAKEY
|
||||
cp_pem $FILE ${CATOP}/private/$CAKEY PRIVATE
|
||||
cp_pem $FILE ${CATOP}/$CACERT CERTIFICATE
|
||||
RET=$?
|
||||
if [ ! -f "${CATOP}/serial" ]; then
|
||||
$X509 -in ${CATOP}/$CACERT -noout -next_serial \
|
||||
-out ${CATOP}/serial
|
||||
fi
|
||||
else
|
||||
echo "Making CA certificate ..."
|
||||
$REQ -new -keyout ${CATOP}/private/$CAKEY \
|
||||
-out ${CATOP}/$CAREQ
|
||||
$CA -out ${CATOP}/$CACERT $CADAYS -batch \
|
||||
$CA -create_serial -out ${CATOP}/$CACERT $CADAYS -batch \
|
||||
-keyfile ${CATOP}/private/$CAKEY -selfsign \
|
||||
-infiles ${CATOP}/$CAREQ
|
||||
-extensions v3_ca \
|
||||
-infiles ${CATOP}/$CAREQ
|
||||
RET=$?
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-xsign)
|
||||
$CA -policy policy_anything -infiles newreq.pem
|
||||
$CA -policy policy_anything -infiles newreq.pem
|
||||
RET=$?
|
||||
;;
|
||||
-sign|-signreq)
|
||||
-pkcs12)
|
||||
if [ -z "$2" ] ; then
|
||||
CNAME="My Certificate"
|
||||
else
|
||||
CNAME="$2"
|
||||
fi
|
||||
$PKCS12 -in newcert.pem -inkey newreq.pem -certfile ${CATOP}/$CACERT \
|
||||
-out newcert.p12 -export -name "$CNAME"
|
||||
RET=$?
|
||||
exit $RET
|
||||
;;
|
||||
-sign|-signreq)
|
||||
$CA -policy policy_anything -out newcert.pem -infiles newreq.pem
|
||||
RET=$?
|
||||
cat newcert.pem
|
||||
echo "Signed certificate is in newcert.pem"
|
||||
;;
|
||||
-signcert)
|
||||
-signCA)
|
||||
$CA -policy policy_anything -out newcert.pem -extensions v3_ca -infiles newreq.pem
|
||||
RET=$?
|
||||
echo "Signed CA certificate is in newcert.pem"
|
||||
;;
|
||||
-signcert)
|
||||
echo "Cert passphrase will be requested twice - bug?"
|
||||
$X509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pem
|
||||
$CA -policy policy_anything -out newcert.pem -infiles tmp.pem
|
||||
RET=$?
|
||||
cat newcert.pem
|
||||
echo "Signed certificate is in newcert.pem"
|
||||
;;
|
||||
-verify)
|
||||
-verify)
|
||||
shift
|
||||
if [ -z "$1" ]; then
|
||||
$VERIFY -CAfile $CATOP/$CACERT newcert.pem
|
||||
@@ -127,13 +185,14 @@ case $i in
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit 0
|
||||
exit $RET
|
||||
;;
|
||||
*)
|
||||
echo "Unknown arg $i";
|
||||
echo "Unknown arg $i" >&2
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
exit $RET
|
||||
|
||||
|
||||
@@ -153,17 +153,19 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
elif [ -n "$(FIPSCANLIB)" ]; then \
|
||||
FIPSLD_CC=$(CC); CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
|
||||
FIPSLD_CC="$(CC)"; CC=$(TOP)/fips/fipsld; export CC FIPSLD_CC; \
|
||||
fi; \
|
||||
LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
|
||||
[ "x$(FIPSCANLIB)" = "xlibfips" ] && LIBRARIES="$$LIBRARIES -lfips"; \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||
CC=$${CC} APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
|
||||
CC="$${CC}" APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
|
||||
LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
|
||||
link_app.$${shlib_target}
|
||||
-(cd ..; \
|
||||
OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
|
||||
$(PERL) tools/c_rehash certs)
|
||||
@if [ -z "$(CROSS_COMPILE)" ]; then \
|
||||
(cd ..; \
|
||||
OPENSSL="`pwd`/util/opensslwrap.sh"; export OPENSSL; \
|
||||
$(PERL) tools/c_rehash certs) \
|
||||
fi
|
||||
|
||||
progs.h: progs.pl
|
||||
$(PERL) progs.pl $(E_EXE) >progs.h
|
||||
@@ -750,13 +752,14 @@ s_cb.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_cb.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_cb.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
|
||||
s_cb.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_cb.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_cb.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_cb.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s_cb.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_cb.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
s_cb.o: ../include/openssl/x509v3.h apps.h s_apps.h s_cb.c
|
||||
s_cb.o: ../include/openssl/rand.h ../include/openssl/safestack.h
|
||||
s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_cb.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_cb.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_cb.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
s_cb.o: s_apps.h s_cb.c
|
||||
s_client.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
@@ -805,28 +808,28 @@ s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_server.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||
s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
s_server.o: ../include/openssl/x509v3.h apps.h s_apps.h s_server.c timeouts.h
|
||||
s_socket.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_socket.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_socket.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
s_socket.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_socket.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_socket.o: ../include/openssl/engine.h ../include/openssl/evp.h
|
||||
s_socket.o: ../include/openssl/fips.h ../include/openssl/hmac.h
|
||||
s_socket.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s_socket.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s_socket.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h
|
||||
s_socket.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
s_socket.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
s_socket.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_socket.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_socket.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_socket.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_socket.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_socket.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h
|
||||
s_socket.o: s_apps.h s_socket.c
|
||||
s_socket.o: ../e_os.h ../e_os2.h ../include/openssl/asn1.h
|
||||
s_socket.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s_socket.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_socket.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
s_socket.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s_socket.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
s_socket.o: ../include/openssl/evp.h ../include/openssl/fips.h
|
||||
s_socket.o: ../include/openssl/hmac.h ../include/openssl/kssl.h
|
||||
s_socket.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_socket.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
|
||||
s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_socket.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_socket.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_socket.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
|
||||
s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_socket.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s_socket.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_socket.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
s_socket.o: ../include/openssl/x509v3.h apps.h s_apps.h s_socket.c
|
||||
s_time.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_time.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
|
||||
@@ -2261,6 +2261,8 @@ int args_verify(char ***pargs, int *pargc,
|
||||
flags |= X509_V_FLAG_X509_STRICT;
|
||||
else if (!strcmp(arg, "-policy_print"))
|
||||
flags |= X509_V_FLAG_NOTIFY_POLICY;
|
||||
else if (!strcmp(arg, "-check_ss_sig"))
|
||||
flags |= X509_V_FLAG_CHECK_SS_SIGNATURE;
|
||||
else
|
||||
return 0;
|
||||
|
||||
|
||||
69
apps/ca.c
69
apps/ca.c
@@ -216,7 +216,6 @@ static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509,
|
||||
char *startdate, char *enddate, long days, char *ext_sect,
|
||||
CONF *conf, int verbose, unsigned long certopt,
|
||||
unsigned long nameopt, int default_op, int ext_copy);
|
||||
static int fix_data(int nid, int *type);
|
||||
static void write_new_certificate(BIO *bp, X509 *x, int output_der, int notext);
|
||||
static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
STACK_OF(CONF_VALUE) *policy, CA_DB *db, BIGNUM *serial,char *subj,unsigned long chtype, int multirdn,
|
||||
@@ -227,7 +226,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
static int do_revoke(X509 *x509, CA_DB *db, int ext, char *extval);
|
||||
static int get_certificate_status(const char *ser_status, CA_DB *db);
|
||||
static int do_updatedb(CA_DB *db);
|
||||
static int check_time_format(char *str);
|
||||
static int check_time_format(const char *str);
|
||||
char *make_revocation_str(int rev_type, char *rev_arg);
|
||||
int make_revoked(X509_REVOKED *rev, const char *str);
|
||||
int old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str);
|
||||
@@ -858,8 +857,8 @@ bad:
|
||||
perror(outdir);
|
||||
goto err;
|
||||
}
|
||||
#ifdef S_IFDIR
|
||||
if (!(sb.st_mode & S_IFDIR))
|
||||
#ifdef S_ISDIR
|
||||
if (!S_ISDIR(sb.st_mode))
|
||||
{
|
||||
BIO_printf(bio_err,"%s need to be a directory\n",outdir);
|
||||
perror(outdir);
|
||||
@@ -895,7 +894,7 @@ bad:
|
||||
BIO_printf(bio_err," in entry %d\n", i+1);
|
||||
goto err;
|
||||
}
|
||||
if (!check_time_format((char *)pp[DB_exp_date]))
|
||||
if (!check_time_format(pp[DB_exp_date]))
|
||||
{
|
||||
BIO_printf(bio_err,"entry %d: invalid expiry date\n",i+1);
|
||||
goto err;
|
||||
@@ -1249,7 +1248,12 @@ bad:
|
||||
BIO_printf(bio_err,"\n%d out of %d certificate requests certified, commit? [y/n]",total_done,total);
|
||||
(void)BIO_flush(bio_err);
|
||||
buf[0][0]='\0';
|
||||
fgets(buf[0],10,stdin);
|
||||
if (!fgets(buf[0],10,stdin))
|
||||
{
|
||||
BIO_printf(bio_err,"CERTIFICATION CANCELED: I/O error\n");
|
||||
ret=0;
|
||||
goto err;
|
||||
}
|
||||
if ((buf[0][0] != 'y') && (buf[0][0] != 'Y'))
|
||||
{
|
||||
BIO_printf(bio_err,"CERTIFICATION CANCELED\n");
|
||||
@@ -2091,7 +2095,7 @@ again2:
|
||||
}
|
||||
|
||||
BIO_printf(bio_err,"Certificate is to be certified until ");
|
||||
ASN1_UTCTIME_print(bio_err,X509_get_notAfter(ret));
|
||||
ASN1_TIME_print(bio_err,X509_get_notAfter(ret));
|
||||
if (days) BIO_printf(bio_err," (%ld days)",days);
|
||||
BIO_printf(bio_err, "\n");
|
||||
|
||||
@@ -2101,7 +2105,12 @@ again2:
|
||||
BIO_printf(bio_err,"Sign the certificate? [y/n]:");
|
||||
(void)BIO_flush(bio_err);
|
||||
buf[0]='\0';
|
||||
fgets(buf,sizeof(buf)-1,stdin);
|
||||
if (!fgets(buf,sizeof(buf)-1,stdin))
|
||||
{
|
||||
BIO_printf(bio_err,"CERTIFICATE WILL NOT BE CERTIFIED: I/O error\n");
|
||||
ok=0;
|
||||
goto err;
|
||||
}
|
||||
if (!((buf[0] == 'y') || (buf[0] == 'Y')))
|
||||
{
|
||||
BIO_printf(bio_err,"CERTIFICATE WILL NOT BE CERTIFIED\n");
|
||||
@@ -2317,25 +2326,9 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
if ((nid == NID_pkcs9_emailAddress) && (email_dn == 0))
|
||||
continue;
|
||||
*/
|
||||
|
||||
j=ASN1_PRINTABLE_type((unsigned char *)buf,-1);
|
||||
if (fix_data(nid, &j) == 0)
|
||||
{
|
||||
BIO_printf(bio_err,
|
||||
"invalid characters in string %s\n",buf);
|
||||
if (!X509_NAME_add_entry_by_NID(n, nid, chtype,
|
||||
(unsigned char *)buf, -1, -1, 0))
|
||||
goto err;
|
||||
}
|
||||
|
||||
if ((ne=X509_NAME_ENTRY_create_by_NID(&ne,nid,j,
|
||||
(unsigned char *)buf,
|
||||
strlen(buf))) == NULL)
|
||||
goto err;
|
||||
|
||||
if (!X509_NAME_add_entry(n,ne,-1, 0)) goto err;
|
||||
}
|
||||
if (spki == NULL)
|
||||
{
|
||||
@@ -2378,29 +2371,17 @@ err:
|
||||
return(ok);
|
||||
}
|
||||
|
||||
static int fix_data(int nid, int *type)
|
||||
static int check_time_format(const char *str)
|
||||
{
|
||||
if (nid == NID_pkcs9_emailAddress)
|
||||
*type=V_ASN1_IA5STRING;
|
||||
if ((nid == NID_commonName) && (*type == V_ASN1_IA5STRING))
|
||||
*type=V_ASN1_T61STRING;
|
||||
if ((nid == NID_pkcs9_challengePassword) && (*type == V_ASN1_IA5STRING))
|
||||
*type=V_ASN1_T61STRING;
|
||||
if ((nid == NID_pkcs9_unstructuredName) && (*type == V_ASN1_T61STRING))
|
||||
return(0);
|
||||
if (nid == NID_pkcs9_unstructuredName)
|
||||
*type=V_ASN1_IA5STRING;
|
||||
return(1);
|
||||
}
|
||||
|
||||
static int check_time_format(char *str)
|
||||
{
|
||||
ASN1_UTCTIME tm;
|
||||
ASN1_TIME tm;
|
||||
|
||||
tm.data=(unsigned char *)str;
|
||||
tm.length=strlen(str);
|
||||
tm.type=V_ASN1_UTCTIME;
|
||||
return(ASN1_UTCTIME_check(&tm));
|
||||
if (ASN1_TIME_check(&tm))
|
||||
return 1;
|
||||
tm.type=V_ASN1_GENERALIZEDTIME;
|
||||
return ASN1_TIME_check(&tm);
|
||||
}
|
||||
|
||||
static int do_revoke(X509 *x509, CA_DB *db, int type, char *value)
|
||||
|
||||
@@ -226,7 +226,12 @@ int MAIN(int argc, char **argv)
|
||||
goto bad;
|
||||
}
|
||||
buf[0]='\0';
|
||||
fgets(buf,sizeof buf,infile);
|
||||
if (!fgets(buf,sizeof buf,infile))
|
||||
{
|
||||
BIO_printf(bio_err,"unable to read key from '%s'\n",
|
||||
file);
|
||||
goto bad;
|
||||
}
|
||||
fclose(infile);
|
||||
i=strlen(buf);
|
||||
if ((i > 0) &&
|
||||
|
||||
@@ -106,9 +106,9 @@ int MAIN(int argc, char **argv)
|
||||
char *inrand=NULL;
|
||||
BIO *out=NULL;
|
||||
BIGNUM *bn = BN_new();
|
||||
RSA *rsa = RSA_new();
|
||||
RSA *rsa = NULL;
|
||||
|
||||
if(!bn || !rsa) goto err;
|
||||
if(!bn) goto err;
|
||||
|
||||
apps_startup();
|
||||
BN_GENCB_set(&cb, genrsa_cb, bio_err);
|
||||
@@ -269,6 +269,10 @@ bad:
|
||||
BIO_printf(bio_err,"Generating RSA private key, %d bit long modulus\n",
|
||||
num);
|
||||
|
||||
rsa = RSA_new();
|
||||
if (!rsa)
|
||||
goto err;
|
||||
|
||||
if (use_x931)
|
||||
{
|
||||
BIGNUM *pubexp;
|
||||
|
||||
@@ -5,13 +5,23 @@ $! Time of creation: 22-MAY-1998 10:13
|
||||
$!
|
||||
$! P1 root of the directory tree
|
||||
$!
|
||||
$
|
||||
$ IF P1 .EQS. ""
|
||||
$ THEN
|
||||
$ WRITE SYS$OUTPUT "First argument missing."
|
||||
$ WRITE SYS$OUTPUT "Should be the directory where you want things installed."
|
||||
$ WRITE SYS$OUTPUT -
|
||||
"Should be the directory where you want things installed."
|
||||
$ EXIT
|
||||
$ ENDIF
|
||||
$
|
||||
$ IF (F$GETSYI("CPU").LT.128)
|
||||
$ THEN
|
||||
$ ARCH := VAX
|
||||
$ ELSE
|
||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
||||
$ ENDIF
|
||||
$
|
||||
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
|
||||
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
|
||||
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
||||
@@ -19,23 +29,16 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
||||
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
|
||||
$
|
||||
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
|
||||
$ DEFINE/NOLOG WRK_SSLVEXE WRK_SSLROOT:[VAX_EXE]
|
||||
$ DEFINE/NOLOG WRK_SSLAEXE WRK_SSLROOT:[ALPHA_EXE]
|
||||
$ DEFINE/NOLOG WRK_SSLLIB WRK_SSLROOT:[LIB]
|
||||
$ DEFINE/NOLOG WRK_SSLEXE WRK_SSLROOT:['ARCH'_EXE]
|
||||
$
|
||||
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLROOT:[000000]
|
||||
$ IF F$PARSE("WRK_SSLVEXE:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLVEXE:
|
||||
$ IF F$PARSE("WRK_SSLAEXE:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLAEXE:
|
||||
$ IF F$PARSE("WRK_SSLLIB:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLLIB:
|
||||
$ IF F$PARSE("WRK_SSLEXE:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLEXE:
|
||||
$
|
||||
$ EXE := openssl
|
||||
$
|
||||
$ VEXE_DIR := [-.VAX.EXE.APPS]
|
||||
$ AEXE_DIR := [-.AXP.EXE.APPS]
|
||||
$ EXE_DIR := [-.'ARCH'.EXE.APPS]
|
||||
$
|
||||
$ I = 0
|
||||
$ LOOP_EXE:
|
||||
@@ -43,25 +46,18 @@ $ E = F$EDIT(F$ELEMENT(I, ",", EXE),"TRIM")
|
||||
$ I = I + 1
|
||||
$ IF E .EQS. "," THEN GOTO LOOP_EXE_END
|
||||
$ SET NOON
|
||||
$ IF F$SEARCH(VEXE_DIR+E+".EXE") .NES. ""
|
||||
$ IF F$SEARCH(EXE_DIR+E+".EXE") .NES. ""
|
||||
$ THEN
|
||||
$ COPY 'VEXE_DIR''E'.EXE WRK_SSLVEXE:'E'.EXE/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLVEXE:'E'.EXE
|
||||
$ ENDIF
|
||||
$ IF F$SEARCH(AEXE_DIR+E+".EXE") .NES. ""
|
||||
$ THEN
|
||||
$ COPY 'AEXE_DIR''E'.EXE WRK_SSLAEXE:'E'.EXE/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLAEXE:'E'.EXE
|
||||
$ COPY 'EXE_DIR''E'.EXE WRK_SSLEXE:'E'.EXE/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLEXE:'E'.EXE
|
||||
$ ENDIF
|
||||
$ SET ON
|
||||
$ GOTO LOOP_EXE
|
||||
$ LOOP_EXE_END:
|
||||
$
|
||||
$ SET NOON
|
||||
$ COPY CA.COM WRK_SSLAEXE:CA.COM/LOG
|
||||
$ SET FILE/PROT=W:RE WRK_SSLAEXE:CA.COM
|
||||
$ COPY CA.COM WRK_SSLVEXE:CA.COM/LOG
|
||||
$ SET FILE/PROT=W:RE WRK_SSLVEXE:CA.COM
|
||||
$ COPY CA.COM WRK_SSLEXE:CA.COM/LOG
|
||||
$ SET FILE/PROT=W:RE WRK_SSLEXE:CA.COM
|
||||
$ COPY OPENSSL-VMS.CNF WRK_SSLROOT:[000000]OPENSSL.CNF/LOG
|
||||
$ SET FILE/PROT=W:R WRK_SSLROOT:[000000]OPENSSL.CNF
|
||||
$ SET ON
|
||||
|
||||
@@ -6,11 +6,12 @@ $! A-Com Computing, Inc.
|
||||
$! byer@mail.all-net.net
|
||||
$!
|
||||
$! Changes by Richard Levitte <richard@levitte.org>
|
||||
$! Zoltan Arpadffy <zoli@polarhome.com>
|
||||
$!
|
||||
$! This command files compiles and creates all the various different
|
||||
$! "application" programs for the different types of encryption for OpenSSL.
|
||||
$! The EXE's are placed in the directory [.xxx.EXE.APPS] where "xxx" denotes
|
||||
$! either AXP or VAX depending on your machine architecture.
|
||||
$! ALPHA, IA64 or VAX, depending on your machine architecture.
|
||||
$!
|
||||
$! It was written so it would try to determine what "C" compiler to
|
||||
$! use or you can specify which "C" compiler to use.
|
||||
@@ -46,20 +47,21 @@ $ TCPIP_LIB = ""
|
||||
$!
|
||||
$! Check What Architecture We Are Using.
|
||||
$!
|
||||
$ IF (F$GETSYI("CPU").GE.128)
|
||||
$ IF (F$GETSYI("CPU").LT.128)
|
||||
$ THEN
|
||||
$!
|
||||
$! The Architecture Is AXP.
|
||||
$! The Architecture Is VAX.
|
||||
$!
|
||||
$ ARCH := AXP
|
||||
$ ARCH := VAX
|
||||
$!
|
||||
$! Else...
|
||||
$!
|
||||
$ ELSE
|
||||
$!
|
||||
$! The Architecture Is VAX.
|
||||
$! The Architecture Is Alpha, IA64 or whatever comes in the future.
|
||||
$!
|
||||
$ ARCH := VAX
|
||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
||||
$!
|
||||
$! End The Architecture Check.
|
||||
$!
|
||||
@@ -73,18 +75,6 @@ $! RSA,DSA,DSAPARAM,-
|
||||
$! X509,GENRSA,GENDSA,S_SERVER,S_CLIENT,SPEED,-
|
||||
$! S_TIME,VERSION,PKCS7,CRL2P7,SESS_ID,CIPHERS,NSEQ,
|
||||
$!
|
||||
$! Check To Make Sure We Have Valid Command Line Parameters.
|
||||
$!
|
||||
$ GOSUB CHECK_OPTIONS
|
||||
$!
|
||||
$! Initialise logical names and such
|
||||
$!
|
||||
$ GOSUB INITIALISE
|
||||
$!
|
||||
$! Tell The User What Kind of Machine We Run On.
|
||||
$!
|
||||
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
|
||||
$!
|
||||
$! Define The CRYPTO Library.
|
||||
$!
|
||||
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
|
||||
@@ -97,6 +87,22 @@ $! Define The OBJ Directory.
|
||||
$!
|
||||
$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.APPS]
|
||||
$!
|
||||
$! Define The EXE Directory.
|
||||
$!
|
||||
$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.APPS]
|
||||
$!
|
||||
$! Check To Make Sure We Have Valid Command Line Parameters.
|
||||
$!
|
||||
$ GOSUB CHECK_OPTIONS
|
||||
$!
|
||||
$! Initialise logical names and such
|
||||
$!
|
||||
$ GOSUB INITIALISE
|
||||
$!
|
||||
$! Tell The User What Kind of Machine We Run On.
|
||||
$!
|
||||
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
|
||||
$!
|
||||
$! Check To See If The OBJ Directory Exists.
|
||||
$!
|
||||
$ IF (F$PARSE(OBJ_DIR).EQS."")
|
||||
@@ -110,10 +116,6 @@ $! End The OBJ Directory Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
$! Define The EXE Directory.
|
||||
$!
|
||||
$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.APPS]
|
||||
$!
|
||||
$! Check To See If The EXE Directory Exists.
|
||||
$!
|
||||
$ IF (F$PARSE(EXE_DIR).EQS."")
|
||||
@@ -136,20 +138,24 @@ $!
|
||||
$ GOSUB CHECK_OPT_FILE
|
||||
$!
|
||||
$! Define The Application Files.
|
||||
$! NOTE: Some might think this list ugly. However, it's made this way to
|
||||
$! reflect the E_OBJ variable in Makefile as closely as possible, thereby
|
||||
$! making it fairly easy to verify that the lists are the same.
|
||||
$!
|
||||
$ LIB_FILES = "VERIFY;ASN1PARS;REQ;DGST;DH;DHPARAM;ENC;PASSWD;GENDH;ERRSTR;"+-
|
||||
"CA;PKCS7;CRL2P7;CRL;"+-
|
||||
"RSA;RSAUTL;DSA;DSAPARAM;EC;ECPARAM;"+-
|
||||
"X509;GENRSA;GENDSA;S_SERVER;S_CLIENT;SPEED;"+-
|
||||
"S_TIME;APPS;S_CB;S_SOCKET;APP_RAND;VERSION;SESS_ID;"+-
|
||||
"CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;OCSP;PRIME"
|
||||
"CIPHERS;NSEQ;PKCS12;PKCS8;SPKAC;SMIME;RAND;ENGINE;"+-
|
||||
"OCSP;PRIME;CMS"
|
||||
$ TCPIP_PROGRAMS = ",,"
|
||||
$ IF COMPILER .EQS. "VAXC" THEN -
|
||||
TCPIP_PROGRAMS = ",OPENSSL,"
|
||||
$!
|
||||
$! Setup exceptional compilations
|
||||
$!
|
||||
$ COMPILEWITH_CC2 = ",S_SERVER,S_CLIENT,"
|
||||
$ COMPILEWITH_CC2 = ",S_SOCKET,S_SERVER,S_CLIENT,"
|
||||
$!
|
||||
$ PHASE := LIB
|
||||
$!
|
||||
@@ -395,19 +401,19 @@ $! Else...
|
||||
$!
|
||||
$ ELSE
|
||||
$!
|
||||
$! Create The AXP Linker Option File.
|
||||
$! Create The non-VAX Linker Option File.
|
||||
$!
|
||||
$ CREATE 'OPT_FILE'
|
||||
$DECK
|
||||
!
|
||||
! Default System Options File For AXP To Link Agianst
|
||||
! Default System Options File For non-VAX To Link Agianst
|
||||
! The Sharable C Runtime Library.
|
||||
!
|
||||
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
|
||||
SYS$SHARE:CMA$OPEN_RTL/SHARE
|
||||
$EOD
|
||||
$!
|
||||
$! End The VAX/AXP DEC C Option File Check.
|
||||
$! End The DEC C Option File Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
@@ -556,7 +562,7 @@ $ ELSE
|
||||
$!
|
||||
$! Check To See If We Have VAXC Or DECC.
|
||||
$!
|
||||
$ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
|
||||
$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
|
||||
$ THEN
|
||||
$!
|
||||
$! Looks Like DECC, Set To Use DECC.
|
||||
@@ -666,7 +672,7 @@ $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End DECC Check.
|
||||
$!
|
||||
@@ -687,9 +693,9 @@ $!
|
||||
$! Compile Using VAXC.
|
||||
$!
|
||||
$ CC = "CC"
|
||||
$ IF ARCH.EQS."AXP"
|
||||
$ IF ARCH.NES."VAX"
|
||||
$ THEN
|
||||
$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
|
||||
$ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
|
||||
$ EXIT
|
||||
$ ENDIF
|
||||
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
||||
@@ -703,7 +709,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End VAXC Check
|
||||
$!
|
||||
@@ -730,7 +736,7 @@ $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End The GNU C Check.
|
||||
$!
|
||||
|
||||
@@ -235,16 +235,19 @@ int main(int Argc, char *Argv[])
|
||||
|
||||
in_FIPS_mode = 0;
|
||||
|
||||
#ifdef OPENSSL_FIPS
|
||||
if(getenv("OPENSSL_FIPS")) {
|
||||
#ifdef OPENSSL_FIPS
|
||||
if (!FIPS_mode_set(1)) {
|
||||
ERR_load_crypto_strings();
|
||||
ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
|
||||
EXIT(1);
|
||||
}
|
||||
in_FIPS_mode = 1;
|
||||
}
|
||||
#else
|
||||
fprintf(stderr, "FIPS mode not supported.\n");
|
||||
EXIT(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (bio_err == NULL)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
@@ -333,7 +336,8 @@ int main(int Argc, char *Argv[])
|
||||
else prompt="OpenSSL> ";
|
||||
fputs(prompt,stdout);
|
||||
fflush(stdout);
|
||||
fgets(p,n,stdin);
|
||||
if (!fgets(p,n,stdin))
|
||||
goto end;
|
||||
if (p[0] == '\0') goto end;
|
||||
i=strlen(p);
|
||||
if (i <= 1) break;
|
||||
|
||||
@@ -68,6 +68,12 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/pkcs12.h>
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
/* Rename these functions to avoid name clashes on NetWare OS */
|
||||
#define uni2asc OPENSSL_uni2asc
|
||||
#define asc2uni OPENSSL_asc2uni
|
||||
#endif
|
||||
|
||||
#define PROG pkcs12_main
|
||||
|
||||
const EVP_CIPHER *enc;
|
||||
|
||||
@@ -1538,7 +1538,8 @@ start:
|
||||
buf[0]='\0';
|
||||
if (!batch)
|
||||
{
|
||||
fgets(buf,sizeof buf,stdin);
|
||||
if (!fgets(buf,sizeof buf,stdin))
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1596,7 +1597,8 @@ start:
|
||||
buf[0]='\0';
|
||||
if (!batch)
|
||||
{
|
||||
fgets(buf,sizeof buf,stdin);
|
||||
if (!fgets(buf,sizeof buf,stdin))
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -171,3 +171,6 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
unsigned char *data, int len,
|
||||
void *arg);
|
||||
#endif
|
||||
|
||||
int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len);
|
||||
int MS_CALLBACK verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len);
|
||||
|
||||
105
apps/s_cb.c
105
apps/s_cb.c
@@ -117,12 +117,17 @@
|
||||
#undef NON_MAIN
|
||||
#undef USE_SOCKETS
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include "s_apps.h"
|
||||
|
||||
#define COOKIE_SECRET_LENGTH 16
|
||||
|
||||
int verify_depth=0;
|
||||
int verify_error=X509_V_OK;
|
||||
unsigned char cookie_secret[COOKIE_SECRET_LENGTH];
|
||||
int cookie_initialized=0;
|
||||
|
||||
int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
|
||||
{
|
||||
@@ -338,6 +343,12 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
break;
|
||||
default:
|
||||
str_version = "???";
|
||||
case DTLS1_VERSION:
|
||||
str_version = "DTLS 1.0 ";
|
||||
break;
|
||||
case DTLS1_BAD_VER:
|
||||
str_version = "DTLS 1.0 (bad) ";
|
||||
break;
|
||||
}
|
||||
|
||||
if (version == SSL2_VERSION)
|
||||
@@ -401,7 +412,10 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
}
|
||||
}
|
||||
|
||||
if (version == SSL3_VERSION || version == TLS1_VERSION)
|
||||
if (version == SSL3_VERSION ||
|
||||
version == TLS1_VERSION ||
|
||||
version == DTLS1_VERSION ||
|
||||
version == DTLS1_BAD_VER)
|
||||
{
|
||||
switch (content_type)
|
||||
{
|
||||
@@ -540,6 +554,9 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||
case 15:
|
||||
str_details1 = ", CertificateVerify";
|
||||
break;
|
||||
case 3:
|
||||
str_details1 = ", HelloVerifyRequest";
|
||||
break;
|
||||
case 16:
|
||||
str_details1 = ", ClientKeyExchange";
|
||||
break;
|
||||
@@ -621,6 +638,9 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
extname = "server ticket";
|
||||
break;
|
||||
|
||||
case TLSEXT_TYPE_renegotiate:
|
||||
extname = "renegotiate";
|
||||
break;
|
||||
|
||||
default:
|
||||
extname = "unknown";
|
||||
@@ -634,3 +654,86 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
BIO_dump(bio, (char *)data, len);
|
||||
(void)BIO_flush(bio);
|
||||
}
|
||||
|
||||
int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len)
|
||||
{
|
||||
unsigned char *buffer, result[EVP_MAX_MD_SIZE];
|
||||
unsigned int length, resultlength;
|
||||
struct sockaddr_in peer;
|
||||
|
||||
/* Initialize a random secret */
|
||||
if (!cookie_initialized)
|
||||
{
|
||||
if (!RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH))
|
||||
{
|
||||
BIO_printf(bio_err,"error setting random cookie secret\n");
|
||||
return 0;
|
||||
}
|
||||
cookie_initialized = 1;
|
||||
}
|
||||
|
||||
/* Read peer information */
|
||||
(void)BIO_dgram_get_peer(SSL_get_rbio(ssl), &peer);
|
||||
|
||||
/* Create buffer with peer's address and port */
|
||||
length = sizeof(peer.sin_addr);
|
||||
length += sizeof(peer.sin_port);
|
||||
buffer = OPENSSL_malloc(length);
|
||||
|
||||
if (buffer == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"out of memory\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(buffer, &peer.sin_addr, sizeof(peer.sin_addr));
|
||||
memcpy(buffer + sizeof(peer.sin_addr), &peer.sin_port, sizeof(peer.sin_port));
|
||||
|
||||
/* Calculate HMAC of buffer using the secret */
|
||||
HMAC(EVP_sha1(), cookie_secret, COOKIE_SECRET_LENGTH,
|
||||
buffer, length, result, &resultlength);
|
||||
OPENSSL_free(buffer);
|
||||
|
||||
memcpy(cookie, result, resultlength);
|
||||
*cookie_len = resultlength;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int MS_CALLBACK verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len)
|
||||
{
|
||||
unsigned char *buffer, result[EVP_MAX_MD_SIZE];
|
||||
unsigned int length, resultlength;
|
||||
struct sockaddr_in peer;
|
||||
|
||||
/* If secret isn't initialized yet, the cookie can't be valid */
|
||||
if (!cookie_initialized)
|
||||
return 0;
|
||||
|
||||
/* Read peer information */
|
||||
(void)BIO_dgram_get_peer(SSL_get_rbio(ssl), &peer);
|
||||
|
||||
/* Create buffer with peer's address and port */
|
||||
length = sizeof(peer.sin_addr);
|
||||
length += sizeof(peer.sin_port);
|
||||
buffer = (unsigned char*) OPENSSL_malloc(length);
|
||||
|
||||
if (buffer == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"out of memory\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(buffer, &peer.sin_addr, sizeof(peer.sin_addr));
|
||||
memcpy(buffer + sizeof(peer.sin_addr), &peer.sin_port, sizeof(peer.sin_port));
|
||||
|
||||
/* Calculate HMAC of buffer using the secret */
|
||||
HMAC(EVP_sha1(), cookie_secret, COOKIE_SECRET_LENGTH,
|
||||
buffer, length, result, &resultlength);
|
||||
OPENSSL_free(buffer);
|
||||
|
||||
if (cookie_len == resultlength && memcmp(result, cookie, resultlength) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ static void sc_usage(void)
|
||||
BIO_printf(bio_err," -ssl3 - just use SSLv3\n");
|
||||
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
|
||||
BIO_printf(bio_err," -dtls1 - just use DTLSv1\n");
|
||||
BIO_printf(bio_err," -mtu - set the MTU\n");
|
||||
BIO_printf(bio_err," -mtu - set the link layer MTU\n");
|
||||
BIO_printf(bio_err," -no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n");
|
||||
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
|
||||
BIO_printf(bio_err," -serverpref - Use server's cipher preferences (only SSLv2)\n");
|
||||
@@ -249,6 +249,7 @@ static void sc_usage(void)
|
||||
BIO_printf(bio_err," -status - request certificate status from server\n");
|
||||
BIO_printf(bio_err," -no_ticket - disable use of RFC4507bis session tickets\n");
|
||||
#endif
|
||||
BIO_printf(bio_err," -legacy_renegotiation - enable use of legacy renegotiation (dangerous)\n");
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
@@ -286,7 +287,7 @@ int MAIN(int, char **);
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
int off=0;
|
||||
int off=0, clr = 0;
|
||||
SSL *con=NULL,*con2=NULL;
|
||||
X509_STORE *store = NULL;
|
||||
int s,k,width,state=0;
|
||||
@@ -318,6 +319,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO *sbio;
|
||||
char *inrand=NULL;
|
||||
int mbuf_len=0;
|
||||
struct timeval timeout, *timeoutp;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
char *engine_id=NULL;
|
||||
char *ssl_client_engine_id=NULL;
|
||||
@@ -338,7 +340,7 @@ int MAIN(int argc, char **argv)
|
||||
struct sockaddr peer;
|
||||
int peerlen = sizeof(peer);
|
||||
int enable_timeouts = 0 ;
|
||||
long mtu = 0;
|
||||
long socket_mtu = 0;
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
char *jpake_secret = NULL;
|
||||
#endif
|
||||
@@ -489,7 +491,7 @@ int MAIN(int argc, char **argv)
|
||||
else if (strcmp(*argv,"-mtu") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
mtu = atol(*(++argv));
|
||||
socket_mtu = atol(*(++argv));
|
||||
}
|
||||
#endif
|
||||
else if (strcmp(*argv,"-bugs") == 0)
|
||||
@@ -535,6 +537,12 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
else if (strcmp(*argv,"-serverpref") == 0)
|
||||
off|=SSL_OP_CIPHER_SERVER_PREFERENCE;
|
||||
else if (strcmp(*argv,"-legacy_renegotiation") == 0)
|
||||
off|=SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
|
||||
else if (strcmp(*argv,"-legacy_server_connect") == 0)
|
||||
{ off|=SSL_OP_LEGACY_SERVER_CONNECT; }
|
||||
else if (strcmp(*argv,"-no_legacy_server_connect") == 0)
|
||||
{ clr|=SSL_OP_LEGACY_SERVER_CONNECT; }
|
||||
else if (strcmp(*argv,"-cipher") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -709,6 +717,9 @@ bad:
|
||||
SSL_CTX_set_options(ctx,SSL_OP_ALL|off);
|
||||
else
|
||||
SSL_CTX_set_options(ctx,off);
|
||||
|
||||
if (clr)
|
||||
SSL_CTX_clear_options(ctx, clr);
|
||||
/* DTLS: partial reads end up discarding unread UDP bytes :-(
|
||||
* Setting read ahead solves this problem.
|
||||
*/
|
||||
@@ -819,7 +830,6 @@ re_start:
|
||||
|
||||
if ( SSL_version(con) == DTLS1_VERSION)
|
||||
{
|
||||
struct timeval timeout;
|
||||
|
||||
sbio=BIO_new_dgram(s,BIO_NOCLOSE);
|
||||
if (getsockname(s, &peer, (void *)&peerlen) < 0)
|
||||
@@ -843,10 +853,10 @@ re_start:
|
||||
BIO_ctrl(sbio, BIO_CTRL_DGRAM_SET_SEND_TIMEOUT, 0, &timeout);
|
||||
}
|
||||
|
||||
if ( mtu > 0)
|
||||
if (socket_mtu > 28)
|
||||
{
|
||||
SSL_set_options(con, SSL_OP_NO_QUERY_MTU);
|
||||
SSL_set_mtu(con, mtu);
|
||||
SSL_set_mtu(con, socket_mtu - 28);
|
||||
}
|
||||
else
|
||||
/* want to do MTU discovery */
|
||||
@@ -1036,6 +1046,12 @@ SSL_set_tlsext_status_ids(con, ids);
|
||||
FD_ZERO(&readfds);
|
||||
FD_ZERO(&writefds);
|
||||
|
||||
if ((SSL_version(con) == DTLS1_VERSION) &&
|
||||
DTLSv1_get_timeout(con, &timeout))
|
||||
timeoutp = &timeout;
|
||||
else
|
||||
timeoutp = NULL;
|
||||
|
||||
if (SSL_in_init(con) && !SSL_total_renegotiations(con))
|
||||
{
|
||||
in_init=1;
|
||||
@@ -1132,7 +1148,7 @@ SSL_set_tlsext_status_ids(con, ids);
|
||||
if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
|
||||
#endif
|
||||
} else i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,NULL);
|
||||
NULL,timeoutp);
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
if(!write_tty) {
|
||||
@@ -1142,11 +1158,11 @@ SSL_set_tlsext_status_ids(con, ids);
|
||||
i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,&tv);
|
||||
} else i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,NULL);
|
||||
NULL,timeoutp);
|
||||
}
|
||||
#else
|
||||
i=select(width,(void *)&readfds,(void *)&writefds,
|
||||
NULL,NULL);
|
||||
NULL,timeoutp);
|
||||
#endif
|
||||
if ( i < 0)
|
||||
{
|
||||
@@ -1157,6 +1173,11 @@ SSL_set_tlsext_status_ids(con, ids);
|
||||
}
|
||||
}
|
||||
|
||||
if ((SSL_version(con) == DTLS1_VERSION) && DTLSv1_handle_timeout(con) > 0)
|
||||
{
|
||||
BIO_printf(bio_err,"TIMEOUT occured\n");
|
||||
}
|
||||
|
||||
if (!ssl_pending && FD_ISSET(SSL_get_fd(con),&writefds))
|
||||
{
|
||||
k=SSL_write(con,&(cbuf[cbuf_off]),
|
||||
@@ -1511,6 +1532,8 @@ static void print_stuff(BIO *bio, SSL *s, int full)
|
||||
EVP_PKEY_bits(pktmp));
|
||||
EVP_PKEY_free(pktmp);
|
||||
}
|
||||
BIO_printf(bio, "Secure Renegotiation IS%s supported\n",
|
||||
SSL_get_secure_renegotiation_support(s) ? "" : " NOT");
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
comp=SSL_get_current_compression(s);
|
||||
expansion=SSL_get_current_expansion(s);
|
||||
|
||||
@@ -283,11 +283,10 @@ static char *engine_id=NULL;
|
||||
static const char *session_id_prefix=NULL;
|
||||
|
||||
static int enable_timeouts = 0;
|
||||
#ifdef mtu
|
||||
#undef mtu
|
||||
#endif
|
||||
static long mtu;
|
||||
static long socket_mtu;
|
||||
#ifndef OPENSSL_NO_DTLS1
|
||||
static int cert_chain = 0;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MONOLITH
|
||||
@@ -375,7 +374,7 @@ static void sv_usage(void)
|
||||
BIO_printf(bio_err," -tls1 - Just talk TLSv1\n");
|
||||
BIO_printf(bio_err," -dtls1 - Just talk DTLSv1\n");
|
||||
BIO_printf(bio_err," -timeout - Enable timeouts\n");
|
||||
BIO_printf(bio_err," -mtu - Set MTU\n");
|
||||
BIO_printf(bio_err," -mtu - Set link layer MTU\n");
|
||||
BIO_printf(bio_err," -chain - Read a certificate chain\n");
|
||||
BIO_printf(bio_err," -no_ssl2 - Just disable SSLv2\n");
|
||||
BIO_printf(bio_err," -no_ssl3 - Just disable SSLv3\n");
|
||||
@@ -405,6 +404,7 @@ static void sv_usage(void)
|
||||
BIO_printf(bio_err," not specified (default is %s)\n",TEST_CERT2);
|
||||
BIO_printf(bio_err," -tlsextdebug - hex dump of all TLS extensions received\n");
|
||||
BIO_printf(bio_err," -no_ticket - disable use of RFC4507bis session tickets\n");
|
||||
BIO_printf(bio_err," -legacy_renegotiation - enable use of legacy renegotiation (dangerous)\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -772,6 +772,7 @@ int MAIN(int argc, char *argv[])
|
||||
int s_dcert_format = FORMAT_PEM, s_dkey_format = FORMAT_PEM;
|
||||
X509 *s_cert = NULL, *s_dcert = NULL;
|
||||
EVP_PKEY *s_key = NULL, *s_dkey = NULL;
|
||||
int no_cache = 0;
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
EVP_PKEY *s_key2 = NULL;
|
||||
X509 *s_cert2 = NULL;
|
||||
@@ -911,6 +912,8 @@ int MAIN(int argc, char *argv[])
|
||||
if (--argc < 1) goto bad;
|
||||
CApath= *(++argv);
|
||||
}
|
||||
else if (strcmp(*argv,"-no_cache") == 0)
|
||||
no_cache = 1;
|
||||
else if (strcmp(*argv,"-crl_check") == 0)
|
||||
{
|
||||
vflags |= X509_V_FLAG_CRL_CHECK;
|
||||
@@ -921,6 +924,8 @@ int MAIN(int argc, char *argv[])
|
||||
}
|
||||
else if (strcmp(*argv,"-serverpref") == 0)
|
||||
{ off|=SSL_OP_CIPHER_SERVER_PREFERENCE; }
|
||||
else if (strcmp(*argv,"-legacy_renegotiation") == 0)
|
||||
off|=SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;
|
||||
else if (strcmp(*argv,"-cipher") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -1032,7 +1037,7 @@ int MAIN(int argc, char *argv[])
|
||||
else if (strcmp(*argv,"-mtu") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
mtu = atol(*(++argv));
|
||||
socket_mtu = atol(*(++argv));
|
||||
}
|
||||
else if (strcmp(*argv, "-chain") == 0)
|
||||
cert_chain = 1;
|
||||
@@ -1253,8 +1258,10 @@ bad:
|
||||
if (socket_type == SOCK_DGRAM) SSL_CTX_set_read_ahead(ctx, 1);
|
||||
|
||||
if (state) SSL_CTX_set_info_callback(ctx,apps_ssl_info_callback);
|
||||
|
||||
SSL_CTX_sess_set_cache_size(ctx,128);
|
||||
if (no_cache)
|
||||
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF);
|
||||
else
|
||||
SSL_CTX_sess_set_cache_size(ctx,128);
|
||||
|
||||
#if 0
|
||||
if (cipher == NULL) cipher=getenv("SSL_CIPHER");
|
||||
@@ -1321,7 +1328,10 @@ bad:
|
||||
|
||||
if (state) SSL_CTX_set_info_callback(ctx2,apps_ssl_info_callback);
|
||||
|
||||
SSL_CTX_sess_set_cache_size(ctx2,128);
|
||||
if (no_cache)
|
||||
SSL_CTX_set_session_cache_mode(ctx2,SSL_SESS_CACHE_OFF);
|
||||
else
|
||||
SSL_CTX_sess_set_cache_size(ctx2,128);
|
||||
|
||||
if ((!SSL_CTX_load_verify_locations(ctx2,CAfile,CApath)) ||
|
||||
(!SSL_CTX_set_default_verify_paths(ctx2)))
|
||||
@@ -1498,6 +1508,10 @@ bad:
|
||||
SSL_CTX_set_session_id_context(ctx,(void*)&s_server_session_id_context,
|
||||
sizeof s_server_session_id_context);
|
||||
|
||||
/* Set DTLS cookie generation and verification callbacks */
|
||||
SSL_CTX_set_cookie_generate_cb(ctx, generate_cookie_callback);
|
||||
SSL_CTX_set_cookie_verify_cb(ctx, verify_cookie_callback);
|
||||
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
if (ctx2)
|
||||
{
|
||||
@@ -1591,8 +1605,11 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
unsigned long l;
|
||||
SSL *con=NULL;
|
||||
BIO *sbio;
|
||||
struct timeval timeout;
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_NETWARE)
|
||||
struct timeval tv;
|
||||
#else
|
||||
struct timeval *timeoutp;
|
||||
#endif
|
||||
|
||||
if ((buf=OPENSSL_malloc(bufsize)) == NULL)
|
||||
@@ -1644,7 +1661,6 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
|
||||
if (SSL_version(con) == DTLS1_VERSION)
|
||||
{
|
||||
struct timeval timeout;
|
||||
|
||||
sbio=BIO_new_dgram(s,BIO_NOCLOSE);
|
||||
|
||||
@@ -1660,10 +1676,10 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
}
|
||||
|
||||
|
||||
if ( mtu > 0)
|
||||
if (socket_mtu > 28)
|
||||
{
|
||||
SSL_set_options(con, SSL_OP_NO_QUERY_MTU);
|
||||
SSL_set_mtu(con, mtu);
|
||||
SSL_set_mtu(con, socket_mtu - 28);
|
||||
}
|
||||
else
|
||||
/* want to do MTU discovery */
|
||||
@@ -1745,7 +1761,19 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
if(_kbhit())
|
||||
read_from_terminal = 1;
|
||||
#else
|
||||
i=select(width,(void *)&readfds,NULL,NULL,NULL);
|
||||
if ((SSL_version(con) == DTLS1_VERSION) &&
|
||||
DTLSv1_get_timeout(con, &timeout))
|
||||
timeoutp = &timeout;
|
||||
else
|
||||
timeoutp = NULL;
|
||||
|
||||
i=select(width,(void *)&readfds,NULL,NULL,timeoutp);
|
||||
|
||||
if ((SSL_version(con) == DTLS1_VERSION) && DTLSv1_handle_timeout(con) > 0)
|
||||
{
|
||||
BIO_printf(bio_err,"TIMEOUT occured\n");
|
||||
}
|
||||
|
||||
if (i <= 0) continue;
|
||||
if (FD_ISSET(fileno(stdin),&readfds))
|
||||
read_from_terminal = 1;
|
||||
@@ -2002,6 +2030,8 @@ static int init_ssl_connection(SSL *con)
|
||||
con->kssl_ctx->client_princ);
|
||||
}
|
||||
#endif /* OPENSSL_NO_KRB5 */
|
||||
BIO_printf(bio_s_out, "Secure Renegotiation IS%s supported\n",
|
||||
SSL_get_secure_renegotiation_support(con) ? "" : " NOT");
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,12 @@
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef FLAT_INC
|
||||
#include "e_os2.h"
|
||||
#else
|
||||
#include "../e_os2.h"
|
||||
#endif
|
||||
|
||||
/* With IPv6, it looks like Digital has mixed up the proper order of
|
||||
recursive header file inclusion, resulting in the compiler complaining
|
||||
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
|
||||
|
||||
22
apps/speed.c
22
apps/speed.c
@@ -254,8 +254,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(OPENSSL_SYS_OS2) && !defined(OPENSSL_SYS_NETWARE)
|
||||
# define HAVE_FORK 1
|
||||
#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
|
||||
# define NO_FORK 1
|
||||
#elif HAVE_FORK
|
||||
# undef NO_FORK
|
||||
#else
|
||||
# define NO_FORK 1
|
||||
#endif
|
||||
|
||||
#undef BUFSIZE
|
||||
@@ -271,7 +275,7 @@ static void print_message(const char *s,long num,int length);
|
||||
static void pkey_print_message(const char *str, const char *str2,
|
||||
long num, int bits, int sec);
|
||||
static void print_result(int alg,int run_no,int count,double time_used);
|
||||
#ifdef HAVE_FORK
|
||||
#ifndef NO_FORK
|
||||
static int do_multi(int multi);
|
||||
#endif
|
||||
|
||||
@@ -749,7 +753,7 @@ int MAIN(int argc, char **argv)
|
||||
const EVP_CIPHER *evp_cipher=NULL;
|
||||
const EVP_MD *evp_md=NULL;
|
||||
int decrypt=0;
|
||||
#ifdef HAVE_FORK
|
||||
#ifndef NO_FORK
|
||||
int multi=0;
|
||||
#endif
|
||||
|
||||
@@ -877,7 +881,7 @@ int MAIN(int argc, char **argv)
|
||||
j--;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_FORK
|
||||
#ifndef NO_FORK
|
||||
else if ((argc > 0) && (strcmp(*argv,"-multi") == 0))
|
||||
{
|
||||
argc--;
|
||||
@@ -1257,7 +1261,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err,"-evp e use EVP e.\n");
|
||||
BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n");
|
||||
BIO_printf(bio_err,"-mr produce machine readable output.\n");
|
||||
#ifdef HAVE_FORK
|
||||
#ifndef NO_FORK
|
||||
BIO_printf(bio_err,"-multi n run n benchmarks in parallel.\n");
|
||||
#endif
|
||||
goto end;
|
||||
@@ -1267,7 +1271,7 @@ int MAIN(int argc, char **argv)
|
||||
j++;
|
||||
}
|
||||
|
||||
#ifdef HAVE_FORK
|
||||
#ifndef NO_FORK
|
||||
if(multi && do_multi(multi))
|
||||
goto show_res;
|
||||
#endif
|
||||
@@ -2462,7 +2466,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
if (rnd_fake) RAND_cleanup();
|
||||
#endif
|
||||
#ifdef HAVE_FORK
|
||||
#ifndef NO_FORK
|
||||
show_res:
|
||||
#endif
|
||||
if(!mr)
|
||||
@@ -2717,7 +2721,7 @@ static void print_result(int alg,int run_no,int count,double time_used)
|
||||
results[alg][run_no]=((double)count)/time_used*lengths[run_no];
|
||||
}
|
||||
|
||||
#ifdef HAVE_FORK
|
||||
#ifndef NO_FORK
|
||||
static char *sstrsep(char **string, const char *delim)
|
||||
{
|
||||
char isdelim[256];
|
||||
|
||||
@@ -1151,6 +1151,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
||||
/* NOTE: this certificate can/should be self signed, unless it was
|
||||
* a certificate request in which case it is not. */
|
||||
X509_STORE_CTX_set_cert(&xsc,x);
|
||||
X509_STORE_CTX_set_flags(&xsc, X509_V_FLAG_CHECK_SS_SIGNATURE);
|
||||
if (!reqfile && X509_verify_cert(&xsc) <= 0)
|
||||
goto end;
|
||||
|
||||
|
||||
10
config
10
config
@@ -48,10 +48,10 @@ done
|
||||
|
||||
# First get uname entries that we use below
|
||||
|
||||
MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
|
||||
RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
|
||||
SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
|
||||
VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
|
||||
[ "$MACHINE" ] || MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
|
||||
[ "$RELEASE" ] || RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
|
||||
[ "$SYSTEM" ] || SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
|
||||
[ "$BUILD" ] || VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
|
||||
|
||||
|
||||
# Now test for ISC and SCO, since it is has a braindamaged uname.
|
||||
@@ -769,6 +769,8 @@ case "$GUESSOS" in
|
||||
t3e-cray-unicosmk) OUT="cray-t3e" ;;
|
||||
j90-cray-unicos) OUT="cray-j90" ;;
|
||||
nsr-tandem-nsk) OUT="tandem-c89" ;;
|
||||
x86pc-*-qnx6) OUT="QNX6-i386" ;;
|
||||
*-*-qnx6) OUT="QNX6" ;;
|
||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -1181,12 +1181,12 @@ AES_cbc_encrypt:
|
||||
.Lcbc_cleanup:
|
||||
cmpl \$0,$mark # was the key schedule copied?
|
||||
lea $aes_key,%rdi
|
||||
mov $_rsp,%rsp
|
||||
je .Lcbc_exit
|
||||
mov \$240/8,%ecx
|
||||
xor %rax,%rax
|
||||
.long 0x90AB48F3 # rep stosq
|
||||
.Lcbc_exit:
|
||||
mov $_rsp,%rsp
|
||||
popfq
|
||||
pop %r15
|
||||
pop %r14
|
||||
|
||||
@@ -93,7 +93,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
||||
int str_type;
|
||||
int ret;
|
||||
char free_out;
|
||||
int outform, outlen;
|
||||
int outform, outlen = 0;
|
||||
ASN1_STRING *dest;
|
||||
unsigned char *p;
|
||||
int nchar;
|
||||
|
||||
@@ -291,6 +291,17 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
|
||||
ASN1_OBJECT *ret=NULL;
|
||||
const unsigned char *p;
|
||||
int i;
|
||||
/* Sanity check OID encoding: can't have 0x80 in subidentifiers, see:
|
||||
* X.690 8.19.2
|
||||
*/
|
||||
for (i = 0, p = *pp + 1; i < len - 1; i++, p++)
|
||||
{
|
||||
if (*p == 0x80)
|
||||
{
|
||||
ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* only the ASN1_OBJECTs from the 'table' will have values
|
||||
* for ->sn or ->ln */
|
||||
|
||||
@@ -344,6 +344,8 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
|
||||
((void*) (1 ? p : (type*)0))
|
||||
#define CHECKED_PPTR_OF(type, p) \
|
||||
((void**) (1 ? p : (type**)0))
|
||||
#define CHECKED_PTR_OF_TO_CHAR(type, p) \
|
||||
((char*) (1 ? p : (type*)0))
|
||||
|
||||
#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
|
||||
#define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **)
|
||||
@@ -933,12 +935,12 @@ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x);
|
||||
#define ASN1_dup_of(type,i2d,d2i,x) \
|
||||
((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
|
||||
CHECKED_D2I_OF(type, d2i), \
|
||||
CHECKED_PTR_OF(type, x)))
|
||||
CHECKED_PTR_OF_TO_CHAR(type, x)))
|
||||
|
||||
#define ASN1_dup_of_const(type,i2d,d2i,x) \
|
||||
((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \
|
||||
CHECKED_D2I_OF(type, d2i), \
|
||||
CHECKED_PTR_OF(const type, x)))
|
||||
CHECKED_PTR_OF_TO_CHAR(const type, x)))
|
||||
|
||||
void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
|
||||
|
||||
@@ -1263,6 +1265,7 @@ void ERR_load_ASN1_strings(void);
|
||||
#define ASN1_R_INVALID_MIME_TYPE 200
|
||||
#define ASN1_R_INVALID_MODIFIER 186
|
||||
#define ASN1_R_INVALID_NUMBER 187
|
||||
#define ASN1_R_INVALID_OBJECT_ENCODING 212
|
||||
#define ASN1_R_INVALID_SEPARATOR 131
|
||||
#define ASN1_R_INVALID_TIME_FORMAT 132
|
||||
#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133
|
||||
|
||||
@@ -240,6 +240,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
||||
{ERR_REASON(ASN1_R_INVALID_MIME_TYPE) ,"invalid mime type"},
|
||||
{ERR_REASON(ASN1_R_INVALID_MODIFIER) ,"invalid modifier"},
|
||||
{ERR_REASON(ASN1_R_INVALID_NUMBER) ,"invalid number"},
|
||||
{ERR_REASON(ASN1_R_INVALID_OBJECT_ENCODING),"invalid object encoding"},
|
||||
{ERR_REASON(ASN1_R_INVALID_SEPARATOR) ,"invalid separator"},
|
||||
{ERR_REASON(ASN1_R_INVALID_TIME_FORMAT) ,"invalid time format"},
|
||||
{ERR_REASON(ASN1_R_INVALID_UNIVERSALSTRING_LENGTH),"invalid universalstring length"},
|
||||
|
||||
@@ -227,6 +227,8 @@ ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf)
|
||||
/* Allocate buffer for new encoding */
|
||||
|
||||
new_der = OPENSSL_malloc(len);
|
||||
if (!new_der)
|
||||
goto err;
|
||||
|
||||
/* Generate tagged encoding */
|
||||
|
||||
@@ -446,6 +448,8 @@ static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf)
|
||||
int derlen;
|
||||
int i, is_set;
|
||||
sk = sk_ASN1_TYPE_new_null();
|
||||
if (!sk)
|
||||
goto bad;
|
||||
if (section)
|
||||
{
|
||||
if (!cnf)
|
||||
@@ -458,7 +462,8 @@ static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf)
|
||||
typ = ASN1_generate_v3(sk_CONF_VALUE_value(sect, i)->value, cnf);
|
||||
if (!typ)
|
||||
goto bad;
|
||||
sk_ASN1_TYPE_push(sk, typ);
|
||||
if (!sk_ASN1_TYPE_push(sk, typ))
|
||||
goto bad;
|
||||
typ = NULL;
|
||||
}
|
||||
}
|
||||
@@ -474,6 +479,8 @@ static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf)
|
||||
derlen = i2d_ASN1_SET_OF_ASN1_TYPE(sk, NULL, i2d_ASN1_TYPE, utype,
|
||||
V_ASN1_UNIVERSAL, is_set);
|
||||
der = OPENSSL_malloc(derlen);
|
||||
if (!der)
|
||||
goto bad;
|
||||
p = der;
|
||||
i2d_ASN1_SET_OF_ASN1_TYPE(sk, &p, i2d_ASN1_TYPE, utype,
|
||||
V_ASN1_UNIVERSAL, is_set);
|
||||
|
||||
@@ -246,7 +246,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offse
|
||||
ii=d2i_ASN1_BOOLEAN(NULL,&opp,len+hl);
|
||||
if (ii < 0)
|
||||
{
|
||||
if (BIO_write(bp,"Bad boolean\n",12))
|
||||
if (BIO_write(bp,"Bad boolean\n",12) <= 0)
|
||||
goto end;
|
||||
}
|
||||
BIO_printf(bp,":%d",ii);
|
||||
|
||||
@@ -379,6 +379,8 @@ int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
|
||||
int gmt=0;
|
||||
int i;
|
||||
int y=0,M=0,d=0,h=0,m=0,s=0;
|
||||
char *f = NULL;
|
||||
int f_len = 0;
|
||||
|
||||
i=tm->length;
|
||||
v=(char *)tm->data;
|
||||
@@ -396,10 +398,21 @@ int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
|
||||
if (tm->length >= 14 &&
|
||||
(v[12] >= '0') && (v[12] <= '9') &&
|
||||
(v[13] >= '0') && (v[13] <= '9'))
|
||||
{
|
||||
s= (v[12]-'0')*10+(v[13]-'0');
|
||||
/* Check for fractions of seconds. */
|
||||
if (tm->length >= 15 && v[14] == '.')
|
||||
{
|
||||
int l = tm->length;
|
||||
f = &v[14]; /* The decimal point. */
|
||||
f_len = 1;
|
||||
while (14 + f_len < l && f[f_len] >= '0' && f[f_len] <= '9')
|
||||
++f_len;
|
||||
}
|
||||
}
|
||||
|
||||
if (BIO_printf(bp,"%s %2d %02d:%02d:%02d %d%s",
|
||||
mon[M-1],d,h,m,s,y,(gmt)?" GMT":"") <= 0)
|
||||
if (BIO_printf(bp,"%s %2d %02d:%02d:%02d%.*s %d%s",
|
||||
mon[M-1],d,h,m,s,f_len,f,y,(gmt)?" GMT":"") <= 0)
|
||||
return(0);
|
||||
else
|
||||
return(1);
|
||||
|
||||
@@ -156,8 +156,11 @@ extern "C" {
|
||||
* previous write
|
||||
* operation */
|
||||
|
||||
#define BIO_CTRL_DGRAM_GET_PEER 46
|
||||
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
||||
|
||||
#define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout to
|
||||
* adjust socket timeouts */
|
||||
|
||||
/* modifiers */
|
||||
#define BIO_FP_READ 0x02
|
||||
@@ -405,7 +408,7 @@ typedef struct bio_f_buffer_ctx_struct
|
||||
#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
|
||||
#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
|
||||
#define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
|
||||
#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3)
|
||||
#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3,0)
|
||||
|
||||
|
||||
#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
||||
@@ -414,7 +417,7 @@ typedef struct bio_f_buffer_ctx_struct
|
||||
#define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name)
|
||||
#define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0)
|
||||
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
|
||||
#define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?"a":NULL)
|
||||
#define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?(void *)"a":NULL)
|
||||
#define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio)
|
||||
|
||||
#define BIO_BIND_NORMAL 0
|
||||
@@ -541,6 +544,8 @@ int BIO_ctrl_reset_read_request(BIO *b);
|
||||
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
|
||||
#define BIO_dgram_send_timedout(b) \
|
||||
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
|
||||
#define BIO_dgram_get_peer(b,peer) \
|
||||
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)
|
||||
#define BIO_dgram_set_peer(b,peer) \
|
||||
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer)
|
||||
|
||||
|
||||
@@ -66,7 +66,13 @@
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS)
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_LINUX
|
||||
#define IP_MTU 14 /* linux is lame */
|
||||
#endif
|
||||
|
||||
#ifdef WATT32
|
||||
#define sock_write SockWrite /* Watt-32 uses same names */
|
||||
@@ -84,6 +90,8 @@ static int dgram_clear(BIO *bio);
|
||||
|
||||
static int BIO_dgram_should_retry(int s);
|
||||
|
||||
static void get_current_time(struct timeval *t);
|
||||
|
||||
static BIO_METHOD methods_dgramp=
|
||||
{
|
||||
BIO_TYPE_DGRAM,
|
||||
@@ -104,6 +112,8 @@ typedef struct bio_dgram_data_st
|
||||
unsigned int connected;
|
||||
unsigned int _errno;
|
||||
unsigned int mtu;
|
||||
struct timeval next_timeout;
|
||||
struct timeval socket_timeout;
|
||||
} bio_dgram_data;
|
||||
|
||||
BIO_METHOD *BIO_s_datagram(void)
|
||||
@@ -165,7 +175,100 @@ static int dgram_clear(BIO *a)
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
static void dgram_adjust_rcv_timeout(BIO *b)
|
||||
{
|
||||
#if defined(SO_RCVTIMEO)
|
||||
bio_dgram_data *data = (bio_dgram_data *)b->ptr;
|
||||
int sz = sizeof(int);
|
||||
|
||||
/* Is a timer active? */
|
||||
if (data->next_timeout.tv_sec > 0 || data->next_timeout.tv_usec > 0)
|
||||
{
|
||||
struct timeval timenow, timeleft;
|
||||
|
||||
/* Read current socket timeout */
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
int timeout;
|
||||
if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||
(void*)&timeout, &sz) < 0)
|
||||
{ perror("getsockopt"); }
|
||||
else
|
||||
{
|
||||
data->socket_timeout.tv_sec = timeout / 1000;
|
||||
data->socket_timeout.tv_usec = (timeout % 1000) * 1000;
|
||||
}
|
||||
#else
|
||||
if ( getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||
&(data->socket_timeout), (void *)&sz) < 0)
|
||||
{ perror("getsockopt"); }
|
||||
#endif
|
||||
|
||||
/* Get current time */
|
||||
get_current_time(&timenow);
|
||||
|
||||
/* Calculate time left until timer expires */
|
||||
memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval));
|
||||
timeleft.tv_sec -= timenow.tv_sec;
|
||||
timeleft.tv_usec -= timenow.tv_usec;
|
||||
if (timeleft.tv_usec < 0)
|
||||
{
|
||||
timeleft.tv_sec--;
|
||||
timeleft.tv_usec += 1000000;
|
||||
}
|
||||
|
||||
if (timeleft.tv_sec < 0)
|
||||
{
|
||||
timeleft.tv_sec = 0;
|
||||
timeleft.tv_usec = 1;
|
||||
}
|
||||
|
||||
/* Adjust socket timeout if next handhake message timer
|
||||
* will expire earlier.
|
||||
*/
|
||||
if ((data->socket_timeout.tv_sec == 0 && data->socket_timeout.tv_usec == 0) ||
|
||||
(data->socket_timeout.tv_sec > timeleft.tv_sec) ||
|
||||
(data->socket_timeout.tv_sec == timeleft.tv_sec &&
|
||||
data->socket_timeout.tv_usec >= timeleft.tv_usec))
|
||||
{
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
timeout = timeleft.tv_sec * 1000 + timeleft.tv_usec / 1000;
|
||||
if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||
(void*)&timeout, sizeof(timeout)) < 0)
|
||||
{ perror("setsockopt"); }
|
||||
#else
|
||||
if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &timeleft,
|
||||
sizeof(struct timeval)) < 0)
|
||||
{ perror("setsockopt"); }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void dgram_reset_rcv_timeout(BIO *b)
|
||||
{
|
||||
#if defined(SO_RCVTIMEO)
|
||||
bio_dgram_data *data = (bio_dgram_data *)b->ptr;
|
||||
|
||||
/* Is a timer active? */
|
||||
if (data->next_timeout.tv_sec > 0 || data->next_timeout.tv_usec > 0)
|
||||
{
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
int timeout = data->socket_timeout.tv_sec * 1000 +
|
||||
data->socket_timeout.tv_usec / 1000;
|
||||
if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||
(void*)&timeout, sizeof(timeout)) < 0)
|
||||
{ perror("setsockopt"); }
|
||||
#else
|
||||
if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &(data->socket_timeout),
|
||||
sizeof(struct timeval)) < 0)
|
||||
{ perror("setsockopt"); }
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int dgram_read(BIO *b, char *out, int outl)
|
||||
{
|
||||
int ret=0;
|
||||
@@ -183,13 +286,15 @@ static int dgram_read(BIO *b, char *out, int outl)
|
||||
* but this is not universal. Cast to (void *) to avoid
|
||||
* compiler warnings.
|
||||
*/
|
||||
dgram_adjust_rcv_timeout(b);
|
||||
ret=recvfrom(b->num,out,outl,0,&peer,(void *)&peerlen);
|
||||
dgram_reset_rcv_timeout(b);
|
||||
|
||||
if ( ! data->connected && ret > 0)
|
||||
BIO_ctrl(b, BIO_CTRL_DGRAM_CONNECT, 0, &peer);
|
||||
if ( ! data->connected && ret >= 0)
|
||||
BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, &peer);
|
||||
|
||||
BIO_clear_retry_flags(b);
|
||||
if (ret <= 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
if (BIO_dgram_should_retry(ret))
|
||||
{
|
||||
@@ -219,7 +324,7 @@ static int dgram_write(BIO *b, const char *in, int inl)
|
||||
BIO_clear_retry_flags(b);
|
||||
if (ret <= 0)
|
||||
{
|
||||
if (BIO_sock_should_retry(ret))
|
||||
if (BIO_dgram_should_retry(ret))
|
||||
{
|
||||
BIO_set_retry_write(b);
|
||||
data->_errno = get_last_socket_error();
|
||||
@@ -240,8 +345,14 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
int *ip;
|
||||
struct sockaddr *to = NULL;
|
||||
bio_dgram_data *data = NULL;
|
||||
#if defined(IP_MTU_DISCOVER) || defined(IP_MTU)
|
||||
long sockopt_val = 0;
|
||||
unsigned int sockopt_len = 0;
|
||||
#endif
|
||||
#ifdef OPENSSL_SYS_LINUX
|
||||
socklen_t addr_len;
|
||||
struct sockaddr_storage addr;
|
||||
#endif
|
||||
|
||||
data = (bio_dgram_data *)b->ptr;
|
||||
|
||||
@@ -300,24 +411,87 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
#endif
|
||||
break;
|
||||
/* (Linux)kernel sets DF bit on outgoing IP packets */
|
||||
#ifdef IP_MTU_DISCOVER
|
||||
case BIO_CTRL_DGRAM_MTU_DISCOVER:
|
||||
sockopt_val = IP_PMTUDISC_DO;
|
||||
if ((ret = setsockopt(b->num, IPPROTO_IP, IP_MTU_DISCOVER,
|
||||
&sockopt_val, sizeof(sockopt_val))) < 0)
|
||||
perror("setsockopt");
|
||||
#ifdef OPENSSL_SYS_LINUX
|
||||
addr_len = (socklen_t)sizeof(struct sockaddr_storage);
|
||||
memset((void *)&addr, 0, sizeof(struct sockaddr_storage));
|
||||
if (getsockname(b->num, (void *)&addr, &addr_len) < 0)
|
||||
{
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
sockopt_len = sizeof(sockopt_val);
|
||||
switch (addr.ss_family)
|
||||
{
|
||||
case AF_INET:
|
||||
sockopt_val = IP_PMTUDISC_DO;
|
||||
if ((ret = setsockopt(b->num, IPPROTO_IP, IP_MTU_DISCOVER,
|
||||
&sockopt_val, sizeof(sockopt_val))) < 0)
|
||||
perror("setsockopt");
|
||||
break;
|
||||
case AF_INET6:
|
||||
sockopt_val = IPV6_PMTUDISC_DO;
|
||||
if ((ret = setsockopt(b->num, IPPROTO_IPV6, IPV6_MTU_DISCOVER,
|
||||
&sockopt_val, sizeof(sockopt_val))) < 0)
|
||||
perror("setsockopt");
|
||||
break;
|
||||
default:
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
ret = -1;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case BIO_CTRL_DGRAM_QUERY_MTU:
|
||||
sockopt_len = sizeof(sockopt_val);
|
||||
if ((ret = getsockopt(b->num, IPPROTO_IP, IP_MTU, (void *)&sockopt_val,
|
||||
&sockopt_len)) < 0 || sockopt_val < 0)
|
||||
{ ret = 0; }
|
||||
else
|
||||
#ifdef OPENSSL_SYS_LINUX
|
||||
addr_len = (socklen_t)sizeof(struct sockaddr_storage);
|
||||
memset((void *)&addr, 0, sizeof(struct sockaddr_storage));
|
||||
if (getsockname(b->num, (void *)&addr, &addr_len) < 0)
|
||||
{
|
||||
data->mtu = sockopt_val;
|
||||
ret = data->mtu;
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
sockopt_len = sizeof(sockopt_val);
|
||||
switch (addr.ss_family)
|
||||
{
|
||||
case AF_INET:
|
||||
if ((ret = getsockopt(b->num, IPPROTO_IP, IP_MTU, (void *)&sockopt_val,
|
||||
&sockopt_len)) < 0 || sockopt_val < 0)
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we assume that the transport protocol is UDP and no
|
||||
* IP options are used.
|
||||
*/
|
||||
data->mtu = sockopt_val - 8 - 20;
|
||||
ret = data->mtu;
|
||||
}
|
||||
break;
|
||||
case AF_INET6:
|
||||
if ((ret = getsockopt(b->num, IPPROTO_IPV6, IPV6_MTU, (void *)&sockopt_val,
|
||||
&sockopt_len)) < 0 || sockopt_val < 0)
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we assume that the transport protocol is UDP and no
|
||||
* IPV6 options are used.
|
||||
*/
|
||||
data->mtu = sockopt_val - 8 - 40;
|
||||
ret = data->mtu;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
ret = 0;
|
||||
#endif
|
||||
break;
|
||||
case BIO_CTRL_DGRAM_GET_MTU:
|
||||
return data->mtu;
|
||||
@@ -340,11 +514,20 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
memset(&(data->peer), 0x00, sizeof(struct sockaddr));
|
||||
}
|
||||
break;
|
||||
case BIO_CTRL_DGRAM_GET_PEER:
|
||||
to = (struct sockaddr *) ptr;
|
||||
|
||||
memcpy(to, &(data->peer), sizeof(struct sockaddr));
|
||||
ret = sizeof(struct sockaddr);
|
||||
break;
|
||||
case BIO_CTRL_DGRAM_SET_PEER:
|
||||
to = (struct sockaddr *) ptr;
|
||||
|
||||
memcpy(&(data->peer), to, sizeof(struct sockaddr));
|
||||
break;
|
||||
case BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT:
|
||||
memcpy(&(data->next_timeout), ptr, sizeof(struct timeval));
|
||||
break;
|
||||
#if defined(SO_RCVTIMEO)
|
||||
case BIO_CTRL_DGRAM_SET_RECV_TIMEOUT:
|
||||
#ifdef OPENSSL_SYS_WINDOWS
|
||||
@@ -507,10 +690,6 @@ int BIO_dgram_non_fatal_error(int err)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ENOTCONN)
|
||||
case ENOTCONN:
|
||||
#endif
|
||||
|
||||
#ifdef EINTR
|
||||
case EINTR:
|
||||
#endif
|
||||
@@ -533,11 +712,6 @@ int BIO_dgram_non_fatal_error(int err)
|
||||
case EALREADY:
|
||||
#endif
|
||||
|
||||
/* DF bit set, and packet larger than MTU */
|
||||
#ifdef EMSGSIZE
|
||||
case EMSGSIZE:
|
||||
#endif
|
||||
|
||||
return(1);
|
||||
/* break; */
|
||||
default:
|
||||
@@ -546,3 +720,20 @@ int BIO_dgram_non_fatal_error(int err)
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void get_current_time(struct timeval *t)
|
||||
{
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
struct _timeb tb;
|
||||
_ftime(&tb);
|
||||
t->tv_sec = (long)tb.time;
|
||||
t->tv_usec = (long)tb.millitm * 1000;
|
||||
#elif defined(OPENSSL_SYS_VMS)
|
||||
struct timeb tb;
|
||||
ftime(&tb);
|
||||
t->tv_sec = (long)tb.time;
|
||||
t->tv_usec = (long)tb.millitm * 1000;
|
||||
#else
|
||||
gettimeofday(t, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -404,11 +404,18 @@ static int MS_CALLBACK file_gets(BIO *bp, char *buf, int size)
|
||||
|
||||
buf[0]='\0';
|
||||
if (bp->flags&BIO_FLAGS_UPLINK)
|
||||
UP_fgets(buf,size,bp->ptr);
|
||||
{
|
||||
if (!UP_fgets(buf,size,bp->ptr))
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
fgets(buf,size,(FILE *)bp->ptr);
|
||||
{
|
||||
if (!fgets(buf,size,(FILE *)bp->ptr))
|
||||
goto err;
|
||||
}
|
||||
if (buf[0] != '\0')
|
||||
ret=strlen(buf);
|
||||
err:
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "../bn_lcl.h"
|
||||
#ifdef __SUNPRO_C
|
||||
# include "../bn_asm.c" /* kind of dirty hack for Sun Studio */
|
||||
#else
|
||||
@@ -56,6 +57,9 @@
|
||||
|
||||
#define BN_ULONG unsigned long
|
||||
|
||||
#undef mul
|
||||
#undef mul_add
|
||||
|
||||
/*
|
||||
* "m"(a), "+m"(r) is the way to favor DirectPath <20>-code;
|
||||
* "g"(0) let the compiler to decide where does it
|
||||
@@ -97,7 +101,7 @@
|
||||
: "a"(a) \
|
||||
: "cc");
|
||||
|
||||
BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w)
|
||||
BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
|
||||
{
|
||||
BN_ULONG c1=0;
|
||||
|
||||
@@ -121,7 +125,7 @@ BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w)
|
||||
return(c1);
|
||||
}
|
||||
|
||||
BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w)
|
||||
BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
|
||||
{
|
||||
BN_ULONG c1=0;
|
||||
|
||||
@@ -144,7 +148,7 @@ BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w)
|
||||
return(c1);
|
||||
}
|
||||
|
||||
void bn_sqr_words(BN_ULONG *r, BN_ULONG *a, int n)
|
||||
void bn_sqr_words(BN_ULONG *r, const BN_ULONG *a, int n)
|
||||
{
|
||||
if (n <= 0) return;
|
||||
|
||||
@@ -175,7 +179,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
|
||||
return ret;
|
||||
}
|
||||
|
||||
BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
BN_ULONG bn_add_words (BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int n)
|
||||
{ BN_ULONG ret=0,i=0;
|
||||
|
||||
if (n <= 0) return 0;
|
||||
@@ -198,7 +202,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
}
|
||||
|
||||
#ifndef SIMICS
|
||||
BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
BN_ULONG bn_sub_words (BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int n)
|
||||
{ BN_ULONG ret=0,i=0;
|
||||
|
||||
if (n <= 0) return 0;
|
||||
@@ -485,7 +489,7 @@ void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
r[7]=c2;
|
||||
}
|
||||
|
||||
void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a)
|
||||
void bn_sqr_comba8(BN_ULONG *r, const BN_ULONG *a)
|
||||
{
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
@@ -561,7 +565,7 @@ void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a)
|
||||
r[15]=c1;
|
||||
}
|
||||
|
||||
void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a)
|
||||
void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a)
|
||||
{
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
@@ -229,7 +229,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
|
||||
if (dv == NULL)
|
||||
res=BN_CTX_get(ctx);
|
||||
else res=dv;
|
||||
if (sdiv == NULL || res == NULL) goto err;
|
||||
if (sdiv == NULL || res == NULL || tmp == NULL || snum == NULL)
|
||||
goto err;
|
||||
|
||||
/* First we normalise the numbers */
|
||||
norm_shift=BN_BITS2-((BN_num_bits(divisor))%BN_BITS2);
|
||||
|
||||
@@ -134,7 +134,8 @@ int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
|
||||
rr = BN_CTX_get(ctx);
|
||||
else
|
||||
rr = r;
|
||||
if ((v = BN_CTX_get(ctx)) == NULL) goto err;
|
||||
v = BN_CTX_get(ctx);
|
||||
if (rr == NULL || v == NULL) goto err;
|
||||
|
||||
if (BN_copy(v,a) == NULL) goto err;
|
||||
bits=BN_num_bits(p);
|
||||
|
||||
@@ -1028,17 +1028,19 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
|
||||
assert(j <= al || j <= bl);
|
||||
k = j+j;
|
||||
t = BN_CTX_get(ctx);
|
||||
if (t == NULL)
|
||||
goto err;
|
||||
if (al > j || bl > j)
|
||||
{
|
||||
bn_wexpand(t,k*4);
|
||||
bn_wexpand(rr,k*4);
|
||||
if (bn_wexpand(t,k*4) == NULL) goto err;
|
||||
if (bn_wexpand(rr,k*4) == NULL) goto err;
|
||||
bn_mul_part_recursive(rr->d,a->d,b->d,
|
||||
j,al-j,bl-j,t->d);
|
||||
}
|
||||
else /* al <= j || bl <= j */
|
||||
{
|
||||
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,
|
||||
j,al-j,bl-j,t->d);
|
||||
}
|
||||
|
||||
@@ -1027,7 +1027,7 @@ int test_exp(BIO *bp, BN_CTX *ctx)
|
||||
BN_bntest_rand(a,20+i*5,0,0); /**/
|
||||
BN_bntest_rand(b,2+i,0,0); /**/
|
||||
|
||||
if (!BN_exp(d,a,b,ctx))
|
||||
if (BN_exp(d,a,b,ctx) <= 0)
|
||||
return(0);
|
||||
|
||||
if (bp != NULL)
|
||||
|
||||
@@ -96,8 +96,11 @@ cmll_ctr.o: ../../include/openssl/camellia.h ../../include/openssl/e_os2.h
|
||||
cmll_ctr.o: ../../include/openssl/opensslconf.h cmll_ctr.c cmll_locl.h
|
||||
cmll_ecb.o: ../../include/openssl/camellia.h ../../include/openssl/e_os2.h
|
||||
cmll_ecb.o: ../../include/openssl/opensslconf.h cmll_ecb.c cmll_locl.h
|
||||
cmll_misc.o: ../../include/openssl/camellia.h ../../include/openssl/e_os2.h
|
||||
cmll_misc.o: ../../include/openssl/camellia.h ../../include/openssl/crypto.h
|
||||
cmll_misc.o: ../../include/openssl/e_os2.h ../../include/openssl/fips.h
|
||||
cmll_misc.o: ../../include/openssl/opensslconf.h
|
||||
cmll_misc.o: ../../include/openssl/opensslv.h cmll_locl.h cmll_misc.c
|
||||
cmll_misc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
cmll_misc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
cmll_misc.o: ../../include/openssl/symhacks.h cmll_locl.h cmll_misc.c
|
||||
cmll_ofb.o: ../../include/openssl/camellia.h ../../include/openssl/e_os2.h
|
||||
cmll_ofb.o: ../../include/openssl/opensslconf.h cmll_locl.h cmll_ofb.c
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
*/
|
||||
|
||||
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, CAST_KEY *schedule, unsigned char *ivec,
|
||||
long length, const CAST_KEY *schedule, unsigned char *ivec,
|
||||
int *num, int enc)
|
||||
{
|
||||
register CAST_LONG v0,v1,t;
|
||||
@@ -119,4 +119,3 @@ void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
v0=v1=ti[0]=ti[1]=t=c=cc=0;
|
||||
*num=n;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
const char CAST_version[]="CAST" OPENSSL_VERSION_PTEXT;
|
||||
|
||||
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
CAST_KEY *ks, int enc)
|
||||
const CAST_KEY *ks, int enc)
|
||||
{
|
||||
CAST_LONG l,d[2];
|
||||
|
||||
@@ -77,4 +77,3 @@ void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
l=d[1]; l2n(l,out);
|
||||
l=d[0]=d[1]=0;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,10 @@
|
||||
#include <openssl/cast.h>
|
||||
#include "cast_lcl.h"
|
||||
|
||||
void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
|
||||
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key)
|
||||
{
|
||||
register CAST_LONG l,r,*k,t;
|
||||
register CAST_LONG l,r,t;
|
||||
const register CAST_LONG *k;
|
||||
|
||||
k= &(key->data[0]);
|
||||
l=data[0];
|
||||
@@ -91,9 +92,10 @@ void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
|
||||
data[0]=r&0xffffffffL;
|
||||
}
|
||||
|
||||
void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
|
||||
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key)
|
||||
{
|
||||
register CAST_LONG l,r,*k,t;
|
||||
register CAST_LONG l,r,t;
|
||||
const register CAST_LONG *k;
|
||||
|
||||
k= &(key->data[0]);
|
||||
l=data[0];
|
||||
@@ -124,7 +126,7 @@ void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
|
||||
}
|
||||
|
||||
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
|
||||
CAST_KEY *ks, unsigned char *iv, int enc)
|
||||
const CAST_KEY *ks, unsigned char *iv, int enc)
|
||||
{
|
||||
register CAST_LONG tin0,tin1;
|
||||
register CAST_LONG tout0,tout1,xor0,xor1;
|
||||
@@ -204,4 +206,3 @@ void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
|
||||
tin0=tin1=tout0=tout1=xor0=xor1=0;
|
||||
tin[0]=tin[1]=0;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
* 64bit block we have used is contained in *num;
|
||||
*/
|
||||
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, CAST_KEY *schedule, unsigned char *ivec,
|
||||
long length, const CAST_KEY *schedule, unsigned char *ivec,
|
||||
int *num)
|
||||
{
|
||||
register CAST_LONG v0,v1,t;
|
||||
@@ -108,4 +108,3 @@ void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
t=v0=v1=ti[0]=ti[1]=0;
|
||||
*num=n;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,17 +87,17 @@ typedef struct cast_key_st
|
||||
void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
||||
#endif
|
||||
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
||||
void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key,
|
||||
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key,
|
||||
int enc);
|
||||
void CAST_encrypt(CAST_LONG *data,CAST_KEY *key);
|
||||
void CAST_decrypt(CAST_LONG *data,CAST_KEY *key);
|
||||
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
|
||||
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
|
||||
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
|
||||
CAST_KEY *ks, unsigned char *iv, int enc);
|
||||
const CAST_KEY *ks, unsigned char *iv, int enc);
|
||||
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, CAST_KEY *schedule, unsigned char *ivec,
|
||||
long length, const CAST_KEY *schedule, unsigned char *ivec,
|
||||
int *num, int enc);
|
||||
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, CAST_KEY *schedule, unsigned char *ivec,
|
||||
long length, const CAST_KEY *schedule, unsigned char *ivec,
|
||||
int *num);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -344,7 +344,7 @@ int cms_Receipt_verify(CMS_ContentInfo *cms, CMS_ContentInfo *req_cms)
|
||||
|
||||
/* Get original receipt request details */
|
||||
|
||||
if (!CMS_get1_ReceiptRequest(osi, &rr))
|
||||
if (CMS_get1_ReceiptRequest(osi, &rr) <= 0)
|
||||
{
|
||||
CMSerr(CMS_F_CMS_RECEIPT_VERIFY, CMS_R_NO_RECEIPT_REQUEST);
|
||||
goto err;
|
||||
@@ -385,7 +385,7 @@ ASN1_OCTET_STRING *cms_encode_Receipt(CMS_SignerInfo *si)
|
||||
|
||||
/* Get original receipt request details */
|
||||
|
||||
if (!CMS_get1_ReceiptRequest(si, &rr))
|
||||
if (CMS_get1_ReceiptRequest(si, &rr) <= 0)
|
||||
{
|
||||
CMSerr(CMS_F_CMS_ENCODE_RECEIPT, CMS_R_NO_RECEIPT_REQUEST);
|
||||
goto err;
|
||||
|
||||
@@ -136,15 +136,6 @@ struct zlib_state
|
||||
|
||||
static int zlib_stateful_ex_idx = -1;
|
||||
|
||||
static void zlib_stateful_free_ex_data(void *obj, void *item,
|
||||
CRYPTO_EX_DATA *ad, int ind,long argl, void *argp)
|
||||
{
|
||||
struct zlib_state *state = (struct zlib_state *)item;
|
||||
inflateEnd(&state->istream);
|
||||
deflateEnd(&state->ostream);
|
||||
OPENSSL_free(state);
|
||||
}
|
||||
|
||||
static int zlib_stateful_init(COMP_CTX *ctx)
|
||||
{
|
||||
int err;
|
||||
@@ -188,6 +179,12 @@ static int zlib_stateful_init(COMP_CTX *ctx)
|
||||
|
||||
static void zlib_stateful_finish(COMP_CTX *ctx)
|
||||
{
|
||||
struct zlib_state *state =
|
||||
(struct zlib_state *)CRYPTO_get_ex_data(&ctx->ex_data,
|
||||
zlib_stateful_ex_idx);
|
||||
inflateEnd(&state->istream);
|
||||
deflateEnd(&state->ostream);
|
||||
OPENSSL_free(state);
|
||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_COMP,ctx,&ctx->ex_data);
|
||||
}
|
||||
|
||||
@@ -402,7 +399,7 @@ COMP_METHOD *COMP_zlib(void)
|
||||
if (zlib_stateful_ex_idx == -1)
|
||||
zlib_stateful_ex_idx =
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_COMP,
|
||||
0,NULL,NULL,NULL,zlib_stateful_free_ex_data);
|
||||
0,NULL,NULL,NULL,NULL);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_COMP);
|
||||
if (zlib_stateful_ex_idx == -1)
|
||||
goto err;
|
||||
|
||||
@@ -513,7 +513,7 @@ void OPENSSL_showfatal (const char *fmta,...)
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
|
||||
/* this -------------v--- guards NT-specific calls */
|
||||
if (GetVersion() < 0x80000000 && OPENSSL_isservice())
|
||||
if (GetVersion() < 0x80000000 && OPENSSL_isservice() > 0)
|
||||
{ HANDLE h = RegisterEventSource(0,_T("OPENSSL"));
|
||||
const TCHAR *pmsg=buf;
|
||||
ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0);
|
||||
|
||||
@@ -6,10 +6,11 @@ $! A-Com Computing, Inc.
|
||||
$! byer@mail.all-net.net
|
||||
$!
|
||||
$! Changes by Richard Levitte <richard@levitte.org>
|
||||
$! Zoltan Arpadffy <arpadffy@polarhome.com>
|
||||
$!
|
||||
$! This command files compiles and creates the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
|
||||
$! library for OpenSSL. The "xxx" denotes the machine architecture of AXP
|
||||
$! or VAX.
|
||||
$! library for OpenSSL. The "xxx" denotes the machine architecture, ALPHA,
|
||||
$! IA64 or VAX.
|
||||
$!
|
||||
$! It was re-written so it would try to determine what "C" compiler to use
|
||||
$! or you can specify which "C" compiler to use.
|
||||
@@ -17,28 +18,28 @@ $!
|
||||
$! Specify the following as P1 to build just that part or ALL to just
|
||||
$! build everything.
|
||||
$!
|
||||
$! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
|
||||
$! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE
|
||||
$! ALL To do both LIBRARY and APPS
|
||||
$! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
|
||||
$! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE
|
||||
$! ALL To do both LIBRARY and APPS
|
||||
$!
|
||||
$! Specify DEBUG or NODEBUG as P2 to compile with or without debugger
|
||||
$! information.
|
||||
$!
|
||||
$! Specify which compiler at P3 to try to compile under.
|
||||
$!
|
||||
$! VAXC For VAX C.
|
||||
$! DECC For DEC C.
|
||||
$! GNUC For GNU C.
|
||||
$! VAXC For VAX C.
|
||||
$! DECC For DEC C.
|
||||
$! GNUC For GNU C.
|
||||
$!
|
||||
$! If you don't speficy a compiler, it will try to determine which
|
||||
$! If you don't specify a compiler, it will try to determine which
|
||||
$! "C" compiler to use.
|
||||
$!
|
||||
$! P4, if defined, sets a TCP/IP library to use, through one of the following
|
||||
$! keywords:
|
||||
$!
|
||||
$! UCX for UCX
|
||||
$! TCPIP for TCPIP (post UCX)
|
||||
$! SOCKETSHR for SOCKETSHR+NETLIB
|
||||
$! UCX For UCX
|
||||
$! TCPIP For TCPIP (post UCX)
|
||||
$! SOCKETSHR For SOCKETSHR+NETLIB
|
||||
$!
|
||||
$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
|
||||
$!
|
||||
@@ -54,26 +55,30 @@ $ TCPIP_LIB = ""
|
||||
$!
|
||||
$! Check Which Architecture We Are Using.
|
||||
$!
|
||||
$ IF (F$GETSYI("CPU").GE.128)
|
||||
$ IF (F$GETSYI("CPU").LT.128)
|
||||
$ THEN
|
||||
$!
|
||||
$! The Architecture Is AXP
|
||||
$! The Architecture Is VAX
|
||||
$!
|
||||
$ ARCH := AXP
|
||||
$ ARCH := VAX
|
||||
$!
|
||||
$! Else...
|
||||
$!
|
||||
$ ELSE
|
||||
$!
|
||||
$! The Architecture Is VAX.
|
||||
$! The Architecture Is Alpha, IA64 or whatever comes in the future.
|
||||
$!
|
||||
$ ARCH := VAX
|
||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
||||
$!
|
||||
$! End The Architecture Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
$! Define The Different Encryption Types.
|
||||
$! NOTE: Some might think this list ugly. However, it's made this way to
|
||||
$! reflect the SDIRS variable in [-]Makefile.org as closely as possible,
|
||||
$! thereby making it fairly easy to verify that the lists are the same.
|
||||
$!
|
||||
$ ENCRYPT_TYPES = "Basic,"+ -
|
||||
"OBJECTS,"+ -
|
||||
@@ -84,6 +89,13 @@ $ ENCRYPT_TYPES = "Basic,"+ -
|
||||
"EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
|
||||
"CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ -
|
||||
"STORE,CMS,PQUEUE,JPAKE"
|
||||
$! Define The OBJ Directory.
|
||||
$!
|
||||
$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO]
|
||||
$!
|
||||
$! Define The EXE Directory.
|
||||
$!
|
||||
$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]
|
||||
$!
|
||||
$! Check To Make Sure We Have Valid Command Line Parameters.
|
||||
$!
|
||||
@@ -97,9 +109,6 @@ $! Tell The User What Kind of Machine We Run On.
|
||||
$!
|
||||
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
|
||||
$!
|
||||
$! Define The OBJ Directory.
|
||||
$!
|
||||
$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO]
|
||||
$!
|
||||
$! Check To See If The Architecture Specific OBJ Directory Exists.
|
||||
$!
|
||||
@@ -114,10 +123,6 @@ $! End The Architecture Specific OBJ Directory Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
$! Define The EXE Directory.
|
||||
$!
|
||||
$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]
|
||||
$!
|
||||
$! Check To See If The Architecture Specific Directory Exists.
|
||||
$!
|
||||
$ IF (F$PARSE(EXE_DIR).EQS."")
|
||||
@@ -186,7 +191,8 @@ $ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ -
|
||||
"cmll_cfb,cmll_ctr"
|
||||
$ LIB_SEED = "seed,seed_cbc,seed_ecb,seed_cfb,seed_ofb"
|
||||
$ LIB_BN_ASM = "[.asm]vms.mar,vms-helper"
|
||||
$ IF F$TRNLNM("OPENSSL_NO_ASM").OR.ARCH.EQS."AXP" THEN LIB_BN_ASM = "bn_asm"
|
||||
$ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN -
|
||||
LIB_BN_ASM = "bn_asm"
|
||||
$ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ -
|
||||
"bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ -
|
||||
"bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ -
|
||||
@@ -291,7 +297,7 @@ $ ! Disable the DOLLARID warning
|
||||
$ COMPILEWITH_CC4 = ",a_utctm,bss_log,o_time,o_dir"
|
||||
$ ! Disable disjoint optimization
|
||||
$ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + -
|
||||
"sha_dgst,sha1dgst,rmd_dgst,bf_enc,"
|
||||
"seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc,"
|
||||
$ ! Disable the MIXLINKAGE warning
|
||||
$ COMPILEWITH_CC6 = ",enc_read,set_key,"
|
||||
$!
|
||||
@@ -334,11 +340,11 @@ $! Create The Library and Apps Module Names.
|
||||
$!
|
||||
$ LIB_MODULE = "LIB_" + MODULE_NAME
|
||||
$ APPS_MODULE = "APPS_" + MODULE_NAME
|
||||
$ IF (MODULE_NAME.EQS."ASN1_2")
|
||||
$ IF (F$EXTRACT(0,5,MODULE_NAME).EQS."ASN1_")
|
||||
$ THEN
|
||||
$ MODULE_NAME = "ASN1"
|
||||
$ ENDIF
|
||||
$ IF (MODULE_NAME.EQS."EVP_2")
|
||||
$ IF (F$EXTRACT(0,4,MODULE_NAME).EQS."EVP_")
|
||||
$ THEN
|
||||
$ MODULE_NAME = "EVP"
|
||||
$ ENDIF
|
||||
@@ -694,7 +700,7 @@ $!
|
||||
$ IF (F$SEARCH(OPT_FILE).EQS."")
|
||||
$ THEN
|
||||
$!
|
||||
$! Figure Out If We Need An AXP Or A VAX Linker Option File.
|
||||
$! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
|
||||
$!
|
||||
$ IF ARCH .EQS. "VAX"
|
||||
$ THEN
|
||||
@@ -714,19 +720,19 @@ $! Else...
|
||||
$!
|
||||
$ ELSE
|
||||
$!
|
||||
$! Create The AXP Linker Option File.
|
||||
$! Create The non-VAX Linker Option File.
|
||||
$!
|
||||
$ CREATE 'OPT_FILE'
|
||||
$DECK
|
||||
!
|
||||
! Default System Options File For AXP To Link Agianst
|
||||
! Default System Options File For non-VAX To Link Agianst
|
||||
! The Sharable C Runtime Library.
|
||||
!
|
||||
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
|
||||
SYS$SHARE:CMA$OPEN_RTL/SHARE
|
||||
$EOD
|
||||
$!
|
||||
$! End The VAX/AXP DEC C Option File Check.
|
||||
$! End The DEC C Option File Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
@@ -787,8 +793,9 @@ $ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.E
|
||||
$ WRITE SYS$OUTPUT ""
|
||||
$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
|
||||
$ WRITE SYS$OUTPUT ""
|
||||
$ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
|
||||
$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
|
||||
$ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
|
||||
$ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
|
||||
$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
|
||||
$ WRITE SYS$OUTPUT ""
|
||||
$!
|
||||
$! Time To EXIT.
|
||||
@@ -913,7 +920,7 @@ $ ELSE
|
||||
$!
|
||||
$! Check To See If We Have VAXC Or DECC.
|
||||
$!
|
||||
$ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
|
||||
$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
|
||||
$ THEN
|
||||
$!
|
||||
$! Looks Like DECC, Set To Use DECC.
|
||||
@@ -1019,12 +1026,12 @@ $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
|
||||
THEN CC = "CC/DECC"
|
||||
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
|
||||
"/NOLIST/PREFIX=ALL" + -
|
||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP])" + -
|
||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[.''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP])" + -
|
||||
CCEXTRAFLAGS
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End DECC Check.
|
||||
$!
|
||||
@@ -1046,14 +1053,14 @@ $!
|
||||
$! Compile Using VAXC.
|
||||
$!
|
||||
$ CC = "CC"
|
||||
$ IF ARCH.EQS."AXP"
|
||||
$ IF ARCH.NES."VAX"
|
||||
$ THEN
|
||||
$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
|
||||
$ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
|
||||
$ EXIT
|
||||
$ ENDIF
|
||||
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
||||
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
|
||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[.''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
|
||||
CCEXTRAFLAGS
|
||||
$ CCDEFS = """VAXC""," + CCDEFS
|
||||
$!
|
||||
@@ -1063,7 +1070,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End VAXC Check
|
||||
$!
|
||||
@@ -1085,12 +1092,12 @@ $!
|
||||
$! Use GNU C...
|
||||
$!
|
||||
$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
|
||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[.''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
|
||||
CCEXTRAFLAGS
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End The GNU C Check.
|
||||
$!
|
||||
@@ -1160,7 +1167,7 @@ $!
|
||||
$! Build a MACRO command for the architecture at hand
|
||||
$!
|
||||
$ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
|
||||
$ IF ARCH .EQS. "AXP" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
|
||||
$ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
|
||||
$!
|
||||
$! Show user the result
|
||||
$!
|
||||
|
||||
@@ -9,7 +9,7 @@ $! Changes by Richard Levitte <richard@levitte.org>
|
||||
$!
|
||||
$! This command files compiles and creates the
|
||||
$! "[.xxx.EXE.CRYPTO.DES]LIBDES.OLB" library. The "xxx" denotes the machine
|
||||
$! architecture of AXP or VAX.
|
||||
$! architecture of ALPHA, IA64 or VAX.
|
||||
$!
|
||||
$! It was re-written to try to determine which "C" compiler to try to use
|
||||
$! or the user can specify a compiler in P3.
|
||||
@@ -45,25 +45,34 @@ $!
|
||||
$!
|
||||
$! Check Which Architecture We Are Using.
|
||||
$!
|
||||
$ IF (F$GETSYI("CPU").GE.128)
|
||||
$ IF (F$GETSYI("CPU").LT.128)
|
||||
$ THEN
|
||||
$!
|
||||
$! The Architecture Is AXP.
|
||||
$! The Architecture Is VAX
|
||||
$!
|
||||
$ ARCH := AXP
|
||||
$ ARCH := VAX
|
||||
$!
|
||||
$! Else...
|
||||
$!
|
||||
$ ELSE
|
||||
$!
|
||||
$! The Architecture Is VAX.
|
||||
$! The Architecture Is Alpha, IA64 or whatever comes in the future.
|
||||
$!
|
||||
$ ARCH := VAX
|
||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
||||
$!
|
||||
$! End The Architecture Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
$! Define The OBJ Directory Name.
|
||||
$!
|
||||
$ OBJ_DIR := SYS$DISK:[--.'ARCH'.OBJ.CRYPTO.DES]
|
||||
$!
|
||||
$! Define The EXE Directory Name.
|
||||
$!
|
||||
$ EXE_DIR :== SYS$DISK:[--.'ARCH'.EXE.CRYPTO.DES]
|
||||
$!
|
||||
$! Check To Make Sure We Have Valid Command Line Parameters.
|
||||
$!
|
||||
$ GOSUB CHECK_OPTIONS
|
||||
@@ -72,10 +81,6 @@ $! Tell The User What Kind of Machine We Run On.
|
||||
$!
|
||||
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
|
||||
$!
|
||||
$! Define The OBJ Directory Name.
|
||||
$!
|
||||
$ OBJ_DIR := SYS$DISK:[--.'ARCH'.OBJ.CRYPTO.DES]
|
||||
$!
|
||||
$! Check To See If The Architecture Specific OBJ Directory Exists.
|
||||
$!
|
||||
$ IF (F$PARSE(OBJ_DIR).EQS."")
|
||||
@@ -89,10 +94,6 @@ $! End The Architecture Specific OBJ Directory Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
$! Define The EXE Directory Name.
|
||||
$!
|
||||
$ EXE_DIR :== SYS$DISK:[--.'ARCH'.EXE.CRYPTO.DES]
|
||||
$!
|
||||
$! Check To See If The Architecture Specific Directory Exists.
|
||||
$!
|
||||
$ IF (F$PARSE(EXE_DIR).EQS."")
|
||||
@@ -564,7 +565,7 @@ $!
|
||||
$ IF (F$SEARCH(OPT_FILE).EQS."")
|
||||
$ THEN
|
||||
$!
|
||||
$! Figure Out If We Need An AXP Or A VAX Linker Option File.
|
||||
$! Figure Out If We Need An non-VAX Or A VAX Linker Option File.
|
||||
$!
|
||||
$ IF (F$GETSYI("CPU").LT.128)
|
||||
$ THEN
|
||||
@@ -584,19 +585,19 @@ $! Else...
|
||||
$!
|
||||
$ ELSE
|
||||
$!
|
||||
$! Create The AXP Linker Option File.
|
||||
$! Create The non-VAX Linker Option File.
|
||||
$!
|
||||
$ CREATE 'OPT_FILE'
|
||||
$DECK
|
||||
!
|
||||
! Default System Options File For AXP To Link Agianst
|
||||
! Default System Options File For non-VAX To Link Agianst
|
||||
! The Sharable C Runtime Library.
|
||||
!
|
||||
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
|
||||
SYS$SHARE:CMA$OPEN_RTL/SHARE
|
||||
$EOD
|
||||
$!
|
||||
$! End The VAX/AXP DEC C Option File Check.
|
||||
$! End The DEC C Option File Check.
|
||||
$!
|
||||
$ ENDIF
|
||||
$!
|
||||
@@ -687,8 +688,9 @@ $ WRITE SYS$OUTPUT " DES_OPTS : To Compile Just The [.xxx.EXE.CRYTPO.DES
|
||||
$ WRITE SYS$OUTPUT ""
|
||||
$ WRITE SYS$OUTPUT " Where 'xxx' Stands For: "
|
||||
$ WRITE SYS$OUTPUT ""
|
||||
$ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
|
||||
$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
|
||||
$ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
|
||||
$ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
|
||||
$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
|
||||
$ WRITE SYS$OUTPUT ""
|
||||
$!
|
||||
$! Time To EXIT.
|
||||
@@ -817,7 +819,7 @@ $ ELSE
|
||||
$!
|
||||
$! Check To See If We Have VAXC Or DECC.
|
||||
$!
|
||||
$ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
|
||||
$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
|
||||
$ THEN
|
||||
$!
|
||||
$! Looks Like DECC, Set To Use DECC.
|
||||
@@ -882,7 +884,7 @@ $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End DECC Check.
|
||||
$!
|
||||
@@ -904,9 +906,9 @@ $!
|
||||
$! Compile Using VAXC.
|
||||
$!
|
||||
$ CC = "CC"
|
||||
$ IF ARCH.EQS."AXP"
|
||||
$ IF ARCH.NES."VAX"
|
||||
$ THEN
|
||||
$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
|
||||
$ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
|
||||
$ EXIT
|
||||
$ ENDIF
|
||||
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
||||
@@ -919,7 +921,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End VAXC Check
|
||||
$!
|
||||
@@ -944,7 +946,7 @@ $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
|
||||
$!
|
||||
$! Define The Linker Options File Name.
|
||||
$!
|
||||
$ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
|
||||
$ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT"
|
||||
$!
|
||||
$! End The GNU C Check.
|
||||
$!
|
||||
|
||||
@@ -84,8 +84,9 @@ dsa_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
dsa_asn1.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
|
||||
dsa_asn1.o: ../../include/openssl/opensslconf.h
|
||||
dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_asn1.c
|
||||
dsa_asn1.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
dsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
dsa_asn1.o: ../cryptlib.h dsa_asn1.c
|
||||
dsa_depr.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
dsa_depr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
dsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1t.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rand.h>
|
||||
#ifdef OPENSSL_FIPS
|
||||
#include <openssl/fips.h>
|
||||
#endif
|
||||
@@ -155,6 +156,7 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
RAND_seed(dgst, dlen);
|
||||
s=DSA_do_sign(dgst,dlen,dsa);
|
||||
if (s == NULL)
|
||||
{
|
||||
|
||||
@@ -190,7 +190,7 @@ DSA *DSA_new_method(ENGINE *engine)
|
||||
ret->method_mont_p=NULL;
|
||||
|
||||
ret->references=1;
|
||||
ret->flags=ret->meth->flags;
|
||||
ret->flags=ret->meth->flags & ~DSA_FLAG_NON_FIPS_ALLOW;
|
||||
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_DSA, ret, &ret->ex_data);
|
||||
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
|
||||
{
|
||||
|
||||
@@ -237,7 +237,10 @@ static void *dlfcn_bind_var(DSO *dso, const char *symname)
|
||||
static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
|
||||
{
|
||||
void *ptr;
|
||||
DSO_FUNC_TYPE sym, *tsym = &sym;
|
||||
union {
|
||||
DSO_FUNC_TYPE sym;
|
||||
void *dlret;
|
||||
} u;
|
||||
|
||||
if((dso == NULL) || (symname == NULL))
|
||||
{
|
||||
@@ -255,14 +258,14 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
|
||||
DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_NULL_HANDLE);
|
||||
return(NULL);
|
||||
}
|
||||
*(void **)(tsym) = dlsym(ptr, symname);
|
||||
if(sym == NULL)
|
||||
u.dlret = dlsym(ptr, symname);
|
||||
if(u.dlret == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE);
|
||||
ERR_add_error_data(4, "symname(", symname, "): ", dlerror());
|
||||
return(NULL);
|
||||
}
|
||||
return(sym);
|
||||
return u.sym;
|
||||
}
|
||||
|
||||
static char *dlfcn_merger(DSO *dso, const char *filespec1,
|
||||
@@ -332,6 +335,15 @@ static char *dlfcn_merger(DSO *dso, const char *filespec1,
|
||||
return(merged);
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_SYS_MACOSX
|
||||
#define DSO_ext ".dylib"
|
||||
#define DSO_extlen 6
|
||||
#else
|
||||
#define DSO_ext ".so"
|
||||
#define DSO_extlen 3
|
||||
#endif
|
||||
|
||||
|
||||
static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
||||
{
|
||||
char *translated;
|
||||
@@ -342,8 +354,8 @@ static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
||||
transform = (strstr(filename, "/") == NULL);
|
||||
if(transform)
|
||||
{
|
||||
/* We will convert this to "%s.so" or "lib%s.so" */
|
||||
rsize += 3; /* The length of ".so" */
|
||||
/* We will convert this to "%s.so" or "lib%s.so" etc */
|
||||
rsize += DSO_extlen; /* The length of ".so" */
|
||||
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||
rsize += 3; /* The length of "lib" */
|
||||
}
|
||||
@@ -357,9 +369,9 @@ static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
||||
if(transform)
|
||||
{
|
||||
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||
sprintf(translated, "lib%s.so", filename);
|
||||
sprintf(translated, "lib%s" DSO_ext, filename);
|
||||
else
|
||||
sprintf(translated, "%s.so", filename);
|
||||
sprintf(translated, "%s" DSO_ext, filename);
|
||||
}
|
||||
else
|
||||
sprintf(translated, "%s", filename);
|
||||
|
||||
@@ -327,8 +327,8 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
|
||||
memset(result, 0, sizeof(struct file_st));
|
||||
position = IN_DEVICE;
|
||||
|
||||
if(filename[0] == '\\' && filename[1] == '\\'
|
||||
|| filename[0] == '/' && filename[1] == '/')
|
||||
if((filename[0] == '\\' && filename[1] == '\\')
|
||||
|| (filename[0] == '/' && filename[1] == '/'))
|
||||
{
|
||||
position = IN_NODE;
|
||||
filename += 2;
|
||||
@@ -347,6 +347,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
|
||||
DSOerr(DSO_F_WIN32_SPLITTER,
|
||||
DSO_R_INCORRECT_FILE_SYNTAX);
|
||||
/*goto err;*/
|
||||
OPENSSL_free(result);
|
||||
return(NULL);
|
||||
}
|
||||
result->device = start;
|
||||
@@ -613,6 +614,8 @@ static char *win32_merger(DSO *dso, const char *filespec1, const char *filespec2
|
||||
|
||||
merged = win32_joiner(dso, filespec1_split);
|
||||
}
|
||||
OPENSSL_free(filespec1_split);
|
||||
OPENSSL_free(filespec2_split);
|
||||
return(merged);
|
||||
}
|
||||
|
||||
|
||||
@@ -123,10 +123,11 @@ ecs_sign.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
|
||||
ecs_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
ecs_sign.o: ../../include/openssl/opensslconf.h
|
||||
ecs_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
ecs_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
|
||||
ecs_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
ecs_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
ecs_sign.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_sign.c
|
||||
ecs_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
|
||||
ecs_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
ecs_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ecs_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
ecs_sign.o: ecs_locl.h ecs_sign.c
|
||||
ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
|
||||
@@ -212,7 +212,7 @@ err:
|
||||
static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
|
||||
const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey)
|
||||
{
|
||||
int ok = 0;
|
||||
int ok = 0, i;
|
||||
BIGNUM *kinv=NULL, *s, *m=NULL,*tmp=NULL,*order=NULL;
|
||||
const BIGNUM *ckinv;
|
||||
BN_CTX *ctx = NULL;
|
||||
@@ -251,22 +251,19 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (8 * dgst_len > BN_num_bits(order))
|
||||
i = BN_num_bits(order);
|
||||
/* Need to truncate digest if it is too long: first truncate whole
|
||||
* bytes.
|
||||
*/
|
||||
if (8 * dgst_len > i)
|
||||
dgst_len = (i + 7)/8;
|
||||
if (!BN_bin2bn(dgst, dgst_len, m))
|
||||
{
|
||||
/* XXX
|
||||
*
|
||||
* Should provide for optional hash truncation:
|
||||
* Keep the BN_num_bits(order) leftmost bits of dgst
|
||||
* (see March 2006 FIPS 186-3 draft, which has a few
|
||||
* confusing errors in this part though)
|
||||
*/
|
||||
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN,
|
||||
ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!BN_bin2bn(dgst, dgst_len, m))
|
||||
/* If still too long truncate remaining bits with a shift */
|
||||
if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7)))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
@@ -346,7 +343,7 @@ err:
|
||||
static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
const ECDSA_SIG *sig, EC_KEY *eckey)
|
||||
{
|
||||
int ret = -1;
|
||||
int ret = -1, i;
|
||||
BN_CTX *ctx;
|
||||
BIGNUM *order, *u1, *u2, *m, *X;
|
||||
EC_POINT *point = NULL;
|
||||
@@ -384,21 +381,6 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (8 * dgst_len > BN_num_bits(order))
|
||||
{
|
||||
/* XXX
|
||||
*
|
||||
* Should provide for optional hash truncation:
|
||||
* Keep the BN_num_bits(order) leftmost bits of dgst
|
||||
* (see March 2006 FIPS 186-3 draft, which has a few
|
||||
* confusing errors in this part though)
|
||||
*/
|
||||
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY,
|
||||
ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
|
||||
ret = 0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (BN_is_zero(sig->r) || BN_is_negative(sig->r) ||
|
||||
BN_ucmp(sig->r, order) >= 0 || BN_is_zero(sig->s) ||
|
||||
@@ -415,11 +397,23 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
goto err;
|
||||
}
|
||||
/* digest -> m */
|
||||
i = BN_num_bits(order);
|
||||
/* Need to truncate digest if it is too long: first truncate whole
|
||||
* bytes.
|
||||
*/
|
||||
if (8 * dgst_len > i)
|
||||
dgst_len = (i + 7)/8;
|
||||
if (!BN_bin2bn(dgst, dgst_len, m))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
/* If still too long truncate remaining bits with a shift */
|
||||
if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7)))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
/* u1 = m * tmp mod order */
|
||||
if (!BN_mod_mul(u1, m, u2, order, ctx))
|
||||
{
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
#endif
|
||||
#include <openssl/rand.h>
|
||||
|
||||
ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey)
|
||||
{
|
||||
@@ -83,6 +84,7 @@ int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, unsigned char
|
||||
EC_KEY *eckey)
|
||||
{
|
||||
ECDSA_SIG *s;
|
||||
RAND_seed(dgst, dlen);
|
||||
s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
|
||||
if (s == NULL)
|
||||
{
|
||||
|
||||
@@ -112,19 +112,21 @@ eng_cnf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
eng_cnf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_cnf.c eng_int.h
|
||||
eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
eng_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
eng_cryptodev.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
eng_cryptodev.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
|
||||
eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
|
||||
eng_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
eng_cryptodev.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
eng_cryptodev.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
|
||||
eng_cryptodev.o: ../../include/openssl/obj_mac.h
|
||||
eng_cryptodev.o: ../../include/openssl/objects.h
|
||||
eng_cryptodev.o: ../../include/openssl/opensslconf.h
|
||||
eng_cryptodev.o: ../../include/openssl/opensslv.h
|
||||
eng_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
eng_cryptodev.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
eng_cryptodev.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
eng_cryptodev.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
eng_cryptodev.o: eng_cryptodev.c
|
||||
eng_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
eng_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
eng_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
eng_cryptodev.o: ../../include/openssl/x509_vfy.h eng_cryptodev.c
|
||||
eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
eng_ctrl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
|
||||
@@ -30,9 +30,13 @@
|
||||
#include <openssl/engine.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/dsa.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#if (defined(__unix__) || defined(unix)) && !defined(USG) && \
|
||||
(defined(OpenBSD) || defined(__FreeBSD_version))
|
||||
(defined(OpenBSD) || defined(__FreeBSD__))
|
||||
#include <sys/param.h>
|
||||
# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
|
||||
# define HAVE_CRYPTODEV
|
||||
@@ -79,7 +83,7 @@ static int cryptodev_max_iv(int cipher);
|
||||
static int cryptodev_key_length_valid(int cipher, int len);
|
||||
static int cipher_nid_to_cryptodev(int nid);
|
||||
static int get_cryptodev_ciphers(const int **cnids);
|
||||
static int get_cryptodev_digests(const int **cnids);
|
||||
/*static int get_cryptodev_digests(const int **cnids);*/
|
||||
static int cryptodev_usable_ciphers(const int **nids);
|
||||
static int cryptodev_usable_digests(const int **nids);
|
||||
static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
@@ -100,7 +104,7 @@ static int cryptodev_asym(struct crypt_kop *kop, int rlen, BIGNUM *r,
|
||||
static int cryptodev_bn_mod_exp(BIGNUM *r, const BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
static int cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I,
|
||||
RSA *rsa);
|
||||
RSA *rsa, BN_CTX *ctx);
|
||||
static int cryptodev_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
|
||||
static int cryptodev_dsa_bn_mod_exp(DSA *dsa, BIGNUM *r, BIGNUM *a,
|
||||
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
||||
@@ -139,6 +143,7 @@ static struct {
|
||||
{ 0, NID_undef, 0, 0, },
|
||||
};
|
||||
|
||||
#if 0
|
||||
static struct {
|
||||
int id;
|
||||
int nid;
|
||||
@@ -151,6 +156,7 @@ static struct {
|
||||
{ CRYPTO_SHA1, NID_undef, },
|
||||
{ 0, NID_undef, },
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return a fd if /dev/crypto seems usable, 0 otherwise.
|
||||
@@ -285,6 +291,7 @@ get_cryptodev_ciphers(const int **cnids)
|
||||
return (count);
|
||||
}
|
||||
|
||||
#if 0 /* unused */
|
||||
/*
|
||||
* Find out what digests /dev/crypto will let us have a session for.
|
||||
* XXX note, that some of these openssl doesn't deal with yet!
|
||||
@@ -321,6 +328,8 @@ get_cryptodev_digests(const int **cnids)
|
||||
return (count);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Find the useable ciphers|digests from dev/crypto - this is the first
|
||||
* thing called by the engine init crud which determines what it
|
||||
@@ -374,7 +383,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
struct crypt_op cryp;
|
||||
struct dev_crypto_state *state = ctx->cipher_data;
|
||||
struct session_op *sess = &state->d_sess;
|
||||
void *iiv;
|
||||
const void *iiv;
|
||||
unsigned char save_iv[EVP_MAX_IV_LENGTH];
|
||||
|
||||
if (state->d_fd < 0)
|
||||
@@ -398,7 +407,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
if (ctx->cipher->iv_len) {
|
||||
cryp.iv = (caddr_t) ctx->iv;
|
||||
if (!ctx->encrypt) {
|
||||
iiv = (void *) in + inl - ctx->cipher->iv_len;
|
||||
iiv = in + inl - ctx->cipher->iv_len;
|
||||
memcpy(save_iv, iiv, ctx->cipher->iv_len);
|
||||
}
|
||||
} else
|
||||
@@ -413,7 +422,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
|
||||
if (ctx->cipher->iv_len) {
|
||||
if (ctx->encrypt)
|
||||
iiv = (void *) out + inl - ctx->cipher->iv_len;
|
||||
iiv = out + inl - ctx->cipher->iv_len;
|
||||
else
|
||||
iiv = save_iv;
|
||||
memcpy(ctx->iv, iiv, ctx->cipher->iv_len);
|
||||
@@ -443,7 +452,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
if ((state->d_fd = get_dev_crypto()) < 0)
|
||||
return (0);
|
||||
|
||||
sess->key = (unsigned char *)key;
|
||||
sess->key = (char *)key;
|
||||
sess->keylen = ctx->key_len;
|
||||
sess->cipher = cipher;
|
||||
|
||||
@@ -625,7 +634,7 @@ static int
|
||||
bn2crparam(const BIGNUM *a, struct crparam *crp)
|
||||
{
|
||||
int i, j, k;
|
||||
ssize_t words, bytes, bits;
|
||||
ssize_t bytes, bits;
|
||||
u_char *b;
|
||||
|
||||
crp->crp_p = NULL;
|
||||
@@ -638,7 +647,7 @@ bn2crparam(const BIGNUM *a, struct crparam *crp)
|
||||
if (b == NULL)
|
||||
return (1);
|
||||
|
||||
crp->crp_p = b;
|
||||
crp->crp_p = (char *)b;
|
||||
crp->crp_nbits = bits;
|
||||
|
||||
for (i = 0, j = 0; i < a->top; i++) {
|
||||
@@ -756,14 +765,11 @@ err:
|
||||
}
|
||||
|
||||
static int
|
||||
cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa)
|
||||
cryptodev_rsa_nocrt_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
|
||||
{
|
||||
int r;
|
||||
BN_CTX *ctx;
|
||||
|
||||
ctx = BN_CTX_new();
|
||||
r = cryptodev_bn_mod_exp(r0, I, rsa->d, rsa->n, ctx, NULL);
|
||||
BN_CTX_free(ctx);
|
||||
return (r);
|
||||
}
|
||||
|
||||
@@ -994,7 +1000,7 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
|
||||
goto err;
|
||||
kop.crk_iparams = 3;
|
||||
|
||||
kop.crk_param[3].crp_p = key;
|
||||
kop.crk_param[3].crp_p = (char *)key;
|
||||
kop.crk_param[3].crp_nbits = keylen * 8;
|
||||
kop.crk_oparams = 1;
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
|
||||
}
|
||||
/* Force the result of the control command to 0 or 1, for the reasons
|
||||
* mentioned before. */
|
||||
if (ENGINE_ctrl(e, num, i, p, f))
|
||||
if (ENGINE_ctrl(e, num, i, p, f) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|
||||
* usage of these commands is consistent across applications and
|
||||
* that certain applications don't understand it one way, and
|
||||
* others another. */
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL))
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -360,7 +360,7 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|
||||
if(flags & ENGINE_CMD_FLAG_STRING)
|
||||
{
|
||||
/* Same explanation as above */
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL))
|
||||
if(ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|
||||
}
|
||||
/* Force the result of the control command to 0 or 1, for the reasons
|
||||
* mentioned before. */
|
||||
if(ENGINE_ctrl(e, num, l, NULL, NULL))
|
||||
if(ENGINE_ctrl(e, num, l, NULL, NULL) > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -339,9 +339,11 @@ void ENGINE_load_ubsec(void);
|
||||
void ENGINE_load_cryptodev(void);
|
||||
void ENGINE_load_padlock(void);
|
||||
void ENGINE_load_builtin_engines(void);
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
#ifndef OPENSSL_NO_CAPIENG
|
||||
void ENGINE_load_capi(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation
|
||||
* "registry" handling. */
|
||||
|
||||
@@ -83,23 +83,24 @@ err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
err.o: ../cryptlib.h err.c
|
||||
err_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||
err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
err_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
err_all.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
|
||||
err_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
|
||||
err_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
|
||||
err_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
err_all.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
|
||||
err_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
err_all.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h
|
||||
err_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.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/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/ui.h
|
||||
err_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
err_all.o: ../../include/openssl/x509v3.h err_all.c
|
||||
err_all.o: ../../include/openssl/comp.h ../../include/openssl/conf.h
|
||||
err_all.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||
err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h
|
||||
err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
|
||||
err_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
|
||||
err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
||||
err_all.o: ../../include/openssl/evp.h ../../include/openssl/fips.h
|
||||
err_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
err_all.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h
|
||||
err_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
err_all.o: ../../include/openssl/ossl_typ.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/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/ui.h ../../include/openssl/x509.h
|
||||
err_all.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
err_all.o: err_all.c
|
||||
err_bio.o: ../../e_os.h ../../include/openssl/bio.h
|
||||
err_bio.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
err_bio.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
#include <openssl/jpake.h>
|
||||
#endif
|
||||
#include <openssl/comp.h>
|
||||
|
||||
void ERR_load_crypto_strings(void)
|
||||
{
|
||||
@@ -157,5 +158,6 @@ void ERR_load_crypto_strings(void)
|
||||
#ifndef OPENSSL_NO_JPAKE
|
||||
ERR_load_JPAKE_strings();
|
||||
#endif
|
||||
ERR_load_COMP_strings();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -71,6 +71,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
EVP_add_cipher(EVP_des_cfb8());
|
||||
EVP_add_cipher(EVP_des_ede_cfb());
|
||||
EVP_add_cipher(EVP_des_ede3_cfb());
|
||||
EVP_add_cipher(EVP_des_ede3_cfb1());
|
||||
EVP_add_cipher(EVP_des_ede3_cfb8());
|
||||
|
||||
EVP_add_cipher(EVP_des_ofb());
|
||||
EVP_add_cipher(EVP_des_ede_ofb());
|
||||
|
||||
@@ -64,9 +64,6 @@
|
||||
|
||||
void OpenSSL_add_all_digests(void)
|
||||
{
|
||||
#ifndef OPENSSL_NO_MD2
|
||||
EVP_add_digest(EVP_md2());
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_MD4
|
||||
EVP_add_digest(EVP_md4());
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,8 @@ EVP_MD_CTX *EVP_MD_CTX_create(void)
|
||||
{
|
||||
EVP_MD_CTX *ctx=OPENSSL_malloc(sizeof *ctx);
|
||||
|
||||
EVP_MD_CTX_init(ctx);
|
||||
if (ctx)
|
||||
EVP_MD_CTX_init(ctx);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
@@ -299,7 +300,14 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
|
||||
OPENSSL_free(ctx->md_data);
|
||||
ctx->digest=type;
|
||||
if (type->ctx_size)
|
||||
{
|
||||
ctx->md_data=OPENSSL_malloc(type->ctx_size);
|
||||
if (!ctx->md_data)
|
||||
{
|
||||
EVPerr(EVP_F_EVP_DIGESTINIT_EX, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
skip_to_init:
|
||||
@@ -380,8 +388,17 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
|
||||
|
||||
if (out->digest->ctx_size)
|
||||
{
|
||||
if (tmp_buf) out->md_data = tmp_buf;
|
||||
else out->md_data=OPENSSL_malloc(out->digest->ctx_size);
|
||||
if (tmp_buf)
|
||||
out->md_data = tmp_buf;
|
||||
else
|
||||
{
|
||||
out->md_data=OPENSSL_malloc(out->digest->ctx_size);
|
||||
if (!out->md_data)
|
||||
{
|
||||
EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
memcpy(out->md_data,in->md_data,out->digest->ctx_size);
|
||||
}
|
||||
|
||||
|
||||
@@ -163,6 +163,12 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx)
|
||||
|
||||
return NID_des_cfb64;
|
||||
|
||||
case NID_des_ede3_cfb64:
|
||||
case NID_des_ede3_cfb8:
|
||||
case NID_des_ede3_cfb1:
|
||||
|
||||
return NID_des_cfb64;
|
||||
|
||||
default:
|
||||
/* Check it has an OID and it is valid */
|
||||
otmp = OBJ_nid2obj(nid);
|
||||
|
||||
@@ -3,15 +3,26 @@ $!
|
||||
$! Author: Richard Levitte <richard@levitte.org>
|
||||
$! Time of creation: 22-MAY-1998 10:13
|
||||
$!
|
||||
$! Changes by Zoltan Arpadffy <zoli@polarhome.com>
|
||||
$!
|
||||
$! P1 root of the directory tree
|
||||
$!
|
||||
$ IF P1 .EQS. ""
|
||||
$ THEN
|
||||
$ WRITE SYS$OUTPUT "First argument missing."
|
||||
$ WRITE SYS$OUTPUT "Should be the directory where you want things installed."
|
||||
$ WRITE SYS$OUTPUT -
|
||||
"It should be the directory where you want things installed."
|
||||
$ EXIT
|
||||
$ ENDIF
|
||||
$
|
||||
$ IF (F$GETSYI("CPU").LT.128)
|
||||
$ THEN
|
||||
$ ARCH := VAX
|
||||
$ ELSE
|
||||
$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
|
||||
$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
|
||||
$ ENDIF
|
||||
$
|
||||
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
|
||||
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
|
||||
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
||||
@@ -19,16 +30,13 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
|
||||
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
|
||||
$
|
||||
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
|
||||
$ DEFINE/NOLOG WRK_SSLVLIB WRK_SSLROOT:[VAX_LIB]
|
||||
$ DEFINE/NOLOG WRK_SSLALIB WRK_SSLROOT:[ALPHA_LIB]
|
||||
$ DEFINE/NOLOG WRK_SSLLIB WRK_SSLROOT:['ARCH'_LIB]
|
||||
$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
|
||||
$
|
||||
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLROOT:[000000]
|
||||
$ IF F$PARSE("WRK_SSLVLIB:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLVLIB:
|
||||
$ IF F$PARSE("WRK_SSLALIB:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLALIB:
|
||||
$ IF F$PARSE("WRK_SSLLIB:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLLIB:
|
||||
$ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
|
||||
CREATE/DIR/LOG WRK_SSLINCLUDE:
|
||||
$
|
||||
@@ -95,8 +103,7 @@ $ EXHEADER_PQUEUE := pqueue.h,pq_compat.h
|
||||
$ EXHEADER_JPAKE := jpake.h
|
||||
$ LIBS := LIBCRYPTO
|
||||
$
|
||||
$ VEXE_DIR := [-.VAX.EXE.CRYPTO]
|
||||
$ AEXE_DIR := [-.AXP.EXE.CRYPTO]
|
||||
$ EXE_DIR := [-.'ARCH'.EXE.CRYPTO]
|
||||
$
|
||||
$ I = 0
|
||||
$ LOOP_SDIRS:
|
||||
@@ -120,27 +127,16 @@ $ E = F$EDIT(F$ELEMENT(I, ",", LIBS),"TRIM")
|
||||
$ I = I + 1
|
||||
$ IF E .EQS. "," THEN GOTO LOOP_LIB_END
|
||||
$ SET NOON
|
||||
$ IF F$SEARCH(VEXE_DIR+E+".OLB") .NES. ""
|
||||
$ IF F$SEARCH(EXE_DIR+E+".OLB") .NES. ""
|
||||
$ THEN
|
||||
$ COPY 'VEXE_DIR''E'.OLB WRK_SSLVLIB:'E'.OLB/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLVLIB:'E'.OLB
|
||||
$ COPY 'EXE_DIR''E'.OLB WRK_SSLLIB:'E'.OLB/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLLIB:'E'.OLB
|
||||
$ ENDIF
|
||||
$ ! Preparing for the time when we have shareable images
|
||||
$ IF F$SEARCH(VEXE_DIR+E+".EXE") .NES. ""
|
||||
$ IF F$SEARCH(EXE_DIR+E+".EXE") .NES. ""
|
||||
$ THEN
|
||||
$ COPY 'VEXE_DIR''E'.EXE WRK_SSLVLIB:'E'.EXE/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLVLIB:'E'.EXE
|
||||
$ ENDIF
|
||||
$ IF F$SEARCH(AEXE_DIR+E+".OLB") .NES. ""
|
||||
$ THEN
|
||||
$ COPY 'AEXE_DIR''E'.OLB WRK_SSLALIB:'E'.OLB/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLALIB:'E'.OLB
|
||||
$ ENDIF
|
||||
$ ! Preparing for the time when we have shareable images
|
||||
$ IF F$SEARCH(AEXE_DIR+E+".EXE") .NES. ""
|
||||
$ THEN
|
||||
$ COPY 'AEXE_DIR''E'.EXE WRK_SSLALIB:'E'.EXE/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLALIB:'E'.EXE
|
||||
$ COPY 'EXE_DIR''E'.EXE WRK_SSLLIB:'E'.EXE/log
|
||||
$ SET FILE/PROT=W:RE WRK_SSLLIB:'E'.EXE
|
||||
$ ENDIF
|
||||
$ SET ON
|
||||
$ GOTO LOOP_LIB
|
||||
|
||||
@@ -305,16 +305,40 @@ void lh_doall_arg(LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg)
|
||||
static void expand(LHASH *lh)
|
||||
{
|
||||
LHASH_NODE **n,**n1,**n2,*np;
|
||||
unsigned int p,i,j;
|
||||
unsigned int p,i,j,pmax;
|
||||
unsigned long hash,nni;
|
||||
|
||||
p=(int)lh->p++;
|
||||
nni=lh->num_alloc_nodes;
|
||||
pmax=lh->pmax;
|
||||
|
||||
if ((lh->p) >= lh->pmax)
|
||||
{
|
||||
j=(int)lh->num_alloc_nodes*2;
|
||||
n=(LHASH_NODE **)OPENSSL_realloc(lh->b,
|
||||
(int)sizeof(LHASH_NODE *)*j);
|
||||
if (n == NULL)
|
||||
{
|
||||
/* fputs("realloc error in lhash",stderr); */
|
||||
lh->error++;
|
||||
lh->p=0;
|
||||
return;
|
||||
}
|
||||
/* else */
|
||||
for (i=(int)lh->num_alloc_nodes; i<j; i++)/* 26/02/92 eay */
|
||||
n[i]=NULL; /* 02/03/92 eay */
|
||||
lh->pmax=lh->num_alloc_nodes;
|
||||
lh->num_alloc_nodes=j;
|
||||
lh->num_expand_reallocs++;
|
||||
lh->p=0;
|
||||
lh->b=n;
|
||||
}
|
||||
|
||||
lh->num_nodes++;
|
||||
lh->num_expands++;
|
||||
p=(int)lh->p++;
|
||||
n1= &(lh->b[p]);
|
||||
n2= &(lh->b[p+(int)lh->pmax]);
|
||||
n2= &(lh->b[p+pmax]);
|
||||
*n2=NULL; /* 27/07/92 - eay - undefined pointer bug */
|
||||
nni=lh->num_alloc_nodes;
|
||||
|
||||
for (np= *n1; np != NULL; )
|
||||
{
|
||||
@@ -335,35 +359,14 @@ static void expand(LHASH *lh)
|
||||
np= *n1;
|
||||
}
|
||||
|
||||
if ((lh->p) >= lh->pmax)
|
||||
{
|
||||
j=(int)lh->num_alloc_nodes*2;
|
||||
n=(LHASH_NODE **)OPENSSL_realloc(lh->b,
|
||||
(int)(sizeof(LHASH_NODE *)*j));
|
||||
if (n == NULL)
|
||||
{
|
||||
/* fputs("realloc error in lhash",stderr); */
|
||||
lh->error++;
|
||||
lh->p=0;
|
||||
return;
|
||||
}
|
||||
/* else */
|
||||
for (i=(int)lh->num_alloc_nodes; i<j; i++)/* 26/02/92 eay */
|
||||
n[i]=NULL; /* 02/03/92 eay */
|
||||
lh->pmax=lh->num_alloc_nodes;
|
||||
lh->num_alloc_nodes=j;
|
||||
lh->num_expand_reallocs++;
|
||||
lh->p=0;
|
||||
lh->b=n;
|
||||
}
|
||||
}
|
||||
|
||||
static void contract(LHASH *lh)
|
||||
{
|
||||
LHASH_NODE **n,*n1,*np;
|
||||
int idx = lh->p+lh->pmax-1;
|
||||
|
||||
np=lh->b[lh->p+lh->pmax-1];
|
||||
lh->b[lh->p+lh->pmax-1]=NULL; /* 24/07-92 - eay - weird but :-( */
|
||||
np=lh->b[idx];
|
||||
if (lh->p == 0)
|
||||
{
|
||||
n=(LHASH_NODE **)OPENSSL_realloc(lh->b,
|
||||
@@ -383,6 +386,7 @@ static void contract(LHASH *lh)
|
||||
else
|
||||
lh->p--;
|
||||
|
||||
lh->b[idx] = NULL;
|
||||
lh->num_nodes--;
|
||||
lh->num_contracts++;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ my $code;
|
||||
sub round1_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
$T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
|
||||
$code .= " mov %edx, %r11d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
|
||||
$code .= <<EOF;
|
||||
@@ -42,6 +43,7 @@ EOF
|
||||
sub round2_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
$T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 1*4(%rsi), %r10d /* (NEXT STEP) X[1] */\n" if ($pos == -1);
|
||||
$code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
|
||||
$code .= <<EOF;
|
||||
@@ -65,6 +67,7 @@ EOF
|
||||
sub round3_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
$T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 5*4(%rsi), %r10d /* (NEXT STEP) X[5] */\n" if ($pos == -1);
|
||||
$code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
|
||||
$code .= <<EOF;
|
||||
@@ -87,6 +90,7 @@ EOF
|
||||
sub round4_step
|
||||
{
|
||||
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
||||
$T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
||||
$code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
|
||||
$code .= " mov \$0xffffffff, %r11d\n" if ($pos == -1);
|
||||
$code .= " xor %edx, %r11d /* (NEXT STEP) not z' = not %edx*/\n"
|
||||
|
||||
@@ -73,7 +73,7 @@ void OPENSSL_init(void)
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
CRYPTO_malloc_debug_init();
|
||||
#endif
|
||||
#ifdef OPENSSL_ENGINE
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
int_EVP_MD_init_engine_callbacks();
|
||||
int_EVP_CIPHER_init_engine_callbacks();
|
||||
int_RAND_init_engine_callbacks();
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
#include <e_os.h>
|
||||
#include "o_str.h"
|
||||
|
||||
#if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && !defined(OPENSSL_SYSNAME_WIN32)
|
||||
#if !defined(OPENSSL_IMPLEMENTS_strncasecmp) && \
|
||||
!defined(OPENSSL_SYSNAME_WIN32) && \
|
||||
!defined(NETWARE_CLIB)
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -456,10 +456,13 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name)
|
||||
s=OBJ_nid2ln(nid);
|
||||
if (s == NULL)
|
||||
s=OBJ_nid2sn(nid);
|
||||
if (buf)
|
||||
BUF_strlcpy(buf,s,buf_len);
|
||||
n=strlen(s);
|
||||
return n;
|
||||
if (s)
|
||||
{
|
||||
if (buf)
|
||||
BUF_strlcpy(buf,s,buf_len);
|
||||
n=strlen(s);
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#define NUM_NID 859
|
||||
#define NUM_SN 852
|
||||
#define NUM_LN 852
|
||||
#define NUM_OBJ 806
|
||||
#define NUM_NID 893
|
||||
#define NUM_SN 886
|
||||
#define NUM_LN 886
|
||||
#define NUM_OBJ 840
|
||||
|
||||
static unsigned char lvalues[5722]={
|
||||
static unsigned char lvalues[5824]={
|
||||
0x00, /* [ 0] OBJ_undef */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
|
||||
@@ -874,6 +874,40 @@ static unsigned char lvalues[5722]={
|
||||
0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x11,0x02,/* [5701] OBJ_LocalKeySet */
|
||||
0x55,0x1D,0x2E, /* [5710] OBJ_freshest_crl */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x08,0x03, /* [5713] OBJ_id_on_permanentIdentifier */
|
||||
0x55,0x04,0x0E, /* [5721] OBJ_searchGuide */
|
||||
0x55,0x04,0x0F, /* [5724] OBJ_businessCategory */
|
||||
0x55,0x04,0x10, /* [5727] OBJ_postalAddress */
|
||||
0x55,0x04,0x12, /* [5730] OBJ_postOfficeBox */
|
||||
0x55,0x04,0x13, /* [5733] OBJ_physicalDeliveryOfficeName */
|
||||
0x55,0x04,0x14, /* [5736] OBJ_telephoneNumber */
|
||||
0x55,0x04,0x15, /* [5739] OBJ_telexNumber */
|
||||
0x55,0x04,0x16, /* [5742] OBJ_teletexTerminalIdentifier */
|
||||
0x55,0x04,0x17, /* [5745] OBJ_facsimileTelephoneNumber */
|
||||
0x55,0x04,0x18, /* [5748] OBJ_x121Address */
|
||||
0x55,0x04,0x19, /* [5751] OBJ_internationaliSDNNumber */
|
||||
0x55,0x04,0x1A, /* [5754] OBJ_registeredAddress */
|
||||
0x55,0x04,0x1B, /* [5757] OBJ_destinationIndicator */
|
||||
0x55,0x04,0x1C, /* [5760] OBJ_preferredDeliveryMethod */
|
||||
0x55,0x04,0x1D, /* [5763] OBJ_presentationAddress */
|
||||
0x55,0x04,0x1E, /* [5766] OBJ_supportedApplicationContext */
|
||||
0x55,0x04,0x1F, /* [5769] OBJ_member */
|
||||
0x55,0x04,0x20, /* [5772] OBJ_owner */
|
||||
0x55,0x04,0x21, /* [5775] OBJ_roleOccupant */
|
||||
0x55,0x04,0x22, /* [5778] OBJ_seeAlso */
|
||||
0x55,0x04,0x23, /* [5781] OBJ_userPassword */
|
||||
0x55,0x04,0x24, /* [5784] OBJ_userCertificate */
|
||||
0x55,0x04,0x25, /* [5787] OBJ_cACertificate */
|
||||
0x55,0x04,0x26, /* [5790] OBJ_authorityRevocationList */
|
||||
0x55,0x04,0x27, /* [5793] OBJ_certificateRevocationList */
|
||||
0x55,0x04,0x28, /* [5796] OBJ_crossCertificatePair */
|
||||
0x55,0x04,0x2F, /* [5799] OBJ_enhancedSearchGuide */
|
||||
0x55,0x04,0x30, /* [5802] OBJ_protocolInformation */
|
||||
0x55,0x04,0x31, /* [5805] OBJ_distinguishedName */
|
||||
0x55,0x04,0x32, /* [5808] OBJ_uniqueMember */
|
||||
0x55,0x04,0x33, /* [5811] OBJ_houseIdentifier */
|
||||
0x55,0x04,0x34, /* [5814] OBJ_supportedAlgorithms */
|
||||
0x55,0x04,0x35, /* [5817] OBJ_deltaRevocationList */
|
||||
0x55,0x04,0x36, /* [5820] OBJ_dmdName */
|
||||
};
|
||||
|
||||
static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
@@ -1928,7 +1962,7 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL,0},
|
||||
{"DES-EDE3-CFB1","des-ede3-cfb1",NID_des_ede3_cfb1,0,NULL,0},
|
||||
{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL,0},
|
||||
{"streetAddress","streetAddress",NID_streetAddress,3,&(lvalues[4462]),0},
|
||||
{"street","streetAddress",NID_streetAddress,3,&(lvalues[4462]),0},
|
||||
{"postalCode","postalCode",NID_postalCode,3,&(lvalues[4465]),0},
|
||||
{"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4468]),0},
|
||||
{"proxyCertInfo","Proxy Certificate Information",NID_proxyCertInfo,8,
|
||||
@@ -2262,6 +2296,61 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
&(lvalues[5710]),0},
|
||||
{"id-on-permanentIdentifier","Permanent Identifier",
|
||||
NID_id_on_permanentIdentifier,8,&(lvalues[5713]),0},
|
||||
{"searchGuide","searchGuide",NID_searchGuide,3,&(lvalues[5721]),0},
|
||||
{"businessCategory","businessCategory",NID_businessCategory,3,
|
||||
&(lvalues[5724]),0},
|
||||
{"postalAddress","postalAddress",NID_postalAddress,3,&(lvalues[5727]),0},
|
||||
{"postOfficeBox","postOfficeBox",NID_postOfficeBox,3,&(lvalues[5730]),0},
|
||||
{"physicalDeliveryOfficeName","physicalDeliveryOfficeName",
|
||||
NID_physicalDeliveryOfficeName,3,&(lvalues[5733]),0},
|
||||
{"telephoneNumber","telephoneNumber",NID_telephoneNumber,3,
|
||||
&(lvalues[5736]),0},
|
||||
{"telexNumber","telexNumber",NID_telexNumber,3,&(lvalues[5739]),0},
|
||||
{"teletexTerminalIdentifier","teletexTerminalIdentifier",
|
||||
NID_teletexTerminalIdentifier,3,&(lvalues[5742]),0},
|
||||
{"facsimileTelephoneNumber","facsimileTelephoneNumber",
|
||||
NID_facsimileTelephoneNumber,3,&(lvalues[5745]),0},
|
||||
{"x121Address","x121Address",NID_x121Address,3,&(lvalues[5748]),0},
|
||||
{"internationaliSDNNumber","internationaliSDNNumber",
|
||||
NID_internationaliSDNNumber,3,&(lvalues[5751]),0},
|
||||
{"registeredAddress","registeredAddress",NID_registeredAddress,3,
|
||||
&(lvalues[5754]),0},
|
||||
{"destinationIndicator","destinationIndicator",
|
||||
NID_destinationIndicator,3,&(lvalues[5757]),0},
|
||||
{"preferredDeliveryMethod","preferredDeliveryMethod",
|
||||
NID_preferredDeliveryMethod,3,&(lvalues[5760]),0},
|
||||
{"presentationAddress","presentationAddress",NID_presentationAddress,
|
||||
3,&(lvalues[5763]),0},
|
||||
{"supportedApplicationContext","supportedApplicationContext",
|
||||
NID_supportedApplicationContext,3,&(lvalues[5766]),0},
|
||||
{"member","member",NID_member,3,&(lvalues[5769]),0},
|
||||
{"owner","owner",NID_owner,3,&(lvalues[5772]),0},
|
||||
{"roleOccupant","roleOccupant",NID_roleOccupant,3,&(lvalues[5775]),0},
|
||||
{"seeAlso","seeAlso",NID_seeAlso,3,&(lvalues[5778]),0},
|
||||
{"userPassword","userPassword",NID_userPassword,3,&(lvalues[5781]),0},
|
||||
{"userCertificate","userCertificate",NID_userCertificate,3,
|
||||
&(lvalues[5784]),0},
|
||||
{"cACertificate","cACertificate",NID_cACertificate,3,&(lvalues[5787]),0},
|
||||
{"authorityRevocationList","authorityRevocationList",
|
||||
NID_authorityRevocationList,3,&(lvalues[5790]),0},
|
||||
{"certificateRevocationList","certificateRevocationList",
|
||||
NID_certificateRevocationList,3,&(lvalues[5793]),0},
|
||||
{"crossCertificatePair","crossCertificatePair",
|
||||
NID_crossCertificatePair,3,&(lvalues[5796]),0},
|
||||
{"enhancedSearchGuide","enhancedSearchGuide",NID_enhancedSearchGuide,
|
||||
3,&(lvalues[5799]),0},
|
||||
{"protocolInformation","protocolInformation",NID_protocolInformation,
|
||||
3,&(lvalues[5802]),0},
|
||||
{"distinguishedName","distinguishedName",NID_distinguishedName,3,
|
||||
&(lvalues[5805]),0},
|
||||
{"uniqueMember","uniqueMember",NID_uniqueMember,3,&(lvalues[5808]),0},
|
||||
{"houseIdentifier","houseIdentifier",NID_houseIdentifier,3,
|
||||
&(lvalues[5811]),0},
|
||||
{"supportedAlgorithms","supportedAlgorithms",NID_supportedAlgorithms,
|
||||
3,&(lvalues[5814]),0},
|
||||
{"deltaRevocationList","deltaRevocationList",NID_deltaRevocationList,
|
||||
3,&(lvalues[5817]),0},
|
||||
{"dmdName","dmdName",NID_dmdName,3,&(lvalues[5820]),0},
|
||||
};
|
||||
|
||||
static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
@@ -2458,10 +2547,12 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[501]),/* "audio" */
|
||||
&(nid_objs[177]),/* "authorityInfoAccess" */
|
||||
&(nid_objs[90]),/* "authorityKeyIdentifier" */
|
||||
&(nid_objs[882]),/* "authorityRevocationList" */
|
||||
&(nid_objs[87]),/* "basicConstraints" */
|
||||
&(nid_objs[365]),/* "basicOCSPResponse" */
|
||||
&(nid_objs[285]),/* "biometricInfo" */
|
||||
&(nid_objs[494]),/* "buildingName" */
|
||||
&(nid_objs[860]),/* "businessCategory" */
|
||||
&(nid_objs[691]),/* "c2onb191v4" */
|
||||
&(nid_objs[692]),/* "c2onb191v5" */
|
||||
&(nid_objs[697]),/* "c2onb239v4" */
|
||||
@@ -2482,6 +2573,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[696]),/* "c2tnb239v3" */
|
||||
&(nid_objs[701]),/* "c2tnb359v1" */
|
||||
&(nid_objs[703]),/* "c2tnb431r1" */
|
||||
&(nid_objs[881]),/* "cACertificate" */
|
||||
&(nid_objs[483]),/* "cNAMERecord" */
|
||||
&(nid_objs[179]),/* "caIssuers" */
|
||||
&(nid_objs[785]),/* "caRepository" */
|
||||
@@ -2490,6 +2582,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[677]),/* "certicom-arc" */
|
||||
&(nid_objs[771]),/* "certificateIssuer" */
|
||||
&(nid_objs[89]),/* "certificatePolicies" */
|
||||
&(nid_objs[883]),/* "certificateRevocationList" */
|
||||
&(nid_objs[54]),/* "challengePassword" */
|
||||
&(nid_objs[407]),/* "characteristic-two-field" */
|
||||
&(nid_objs[395]),/* "clearance" */
|
||||
@@ -2500,6 +2593,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[153]),/* "crlBag" */
|
||||
&(nid_objs[103]),/* "crlDistributionPoints" */
|
||||
&(nid_objs[88]),/* "crlNumber" */
|
||||
&(nid_objs[884]),/* "crossCertificatePair" */
|
||||
&(nid_objs[806]),/* "cryptocom" */
|
||||
&(nid_objs[805]),/* "cryptopro" */
|
||||
&(nid_objs[500]),/* "dITRedirect" */
|
||||
@@ -2508,9 +2602,13 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[434]),/* "data" */
|
||||
&(nid_objs[390]),/* "dcobject" */
|
||||
&(nid_objs[140]),/* "deltaCRL" */
|
||||
&(nid_objs[891]),/* "deltaRevocationList" */
|
||||
&(nid_objs[107]),/* "description" */
|
||||
&(nid_objs[871]),/* "destinationIndicator" */
|
||||
&(nid_objs[28]),/* "dhKeyAgreement" */
|
||||
&(nid_objs[382]),/* "directory" */
|
||||
&(nid_objs[887]),/* "distinguishedName" */
|
||||
&(nid_objs[892]),/* "dmdName" */
|
||||
&(nid_objs[174]),/* "dnQualifier" */
|
||||
&(nid_objs[447]),/* "document" */
|
||||
&(nid_objs[471]),/* "documentAuthor" */
|
||||
@@ -2533,12 +2631,14 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[792]),/* "ecdsa-with-Specified" */
|
||||
&(nid_objs[48]),/* "emailAddress" */
|
||||
&(nid_objs[132]),/* "emailProtection" */
|
||||
&(nid_objs[885]),/* "enhancedSearchGuide" */
|
||||
&(nid_objs[389]),/* "enterprises" */
|
||||
&(nid_objs[384]),/* "experimental" */
|
||||
&(nid_objs[172]),/* "extReq" */
|
||||
&(nid_objs[56]),/* "extendedCertificateAttributes" */
|
||||
&(nid_objs[126]),/* "extendedKeyUsage" */
|
||||
&(nid_objs[372]),/* "extendedStatus" */
|
||||
&(nid_objs[867]),/* "facsimileTelephoneNumber" */
|
||||
&(nid_objs[462]),/* "favouriteDrink" */
|
||||
&(nid_objs[857]),/* "freshestCRL" */
|
||||
&(nid_objs[453]),/* "friendlyCountry" */
|
||||
@@ -2565,6 +2665,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[486]),/* "homePostalAddress" */
|
||||
&(nid_objs[473]),/* "homeTelephoneNumber" */
|
||||
&(nid_objs[466]),/* "host" */
|
||||
&(nid_objs[889]),/* "houseIdentifier" */
|
||||
&(nid_objs[442]),/* "iA5StringSyntax" */
|
||||
&(nid_objs[783]),/* "id-DHBasedMac" */
|
||||
&(nid_objs[824]),/* "id-Gost28147-89-CryptoPro-A-ParamSet" */
|
||||
@@ -2794,6 +2895,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[748]),/* "inhibitAnyPolicy" */
|
||||
&(nid_objs[101]),/* "initials" */
|
||||
&(nid_objs[647]),/* "international-organizations" */
|
||||
&(nid_objs[869]),/* "internationaliSDNNumber" */
|
||||
&(nid_objs[142]),/* "invalidityDate" */
|
||||
&(nid_objs[294]),/* "ipsecEndSystem" */
|
||||
&(nid_objs[295]),/* "ipsecTunnel" */
|
||||
@@ -2811,6 +2913,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[493]),/* "mailPreferenceOption" */
|
||||
&(nid_objs[467]),/* "manager" */
|
||||
&(nid_objs[809]),/* "md_gost94" */
|
||||
&(nid_objs[875]),/* "member" */
|
||||
&(nid_objs[182]),/* "member-body" */
|
||||
&(nid_objs[51]),/* "messageDigest" */
|
||||
&(nid_objs[383]),/* "mgmt" */
|
||||
@@ -2846,12 +2949,14 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[681]),/* "onBasis" */
|
||||
&(nid_objs[491]),/* "organizationalStatus" */
|
||||
&(nid_objs[475]),/* "otherMailbox" */
|
||||
&(nid_objs[876]),/* "owner" */
|
||||
&(nid_objs[489]),/* "pagerTelephoneNumber" */
|
||||
&(nid_objs[374]),/* "path" */
|
||||
&(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */
|
||||
&(nid_objs[499]),/* "personalSignature" */
|
||||
&(nid_objs[487]),/* "personalTitle" */
|
||||
&(nid_objs[464]),/* "photo" */
|
||||
&(nid_objs[863]),/* "physicalDeliveryOfficeName" */
|
||||
&(nid_objs[437]),/* "pilot" */
|
||||
&(nid_objs[439]),/* "pilotAttributeSyntax" */
|
||||
&(nid_objs[438]),/* "pilotAttributeType" */
|
||||
@@ -2877,8 +2982,12 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[47]),/* "pkcs9" */
|
||||
&(nid_objs[401]),/* "policyConstraints" */
|
||||
&(nid_objs[747]),/* "policyMappings" */
|
||||
&(nid_objs[862]),/* "postOfficeBox" */
|
||||
&(nid_objs[861]),/* "postalAddress" */
|
||||
&(nid_objs[661]),/* "postalCode" */
|
||||
&(nid_objs[683]),/* "ppBasis" */
|
||||
&(nid_objs[872]),/* "preferredDeliveryMethod" */
|
||||
&(nid_objs[873]),/* "presentationAddress" */
|
||||
&(nid_objs[816]),/* "prf-gostr3411-94" */
|
||||
&(nid_objs[406]),/* "prime-field" */
|
||||
&(nid_objs[409]),/* "prime192v1" */
|
||||
@@ -2890,13 +2999,16 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[415]),/* "prime256v1" */
|
||||
&(nid_objs[385]),/* "private" */
|
||||
&(nid_objs[84]),/* "privateKeyUsagePeriod" */
|
||||
&(nid_objs[886]),/* "protocolInformation" */
|
||||
&(nid_objs[663]),/* "proxyCertInfo" */
|
||||
&(nid_objs[510]),/* "pseudonym" */
|
||||
&(nid_objs[435]),/* "pss" */
|
||||
&(nid_objs[286]),/* "qcStatements" */
|
||||
&(nid_objs[457]),/* "qualityLabelledData" */
|
||||
&(nid_objs[450]),/* "rFC822localPart" */
|
||||
&(nid_objs[870]),/* "registeredAddress" */
|
||||
&(nid_objs[400]),/* "role" */
|
||||
&(nid_objs[877]),/* "roleOccupant" */
|
||||
&(nid_objs[448]),/* "room" */
|
||||
&(nid_objs[463]),/* "roomNumber" */
|
||||
&(nid_objs[ 6]),/* "rsaEncryption" */
|
||||
@@ -2909,6 +3021,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[290]),/* "sbgp-ipAddrBlock" */
|
||||
&(nid_objs[292]),/* "sbgp-routerIdentifier" */
|
||||
&(nid_objs[159]),/* "sdsiCertificate" */
|
||||
&(nid_objs[859]),/* "searchGuide" */
|
||||
&(nid_objs[704]),/* "secp112r1" */
|
||||
&(nid_objs[705]),/* "secp112r2" */
|
||||
&(nid_objs[706]),/* "secp128r1" */
|
||||
@@ -2943,6 +3056,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[733]),/* "sect571k1" */
|
||||
&(nid_objs[734]),/* "sect571r1" */
|
||||
&(nid_objs[386]),/* "security" */
|
||||
&(nid_objs[878]),/* "seeAlso" */
|
||||
&(nid_objs[394]),/* "selected-attribute-types" */
|
||||
&(nid_objs[105]),/* "serialNumber" */
|
||||
&(nid_objs[129]),/* "serverAuth" */
|
||||
@@ -3081,14 +3195,19 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[454]),/* "simpleSecurityObject" */
|
||||
&(nid_objs[496]),/* "singleLevelQuality" */
|
||||
&(nid_objs[387]),/* "snmpv2" */
|
||||
&(nid_objs[660]),/* "streetAddress" */
|
||||
&(nid_objs[660]),/* "street" */
|
||||
&(nid_objs[85]),/* "subjectAltName" */
|
||||
&(nid_objs[769]),/* "subjectDirectoryAttributes" */
|
||||
&(nid_objs[398]),/* "subjectInfoAccess" */
|
||||
&(nid_objs[82]),/* "subjectKeyIdentifier" */
|
||||
&(nid_objs[498]),/* "subtreeMaximumQuality" */
|
||||
&(nid_objs[497]),/* "subtreeMinimumQuality" */
|
||||
&(nid_objs[890]),/* "supportedAlgorithms" */
|
||||
&(nid_objs[874]),/* "supportedApplicationContext" */
|
||||
&(nid_objs[402]),/* "targetInformation" */
|
||||
&(nid_objs[864]),/* "telephoneNumber" */
|
||||
&(nid_objs[866]),/* "teletexTerminalIdentifier" */
|
||||
&(nid_objs[865]),/* "telexNumber" */
|
||||
&(nid_objs[459]),/* "textEncodedORAddress" */
|
||||
&(nid_objs[293]),/* "textNotice" */
|
||||
&(nid_objs[133]),/* "timeStamping" */
|
||||
@@ -3096,9 +3215,12 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[682]),/* "tpBasis" */
|
||||
&(nid_objs[375]),/* "trustRoot" */
|
||||
&(nid_objs[436]),/* "ucl" */
|
||||
&(nid_objs[888]),/* "uniqueMember" */
|
||||
&(nid_objs[55]),/* "unstructuredAddress" */
|
||||
&(nid_objs[49]),/* "unstructuredName" */
|
||||
&(nid_objs[880]),/* "userCertificate" */
|
||||
&(nid_objs[465]),/* "userClass" */
|
||||
&(nid_objs[879]),/* "userPassword" */
|
||||
&(nid_objs[373]),/* "valid" */
|
||||
&(nid_objs[678]),/* "wap" */
|
||||
&(nid_objs[679]),/* "wap-wsg" */
|
||||
@@ -3114,6 +3236,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[741]),/* "wap-wsg-idm-ecid-wtls8" */
|
||||
&(nid_objs[742]),/* "wap-wsg-idm-ecid-wtls9" */
|
||||
&(nid_objs[804]),/* "whirlpool" */
|
||||
&(nid_objs[868]),/* "x121Address" */
|
||||
&(nid_objs[503]),/* "x500UniqueIdentifier" */
|
||||
&(nid_objs[158]),/* "x509Certificate" */
|
||||
&(nid_objs[160]),/* "x509Crl" */
|
||||
@@ -3284,11 +3407,13 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[484]),/* "associatedDomain" */
|
||||
&(nid_objs[485]),/* "associatedName" */
|
||||
&(nid_objs[501]),/* "audio" */
|
||||
&(nid_objs[882]),/* "authorityRevocationList" */
|
||||
&(nid_objs[91]),/* "bf-cbc" */
|
||||
&(nid_objs[93]),/* "bf-cfb" */
|
||||
&(nid_objs[92]),/* "bf-ecb" */
|
||||
&(nid_objs[94]),/* "bf-ofb" */
|
||||
&(nid_objs[494]),/* "buildingName" */
|
||||
&(nid_objs[860]),/* "businessCategory" */
|
||||
&(nid_objs[691]),/* "c2onb191v4" */
|
||||
&(nid_objs[692]),/* "c2onb191v5" */
|
||||
&(nid_objs[697]),/* "c2onb239v4" */
|
||||
@@ -3309,6 +3434,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[696]),/* "c2tnb239v3" */
|
||||
&(nid_objs[701]),/* "c2tnb359v1" */
|
||||
&(nid_objs[703]),/* "c2tnb431r1" */
|
||||
&(nid_objs[881]),/* "cACertificate" */
|
||||
&(nid_objs[483]),/* "cNAMERecord" */
|
||||
&(nid_objs[751]),/* "camellia-128-cbc" */
|
||||
&(nid_objs[757]),/* "camellia-128-cfb" */
|
||||
@@ -3336,6 +3462,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[152]),/* "certBag" */
|
||||
&(nid_objs[677]),/* "certicom-arc" */
|
||||
&(nid_objs[517]),/* "certificate extensions" */
|
||||
&(nid_objs[883]),/* "certificateRevocationList" */
|
||||
&(nid_objs[54]),/* "challengePassword" */
|
||||
&(nid_objs[407]),/* "characteristic-two-field" */
|
||||
&(nid_objs[395]),/* "clearance" */
|
||||
@@ -3346,6 +3473,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[53]),/* "countersignature" */
|
||||
&(nid_objs[14]),/* "countryName" */
|
||||
&(nid_objs[153]),/* "crlBag" */
|
||||
&(nid_objs[884]),/* "crossCertificatePair" */
|
||||
&(nid_objs[806]),/* "cryptocom" */
|
||||
&(nid_objs[805]),/* "cryptopro" */
|
||||
&(nid_objs[500]),/* "dITRedirect" */
|
||||
@@ -3353,6 +3481,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[495]),/* "dSAQuality" */
|
||||
&(nid_objs[434]),/* "data" */
|
||||
&(nid_objs[390]),/* "dcObject" */
|
||||
&(nid_objs[891]),/* "deltaRevocationList" */
|
||||
&(nid_objs[31]),/* "des-cbc" */
|
||||
&(nid_objs[643]),/* "des-cdmf" */
|
||||
&(nid_objs[30]),/* "des-cfb" */
|
||||
@@ -3371,10 +3500,13 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[63]),/* "des-ede3-ofb" */
|
||||
&(nid_objs[45]),/* "des-ofb" */
|
||||
&(nid_objs[107]),/* "description" */
|
||||
&(nid_objs[871]),/* "destinationIndicator" */
|
||||
&(nid_objs[80]),/* "desx-cbc" */
|
||||
&(nid_objs[28]),/* "dhKeyAgreement" */
|
||||
&(nid_objs[11]),/* "directory services (X.500)" */
|
||||
&(nid_objs[378]),/* "directory services - algorithms" */
|
||||
&(nid_objs[887]),/* "distinguishedName" */
|
||||
&(nid_objs[892]),/* "dmdName" */
|
||||
&(nid_objs[174]),/* "dnQualifier" */
|
||||
&(nid_objs[447]),/* "document" */
|
||||
&(nid_objs[471]),/* "documentAuthor" */
|
||||
@@ -3404,7 +3536,9 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[792]),/* "ecdsa-with-Specified" */
|
||||
&(nid_objs[48]),/* "emailAddress" */
|
||||
&(nid_objs[632]),/* "encrypted track 2" */
|
||||
&(nid_objs[885]),/* "enhancedSearchGuide" */
|
||||
&(nid_objs[56]),/* "extendedCertificateAttributes" */
|
||||
&(nid_objs[867]),/* "facsimileTelephoneNumber" */
|
||||
&(nid_objs[462]),/* "favouriteDrink" */
|
||||
&(nid_objs[453]),/* "friendlyCountry" */
|
||||
&(nid_objs[490]),/* "friendlyCountryName" */
|
||||
@@ -3426,6 +3560,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[486]),/* "homePostalAddress" */
|
||||
&(nid_objs[473]),/* "homeTelephoneNumber" */
|
||||
&(nid_objs[466]),/* "host" */
|
||||
&(nid_objs[889]),/* "houseIdentifier" */
|
||||
&(nid_objs[442]),/* "iA5StringSyntax" */
|
||||
&(nid_objs[381]),/* "iana" */
|
||||
&(nid_objs[824]),/* "id-Gost28147-89-CryptoPro-A-ParamSet" */
|
||||
@@ -3640,6 +3775,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[676]),/* "identified-organization" */
|
||||
&(nid_objs[461]),/* "info" */
|
||||
&(nid_objs[101]),/* "initials" */
|
||||
&(nid_objs[869]),/* "internationaliSDNNumber" */
|
||||
&(nid_objs[749]),/* "ipsec3" */
|
||||
&(nid_objs[750]),/* "ipsec4" */
|
||||
&(nid_objs[181]),/* "iso" */
|
||||
@@ -3666,6 +3802,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[ 8]),/* "md5WithRSAEncryption" */
|
||||
&(nid_objs[95]),/* "mdc2" */
|
||||
&(nid_objs[96]),/* "mdc2WithRSA" */
|
||||
&(nid_objs[875]),/* "member" */
|
||||
&(nid_objs[602]),/* "merchant initiated auth" */
|
||||
&(nid_objs[514]),/* "message extensions" */
|
||||
&(nid_objs[51]),/* "messageDigest" */
|
||||
@@ -3680,6 +3817,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[491]),/* "organizationalStatus" */
|
||||
&(nid_objs[18]),/* "organizationalUnitName" */
|
||||
&(nid_objs[475]),/* "otherMailbox" */
|
||||
&(nid_objs[876]),/* "owner" */
|
||||
&(nid_objs[489]),/* "pagerTelephoneNumber" */
|
||||
&(nid_objs[782]),/* "password based MAC" */
|
||||
&(nid_objs[374]),/* "path" */
|
||||
@@ -3700,6 +3838,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[499]),/* "personalSignature" */
|
||||
&(nid_objs[487]),/* "personalTitle" */
|
||||
&(nid_objs[464]),/* "photo" */
|
||||
&(nid_objs[863]),/* "physicalDeliveryOfficeName" */
|
||||
&(nid_objs[437]),/* "pilot" */
|
||||
&(nid_objs[439]),/* "pilotAttributeSyntax" */
|
||||
&(nid_objs[438]),/* "pilotAttributeType" */
|
||||
@@ -3722,8 +3861,12 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[22]),/* "pkcs7-signedData" */
|
||||
&(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */
|
||||
&(nid_objs[47]),/* "pkcs9" */
|
||||
&(nid_objs[862]),/* "postOfficeBox" */
|
||||
&(nid_objs[861]),/* "postalAddress" */
|
||||
&(nid_objs[661]),/* "postalCode" */
|
||||
&(nid_objs[683]),/* "ppBasis" */
|
||||
&(nid_objs[872]),/* "preferredDeliveryMethod" */
|
||||
&(nid_objs[873]),/* "presentationAddress" */
|
||||
&(nid_objs[406]),/* "prime-field" */
|
||||
&(nid_objs[409]),/* "prime192v1" */
|
||||
&(nid_objs[410]),/* "prime192v2" */
|
||||
@@ -3732,6 +3875,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[413]),/* "prime239v2" */
|
||||
&(nid_objs[414]),/* "prime239v3" */
|
||||
&(nid_objs[415]),/* "prime256v1" */
|
||||
&(nid_objs[886]),/* "protocolInformation" */
|
||||
&(nid_objs[510]),/* "pseudonym" */
|
||||
&(nid_objs[435]),/* "pss" */
|
||||
&(nid_objs[286]),/* "qcStatements" */
|
||||
@@ -3749,10 +3893,12 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[122]),/* "rc5-cfb" */
|
||||
&(nid_objs[121]),/* "rc5-ecb" */
|
||||
&(nid_objs[123]),/* "rc5-ofb" */
|
||||
&(nid_objs[870]),/* "registeredAddress" */
|
||||
&(nid_objs[460]),/* "rfc822Mailbox" */
|
||||
&(nid_objs[117]),/* "ripemd160" */
|
||||
&(nid_objs[119]),/* "ripemd160WithRSA" */
|
||||
&(nid_objs[400]),/* "role" */
|
||||
&(nid_objs[877]),/* "roleOccupant" */
|
||||
&(nid_objs[448]),/* "room" */
|
||||
&(nid_objs[463]),/* "roomNumber" */
|
||||
&(nid_objs[19]),/* "rsa" */
|
||||
@@ -3766,6 +3912,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[290]),/* "sbgp-ipAddrBlock" */
|
||||
&(nid_objs[292]),/* "sbgp-routerIdentifier" */
|
||||
&(nid_objs[159]),/* "sdsiCertificate" */
|
||||
&(nid_objs[859]),/* "searchGuide" */
|
||||
&(nid_objs[704]),/* "secp112r1" */
|
||||
&(nid_objs[705]),/* "secp112r2" */
|
||||
&(nid_objs[706]),/* "secp128r1" */
|
||||
@@ -3800,6 +3947,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[733]),/* "sect571k1" */
|
||||
&(nid_objs[734]),/* "sect571r1" */
|
||||
&(nid_objs[635]),/* "secure device signature" */
|
||||
&(nid_objs[878]),/* "seeAlso" */
|
||||
&(nid_objs[777]),/* "seed-cbc" */
|
||||
&(nid_objs[779]),/* "seed-cfb" */
|
||||
&(nid_objs[776]),/* "seed-ecb" */
|
||||
@@ -3942,17 +4090,25 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[660]),/* "streetAddress" */
|
||||
&(nid_objs[498]),/* "subtreeMaximumQuality" */
|
||||
&(nid_objs[497]),/* "subtreeMinimumQuality" */
|
||||
&(nid_objs[890]),/* "supportedAlgorithms" */
|
||||
&(nid_objs[874]),/* "supportedApplicationContext" */
|
||||
&(nid_objs[100]),/* "surname" */
|
||||
&(nid_objs[864]),/* "telephoneNumber" */
|
||||
&(nid_objs[866]),/* "teletexTerminalIdentifier" */
|
||||
&(nid_objs[865]),/* "telexNumber" */
|
||||
&(nid_objs[459]),/* "textEncodedORAddress" */
|
||||
&(nid_objs[293]),/* "textNotice" */
|
||||
&(nid_objs[106]),/* "title" */
|
||||
&(nid_objs[682]),/* "tpBasis" */
|
||||
&(nid_objs[436]),/* "ucl" */
|
||||
&(nid_objs[ 0]),/* "undefined" */
|
||||
&(nid_objs[888]),/* "uniqueMember" */
|
||||
&(nid_objs[55]),/* "unstructuredAddress" */
|
||||
&(nid_objs[49]),/* "unstructuredName" */
|
||||
&(nid_objs[880]),/* "userCertificate" */
|
||||
&(nid_objs[465]),/* "userClass" */
|
||||
&(nid_objs[458]),/* "userId" */
|
||||
&(nid_objs[879]),/* "userPassword" */
|
||||
&(nid_objs[373]),/* "valid" */
|
||||
&(nid_objs[678]),/* "wap" */
|
||||
&(nid_objs[679]),/* "wap-wsg" */
|
||||
@@ -3968,6 +4124,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[741]),/* "wap-wsg-idm-ecid-wtls8" */
|
||||
&(nid_objs[742]),/* "wap-wsg-idm-ecid-wtls9" */
|
||||
&(nid_objs[804]),/* "whirlpool" */
|
||||
&(nid_objs[868]),/* "x121Address" */
|
||||
&(nid_objs[503]),/* "x500UniqueIdentifier" */
|
||||
&(nid_objs[158]),/* "x509Certificate" */
|
||||
&(nid_objs[160]),/* "x509Crl" */
|
||||
@@ -4009,13 +4166,47 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */
|
||||
&(nid_objs[106]),/* OBJ_title 2 5 4 12 */
|
||||
&(nid_objs[107]),/* OBJ_description 2 5 4 13 */
|
||||
&(nid_objs[859]),/* OBJ_searchGuide 2 5 4 14 */
|
||||
&(nid_objs[860]),/* OBJ_businessCategory 2 5 4 15 */
|
||||
&(nid_objs[861]),/* OBJ_postalAddress 2 5 4 16 */
|
||||
&(nid_objs[661]),/* OBJ_postalCode 2 5 4 17 */
|
||||
&(nid_objs[862]),/* OBJ_postOfficeBox 2 5 4 18 */
|
||||
&(nid_objs[863]),/* OBJ_physicalDeliveryOfficeName 2 5 4 19 */
|
||||
&(nid_objs[864]),/* OBJ_telephoneNumber 2 5 4 20 */
|
||||
&(nid_objs[865]),/* OBJ_telexNumber 2 5 4 21 */
|
||||
&(nid_objs[866]),/* OBJ_teletexTerminalIdentifier 2 5 4 22 */
|
||||
&(nid_objs[867]),/* OBJ_facsimileTelephoneNumber 2 5 4 23 */
|
||||
&(nid_objs[868]),/* OBJ_x121Address 2 5 4 24 */
|
||||
&(nid_objs[869]),/* OBJ_internationaliSDNNumber 2 5 4 25 */
|
||||
&(nid_objs[870]),/* OBJ_registeredAddress 2 5 4 26 */
|
||||
&(nid_objs[871]),/* OBJ_destinationIndicator 2 5 4 27 */
|
||||
&(nid_objs[872]),/* OBJ_preferredDeliveryMethod 2 5 4 28 */
|
||||
&(nid_objs[873]),/* OBJ_presentationAddress 2 5 4 29 */
|
||||
&(nid_objs[874]),/* OBJ_supportedApplicationContext 2 5 4 30 */
|
||||
&(nid_objs[875]),/* OBJ_member 2 5 4 31 */
|
||||
&(nid_objs[876]),/* OBJ_owner 2 5 4 32 */
|
||||
&(nid_objs[877]),/* OBJ_roleOccupant 2 5 4 33 */
|
||||
&(nid_objs[878]),/* OBJ_seeAlso 2 5 4 34 */
|
||||
&(nid_objs[879]),/* OBJ_userPassword 2 5 4 35 */
|
||||
&(nid_objs[880]),/* OBJ_userCertificate 2 5 4 36 */
|
||||
&(nid_objs[881]),/* OBJ_cACertificate 2 5 4 37 */
|
||||
&(nid_objs[882]),/* OBJ_authorityRevocationList 2 5 4 38 */
|
||||
&(nid_objs[883]),/* OBJ_certificateRevocationList 2 5 4 39 */
|
||||
&(nid_objs[884]),/* OBJ_crossCertificatePair 2 5 4 40 */
|
||||
&(nid_objs[173]),/* OBJ_name 2 5 4 41 */
|
||||
&(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */
|
||||
&(nid_objs[101]),/* OBJ_initials 2 5 4 43 */
|
||||
&(nid_objs[509]),/* OBJ_generationQualifier 2 5 4 44 */
|
||||
&(nid_objs[503]),/* OBJ_x500UniqueIdentifier 2 5 4 45 */
|
||||
&(nid_objs[174]),/* OBJ_dnQualifier 2 5 4 46 */
|
||||
&(nid_objs[885]),/* OBJ_enhancedSearchGuide 2 5 4 47 */
|
||||
&(nid_objs[886]),/* OBJ_protocolInformation 2 5 4 48 */
|
||||
&(nid_objs[887]),/* OBJ_distinguishedName 2 5 4 49 */
|
||||
&(nid_objs[888]),/* OBJ_uniqueMember 2 5 4 50 */
|
||||
&(nid_objs[889]),/* OBJ_houseIdentifier 2 5 4 51 */
|
||||
&(nid_objs[890]),/* OBJ_supportedAlgorithms 2 5 4 52 */
|
||||
&(nid_objs[891]),/* OBJ_deltaRevocationList 2 5 4 53 */
|
||||
&(nid_objs[892]),/* OBJ_dmdName 2 5 4 54 */
|
||||
&(nid_objs[510]),/* OBJ_pseudonym 2 5 4 65 */
|
||||
&(nid_objs[400]),/* OBJ_role 2 5 4 72 */
|
||||
&(nid_objs[769]),/* OBJ_subject_directory_attributes 2 5 29 9 */
|
||||
|
||||
@@ -2049,6 +2049,7 @@
|
||||
#define NID_stateOrProvinceName 16
|
||||
#define OBJ_stateOrProvinceName OBJ_X509,8L
|
||||
|
||||
#define SN_streetAddress "street"
|
||||
#define LN_streetAddress "streetAddress"
|
||||
#define NID_streetAddress 660
|
||||
#define OBJ_streetAddress OBJ_X509,9L
|
||||
@@ -2063,6 +2064,7 @@
|
||||
#define NID_organizationalUnitName 18
|
||||
#define OBJ_organizationalUnitName OBJ_X509,11L
|
||||
|
||||
#define SN_title "title"
|
||||
#define LN_title "title"
|
||||
#define NID_title 106
|
||||
#define OBJ_title OBJ_X509,12L
|
||||
@@ -2071,10 +2073,114 @@
|
||||
#define NID_description 107
|
||||
#define OBJ_description OBJ_X509,13L
|
||||
|
||||
#define LN_searchGuide "searchGuide"
|
||||
#define NID_searchGuide 859
|
||||
#define OBJ_searchGuide OBJ_X509,14L
|
||||
|
||||
#define LN_businessCategory "businessCategory"
|
||||
#define NID_businessCategory 860
|
||||
#define OBJ_businessCategory OBJ_X509,15L
|
||||
|
||||
#define LN_postalAddress "postalAddress"
|
||||
#define NID_postalAddress 861
|
||||
#define OBJ_postalAddress OBJ_X509,16L
|
||||
|
||||
#define LN_postalCode "postalCode"
|
||||
#define NID_postalCode 661
|
||||
#define OBJ_postalCode OBJ_X509,17L
|
||||
|
||||
#define LN_postOfficeBox "postOfficeBox"
|
||||
#define NID_postOfficeBox 862
|
||||
#define OBJ_postOfficeBox OBJ_X509,18L
|
||||
|
||||
#define LN_physicalDeliveryOfficeName "physicalDeliveryOfficeName"
|
||||
#define NID_physicalDeliveryOfficeName 863
|
||||
#define OBJ_physicalDeliveryOfficeName OBJ_X509,19L
|
||||
|
||||
#define LN_telephoneNumber "telephoneNumber"
|
||||
#define NID_telephoneNumber 864
|
||||
#define OBJ_telephoneNumber OBJ_X509,20L
|
||||
|
||||
#define LN_telexNumber "telexNumber"
|
||||
#define NID_telexNumber 865
|
||||
#define OBJ_telexNumber OBJ_X509,21L
|
||||
|
||||
#define LN_teletexTerminalIdentifier "teletexTerminalIdentifier"
|
||||
#define NID_teletexTerminalIdentifier 866
|
||||
#define OBJ_teletexTerminalIdentifier OBJ_X509,22L
|
||||
|
||||
#define LN_facsimileTelephoneNumber "facsimileTelephoneNumber"
|
||||
#define NID_facsimileTelephoneNumber 867
|
||||
#define OBJ_facsimileTelephoneNumber OBJ_X509,23L
|
||||
|
||||
#define LN_x121Address "x121Address"
|
||||
#define NID_x121Address 868
|
||||
#define OBJ_x121Address OBJ_X509,24L
|
||||
|
||||
#define LN_internationaliSDNNumber "internationaliSDNNumber"
|
||||
#define NID_internationaliSDNNumber 869
|
||||
#define OBJ_internationaliSDNNumber OBJ_X509,25L
|
||||
|
||||
#define LN_registeredAddress "registeredAddress"
|
||||
#define NID_registeredAddress 870
|
||||
#define OBJ_registeredAddress OBJ_X509,26L
|
||||
|
||||
#define LN_destinationIndicator "destinationIndicator"
|
||||
#define NID_destinationIndicator 871
|
||||
#define OBJ_destinationIndicator OBJ_X509,27L
|
||||
|
||||
#define LN_preferredDeliveryMethod "preferredDeliveryMethod"
|
||||
#define NID_preferredDeliveryMethod 872
|
||||
#define OBJ_preferredDeliveryMethod OBJ_X509,28L
|
||||
|
||||
#define LN_presentationAddress "presentationAddress"
|
||||
#define NID_presentationAddress 873
|
||||
#define OBJ_presentationAddress OBJ_X509,29L
|
||||
|
||||
#define LN_supportedApplicationContext "supportedApplicationContext"
|
||||
#define NID_supportedApplicationContext 874
|
||||
#define OBJ_supportedApplicationContext OBJ_X509,30L
|
||||
|
||||
#define SN_member "member"
|
||||
#define NID_member 875
|
||||
#define OBJ_member OBJ_X509,31L
|
||||
|
||||
#define SN_owner "owner"
|
||||
#define NID_owner 876
|
||||
#define OBJ_owner OBJ_X509,32L
|
||||
|
||||
#define LN_roleOccupant "roleOccupant"
|
||||
#define NID_roleOccupant 877
|
||||
#define OBJ_roleOccupant OBJ_X509,33L
|
||||
|
||||
#define SN_seeAlso "seeAlso"
|
||||
#define NID_seeAlso 878
|
||||
#define OBJ_seeAlso OBJ_X509,34L
|
||||
|
||||
#define LN_userPassword "userPassword"
|
||||
#define NID_userPassword 879
|
||||
#define OBJ_userPassword OBJ_X509,35L
|
||||
|
||||
#define LN_userCertificate "userCertificate"
|
||||
#define NID_userCertificate 880
|
||||
#define OBJ_userCertificate OBJ_X509,36L
|
||||
|
||||
#define LN_cACertificate "cACertificate"
|
||||
#define NID_cACertificate 881
|
||||
#define OBJ_cACertificate OBJ_X509,37L
|
||||
|
||||
#define LN_authorityRevocationList "authorityRevocationList"
|
||||
#define NID_authorityRevocationList 882
|
||||
#define OBJ_authorityRevocationList OBJ_X509,38L
|
||||
|
||||
#define LN_certificateRevocationList "certificateRevocationList"
|
||||
#define NID_certificateRevocationList 883
|
||||
#define OBJ_certificateRevocationList OBJ_X509,39L
|
||||
|
||||
#define LN_crossCertificatePair "crossCertificatePair"
|
||||
#define NID_crossCertificatePair 884
|
||||
#define OBJ_crossCertificatePair OBJ_X509,40L
|
||||
|
||||
#define SN_name "name"
|
||||
#define LN_name "name"
|
||||
#define NID_name 173
|
||||
@@ -2085,6 +2191,7 @@
|
||||
#define NID_givenName 99
|
||||
#define OBJ_givenName OBJ_X509,42L
|
||||
|
||||
#define SN_initials "initials"
|
||||
#define LN_initials "initials"
|
||||
#define NID_initials 101
|
||||
#define OBJ_initials OBJ_X509,43L
|
||||
@@ -2102,6 +2209,38 @@
|
||||
#define NID_dnQualifier 174
|
||||
#define OBJ_dnQualifier OBJ_X509,46L
|
||||
|
||||
#define LN_enhancedSearchGuide "enhancedSearchGuide"
|
||||
#define NID_enhancedSearchGuide 885
|
||||
#define OBJ_enhancedSearchGuide OBJ_X509,47L
|
||||
|
||||
#define LN_protocolInformation "protocolInformation"
|
||||
#define NID_protocolInformation 886
|
||||
#define OBJ_protocolInformation OBJ_X509,48L
|
||||
|
||||
#define LN_distinguishedName "distinguishedName"
|
||||
#define NID_distinguishedName 887
|
||||
#define OBJ_distinguishedName OBJ_X509,49L
|
||||
|
||||
#define LN_uniqueMember "uniqueMember"
|
||||
#define NID_uniqueMember 888
|
||||
#define OBJ_uniqueMember OBJ_X509,50L
|
||||
|
||||
#define LN_houseIdentifier "houseIdentifier"
|
||||
#define NID_houseIdentifier 889
|
||||
#define OBJ_houseIdentifier OBJ_X509,51L
|
||||
|
||||
#define LN_supportedAlgorithms "supportedAlgorithms"
|
||||
#define NID_supportedAlgorithms 890
|
||||
#define OBJ_supportedAlgorithms OBJ_X509,52L
|
||||
|
||||
#define LN_deltaRevocationList "deltaRevocationList"
|
||||
#define NID_deltaRevocationList 891
|
||||
#define OBJ_deltaRevocationList OBJ_X509,53L
|
||||
|
||||
#define SN_dmdName "dmdName"
|
||||
#define NID_dmdName 892
|
||||
#define OBJ_dmdName OBJ_X509,54L
|
||||
|
||||
#define LN_pseudonym "pseudonym"
|
||||
#define NID_pseudonym 510
|
||||
#define OBJ_pseudonym OBJ_X509,65L
|
||||
|
||||
@@ -856,3 +856,37 @@ hmac 855
|
||||
LocalKeySet 856
|
||||
freshest_crl 857
|
||||
id_on_permanentIdentifier 858
|
||||
searchGuide 859
|
||||
businessCategory 860
|
||||
postalAddress 861
|
||||
postOfficeBox 862
|
||||
physicalDeliveryOfficeName 863
|
||||
telephoneNumber 864
|
||||
telexNumber 865
|
||||
teletexTerminalIdentifier 866
|
||||
facsimileTelephoneNumber 867
|
||||
x121Address 868
|
||||
internationaliSDNNumber 869
|
||||
registeredAddress 870
|
||||
destinationIndicator 871
|
||||
preferredDeliveryMethod 872
|
||||
presentationAddress 873
|
||||
supportedApplicationContext 874
|
||||
member 875
|
||||
owner 876
|
||||
roleOccupant 877
|
||||
seeAlso 878
|
||||
userPassword 879
|
||||
userCertificate 880
|
||||
cACertificate 881
|
||||
authorityRevocationList 882
|
||||
certificateRevocationList 883
|
||||
crossCertificatePair 884
|
||||
enhancedSearchGuide 885
|
||||
protocolInformation 886
|
||||
distinguishedName 887
|
||||
uniqueMember 888
|
||||
houseIdentifier 889
|
||||
supportedAlgorithms 890
|
||||
deltaRevocationList 891
|
||||
dmdName 892
|
||||
|
||||
@@ -664,18 +664,52 @@ X509 5 : : serialNumber
|
||||
X509 6 : C : countryName
|
||||
X509 7 : L : localityName
|
||||
X509 8 : ST : stateOrProvinceName
|
||||
X509 9 : : streetAddress
|
||||
X509 9 : street : streetAddress
|
||||
X509 10 : O : organizationName
|
||||
X509 11 : OU : organizationalUnitName
|
||||
X509 12 : : title
|
||||
X509 12 : title : title
|
||||
X509 13 : : description
|
||||
X509 17 : : postalCode
|
||||
X509 14 : : searchGuide
|
||||
X509 15 : : businessCategory
|
||||
X509 16 : : postalAddress
|
||||
X509 17 : : postalCode
|
||||
X509 18 : : postOfficeBox
|
||||
X509 19 : : physicalDeliveryOfficeName
|
||||
X509 20 : : telephoneNumber
|
||||
X509 21 : : telexNumber
|
||||
X509 22 : : teletexTerminalIdentifier
|
||||
X509 23 : : facsimileTelephoneNumber
|
||||
X509 24 : : x121Address
|
||||
X509 25 : : internationaliSDNNumber
|
||||
X509 26 : : registeredAddress
|
||||
X509 27 : : destinationIndicator
|
||||
X509 28 : : preferredDeliveryMethod
|
||||
X509 29 : : presentationAddress
|
||||
X509 30 : : supportedApplicationContext
|
||||
X509 31 : member :
|
||||
X509 32 : owner :
|
||||
X509 33 : : roleOccupant
|
||||
X509 34 : seeAlso :
|
||||
X509 35 : : userPassword
|
||||
X509 36 : : userCertificate
|
||||
X509 37 : : cACertificate
|
||||
X509 38 : : authorityRevocationList
|
||||
X509 39 : : certificateRevocationList
|
||||
X509 40 : : crossCertificatePair
|
||||
X509 41 : name : name
|
||||
X509 42 : GN : givenName
|
||||
X509 43 : : initials
|
||||
X509 43 : initials : initials
|
||||
X509 44 : : generationQualifier
|
||||
X509 45 : : x500UniqueIdentifier
|
||||
X509 46 : dnQualifier : dnQualifier
|
||||
X509 47 : : enhancedSearchGuide
|
||||
X509 48 : : protocolInformation
|
||||
X509 49 : : distinguishedName
|
||||
X509 50 : : uniqueMember
|
||||
X509 51 : : houseIdentifier
|
||||
X509 52 : : supportedAlgorithms
|
||||
X509 53 : : deltaRevocationList
|
||||
X509 54 : dmdName :
|
||||
X509 65 : : pseudonym
|
||||
X509 72 : role : role
|
||||
|
||||
|
||||
@@ -266,12 +266,12 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags)
|
||||
if (!ASN1_GENERALIZEDTIME_print(bp,single->nextUpdate))
|
||||
goto err;
|
||||
}
|
||||
if (!BIO_write(bp,"\n",1)) goto err;
|
||||
if (BIO_write(bp,"\n",1) <= 0) goto err;
|
||||
if (!X509V3_extensions_print(bp,
|
||||
"Response Single Extensions",
|
||||
single->singleExtensions, flags, 8))
|
||||
goto err;
|
||||
if (!BIO_write(bp,"\n",1)) goto err;
|
||||
if (BIO_write(bp,"\n",1) <= 0) goto err;
|
||||
}
|
||||
if (!X509V3_extensions_print(bp, "Response Extensions",
|
||||
rd->responseExtensions, flags, 4))
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x009080bfL
|
||||
#define OPENSSL_VERSION_NUMBER 0x009080d1L
|
||||
#ifdef OPENSSL_FIPS
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8k-fips 25 Mar 2009"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m-fips-beta1 20 Jan 2010"
|
||||
#else
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8k 25 Mar 2009"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8m-beta1 20 Jan 2010"
|
||||
#endif
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type,
|
||||
|
||||
EVP_CIPHER_CTX_init(&ctx->cipher);
|
||||
ret=EVP_SealInit(&ctx->cipher,type,ek,ekl,iv,pubk,npubk);
|
||||
if (!ret) goto err;
|
||||
if (ret <= 0) goto err;
|
||||
|
||||
/* base64 encode the keys */
|
||||
for (i=0; i<npubk; i++)
|
||||
|
||||
@@ -189,8 +189,10 @@ my $current_function;
|
||||
if (!$masm) {
|
||||
# Solaris /usr/ccs/bin/as can't handle multiplications
|
||||
# in $self->{label}
|
||||
use integer;
|
||||
$self->{label} =~ s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/egi;
|
||||
$self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg;
|
||||
$self->{label} =~ s/([0-9]+)/$1<<32>>32/eg;
|
||||
|
||||
if (defined($self->{index})) {
|
||||
sprintf "%s(%%%s,%%%s,%d)",
|
||||
|
||||
@@ -60,6 +60,12 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/pkcs12.h>
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
/* Rename these functions to avoid name clashes on NetWare OS */
|
||||
#define uni2asc OPENSSL_uni2asc
|
||||
#define asc2uni OPENSSL_asc2uni
|
||||
#endif
|
||||
|
||||
/* Add a local keyid to a safebag */
|
||||
|
||||
int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name,
|
||||
|
||||
@@ -69,6 +69,12 @@ extern BIO *bio_err;
|
||||
void h__dump (unsigned char *p, int len);
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
/* Rename these functions to avoid name clashes on NetWare OS */
|
||||
#define uni2asc OPENSSL_uni2asc
|
||||
#define asc2uni OPENSSL_asc2uni
|
||||
#endif
|
||||
|
||||
/* PKCS12 compatible key/IV generation */
|
||||
#ifndef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
@@ -60,6 +60,12 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/pkcs12.h>
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
/* Rename these functions to avoid name clashes on NetWare OS */
|
||||
#define uni2asc OPENSSL_uni2asc
|
||||
#define asc2uni OPENSSL_asc2uni
|
||||
#endif
|
||||
|
||||
/* Cheap and nasty Unicode stuff */
|
||||
|
||||
unsigned char *asc2uni(const char *asc, int asclen, unsigned char **uni, int *unilen)
|
||||
|
||||
@@ -232,9 +232,14 @@ int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen,
|
||||
const EVP_MD *md_type);
|
||||
int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt,
|
||||
int saltlen, const EVP_MD *md_type);
|
||||
#if defined(NETWARE) || defined(OPENSSL_SYS_NETWARE)
|
||||
/* Rename these functions to avoid name clashes on NetWare OS */
|
||||
unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, unsigned char **uni, int *unilen);
|
||||
char *OPENSSL_uni2asc(unsigned char *uni, int unilen);
|
||||
#else
|
||||
unsigned char *asc2uni(const char *asc, int asclen, unsigned char **uni, int *unilen);
|
||||
char *uni2asc(unsigned char *uni, int unilen);
|
||||
|
||||
#endif
|
||||
DECLARE_ASN1_FUNCTIONS(PKCS12)
|
||||
DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA)
|
||||
DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG)
|
||||
|
||||
@@ -50,10 +50,6 @@
|
||||
* 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>
|
||||
@@ -61,200 +57,47 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* MIME and related routines */
|
||||
/* PKCS#7 wrappers round generalised MIME routines */
|
||||
|
||||
/* MIME format structures
|
||||
* Note that all are translated to lower case apart from
|
||||
* parameter values. Quotes are stripped off
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
char *param_name; /* Param name e.g. "micalg" */
|
||||
char *param_value; /* Param value e.g. "sha1" */
|
||||
} MIME_PARAM;
|
||||
|
||||
DECLARE_STACK_OF(MIME_PARAM)
|
||||
IMPLEMENT_STACK_OF(MIME_PARAM)
|
||||
|
||||
typedef struct {
|
||||
char *name; /* Name of line e.g. "content-type" */
|
||||
char *value; /* Value of line e.g. "text/plain" */
|
||||
STACK_OF(MIME_PARAM) *params; /* Zero or more parameters */
|
||||
} MIME_HEADER;
|
||||
|
||||
DECLARE_STACK_OF(MIME_HEADER)
|
||||
IMPLEMENT_STACK_OF(MIME_HEADER)
|
||||
|
||||
static int pkcs7_output_data(BIO *bio, BIO *data, PKCS7 *p7, int flags);
|
||||
static int B64_write_PKCS7(BIO *bio, PKCS7 *p7);
|
||||
static PKCS7 *B64_read_PKCS7(BIO *bio);
|
||||
static char * strip_ends(char *name);
|
||||
static char * strip_start(char *name);
|
||||
static char * strip_end(char *name);
|
||||
static MIME_HEADER *mime_hdr_new(char *name, char *value);
|
||||
static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value);
|
||||
static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio);
|
||||
static int mime_hdr_cmp(const MIME_HEADER * const *a,
|
||||
const MIME_HEADER * const *b);
|
||||
static int mime_param_cmp(const MIME_PARAM * const *a,
|
||||
const MIME_PARAM * const *b);
|
||||
static void mime_param_free(MIME_PARAM *param);
|
||||
static int mime_bound_check(char *line, int linelen, char *bound, int blen);
|
||||
static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret);
|
||||
static int strip_eol(char *linebuf, int *plen);
|
||||
static MIME_HEADER *mime_hdr_find(STACK_OF(MIME_HEADER) *hdrs, char *name);
|
||||
static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name);
|
||||
static void mime_hdr_free(MIME_HEADER *hdr);
|
||||
|
||||
#define MAX_SMLEN 1024
|
||||
#define mime_debug(x) /* x */
|
||||
|
||||
/* Base 64 read and write of PKCS#7 structure */
|
||||
|
||||
static int B64_write_PKCS7(BIO *bio, PKCS7 *p7)
|
||||
{
|
||||
BIO *b64;
|
||||
if(!(b64 = BIO_new(BIO_f_base64()))) {
|
||||
PKCS7err(PKCS7_F_B64_WRITE_PKCS7,ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
bio = BIO_push(b64, bio);
|
||||
i2d_PKCS7_bio(bio, p7);
|
||||
(void)BIO_flush(bio);
|
||||
bio = BIO_pop(bio);
|
||||
BIO_free(b64);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static PKCS7 *B64_read_PKCS7(BIO *bio)
|
||||
{
|
||||
BIO *b64;
|
||||
PKCS7 *p7;
|
||||
if(!(b64 = BIO_new(BIO_f_base64()))) {
|
||||
PKCS7err(PKCS7_F_B64_READ_PKCS7,ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
bio = BIO_push(b64, bio);
|
||||
if(!(p7 = d2i_PKCS7_bio(bio, NULL)))
|
||||
PKCS7err(PKCS7_F_B64_READ_PKCS7,PKCS7_R_DECODE_ERROR);
|
||||
(void)BIO_flush(bio);
|
||||
bio = BIO_pop(bio);
|
||||
BIO_free(b64);
|
||||
return p7;
|
||||
}
|
||||
|
||||
/* SMIME sender */
|
||||
|
||||
int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
|
||||
{
|
||||
char bound[33], c;
|
||||
int i;
|
||||
char *mime_prefix, *mime_eol, *msg_type=NULL;
|
||||
if (flags & PKCS7_NOOLDMIMETYPE)
|
||||
mime_prefix = "application/pkcs7-";
|
||||
else
|
||||
mime_prefix = "application/x-pkcs7-";
|
||||
|
||||
if (flags & PKCS7_CRLFEOL)
|
||||
mime_eol = "\r\n";
|
||||
else
|
||||
mime_eol = "\n";
|
||||
if((flags & PKCS7_DETACHED) && data) {
|
||||
/* We want multipart/signed */
|
||||
/* Generate a random boundary */
|
||||
RAND_pseudo_bytes((unsigned char *)bound, 32);
|
||||
for(i = 0; i < 32; i++) {
|
||||
c = bound[i] & 0xf;
|
||||
if(c < 10) c += '0';
|
||||
else c += 'A' - 10;
|
||||
bound[i] = c;
|
||||
}
|
||||
bound[32] = 0;
|
||||
BIO_printf(bio, "MIME-Version: 1.0%s", mime_eol);
|
||||
BIO_printf(bio, "Content-Type: multipart/signed;");
|
||||
BIO_printf(bio, " protocol=\"%ssignature\";", mime_prefix);
|
||||
BIO_printf(bio, " micalg=sha1; boundary=\"----%s\"%s%s",
|
||||
bound, mime_eol, mime_eol);
|
||||
BIO_printf(bio, "This is an S/MIME signed message%s%s",
|
||||
mime_eol, mime_eol);
|
||||
/* Now write out the first part */
|
||||
BIO_printf(bio, "------%s%s", bound, mime_eol);
|
||||
pkcs7_output_data(bio, data, p7, flags);
|
||||
BIO_printf(bio, "%s------%s%s", mime_eol, bound, mime_eol);
|
||||
|
||||
/* Headers for signature */
|
||||
|
||||
BIO_printf(bio, "Content-Type: %ssignature;", mime_prefix);
|
||||
BIO_printf(bio, " name=\"smime.p7s\"%s", mime_eol);
|
||||
BIO_printf(bio, "Content-Transfer-Encoding: base64%s",
|
||||
mime_eol);
|
||||
BIO_printf(bio, "Content-Disposition: attachment;");
|
||||
BIO_printf(bio, " filename=\"smime.p7s\"%s%s",
|
||||
mime_eol, mime_eol);
|
||||
B64_write_PKCS7(bio, p7);
|
||||
BIO_printf(bio,"%s------%s--%s%s", mime_eol, bound,
|
||||
mime_eol, mime_eol);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Determine smime-type header */
|
||||
|
||||
if (PKCS7_type_is_enveloped(p7))
|
||||
msg_type = "enveloped-data";
|
||||
else if (PKCS7_type_is_signed(p7))
|
||||
{
|
||||
/* If we have any signers it is signed-data othewise
|
||||
* certs-only.
|
||||
*/
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *sinfos;
|
||||
sinfos = PKCS7_get_signer_info(p7);
|
||||
if (sk_PKCS7_SIGNER_INFO_num(sinfos) > 0)
|
||||
msg_type = "signed-data";
|
||||
else
|
||||
msg_type = "certs-only";
|
||||
}
|
||||
/* MIME headers */
|
||||
BIO_printf(bio, "MIME-Version: 1.0%s", mime_eol);
|
||||
BIO_printf(bio, "Content-Disposition: attachment;");
|
||||
BIO_printf(bio, " filename=\"smime.p7m\"%s", mime_eol);
|
||||
BIO_printf(bio, "Content-Type: %smime;", mime_prefix);
|
||||
if (msg_type)
|
||||
BIO_printf(bio, " smime-type=%s;", msg_type);
|
||||
BIO_printf(bio, " name=\"smime.p7m\"%s", mime_eol);
|
||||
BIO_printf(bio, "Content-Transfer-Encoding: base64%s%s",
|
||||
mime_eol, mime_eol);
|
||||
B64_write_PKCS7(bio, p7);
|
||||
BIO_printf(bio, "%s", mime_eol);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Handle output of PKCS#7 data */
|
||||
|
||||
|
||||
static int pkcs7_output_data(BIO *out, BIO *data, PKCS7 *p7, int flags)
|
||||
PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont)
|
||||
{
|
||||
BIO *tmpbio, *p7bio;
|
||||
return (PKCS7 *)SMIME_read_ASN1(bio, bcont, ASN1_ITEM_rptr(PKCS7));
|
||||
}
|
||||
|
||||
if (!(flags & PKCS7_STREAM))
|
||||
/* Callback for int_smime_write_ASN1 */
|
||||
|
||||
static int pk7_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
|
||||
const ASN1_ITEM *it)
|
||||
{
|
||||
PKCS7 *p7 = (PKCS7 *)val;
|
||||
BIO *tmpbio, *p7bio;
|
||||
int r = 0;
|
||||
|
||||
if (!(flags & SMIME_DETACHED))
|
||||
{
|
||||
SMIME_crlf_copy(data, out, flags);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Partial sign operation */
|
||||
/* Let PKCS7 code prepend any needed BIOs */
|
||||
|
||||
/* Initialize sign operation */
|
||||
p7bio = PKCS7_dataInit(p7, out);
|
||||
|
||||
/* Copy data across, computing digests etc */
|
||||
if (!p7bio)
|
||||
return 0;
|
||||
|
||||
/* Copy data across, passing through filter BIOs for processing */
|
||||
SMIME_crlf_copy(data, p7bio, flags);
|
||||
|
||||
/* Must be detached */
|
||||
PKCS7_set_detached(p7, 1);
|
||||
/* Finalize structure */
|
||||
if (PKCS7_dataFinal(p7, p7bio) <= 0)
|
||||
goto err;
|
||||
|
||||
/* Finalize signatures */
|
||||
PKCS7_dataFinal(p7, p7bio);
|
||||
r = 1;
|
||||
|
||||
err:
|
||||
|
||||
/* Now remove any digests prepended to the BIO */
|
||||
|
||||
@@ -269,454 +112,17 @@ static int pkcs7_output_data(BIO *out, BIO *data, PKCS7 *p7, int flags)
|
||||
|
||||
}
|
||||
|
||||
/* SMIME reader: handle multipart/signed and opaque signing.
|
||||
* in multipart case the content is placed in a memory BIO
|
||||
* pointed to by "bcont". In opaque this is set to NULL
|
||||
*/
|
||||
|
||||
PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont)
|
||||
{
|
||||
BIO *p7in;
|
||||
STACK_OF(MIME_HEADER) *headers = NULL;
|
||||
STACK_OF(BIO) *parts = NULL;
|
||||
MIME_HEADER *hdr;
|
||||
MIME_PARAM *prm;
|
||||
PKCS7 *p7;
|
||||
int ret;
|
||||
|
||||
if(bcont) *bcont = NULL;
|
||||
|
||||
if (!(headers = mime_parse_hdr(bio))) {
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_MIME_PARSE_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) {
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_CONTENT_TYPE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Handle multipart/signed */
|
||||
|
||||
if(!strcmp(hdr->value, "multipart/signed")) {
|
||||
/* Split into two parts */
|
||||
prm = mime_param_find(hdr, "boundary");
|
||||
if(!prm || !prm->param_value) {
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_MULTIPART_BOUNDARY);
|
||||
return NULL;
|
||||
}
|
||||
ret = multi_split(bio, prm->param_value, &parts);
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
if(!ret || (sk_BIO_num(parts) != 2) ) {
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_MULTIPART_BODY_FAILURE);
|
||||
sk_BIO_pop_free(parts, BIO_vfree);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Parse the signature piece */
|
||||
p7in = sk_BIO_value(parts, 1);
|
||||
|
||||
if (!(headers = mime_parse_hdr(p7in))) {
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_MIME_SIG_PARSE_ERROR);
|
||||
sk_BIO_pop_free(parts, BIO_vfree);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Get content type */
|
||||
|
||||
if(!(hdr = mime_hdr_find(headers, "content-type")) ||
|
||||
!hdr->value) {
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_NO_SIG_CONTENT_TYPE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(strcmp(hdr->value, "application/x-pkcs7-signature") &&
|
||||
strcmp(hdr->value, "application/pkcs7-signature")) {
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_SIG_INVALID_MIME_TYPE);
|
||||
ERR_add_error_data(2, "type: ", hdr->value);
|
||||
sk_BIO_pop_free(parts, BIO_vfree);
|
||||
return NULL;
|
||||
}
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
/* Read in PKCS#7 */
|
||||
if(!(p7 = B64_read_PKCS7(p7in))) {
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_PKCS7_SIG_PARSE_ERROR);
|
||||
sk_BIO_pop_free(parts, BIO_vfree);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(bcont) {
|
||||
*bcont = sk_BIO_value(parts, 0);
|
||||
BIO_free(p7in);
|
||||
sk_BIO_free(parts);
|
||||
} else sk_BIO_pop_free(parts, BIO_vfree);
|
||||
return p7;
|
||||
}
|
||||
|
||||
/* OK, if not multipart/signed try opaque signature */
|
||||
|
||||
if (strcmp (hdr->value, "application/x-pkcs7-mime") &&
|
||||
strcmp (hdr->value, "application/pkcs7-mime")) {
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_INVALID_MIME_TYPE);
|
||||
ERR_add_error_data(2, "type: ", hdr->value);
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
|
||||
|
||||
if(!(p7 = B64_read_PKCS7(bio))) {
|
||||
PKCS7err(PKCS7_F_SMIME_READ_PKCS7, PKCS7_R_PKCS7_PARSE_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
return p7;
|
||||
|
||||
}
|
||||
|
||||
/* Split a multipart/XXX message body into component parts: result is
|
||||
* canonical parts in a STACK of bios
|
||||
*/
|
||||
|
||||
static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
|
||||
{
|
||||
char linebuf[MAX_SMLEN];
|
||||
int len, blen;
|
||||
int eol = 0, next_eol = 0;
|
||||
BIO *bpart = NULL;
|
||||
STACK_OF(BIO) *parts;
|
||||
char state, part, first;
|
||||
|
||||
blen = strlen(bound);
|
||||
part = 0;
|
||||
state = 0;
|
||||
first = 1;
|
||||
parts = sk_BIO_new_null();
|
||||
*ret = parts;
|
||||
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
|
||||
state = mime_bound_check(linebuf, len, bound, blen);
|
||||
if(state == 1) {
|
||||
first = 1;
|
||||
part++;
|
||||
} else if(state == 2) {
|
||||
sk_BIO_push(parts, bpart);
|
||||
return 1;
|
||||
} else if(part) {
|
||||
/* Strip CR+LF from linebuf */
|
||||
next_eol = strip_eol(linebuf, &len);
|
||||
if(first) {
|
||||
first = 0;
|
||||
if(bpart) sk_BIO_push(parts, bpart);
|
||||
bpart = BIO_new(BIO_s_mem());
|
||||
BIO_set_mem_eof_return(bpart, 0);
|
||||
} else if (eol)
|
||||
BIO_write(bpart, "\r\n", 2);
|
||||
eol = next_eol;
|
||||
if (len)
|
||||
BIO_write(bpart, linebuf, len);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This is the big one: parse MIME header lines up to message body */
|
||||
|
||||
#define MIME_INVALID 0
|
||||
#define MIME_START 1
|
||||
#define MIME_TYPE 2
|
||||
#define MIME_NAME 3
|
||||
#define MIME_VALUE 4
|
||||
#define MIME_QUOTE 5
|
||||
#define MIME_COMMENT 6
|
||||
|
||||
|
||||
static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio)
|
||||
{
|
||||
char *p, *q, c;
|
||||
char *ntmp;
|
||||
char linebuf[MAX_SMLEN];
|
||||
MIME_HEADER *mhdr = NULL;
|
||||
STACK_OF(MIME_HEADER) *headers;
|
||||
int len, state, save_state = 0;
|
||||
|
||||
headers = sk_MIME_HEADER_new(mime_hdr_cmp);
|
||||
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
|
||||
/* If whitespace at line start then continuation line */
|
||||
if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME;
|
||||
else state = MIME_START;
|
||||
ntmp = NULL;
|
||||
/* Go through all characters */
|
||||
for(p = linebuf, q = linebuf; (c = *p) && (c!='\r') && (c!='\n'); p++) {
|
||||
|
||||
/* State machine to handle MIME headers
|
||||
* if this looks horrible that's because it *is*
|
||||
*/
|
||||
|
||||
switch(state) {
|
||||
case MIME_START:
|
||||
if(c == ':') {
|
||||
state = MIME_TYPE;
|
||||
*p = 0;
|
||||
ntmp = strip_ends(q);
|
||||
q = p + 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case MIME_TYPE:
|
||||
if(c == ';') {
|
||||
mime_debug("Found End Value\n");
|
||||
*p = 0;
|
||||
mhdr = mime_hdr_new(ntmp, strip_ends(q));
|
||||
sk_MIME_HEADER_push(headers, mhdr);
|
||||
ntmp = NULL;
|
||||
q = p + 1;
|
||||
state = MIME_NAME;
|
||||
} else if(c == '(') {
|
||||
save_state = state;
|
||||
state = MIME_COMMENT;
|
||||
}
|
||||
break;
|
||||
|
||||
case MIME_COMMENT:
|
||||
if(c == ')') {
|
||||
state = save_state;
|
||||
}
|
||||
break;
|
||||
|
||||
case MIME_NAME:
|
||||
if(c == '=') {
|
||||
state = MIME_VALUE;
|
||||
*p = 0;
|
||||
ntmp = strip_ends(q);
|
||||
q = p + 1;
|
||||
}
|
||||
break ;
|
||||
|
||||
case MIME_VALUE:
|
||||
if(c == ';') {
|
||||
state = MIME_NAME;
|
||||
*p = 0;
|
||||
mime_hdr_addparam(mhdr, ntmp, strip_ends(q));
|
||||
ntmp = NULL;
|
||||
q = p + 1;
|
||||
} else if (c == '"') {
|
||||
mime_debug("Found Quote\n");
|
||||
state = MIME_QUOTE;
|
||||
} else if(c == '(') {
|
||||
save_state = state;
|
||||
state = MIME_COMMENT;
|
||||
}
|
||||
break;
|
||||
|
||||
case MIME_QUOTE:
|
||||
if(c == '"') {
|
||||
mime_debug("Found Match Quote\n");
|
||||
state = MIME_VALUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(state == MIME_TYPE) {
|
||||
mhdr = mime_hdr_new(ntmp, strip_ends(q));
|
||||
sk_MIME_HEADER_push(headers, mhdr);
|
||||
} else if(state == MIME_VALUE)
|
||||
mime_hdr_addparam(mhdr, ntmp, strip_ends(q));
|
||||
if(p == linebuf) break; /* Blank line means end of headers */
|
||||
}
|
||||
|
||||
return headers;
|
||||
|
||||
}
|
||||
|
||||
static char *strip_ends(char *name)
|
||||
{
|
||||
return strip_end(strip_start(name));
|
||||
}
|
||||
|
||||
/* Strip a parameter of whitespace from start of param */
|
||||
static char *strip_start(char *name)
|
||||
{
|
||||
char *p, c;
|
||||
/* Look for first non white space or quote */
|
||||
for(p = name; (c = *p) ;p++) {
|
||||
if(c == '"') {
|
||||
/* Next char is start of string if non null */
|
||||
if(p[1]) return p + 1;
|
||||
/* Else null string */
|
||||
return NULL;
|
||||
}
|
||||
if(!isspace((unsigned char)c)) return p;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* As above but strip from end of string : maybe should handle brackets? */
|
||||
static char *strip_end(char *name)
|
||||
{
|
||||
char *p, c;
|
||||
if(!name) return NULL;
|
||||
/* Look for first non white space or quote */
|
||||
for(p = name + strlen(name) - 1; p >= name ;p--) {
|
||||
c = *p;
|
||||
if(c == '"') {
|
||||
if(p - 1 == name) return NULL;
|
||||
*p = 0;
|
||||
return name;
|
||||
}
|
||||
if(isspace((unsigned char)c)) *p = 0;
|
||||
else return name;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static MIME_HEADER *mime_hdr_new(char *name, char *value)
|
||||
{
|
||||
MIME_HEADER *mhdr;
|
||||
char *tmpname, *tmpval, *p;
|
||||
int c;
|
||||
if(name) {
|
||||
if(!(tmpname = BUF_strdup(name))) return NULL;
|
||||
for(p = tmpname ; *p; p++) {
|
||||
c = *p;
|
||||
if(isupper(c)) {
|
||||
c = tolower(c);
|
||||
*p = c;
|
||||
}
|
||||
}
|
||||
} else tmpname = NULL;
|
||||
if(value) {
|
||||
if(!(tmpval = BUF_strdup(value))) return NULL;
|
||||
for(p = tmpval ; *p; p++) {
|
||||
c = *p;
|
||||
if(isupper(c)) {
|
||||
c = tolower(c);
|
||||
*p = c;
|
||||
}
|
||||
}
|
||||
} else tmpval = NULL;
|
||||
mhdr = (MIME_HEADER *) OPENSSL_malloc(sizeof(MIME_HEADER));
|
||||
if(!mhdr) return NULL;
|
||||
mhdr->name = tmpname;
|
||||
mhdr->value = tmpval;
|
||||
if(!(mhdr->params = sk_MIME_PARAM_new(mime_param_cmp))) return NULL;
|
||||
return mhdr;
|
||||
}
|
||||
|
||||
static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value)
|
||||
{
|
||||
char *tmpname, *tmpval, *p;
|
||||
int c;
|
||||
MIME_PARAM *mparam;
|
||||
if(name) {
|
||||
tmpname = BUF_strdup(name);
|
||||
if(!tmpname) return 0;
|
||||
for(p = tmpname ; *p; p++) {
|
||||
c = *p;
|
||||
if(isupper(c)) {
|
||||
c = tolower(c);
|
||||
*p = c;
|
||||
}
|
||||
}
|
||||
} else tmpname = NULL;
|
||||
if(value) {
|
||||
tmpval = BUF_strdup(value);
|
||||
if(!tmpval) return 0;
|
||||
} else tmpval = NULL;
|
||||
/* Parameter values are case sensitive so leave as is */
|
||||
mparam = (MIME_PARAM *) OPENSSL_malloc(sizeof(MIME_PARAM));
|
||||
if(!mparam) return 0;
|
||||
mparam->param_name = tmpname;
|
||||
mparam->param_value = tmpval;
|
||||
sk_MIME_PARAM_push(mhdr->params, mparam);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mime_hdr_cmp(const MIME_HEADER * const *a,
|
||||
const MIME_HEADER * const *b)
|
||||
{
|
||||
return(strcmp((*a)->name, (*b)->name));
|
||||
}
|
||||
|
||||
static int mime_param_cmp(const MIME_PARAM * const *a,
|
||||
const MIME_PARAM * const *b)
|
||||
{
|
||||
return(strcmp((*a)->param_name, (*b)->param_name));
|
||||
}
|
||||
|
||||
/* Find a header with a given name (if possible) */
|
||||
|
||||
static MIME_HEADER *mime_hdr_find(STACK_OF(MIME_HEADER) *hdrs, char *name)
|
||||
{
|
||||
MIME_HEADER htmp;
|
||||
int idx;
|
||||
htmp.name = name;
|
||||
idx = sk_MIME_HEADER_find(hdrs, &htmp);
|
||||
if(idx < 0) return NULL;
|
||||
return sk_MIME_HEADER_value(hdrs, idx);
|
||||
}
|
||||
|
||||
static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name)
|
||||
{
|
||||
MIME_PARAM param;
|
||||
int idx;
|
||||
param.param_name = name;
|
||||
idx = sk_MIME_PARAM_find(hdr->params, ¶m);
|
||||
if(idx < 0) return NULL;
|
||||
return sk_MIME_PARAM_value(hdr->params, idx);
|
||||
}
|
||||
|
||||
static void mime_hdr_free(MIME_HEADER *hdr)
|
||||
{
|
||||
if(hdr->name) OPENSSL_free(hdr->name);
|
||||
if(hdr->value) OPENSSL_free(hdr->value);
|
||||
if(hdr->params) sk_MIME_PARAM_pop_free(hdr->params, mime_param_free);
|
||||
OPENSSL_free(hdr);
|
||||
}
|
||||
|
||||
static void mime_param_free(MIME_PARAM *param)
|
||||
{
|
||||
if(param->param_name) OPENSSL_free(param->param_name);
|
||||
if(param->param_value) OPENSSL_free(param->param_value);
|
||||
OPENSSL_free(param);
|
||||
}
|
||||
|
||||
/* Check for a multipart boundary. Returns:
|
||||
* 0 : no boundary
|
||||
* 1 : part boundary
|
||||
* 2 : final boundary
|
||||
*/
|
||||
static int mime_bound_check(char *line, int linelen, char *bound, int blen)
|
||||
{
|
||||
if(linelen == -1) linelen = strlen(line);
|
||||
if(blen == -1) blen = strlen(bound);
|
||||
/* Quickly eliminate if line length too short */
|
||||
if(blen + 2 > linelen) return 0;
|
||||
/* Check for part boundary */
|
||||
if(!strncmp(line, "--", 2) && !strncmp(line + 2, bound, blen)) {
|
||||
if(!strncmp(line + blen + 2, "--", 2)) return 2;
|
||||
else return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int strip_eol(char *linebuf, int *plen)
|
||||
int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
|
||||
{
|
||||
int len = *plen;
|
||||
char *p, c;
|
||||
int is_eol = 0;
|
||||
p = linebuf + len - 1;
|
||||
for (p = linebuf + len - 1; len > 0; len--, p--)
|
||||
{
|
||||
c = *p;
|
||||
if (c == '\n')
|
||||
is_eol = 1;
|
||||
else if (c != '\r')
|
||||
break;
|
||||
}
|
||||
*plen = len;
|
||||
return is_eol;
|
||||
STACK_OF(X509_ALGOR) *mdalgs;
|
||||
int ctype_nid = OBJ_obj2nid(p7->type);
|
||||
if (ctype_nid == NID_pkcs7_signed)
|
||||
mdalgs = p7->d.sign->md_algs;
|
||||
else
|
||||
mdalgs = NULL;
|
||||
|
||||
return int_smime_write_ASN1(bio, (ASN1_VALUE *)p7, data, flags,
|
||||
ctype_nid, NID_undef, mdalgs,
|
||||
pk7_output_data,
|
||||
ASN1_ITEM_rptr(PKCS7));
|
||||
}
|
||||
|
||||
@@ -234,3 +234,17 @@ pqueue_next(pitem **item)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
pqueue_size(pqueue_s *pq)
|
||||
{
|
||||
pitem *item = pq->items;
|
||||
int count = 0;
|
||||
|
||||
while(item != NULL)
|
||||
{
|
||||
count++;
|
||||
item = item->next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -91,5 +91,6 @@ pitem *pqueue_iterator(pqueue pq);
|
||||
pitem *pqueue_next(piterator *iter);
|
||||
|
||||
void pqueue_print(pqueue pq);
|
||||
int pqueue_size(pqueue pq);
|
||||
|
||||
#endif /* ! HEADER_PQUEUE_H */
|
||||
|
||||
@@ -463,7 +463,7 @@ int RAND_poll(void)
|
||||
PROCESSENTRY32 p;
|
||||
THREADENTRY32 t;
|
||||
MODULEENTRY32 m;
|
||||
DWORD stoptime = 0;
|
||||
DWORD starttime = 0;
|
||||
|
||||
snap = (CREATETOOLHELP32SNAPSHOT)
|
||||
GetProcAddress(kernel, "CreateToolhelp32Snapshot");
|
||||
@@ -494,9 +494,55 @@ int RAND_poll(void)
|
||||
* each entry. Consider each field a source of 1 byte
|
||||
* of entropy.
|
||||
*/
|
||||
ZeroMemory(&hlist, sizeof(HEAPLIST32));
|
||||
hlist.dwSize = sizeof(HEAPLIST32);
|
||||
if (good) stoptime = GetTickCount() + MAXDELAY;
|
||||
if (good) starttime = GetTickCount();
|
||||
#ifdef _MSC_VER
|
||||
if (heaplist_first(handle, &hlist))
|
||||
{
|
||||
/*
|
||||
following discussion on dev ML, exception on WinCE (or other Win
|
||||
platform) is theoretically of unknown origin; prevent infinite
|
||||
loop here when this theoretical case occurs; otherwise cope with
|
||||
the expected (MSDN documented) exception-throwing behaviour of
|
||||
Heap32Next() on WinCE.
|
||||
|
||||
based on patch in original message by Tanguy Fautré (2009/03/02)
|
||||
Subject: RAND_poll() and CreateToolhelp32Snapshot() stability
|
||||
*/
|
||||
int ex_cnt_limit = 42;
|
||||
do
|
||||
{
|
||||
RAND_add(&hlist, hlist.dwSize, 3);
|
||||
__try
|
||||
{
|
||||
ZeroMemory(&hentry, sizeof(HEAPENTRY32));
|
||||
hentry.dwSize = sizeof(HEAPENTRY32);
|
||||
if (heap_first(&hentry,
|
||||
hlist.th32ProcessID,
|
||||
hlist.th32HeapID))
|
||||
{
|
||||
int entrycnt = 80;
|
||||
do
|
||||
RAND_add(&hentry,
|
||||
hentry.dwSize, 5);
|
||||
while (heap_next(&hentry)
|
||||
&& --entrycnt > 0);
|
||||
}
|
||||
}
|
||||
__except (EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
/* ignore access violations when walking the heap list */
|
||||
ex_cnt_limit--;
|
||||
}
|
||||
} while (heaplist_next(handle, &hlist)
|
||||
&& (!good || (GetTickCount()-starttime)<MAXDELAY)
|
||||
&& ex_cnt_limit > 0);
|
||||
}
|
||||
|
||||
#else
|
||||
if (heaplist_first(handle, &hlist))
|
||||
{
|
||||
do
|
||||
{
|
||||
RAND_add(&hlist, hlist.dwSize, 3);
|
||||
@@ -512,8 +558,10 @@ int RAND_poll(void)
|
||||
while (heap_next(&hentry)
|
||||
&& --entrycnt > 0);
|
||||
}
|
||||
} while (heaplist_next(handle,
|
||||
&hlist) && GetTickCount() < stoptime);
|
||||
} while (heaplist_next(handle, &hlist)
|
||||
&& (!good || (GetTickCount()-starttime)<MAXDELAY));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* process walking */
|
||||
/* PROCESSENTRY32 contains 9 fields that will change
|
||||
@@ -522,11 +570,11 @@ int RAND_poll(void)
|
||||
*/
|
||||
p.dwSize = sizeof(PROCESSENTRY32);
|
||||
|
||||
if (good) stoptime = GetTickCount() + MAXDELAY;
|
||||
if (good) starttime = GetTickCount();
|
||||
if (process_first(handle, &p))
|
||||
do
|
||||
RAND_add(&p, p.dwSize, 9);
|
||||
while (process_next(handle, &p) && GetTickCount() < stoptime);
|
||||
while (process_next(handle, &p) && (!good || (GetTickCount()-starttime)<MAXDELAY));
|
||||
|
||||
/* thread walking */
|
||||
/* THREADENTRY32 contains 6 fields that will change
|
||||
@@ -534,11 +582,11 @@ int RAND_poll(void)
|
||||
* 1 byte of entropy.
|
||||
*/
|
||||
t.dwSize = sizeof(THREADENTRY32);
|
||||
if (good) stoptime = GetTickCount() + MAXDELAY;
|
||||
if (good) starttime = GetTickCount();
|
||||
if (thread_first(handle, &t))
|
||||
do
|
||||
RAND_add(&t, t.dwSize, 6);
|
||||
while (thread_next(handle, &t) && GetTickCount() < stoptime);
|
||||
while (thread_next(handle, &t) && (!good || (GetTickCount()-starttime)<MAXDELAY));
|
||||
|
||||
/* module walking */
|
||||
/* MODULEENTRY32 contains 9 fields that will change
|
||||
@@ -546,12 +594,12 @@ int RAND_poll(void)
|
||||
* 1 byte of entropy.
|
||||
*/
|
||||
m.dwSize = sizeof(MODULEENTRY32);
|
||||
if (good) stoptime = GetTickCount() + MAXDELAY;
|
||||
if (good) starttime = GetTickCount();
|
||||
if (module_first(handle, &m))
|
||||
do
|
||||
RAND_add(&m, m.dwSize, 9);
|
||||
while (module_next(handle, &m)
|
||||
&& (GetTickCount() < stoptime));
|
||||
&& (!good || (GetTickCount()-starttime)<MAXDELAY));
|
||||
if (close_snap)
|
||||
close_snap(handle);
|
||||
else
|
||||
|
||||
@@ -127,8 +127,8 @@ int RAND_load_file(const char *file, long bytes)
|
||||
in=fopen(file,"rb");
|
||||
#endif
|
||||
if (in == NULL) goto err;
|
||||
#if defined(S_IFBLK) && defined(S_IFCHR)
|
||||
if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
|
||||
#if defined(S_ISBLK) && defined(S_ISCHR)
|
||||
if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) {
|
||||
/* this file is a device. we don't want read an infinite number
|
||||
* of bytes from a random device, nor do we want to use buffered
|
||||
* I/O because we will waste system entropy.
|
||||
@@ -174,8 +174,8 @@ int RAND_write_file(const char *file)
|
||||
|
||||
i=stat(file,&sb);
|
||||
if (i != -1) {
|
||||
#if defined(S_IFBLK) && defined(S_IFCHR)
|
||||
if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
|
||||
#if defined(S_ISBLK) && defined(S_ISCHR)
|
||||
if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) {
|
||||
/* this file is a device. we don't write back to it.
|
||||
* we "succeed" on the assumption this is some sort
|
||||
* of random device. Otherwise attempting to write to
|
||||
|
||||
@@ -207,8 +207,17 @@ RSA *RSA_new_method(ENGINE *engine)
|
||||
ret->blinding=NULL;
|
||||
ret->mt_blinding=NULL;
|
||||
ret->bignum_data=NULL;
|
||||
ret->flags=ret->meth->flags;
|
||||
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data);
|
||||
ret->flags=ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
|
||||
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data))
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
if (ret->engine)
|
||||
ENGINE_finish(ret->engine);
|
||||
#endif
|
||||
OPENSSL_free(ret);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
|
||||
@@ -52,13 +52,6 @@ int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
|
||||
return 0;
|
||||
}
|
||||
|
||||
dbmask = OPENSSL_malloc(emlen - SHA_DIGEST_LENGTH);
|
||||
if (dbmask == NULL)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
to[0] = 0;
|
||||
seed = to + 1;
|
||||
db = to + SHA_DIGEST_LENGTH + 1;
|
||||
@@ -76,6 +69,13 @@ int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
|
||||
20);
|
||||
#endif
|
||||
|
||||
dbmask = OPENSSL_malloc(emlen - SHA_DIGEST_LENGTH);
|
||||
if (dbmask == NULL)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
MGF1(dbmask, emlen - SHA_DIGEST_LENGTH, seed, SHA_DIGEST_LENGTH);
|
||||
for (i = 0; i < emlen - SHA_DIGEST_LENGTH; i++)
|
||||
db[i] ^= dbmask[i];
|
||||
|
||||
@@ -217,7 +217,7 @@ int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
|
||||
ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
if (!RAND_bytes(salt, sLen))
|
||||
if (RAND_bytes(salt, sLen) <= 0)
|
||||
goto err;
|
||||
}
|
||||
maskedDBLen = emLen - hLen - 1;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user