Compare commits
88 Commits
OpenSSL-en
...
BEFORE_eng
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1df586bec2 | ||
|
|
551e5990d2 | ||
|
|
d9efa3616a | ||
|
|
51c8dc37dd | ||
|
|
28967cf079 | ||
|
|
a2bbe59401 | ||
|
|
421cb50b2d | ||
|
|
0fa504b68d | ||
|
|
705bfcf8e7 | ||
|
|
4fb40db932 | ||
|
|
9dd0463852 | ||
|
|
5cb5715f97 | ||
|
|
e9a583aa26 | ||
|
|
f3f316f13f | ||
|
|
99b1aaf2ec | ||
|
|
53400da75c | ||
|
|
2b59a6ac14 | ||
|
|
48d89b560c | ||
|
|
b5a43800ef | ||
|
|
0fd44e2ddb | ||
|
|
0a2221f9ad | ||
|
|
567f17cfe0 | ||
|
|
627ec355d8 | ||
|
|
4184a78761 | ||
|
|
bbdc9c98a8 | ||
|
|
11b62699a1 | ||
|
|
14a74a21f0 | ||
|
|
c8cda405e7 | ||
|
|
befb3e7a4d | ||
|
|
c6f1787bbd | ||
|
|
9bd3bd227f | ||
|
|
d0ef53bd2d | ||
|
|
8d3f155a66 | ||
|
|
ef0ab7f94f | ||
|
|
bf55ece1c1 | ||
|
|
51754ec835 | ||
|
|
1bc5dd3efc | ||
|
|
0ded1638ba | ||
|
|
71d525c9f6 | ||
|
|
3ab5651112 | ||
|
|
82ce0b2308 | ||
|
|
a22fb399cb | ||
|
|
8df8f27513 | ||
|
|
cde70093ac | ||
|
|
5f97f508e4 | ||
|
|
553615f500 | ||
|
|
924046ce75 | ||
|
|
9e2c0f41d7 | ||
|
|
5ef67042f9 | ||
|
|
53fe8d5be5 | ||
|
|
8c23788dd1 | ||
|
|
ef76e3dbda | ||
|
|
7ba839bfe2 | ||
|
|
d2dcf4f40d | ||
|
|
75a382bd90 | ||
|
|
5b0a0544f2 | ||
|
|
a0ec9cf6d5 | ||
|
|
e9ebf346c4 | ||
|
|
8ca533e378 | ||
|
|
d0c9858914 | ||
|
|
356c06c776 | ||
|
|
ef71cb6daf | ||
|
|
2e7e3d6ce9 | ||
|
|
a269d312da | ||
|
|
a87aa87bcc | ||
|
|
6df3553255 | ||
|
|
2eaad87f36 | ||
|
|
b7af080fb1 | ||
|
|
3a0afe1eed | ||
|
|
086a32d754 | ||
|
|
544ebbceb4 | ||
|
|
6d0dcbedb1 | ||
|
|
88aeb646bd | ||
|
|
46b1b91309 | ||
|
|
be054868a1 | ||
|
|
0acc90e5f7 | ||
|
|
4e20a4e688 | ||
|
|
9ef9e78520 | ||
|
|
393e826ec3 | ||
|
|
c5e8580e7b | ||
|
|
16221173c8 | ||
|
|
0e8f2fdfdd | ||
|
|
fec8c79a7e | ||
|
|
56245be46d | ||
|
|
eb206eb8be | ||
|
|
fda05b2155 | ||
|
|
8c4ab6d5ae | ||
|
|
8fdec3e558 |
82
CHANGES
82
CHANGES
@@ -2,6 +2,88 @@
|
|||||||
OpenSSL CHANGES
|
OpenSSL CHANGES
|
||||||
_______________
|
_______________
|
||||||
|
|
||||||
|
Changes between 0.9.6 and 0.9.7 [xx XXX 2000]
|
||||||
|
|
||||||
|
*) Rework the filename-translation in the DSO code. It is now possible to
|
||||||
|
have far greater control over how a "name" is turned into a filename
|
||||||
|
depending on the operating environment and any oddities about the
|
||||||
|
different shared library filenames on each system.
|
||||||
|
[Geoff Thorpe]
|
||||||
|
|
||||||
|
*) Support threads on FreeBSD-elf in Configure.
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
|
*) Add the possibility to create shared libraries on HP-UX
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
|
*) Fix for SHA1 assembly problem with MASM: it produces
|
||||||
|
warnings about corrupt line number information when assembling
|
||||||
|
with debugging information. This is caused by the overlapping
|
||||||
|
of two sections.
|
||||||
|
[Bernd Matthes <mainbug@celocom.de>, Steve Henson]
|
||||||
|
|
||||||
|
*) NCONF changes.
|
||||||
|
NCONF_get_number() has no error checking at all. As a replacement,
|
||||||
|
NCONF_get_number_e() is defined (_e for "error checking") and is
|
||||||
|
promoted strongly. The old NCONF_get_number is kept around for
|
||||||
|
binary backward compatibility.
|
||||||
|
Make it possible for methods to load from something other than a BIO,
|
||||||
|
by providing a function pointer that is given a name instead of a BIO.
|
||||||
|
For example, this could be used to load configuration data from an
|
||||||
|
LDAP server.
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
|
*) Fix typo in get_cert_by_subject() in by_dir.c
|
||||||
|
[Jean-Marc Desperrier <jean-marc.desperrier@certplus.com>]
|
||||||
|
|
||||||
|
*) Rework the system to generate shared libraries:
|
||||||
|
|
||||||
|
- Make note of the expected extension for the shared libraries and
|
||||||
|
if there is a need for symbolic links from for example libcrypto.so.0
|
||||||
|
to libcrypto.so.0.9.7. There is extended info in Configure for
|
||||||
|
that.
|
||||||
|
|
||||||
|
- Make as few rebuilds of the shared libraries as possible.
|
||||||
|
|
||||||
|
- Still avoid linking the OpenSSL programs with the shared libraries.
|
||||||
|
|
||||||
|
- When installing, install the shared libraries separately from the
|
||||||
|
static ones.
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
|
*) Fix for non blocking accept BIOs. Added new I/O special reason
|
||||||
|
BIO_RR_ACCEPT to cover this case. Previously use of accept BIOs
|
||||||
|
with non blocking I/O was not possible because no retry code was
|
||||||
|
implemented. Also added new SSL code SSL_WANT_ACCEPT to cover
|
||||||
|
this case.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Added the beginnings of Rijndael support.
|
||||||
|
[Ben Laurie]
|
||||||
|
|
||||||
|
*) Fix for bug in DirectoryString mask setting. Add support for
|
||||||
|
X509_NAME_print_ex() in 'req' and X509_print_ex() function
|
||||||
|
to allow certificate printing to more controllable, additional
|
||||||
|
'certopt' option to 'x509' to allow new printing options to be
|
||||||
|
set.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Clean old EAY MD5 hack from e_os.h.
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
|
*) Fix SSL_CTX_set_read_ahead macro to actually use its argument.
|
||||||
|
|
||||||
|
Copy SSL_CTX's read_ahead flag to SSL object directly in SSL_new
|
||||||
|
and not in SSL_clear because the latter is also used by the
|
||||||
|
accept/connect functions; previously, the settings made by
|
||||||
|
SSL_set_read_ahead would be lost during the handshake.
|
||||||
|
[Bodo Moeller; problems reported by Anders Gertz <gertz@epact.se>]
|
||||||
|
|
||||||
|
*) Correct util/mkdef.pl to be selective about disabled algorithms.
|
||||||
|
Previously, it would create entries for disableed algorithms no
|
||||||
|
matter what.
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
Changes between 0.9.5a and 0.9.6 [24 Sep 2000]
|
Changes between 0.9.5a and 0.9.6 [24 Sep 2000]
|
||||||
|
|
||||||
*) In ssl23_get_client_hello, generate an error message when faced
|
*) In ssl23_get_client_hello, generate an error message when faced
|
||||||
|
|||||||
158
Configure
158
Configure
@@ -10,7 +10,7 @@ use strict;
|
|||||||
|
|
||||||
# see INSTALL for instructions.
|
# see INSTALL for instructions.
|
||||||
|
|
||||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
|
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no-threads] [no-asm] [no-dso] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
|
||||||
|
|
||||||
# Options:
|
# Options:
|
||||||
#
|
#
|
||||||
@@ -23,20 +23,11 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
|
|||||||
# default). This needn't be set in advance, you can
|
# default). This needn't be set in advance, you can
|
||||||
# just as well use "make INSTALL_PREFIX=/whatever install".
|
# just as well use "make INSTALL_PREFIX=/whatever install".
|
||||||
#
|
#
|
||||||
# no-hw-xxx do not compile support for specific crypto hardware.
|
|
||||||
# Generic OpenSSL-style methods relating to this support
|
|
||||||
# are always compiled but return NULL if the hardware
|
|
||||||
# support isn't compiled.
|
|
||||||
# no-hw do not compile support for any crypto hardware.
|
|
||||||
# rsaref use RSAref
|
# rsaref use RSAref
|
||||||
# [no-]threads [don't] try to create a library that is suitable for
|
# [no-]threads [don't] try to create a library that is suitable for
|
||||||
# multithreaded applications (default is "threads" if we
|
# multithreaded applications (default is "threads" if we
|
||||||
# know how to do it)
|
# know how to do it)
|
||||||
# [no-]shared [don't] try to create shared libraries when supported.
|
# [no-]shared [don't] try to create shared libraries when supported.
|
||||||
# IT IS NOT RECOMMENDED TO USE "shared"! Since this is a
|
|
||||||
# development branch, the positions of the ENGINE symbols
|
|
||||||
# in the transfer vector are constantly moving, so binary
|
|
||||||
# backward compatibility can't be guaranteed in any way.
|
|
||||||
# no-asm do not use assembler
|
# no-asm do not use assembler
|
||||||
# no-dso do not compile in any native shared-library methods. This
|
# no-dso do not compile in any native shared-library methods. This
|
||||||
# will ensure that all methods just return NULL.
|
# will ensure that all methods just return NULL.
|
||||||
@@ -136,32 +127,32 @@ my %table=(
|
|||||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
|
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
|
||||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
||||||
# error message.
|
# error message.
|
||||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC",
|
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_sol_asm}:dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### SPARC Solaris with GNU C setups
|
#### 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::::::::::dlfcn:solaris-shared:-fPIC",
|
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC",
|
"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC",
|
"solaris-sparcv9-gcc","gcc:-mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
|
# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8
|
||||||
# but keep the assembler modules.
|
# but keep the assembler modules.
|
||||||
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC",
|
"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
####
|
####
|
||||||
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC",
|
"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC",
|
"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### SPARC Solaris with Sun C setups
|
#### SPARC Solaris with Sun C setups
|
||||||
# DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests
|
# DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests
|
||||||
"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC",
|
"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
|
# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2.
|
||||||
# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
|
# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8
|
||||||
# SC5.0 note: Compiler common patch 107357-01 or later is required!
|
# SC5.0 note: Compiler common patch 107357-01 or later is required!
|
||||||
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC",
|
"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC",
|
"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC",
|
"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC",
|
"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
####
|
####
|
||||||
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC",
|
"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC",
|
"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC::-D_REENTRANT:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### SPARC Linux setups
|
#### SPARC Linux setups
|
||||||
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
|
"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::",
|
||||||
@@ -223,41 +214,41 @@ my %table=(
|
|||||||
#
|
#
|
||||||
#!#"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
#!#"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
||||||
# Since there is mention of this in shlib/hpux10-cc.sh
|
# Since there is mention of this in shlib/hpux10-cc.sh
|
||||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn",
|
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||||
#
|
#
|
||||||
# Chris Ruemmler <ruemmler@cup.hp.com>
|
# Chris Ruemmler <ruemmler@cup.hp.com>
|
||||||
# Kevin Steves <ks@hp.se>
|
# Kevin Steves <ks@hp.se>
|
||||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
|
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl",
|
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn",
|
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
|
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# HPUX 9.X config.
|
# HPUX 9.X config.
|
||||||
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
||||||
# egcs. gcc 2.8.1 is also broken.
|
# egcs. gcc 2.8.1 is also broken.
|
||||||
|
|
||||||
"hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# If hpux-cc fails (e.g. during "make test"), try the next one; otherwise,
|
# If hpux-cc fails (e.g. during "make test"), try the next one; otherwise,
|
||||||
# please report your OS and compiler version to the openssl-bugs@openssl.org
|
# please report your OS and compiler version to the openssl-bugs@openssl.org
|
||||||
# mailing list.
|
# mailing list.
|
||||||
"hpux-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
"hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# If hpux-gcc fails, try this one:
|
# If hpux-gcc fails, try this one:
|
||||||
"hpux-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# HPUX 10.X config. Supports threads.
|
# HPUX 10.X config. Supports threads.
|
||||||
"hpux10-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux10-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG):
|
# If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG):
|
||||||
"hpux10-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux10-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
"hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
# If hpux10-gcc fails, try this one:
|
# If hpux10-gcc fails, try this one:
|
||||||
"hpux10-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
"hpux10-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT:-ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# HPUX 11.X from www.globus.org.
|
# HPUX 11.X from www.globus.org.
|
||||||
# Only works on PA-RISC 2.0 cpus, and not optimized. Why?
|
# Only works on PA-RISC 2.0 cpus, and not optimized. Why?
|
||||||
@@ -271,10 +262,10 @@ my %table=(
|
|||||||
# Dec Alpha, OSF/1 - the alpha164-cc is the flags for a 21164A with
|
# Dec Alpha, OSF/1 - the alpha164-cc is the flags for a 21164A with
|
||||||
# the new compiler
|
# the new compiler
|
||||||
# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
|
# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
|
||||||
"alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:asm/alpha.o:::::::::dlfcn:true64-shared",
|
"alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:asm/alpha.o:::::::::dlfcn:true64-shared::.so",
|
||||||
"alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared",
|
"alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared::.so",
|
||||||
"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared",
|
"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared::.so",
|
||||||
"FreeBSD-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2:::",
|
"FreeBSD-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### Alpha Linux with GNU C and Compaq C setups
|
#### Alpha Linux with GNU C and Compaq C setups
|
||||||
# Special notes:
|
# Special notes:
|
||||||
@@ -289,8 +280,8 @@ my %table=(
|
|||||||
#
|
#
|
||||||
# <appro@fy.chalmers.se>
|
# <appro@fy.chalmers.se>
|
||||||
#
|
#
|
||||||
"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::",
|
"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o:::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o::",
|
"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:asm/alpha.o:::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::",
|
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::",
|
||||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::",
|
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:asm/alpha.o::",
|
||||||
|
|
||||||
@@ -299,7 +290,7 @@ my %table=(
|
|||||||
|
|
||||||
# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
|
# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
|
||||||
# bn86-elf.o file file since it is hand tweaked assembler.
|
# bn86-elf.o file file since it is hand tweaked assembler.
|
||||||
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||||
@@ -307,13 +298,13 @@ my %table=(
|
|||||||
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
||||||
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
||||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::SIXTY_FOUR_BIT_LONG::",
|
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::SIXTY_FOUR_BIT_LONG::",
|
||||||
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
|
"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::",
|
"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:",
|
"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
"FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
"FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||||
"bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown)::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
|
"bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown)::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}",
|
||||||
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
|
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"nextstep", "cc:-O -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
"nextstep", "cc:-O -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||||
"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||||
# NCR MP-RAS UNIX ver 02.03.01
|
# NCR MP-RAS UNIX ver 02.03.01
|
||||||
@@ -323,7 +314,7 @@ my %table=(
|
|||||||
"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown)::${x86_gcc_des} ${x86_gcc_opts}:",
|
"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown)::${x86_gcc_des} ${x86_gcc_opts}:",
|
||||||
|
|
||||||
# Linux on ARM
|
# Linux on ARM
|
||||||
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC",
|
"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::::::::::dlfcn:linux-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
# UnixWare 2.0
|
# UnixWare 2.0
|
||||||
"unixware-2.0","cc:-O -DFILIO_H::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
|
"unixware-2.0","cc:-O -DFILIO_H::(unknown):-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||||
@@ -406,10 +397,10 @@ my %table=(
|
|||||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown)::::::",
|
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown)::::::",
|
||||||
|
|
||||||
# Some OpenBSD from Bob Beck <beck@obtuse.com>
|
# Some OpenBSD from Bob Beck <beck@obtuse.com>
|
||||||
"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:::",
|
"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"OpenBSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn",
|
"OpenBSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL:::",
|
"OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown):BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR::::",
|
"OpenBSD-mips","gcc:-O2 -DL_ENDIAN::(unknown):BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::dlfcn:bsd-gcc-shared:-fPIC:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
##### MacOS X (a.k.a. Rhapsody) setup
|
##### MacOS X (a.k.a. Rhapsody) setup
|
||||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||||
@@ -499,18 +490,6 @@ PROCESS_ARGS:
|
|||||||
$flags .= "-DNO_ASM ";
|
$flags .= "-DNO_ASM ";
|
||||||
$openssl_other_defines .= "#define NO_ASM\n";
|
$openssl_other_defines .= "#define NO_ASM\n";
|
||||||
}
|
}
|
||||||
elsif (/^no-hw-(.+)$/)
|
|
||||||
{
|
|
||||||
my $hw=$1;
|
|
||||||
$hw =~ tr/[a-z]/[A-Z]/;
|
|
||||||
$flags .= "-DNO_HW_$hw ";
|
|
||||||
$openssl_other_defines .= "#define NO_HW_$hw\n";
|
|
||||||
}
|
|
||||||
elsif (/^no-hw$/)
|
|
||||||
{
|
|
||||||
$flags .= "-DNO_HW ";
|
|
||||||
$openssl_other_defines .= "#define NO_HW\n";
|
|
||||||
}
|
|
||||||
elsif (/^no-dso$/)
|
elsif (/^no-dso$/)
|
||||||
{ $no_dso=1; }
|
{ $no_dso=1; }
|
||||||
elsif (/^no-threads$/)
|
elsif (/^no-threads$/)
|
||||||
@@ -653,8 +632,8 @@ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;
|
|||||||
print "IsWindows=$IsWindows\n";
|
print "IsWindows=$IsWindows\n";
|
||||||
|
|
||||||
(my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
|
(my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
|
||||||
$md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag)=
|
$md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,my $shared_extension)=
|
||||||
split(/\s*:\s*/,$table{$target} . ":" x 22 , -1);
|
split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||||
$cflags="$flags$cflags" if ($flags ne "");
|
$cflags="$flags$cflags" if ($flags ne "");
|
||||||
|
|
||||||
# The DSO code currently always implements all functions so that no
|
# The DSO code currently always implements all functions so that no
|
||||||
@@ -729,17 +708,22 @@ if ($threads)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
|
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
|
||||||
my $shared_mark1 = "";
|
my $shared_mark = "";
|
||||||
my $shared_mark2 = "";
|
if ($shared_target ne "")
|
||||||
if ($shared_cflag ne "")
|
|
||||||
{
|
{
|
||||||
$cflags = "$shared_cflag $cflags";
|
if ($shared_cflag ne "")
|
||||||
|
{
|
||||||
|
$cflags = "$shared_cflag $cflags";
|
||||||
|
}
|
||||||
if (!$no_shared)
|
if (!$no_shared)
|
||||||
{
|
{
|
||||||
$shared_mark1 = ".shlib-clean.";
|
#$shared_mark = "\$(SHARED_LIBS)";
|
||||||
$shared_mark2 = ".shlib.";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$no_shared = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#my ($bn1)=split(/\s+/,$bn_obj);
|
#my ($bn1)=split(/\s+/,$bn_obj);
|
||||||
#$bn1 = "" unless defined $bn1;
|
#$bn1 = "" unless defined $bn1;
|
||||||
@@ -821,6 +805,7 @@ while (<IN>)
|
|||||||
s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/;
|
s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/;
|
||||||
s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/;
|
s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/;
|
||||||
s/^SHLIB_MINOR=.*/SHLIB_MINOR=$shlib_minor/;
|
s/^SHLIB_MINOR=.*/SHLIB_MINOR=$shlib_minor/;
|
||||||
|
s/^SHLIB_EXT=.*/SHLIB_EXT=$shared_extension/;
|
||||||
s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/;
|
s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/;
|
||||||
s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
|
s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
|
||||||
s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
|
s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
|
||||||
@@ -844,9 +829,18 @@ while (<IN>)
|
|||||||
s/^RANLIB=.*/RANLIB= $ranlib/;
|
s/^RANLIB=.*/RANLIB= $ranlib/;
|
||||||
s/^PERL=.*/PERL= $perl/;
|
s/^PERL=.*/PERL= $perl/;
|
||||||
s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
|
s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/;
|
||||||
s/^SHLIB_MARK1=.*/SHLIB_MARK1=$shared_mark1/;
|
s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/;
|
||||||
s/^SHLIB_MARK2=.*/SHLIB_MARK2=$shared_mark2/;
|
s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared);
|
||||||
s/^LIBS=.*/LIBS=libcrypto\.so\* libssl\.so\*/ if (!$no_shared);
|
if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/)
|
||||||
|
{
|
||||||
|
my $sotmp = $1;
|
||||||
|
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/
|
||||||
|
}
|
||||||
|
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
|
||||||
|
{
|
||||||
|
my $sotmp = $1;
|
||||||
|
s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||||
|
}
|
||||||
print OUT $_."\n";
|
print OUT $_."\n";
|
||||||
}
|
}
|
||||||
close(IN);
|
close(IN);
|
||||||
@@ -1133,8 +1127,9 @@ sub print_table_entry
|
|||||||
(my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,
|
(my $cc,my $cflags,my $unistd,my $thread_cflag,my $lflags,my $bn_ops,
|
||||||
my $bn_obj,my $des_obj,my $bf_obj,
|
my $bn_obj,my $des_obj,my $bf_obj,
|
||||||
my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
|
my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj,
|
||||||
my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag)=
|
my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag,
|
||||||
split(/\s*:\s*/,$table{$target} . ":" x 22 , -1);
|
my $shared_extension)=
|
||||||
|
split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
|
||||||
|
|
||||||
print <<EOF
|
print <<EOF
|
||||||
|
|
||||||
@@ -1157,5 +1152,6 @@ sub print_table_entry
|
|||||||
\$dso_scheme = $dso_scheme
|
\$dso_scheme = $dso_scheme
|
||||||
\$shared_target= $shared_target
|
\$shared_target= $shared_target
|
||||||
\$shared_cflag = $shared_cflag
|
\$shared_cflag = $shared_cflag
|
||||||
|
\$shared_extension = $shared_extension
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|||||||
28
FAQ
28
FAQ
@@ -27,6 +27,8 @@ OpenSSL - Frequently Asked Questions
|
|||||||
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
|
* Why does the OpenSSL test fail with "bc: 1 no implemented"?
|
||||||
* Why does the OpenSSL compilation fail on Alpha True64 Unix?
|
* Why does the OpenSSL compilation fail on Alpha True64 Unix?
|
||||||
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
* Why does the OpenSSL compilation fail with "ar: command not found"?
|
||||||
|
* Why does the OpenSSL compilation fail on Win32 with VC++?
|
||||||
|
* Why aren't tools like 'autoconf' and 'libtool' used?
|
||||||
|
|
||||||
|
|
||||||
* Which is the current version of OpenSSL?
|
* Which is the current version of OpenSSL?
|
||||||
@@ -430,3 +432,29 @@ and then redo the compilation. What you should really do is make sure
|
|||||||
'/usr/ccs/bin' is permanently in your $PATH, for example through your
|
'/usr/ccs/bin' is permanently in your $PATH, for example through your
|
||||||
'.profile' (again, assuming you use a sh-compatible shell).
|
'.profile' (again, assuming you use a sh-compatible shell).
|
||||||
|
|
||||||
|
|
||||||
|
* Why does the OpenSSL compilation fail on Win32 with VC++?
|
||||||
|
|
||||||
|
Sometimes, you may get reports from VC++ command line (cl) that it
|
||||||
|
can't find standard include files like stdio.h and other weirdnesses.
|
||||||
|
One possible cause is that the environment isn't correctly set up.
|
||||||
|
To solve that problem, one should run VCVARS32.BAT which is found in
|
||||||
|
the 'bin' subdirectory of the VC++ installation directory (somewhere
|
||||||
|
under 'Program Files'). This needs to be done prior to running NMAKE,
|
||||||
|
and the changes are only valid for the current DOS session.
|
||||||
|
|
||||||
|
|
||||||
|
* Why aren't tools like 'autoconf' and 'libtool' used?
|
||||||
|
|
||||||
|
autoconf is a nice tool, but is unfortunately very Unix-centric.
|
||||||
|
Although one can come up with solution to have ports keep in track,
|
||||||
|
there's also some work needed for that, and can be quite painful at
|
||||||
|
times. If there was a 'autoconf'-like tool that generated perl
|
||||||
|
scripts or something similarly general, it would probably be used
|
||||||
|
in OpenSSL much earlier.
|
||||||
|
|
||||||
|
libtool has repeatadly been reported by some members of the OpenSSL
|
||||||
|
development and others to be a pain to use. So far, those in the
|
||||||
|
development team who have said anything about this have expressed
|
||||||
|
a wish to avoid libtool for that reason.
|
||||||
|
|
||||||
|
|||||||
5
INSTALL
5
INSTALL
@@ -57,10 +57,7 @@
|
|||||||
|
|
||||||
shared In addition to the usual static libraries, create shared
|
shared In addition to the usual static libraries, create shared
|
||||||
libraries on platforms where it's supported. See "Note on
|
libraries on platforms where it's supported. See "Note on
|
||||||
shared libraries" below. THIS IS NOT RECOMMENDED! Since
|
shared libraries" below.
|
||||||
this is a development branch, the positions of the ENGINE
|
|
||||||
symbols in the transfer vector are constantly moving, so
|
|
||||||
binary backward compatibility can't be guaranteed in any way.
|
|
||||||
|
|
||||||
no-asm Do not use assembler code.
|
no-asm Do not use assembler code.
|
||||||
|
|
||||||
|
|||||||
176
Makefile.org
176
Makefile.org
@@ -9,6 +9,7 @@ SHLIB_VERSION_NUMBER=
|
|||||||
SHLIB_VERSION_HISTORY=
|
SHLIB_VERSION_HISTORY=
|
||||||
SHLIB_MAJOR=
|
SHLIB_MAJOR=
|
||||||
SHLIB_MINOR=
|
SHLIB_MINOR=
|
||||||
|
SHLIB_EXT=
|
||||||
PLATFORM=dist
|
PLATFORM=dist
|
||||||
OPTIONS=
|
OPTIONS=
|
||||||
CONFIGURE_ARGS=
|
CONFIGURE_ARGS=
|
||||||
@@ -149,21 +150,18 @@ RMD160_ASM_OBJ= asm/rm86-out.o
|
|||||||
#RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
|
#RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD
|
||||||
#RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi
|
#RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi
|
||||||
|
|
||||||
# To do special treatment, use "directory names" starting with a period.
|
|
||||||
# When we're prepared to use shared libraries in the programs we link here
|
# When we're prepared to use shared libraries in the programs we link here
|
||||||
# we might have SHLIB_MARK1 get the value ".shlib." and SHLIB_MARK2 be empty,
|
# we might set SHLIB_MARK to '$(SHARED_LIBS)'.
|
||||||
# or have that configurable.
|
SHLIB_MARK=
|
||||||
SHLIB_MARK1=.shlib-clean.
|
|
||||||
SHLIB_MARK2=.shlib.
|
|
||||||
|
|
||||||
DIRS= crypto ssl rsaref $(SHLIB_MARK1) apps test tools $(SHLIB_MARK2)
|
DIRS= crypto ssl rsaref $(SHLIB_MARK) apps test tools
|
||||||
SHLIBDIRS= crypto ssl
|
SHLIBDIRS= crypto ssl
|
||||||
|
|
||||||
# dirs in crypto to build
|
# dirs in crypto to build
|
||||||
SDIRS= \
|
SDIRS= \
|
||||||
md2 md4 md5 sha mdc2 hmac ripemd \
|
md2 md4 md5 sha mdc2 hmac ripemd \
|
||||||
des rc2 rc4 rc5 idea bf cast \
|
des rc2 rc4 rc5 idea bf cast \
|
||||||
bn rsa dsa dh dso engine \
|
bn rsa dsa dh dso rijndael \
|
||||||
buffer bio stack lhash rand err objects \
|
buffer bio stack lhash rand err objects \
|
||||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
|
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
|
||||||
|
|
||||||
@@ -180,7 +178,10 @@ ONEDIRS=out tmp
|
|||||||
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
|
||||||
WDIRS= windows
|
WDIRS= windows
|
||||||
LIBS= libcrypto.a libssl.a
|
LIBS= libcrypto.a libssl.a
|
||||||
SHARED_LIBS=libcrypto.so libssl.so
|
SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
|
||||||
|
SHARED_SSL=libssl$(SHLIB_EXT)
|
||||||
|
SHARED_LIBS=
|
||||||
|
SHARED_LIBS_LINK_EXTS=
|
||||||
|
|
||||||
GENERAL= Makefile
|
GENERAL= Makefile
|
||||||
BASENAME= openssl
|
BASENAME= openssl
|
||||||
@@ -190,88 +191,77 @@ WTARFILE= $(NAME)-win.tar
|
|||||||
EXHEADER= e_os.h e_os2.h
|
EXHEADER= e_os.h e_os2.h
|
||||||
HEADER= e_os.h
|
HEADER= e_os.h
|
||||||
|
|
||||||
all: Makefile.ssl
|
# When we're prepared to use shared libraries in the programs we link here
|
||||||
@need_shlib=true; \
|
# we might remove 'clean-shared' from the targets to perform at this stage
|
||||||
for i in $(DIRS) ;\
|
|
||||||
do \
|
all: clean-shared Makefile.ssl sub_all
|
||||||
if [ "$$i" = ".shlib-clean." ]; then \
|
|
||||||
if [ "$(SHLIB_TARGET)" != "" ]; then \
|
|
||||||
$(MAKE) clean-shared; \
|
|
||||||
fi; \
|
|
||||||
elif [ "$$i" = ".shlib." ]; then \
|
|
||||||
if [ "$(SHLIB_TARGET)" != "" ]; then \
|
|
||||||
$(MAKE) $(SHARED_LIBS); \
|
|
||||||
fi; \
|
|
||||||
need_shlib=false; \
|
|
||||||
else \
|
|
||||||
(cd $$i && echo "making all in $$i..." && \
|
|
||||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
|
|
||||||
fi; \
|
|
||||||
done; \
|
|
||||||
if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \
|
|
||||||
$(MAKE) $(SHARED_LIBS); \
|
|
||||||
fi
|
|
||||||
|
|
||||||
sub_all:
|
sub_all:
|
||||||
@need_shlib=true; \
|
@for i in $(DIRS); \
|
||||||
for i in $(DIRS) ;\
|
|
||||||
do \
|
do \
|
||||||
if [ "$$i" = ".shlib-clean." ]; then \
|
if [ -d "$$i" ]; then \
|
||||||
if [ "$(SHLIB_TARGET)" != "" ]; then \
|
|
||||||
$(MAKE) clean-shared; \
|
|
||||||
fi; \
|
|
||||||
elif [ "$$i" = ".shlib." ]; then \
|
|
||||||
if [ "$(SHLIB_TARGET)" != "" ]; then \
|
|
||||||
$(MAKE) $(SHARED_LIBS); \
|
|
||||||
fi; \
|
|
||||||
need_shlib=false; \
|
|
||||||
else \
|
|
||||||
(cd $$i && echo "making all in $$i..." && \
|
(cd $$i && echo "making all in $$i..." && \
|
||||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
|
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $$i; \
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \
|
if echo "$(DIRS)" | \
|
||||||
|
egrep '(^| )(crypto|ssl)( |$$)' > /dev/null 2>&1 && \
|
||||||
|
[ -n "$(SHARED_LIBS)" ]; then \
|
||||||
$(MAKE) $(SHARED_LIBS); \
|
$(MAKE) $(SHARED_LIBS); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
libcrypto.so: libcrypto.a
|
libcrypto$(SHLIB_EXT): libcrypto.a
|
||||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||||
$(MAKE) SHLIBDIRS=crypto $(SHLIB_TARGET); \
|
$(MAKE) SHLIBDIRS=crypto build-shared; \
|
||||||
else \
|
else \
|
||||||
echo "There's no support for shared libraries on this platform" >&2; \
|
echo "There's no support for shared libraries on this platform" >&2; \
|
||||||
fi
|
fi
|
||||||
libssl.so: libcrypto.so libssl.a
|
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
|
||||||
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
@if [ "$(SHLIB_TARGET)" != "" ]; then \
|
||||||
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-L. -lcrypto' $(SHLIB_TARGET); \
|
$(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-L. -lcrypto' build-shared; \
|
||||||
else \
|
else \
|
||||||
echo "There's no support for shared libraries on this platform" >&2; \
|
echo "There's no support for shared libraries on this platform" >&2; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clean-shared:
|
clean-shared:
|
||||||
for i in ${SHLIBDIRS}; do \
|
@for i in $(SHLIBDIRS); do \
|
||||||
rm -f lib$$i.so \
|
if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
|
||||||
lib$$i.so.${SHLIB_MAJOR} \
|
tmp="$(SHARED_LIBS_LINK_EXTS)"; \
|
||||||
lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
for j in $${tmp:-x}; do \
|
||||||
|
( set -x; rm -f lib$$i$$j ); \
|
||||||
|
done; \
|
||||||
|
fi; \
|
||||||
|
( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
|
||||||
done
|
done
|
||||||
|
|
||||||
linux-shared:
|
link-shared:
|
||||||
|
@for i in $(SHLIBDIRS); do \
|
||||||
|
prev=lib$$i$(SHLIB_EXT); \
|
||||||
|
if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
|
||||||
|
tmp="$(SHARED_LIBS_LINK_EXTS)"; \
|
||||||
|
for j in $${tmp:-x}; do \
|
||||||
|
( set -x; ln -s -f $$prev lib$$i$$j ); \
|
||||||
|
prev=lib$$i$$j; \
|
||||||
|
done; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
build-shared: clean-shared do_$(SHLIB_TARGET) link-shared
|
||||||
|
|
||||||
|
do_bsd-gcc-shared: linux-shared
|
||||||
|
do_linux-shared:
|
||||||
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
rm -f lib$$i.so \
|
|
||||||
lib$$i.so.${SHLIB_MAJOR} \
|
|
||||||
lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
|
||||||
( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
( set -x; ${CC} -shared -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
|
-Wl,-S,-soname=lib$$i.so.${SHLIB_MAJOR} \
|
||||||
-Wl,--whole-archive lib$$i.a \
|
-Wl,--whole-archive lib$$i.a \
|
||||||
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
-Wl,--no-whole-archive $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
libs="$$libs -L. -l$$i"; \
|
libs="$$libs -L. -l$$i"; \
|
||||||
( set -x; \
|
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
|
||||||
lib$$i.so.${SHLIB_MAJOR}; \
|
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so ); \
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# This assumes that GNU utilities are *not* used
|
# This assumes that GNU utilities are *not* used
|
||||||
true64-shared:
|
do_true64-shared:
|
||||||
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
( set -x; ${CC} -shared -no_archive -o lib$$i.so \
|
( set -x; ${CC} -shared -no_archive -o lib$$i.so \
|
||||||
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
|
||||||
@@ -280,18 +270,31 @@ true64-shared:
|
|||||||
done
|
done
|
||||||
|
|
||||||
# This assumes that GNU utilities are *not* used
|
# This assumes that GNU utilities are *not* used
|
||||||
solaris-shared:
|
do_solaris-shared:
|
||||||
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
rm -f lib$$i.so \
|
|
||||||
lib$$i.so.${SHLIB_MAJOR} \
|
|
||||||
lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR}; \
|
|
||||||
( set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
( set -x; ${CC} -G -o lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
-h lib$$i.so.${SHLIB_MAJOR} \
|
-h lib$$i.so.${SHLIB_MAJOR} \
|
||||||
-z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
|
-z allextract lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
libs="$$libs -L. -l$$i"; \
|
libs="$$libs -L. -l$$i"; \
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
done
|
||||||
lib$$i.so.${SHLIB_MAJOR}; \
|
|
||||||
ln -s lib$$i.so.${SHLIB_MAJOR} lib$$i.so; \
|
# This assumes that GNU utilities are *not* used
|
||||||
|
do_hpux-shared:
|
||||||
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
( set -x; /usr/ccs/bin/ld +vnocompatwarnings \
|
||||||
|
-b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
|
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
|
-Fl lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
|
libs="$$libs -L. -l$$i"; \
|
||||||
|
done
|
||||||
|
|
||||||
|
# This assumes that GNU utilities are *not* used
|
||||||
|
do_hpux64-shared:
|
||||||
|
libs='${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
|
||||||
|
( set -x; /usr/ccs/bin/ld -b -z -o lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
|
+h lib$$i.sl.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
||||||
|
+forceload lib$$i.a $$libs ${EX_LIBS} -lc ) || exit 1; \
|
||||||
|
libs="$$libs -L. -l$$i"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
Makefile.ssl: Makefile.org
|
Makefile.ssl: Makefile.org
|
||||||
@@ -306,7 +309,7 @@ clean:
|
|||||||
rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
|
rm -f shlib/*.o *.o core a.out fluff *.map rehash.time testlog make.log cctest cctest.c
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making clean in $$i..." && \
|
(cd $$i && echo "making clean in $$i..." && \
|
||||||
$(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
|
$(MAKE) SDIRS='${SDIRS}' clean ) || exit 1; \
|
||||||
rm -f $(LIBS); \
|
rm -f $(LIBS); \
|
||||||
@@ -327,7 +330,7 @@ files:
|
|||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
|
$(PERL) $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making 'files' in $$i..." && \
|
(cd $$i && echo "making 'files' in $$i..." && \
|
||||||
$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
|
$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' files ) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -338,7 +341,7 @@ links:
|
|||||||
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
|
@$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
|
||||||
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
|
@$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
|
||||||
@for i in $(DIRS); do \
|
@for i in $(DIRS); do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making links in $$i..." && \
|
(cd $$i && echo "making links in $$i..." && \
|
||||||
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' links ) || exit 1; \
|
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' links ) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -348,7 +351,7 @@ dclean:
|
|||||||
rm -f *.bak
|
rm -f *.bak
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making dclean in $$i..." && \
|
(cd $$i && echo "making dclean in $$i..." && \
|
||||||
$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
|
$(MAKE) SDIRS='${SDIRS}' PERL='${PERL}' dclean ) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -372,7 +375,7 @@ report:
|
|||||||
depend:
|
depend:
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making dependencies $$i..." && \
|
(cd $$i && echo "making dependencies $$i..." && \
|
||||||
$(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
|
$(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -381,7 +384,7 @@ depend:
|
|||||||
lint:
|
lint:
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making lint $$i..." && \
|
(cd $$i && echo "making lint $$i..." && \
|
||||||
$(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
|
$(MAKE) SDIRS='${SDIRS}' lint ) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -390,7 +393,7 @@ lint:
|
|||||||
tags:
|
tags:
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i && echo "making tags $$i..." && \
|
(cd $$i && echo "making tags $$i..." && \
|
||||||
$(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
|
$(MAKE) SDIRS='${SDIRS}' tags ) || exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -452,7 +455,7 @@ install: all install_docs
|
|||||||
done;
|
done;
|
||||||
@for i in $(DIRS) ;\
|
@for i in $(DIRS) ;\
|
||||||
do \
|
do \
|
||||||
if echo "$$i" | grep -v '^\.'; then \
|
if [ -d "$$i" ]; then \
|
||||||
(cd $$i; echo "installing $$i..."; \
|
(cd $$i; echo "installing $$i..."; \
|
||||||
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \
|
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -466,6 +469,20 @@ install: all install_docs
|
|||||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
|
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||||
|
tmp="$(SHARED_LIBS)"; \
|
||||||
|
for i in $${tmp:-x}; \
|
||||||
|
do \
|
||||||
|
if [ -f "$$i" ]; then \
|
||||||
|
( echo installing $$i; \
|
||||||
|
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||||
|
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
|
||||||
|
fi \
|
||||||
|
done; \
|
||||||
|
( here="`pwd`"; \
|
||||||
|
cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
|
||||||
|
make -f $$here/Makefile link-shared ); \
|
||||||
|
fi
|
||||||
|
|
||||||
install_docs:
|
install_docs:
|
||||||
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
@$(PERL) $(TOP)/util/mkdir-p.pl \
|
||||||
@@ -473,30 +490,23 @@ install_docs:
|
|||||||
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
$(INSTALL_PREFIX)$(MANDIR)/man3 \
|
||||||
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
$(INSTALL_PREFIX)$(MANDIR)/man5 \
|
||||||
$(INSTALL_PREFIX)$(MANDIR)/man7
|
$(INSTALL_PREFIX)$(MANDIR)/man7
|
||||||
@echo installing man 1 and man 5
|
|
||||||
@for i in doc/apps/*.pod; do \
|
@for i in doc/apps/*.pod; do \
|
||||||
fn=`basename $$i .pod`; \
|
fn=`basename $$i .pod`; \
|
||||||
sec=`[ "$$fn" = "config" ] && echo 5 || echo 1`; \
|
sec=`[ "$$fn" = "config" ] && echo 5 || echo 1`; \
|
||||||
|
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||||
(cd `dirname $$i`; \
|
(cd `dirname $$i`; \
|
||||||
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
||||||
--release=$(VERSION) `basename $$i`) \
|
--release=$(VERSION) `basename $$i`) \
|
||||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||||
done
|
done
|
||||||
@echo installing man 3 and man 7
|
|
||||||
@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
@for i in doc/crypto/*.pod doc/ssl/*.pod; do \
|
||||||
fn=`basename $$i .pod`; \
|
fn=`basename $$i .pod`; \
|
||||||
sec=`[ "$$fn" = "des_modes" ] && echo 7 || echo 3`; \
|
sec=`[ "$$fn" = "des_modes" ] && echo 7 || echo 3`; \
|
||||||
|
echo "installing man$$sec/`basename $$i .pod`.$$sec"; \
|
||||||
(cd `dirname $$i`; \
|
(cd `dirname $$i`; \
|
||||||
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
$(PERL) ../../util/pod2man.pl --section=$$sec --center=OpenSSL \
|
||||||
--release=$(VERSION) `basename $$i`) \
|
--release=$(VERSION) `basename $$i`) \
|
||||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/`basename $$i .pod`.$$sec; \
|
||||||
done
|
done
|
||||||
|
|
||||||
shlib: all
|
|
||||||
if [ ! -d shlib_dir ] ; then mkdir shlib_dir ; else rm -f shlib_dir/* ; fi
|
|
||||||
cd shlib_dir ; ar -x ../libcrypto.a && $(CC) -shared ./*.o -Wl,-soname -Wl,libcrypto.so.0.9 \
|
|
||||||
-o ./libcrypto.so.0.9.4 && rm *.o
|
|
||||||
cd shlib_dir ; ar -x ../libssl.a && $(CC) -shared ./*.o -Wl,-soname -Wl,libssl.so.0.9 \
|
|
||||||
-o ./libssl.so.0.9.4 && rm *.o
|
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|||||||
2
README
2
README
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
OpenSSL 0.9.6 [engine] 24 Sep 2000
|
OpenSSL 0.9.7-dev 24 Sep 2000
|
||||||
|
|
||||||
Copyright (c) 1998-2000 The OpenSSL Project
|
Copyright (c) 1998-2000 The OpenSSL Project
|
||||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||||
|
|||||||
8
STATUS
8
STATUS
@@ -1,9 +1,10 @@
|
|||||||
|
|
||||||
OpenSSL STATUS Last modified at
|
OpenSSL STATUS Last modified at
|
||||||
______________ $Date: 2000/09/24 16:04:33 $
|
______________ $Date: 2000/10/23 14:36:18 $
|
||||||
|
|
||||||
DEVELOPMENT STATE
|
DEVELOPMENT STATE
|
||||||
|
|
||||||
|
o OpenSSL 0.9.7: Under development...
|
||||||
o OpenSSL 0.9.6: Released on September 24th, 2000
|
o OpenSSL 0.9.6: Released on September 24th, 2000
|
||||||
o OpenSSL 0.9.5a: Released on April 1st, 2000
|
o OpenSSL 0.9.5a: Released on April 1st, 2000
|
||||||
o OpenSSL 0.9.5: Released on February 28th, 2000
|
o OpenSSL 0.9.5: Released on February 28th, 2000
|
||||||
@@ -24,7 +25,7 @@
|
|||||||
o Steve is currently working on (in no particular order):
|
o Steve is currently working on (in no particular order):
|
||||||
ASN1 code redesign, butchery, replacement.
|
ASN1 code redesign, butchery, replacement.
|
||||||
EVP cipher enhancement.
|
EVP cipher enhancement.
|
||||||
Proper (or at least usable) certificate chain verification.
|
/* Proper (or at least usable) certificate chain verification. */
|
||||||
Private key, certificate and CRL API and implementation.
|
Private key, certificate and CRL API and implementation.
|
||||||
Developing and bugfixing PKCS#7 (S/MIME code).
|
Developing and bugfixing PKCS#7 (S/MIME code).
|
||||||
Various X509 issues: character sets, certificate request extensions.
|
Various X509 issues: character sets, certificate request extensions.
|
||||||
@@ -44,9 +45,6 @@
|
|||||||
|
|
||||||
OPEN ISSUES
|
OPEN ISSUES
|
||||||
|
|
||||||
o internal_verify doesn't know about X509.v3 (basicConstraints
|
|
||||||
CA flag ...)
|
|
||||||
|
|
||||||
o The Makefile hierarchy and build mechanism is still not a round thing:
|
o The Makefile hierarchy and build mechanism is still not a round thing:
|
||||||
|
|
||||||
1. The config vs. Configure scripts
|
1. The config vs. Configure scripts
|
||||||
|
|||||||
249
TABLE
249
TABLE
@@ -19,6 +19,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** BC-32
|
*** BC-32
|
||||||
$cc = bcc32
|
$cc = bcc32
|
||||||
@@ -39,6 +40,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = win32
|
$dso_scheme = win32
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** BS2000-OSD
|
*** BS2000-OSD
|
||||||
$cc = c89
|
$cc = c89
|
||||||
@@ -59,6 +61,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** CygWin32
|
*** CygWin32
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -79,6 +82,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = win32
|
$dso_scheme = win32
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** FreeBSD
|
*** FreeBSD
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -99,6 +103,7 @@ $rc5_obj = asm/r586-out.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** FreeBSD-alpha
|
*** FreeBSD-alpha
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -116,9 +121,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** FreeBSD-elf
|
*** FreeBSD-elf
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -136,9 +142,10 @@ $cast_obj = asm/cx86-elf.o
|
|||||||
$rc4_obj = asm/rx86-elf.o
|
$rc4_obj = asm/rx86-elf.o
|
||||||
$rmd160_obj = asm/rm86-elf.o
|
$rmd160_obj = asm/rm86-elf.o
|
||||||
$rc5_obj = asm/r586-elf.o
|
$rc5_obj = asm/r586-elf.o
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** MPE/iX-gcc
|
*** MPE/iX-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -159,6 +166,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** Mingw32
|
*** Mingw32
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -179,6 +187,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = win32
|
$dso_scheme = win32
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** NetBSD-m68
|
*** NetBSD-m68
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -196,9 +205,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** NetBSD-sparc
|
*** NetBSD-sparc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -216,9 +226,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** NetBSD-x86
|
*** NetBSD-x86
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -236,9 +247,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** OpenBSD
|
*** OpenBSD
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -256,9 +268,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** OpenBSD-alpha
|
*** OpenBSD-alpha
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -276,9 +289,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** OpenBSD-mips
|
*** OpenBSD-mips
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -296,9 +310,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** OpenBSD-x86
|
*** OpenBSD-x86
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -317,8 +332,9 @@ $rc4_obj = asm/rx86-out.o
|
|||||||
$rmd160_obj = asm/rm86-out.o
|
$rmd160_obj = asm/rm86-out.o
|
||||||
$rc5_obj = asm/r586-out.o
|
$rc5_obj = asm/r586-out.o
|
||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** ReliantUNIX
|
*** ReliantUNIX
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -339,6 +355,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** SINIX
|
*** SINIX
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -359,6 +376,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** SINIX-N
|
*** SINIX-N
|
||||||
$cc = /usr/ucb/cc
|
$cc = /usr/ucb/cc
|
||||||
@@ -379,6 +397,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** VC-MSDOS
|
*** VC-MSDOS
|
||||||
$cc = cl
|
$cc = cl
|
||||||
@@ -399,6 +418,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** VC-NT
|
*** VC-NT
|
||||||
$cc = cl
|
$cc = cl
|
||||||
@@ -419,6 +439,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = win32
|
$dso_scheme = win32
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** VC-W31-16
|
*** VC-W31-16
|
||||||
$cc = cl
|
$cc = cl
|
||||||
@@ -439,6 +460,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** VC-W31-32
|
*** VC-W31-32
|
||||||
$cc = cl
|
$cc = cl
|
||||||
@@ -459,6 +481,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** VC-WIN16
|
*** VC-WIN16
|
||||||
$cc = cl
|
$cc = cl
|
||||||
@@ -479,6 +502,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** VC-WIN32
|
*** VC-WIN32
|
||||||
$cc = cl
|
$cc = cl
|
||||||
@@ -499,6 +523,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = win32
|
$dso_scheme = win32
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** aix-cc
|
*** aix-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -519,6 +544,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** aix-gcc
|
*** aix-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -539,6 +565,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** alpha-cc
|
*** alpha-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -559,6 +586,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= true64-shared
|
$shared_target= true64-shared
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension = .so
|
||||||
|
|
||||||
*** alpha-gcc
|
*** alpha-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -579,6 +607,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= true64-shared
|
$shared_target= true64-shared
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension = .so
|
||||||
|
|
||||||
*** alpha164-cc
|
*** alpha164-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -599,6 +628,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= true64-shared
|
$shared_target= true64-shared
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension = .so
|
||||||
|
|
||||||
*** bsdi-elf-gcc
|
*** bsdi-elf-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -616,9 +646,10 @@ $cast_obj = asm/cx86-elf.o
|
|||||||
$rc4_obj = asm/rx86-elf.o
|
$rc4_obj = asm/rx86-elf.o
|
||||||
$rmd160_obj = asm/rm86-elf.o
|
$rmd160_obj = asm/rm86-elf.o
|
||||||
$rc5_obj = asm/r586-elf.o
|
$rc5_obj = asm/r586-elf.o
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= bsd-gcc-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** bsdi-gcc
|
*** bsdi-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -639,6 +670,7 @@ $rc5_obj = asm/r586bsdi.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** cc
|
*** cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -659,6 +691,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** cray-t3e
|
*** cray-t3e
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -679,6 +712,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** cray-t90-cc
|
*** cray-t90-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -699,6 +733,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug
|
*** debug
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -719,6 +754,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-ben
|
*** debug-ben
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -739,6 +775,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-ben-debug
|
*** debug-ben-debug
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -759,6 +796,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-ben-strict
|
*** debug-ben-strict
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -779,6 +817,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-bodo
|
*** debug-bodo
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -799,6 +838,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-levitte-linux-elf
|
*** debug-levitte-linux-elf
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -819,6 +859,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-linux-elf
|
*** debug-linux-elf
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -839,6 +880,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-linux-elf-noefence
|
*** debug-linux-elf-noefence
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -859,6 +901,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-rse
|
*** debug-rse
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -879,6 +922,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-solaris-sparcv8-cc
|
*** debug-solaris-sparcv8-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -899,6 +943,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** debug-solaris-sparcv8-gcc
|
*** debug-solaris-sparcv8-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -919,6 +964,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** debug-solaris-sparcv9-cc
|
*** debug-solaris-sparcv9-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -939,6 +985,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** debug-solaris-sparcv9-gcc
|
*** debug-solaris-sparcv9-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -959,6 +1006,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** debug-steve
|
*** debug-steve
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -979,6 +1027,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** debug-ulf
|
*** debug-ulf
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -999,6 +1048,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** dgux-R3-gcc
|
*** dgux-R3-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1019,6 +1069,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** dgux-R4-gcc
|
*** dgux-R4-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1039,6 +1090,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** dgux-R4-x86-gcc
|
*** dgux-R4-x86-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1059,6 +1111,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** dist
|
*** dist
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1079,6 +1132,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** gcc
|
*** gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1099,6 +1153,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** hpux-brokencc
|
*** hpux-brokencc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1117,8 +1172,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-brokengcc
|
*** hpux-brokengcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1137,8 +1193,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-cc
|
*** hpux-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1157,8 +1214,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-gcc
|
*** hpux-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1177,8 +1235,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-parisc-cc
|
*** hpux-parisc-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1197,8 +1256,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-parisc-cc-o4
|
*** hpux-parisc-cc-o4
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1217,8 +1277,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-parisc-gcc
|
*** hpux-parisc-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1237,8 +1298,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-parisc1_1-cc
|
*** hpux-parisc1_1-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1257,8 +1319,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux-parisc2-cc
|
*** hpux-parisc2-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1277,8 +1340,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux10-brokencc
|
*** hpux10-brokencc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1297,8 +1361,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux10-brokengcc
|
*** hpux10-brokengcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1317,8 +1382,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux10-cc
|
*** hpux10-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1337,8 +1403,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux10-gcc
|
*** hpux10-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1357,8 +1424,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dl
|
$dso_scheme = dl
|
||||||
$shared_target=
|
$shared_target= hpux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux64-parisc-cc
|
*** hpux64-parisc-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1377,8 +1445,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= hpux64-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** hpux64-parisc2-cc
|
*** hpux64-parisc2-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1397,8 +1466,9 @@ $rc4_obj =
|
|||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= hpux64-shared
|
||||||
$shared_cflag =
|
$shared_cflag = +Z
|
||||||
|
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** irix-cc
|
*** irix-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1419,6 +1489,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** irix-gcc
|
*** irix-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1439,6 +1510,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** irix-mips3-cc
|
*** irix-mips3-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1459,6 +1531,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** irix-mips3-gcc
|
*** irix-mips3-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1479,6 +1552,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** irix64-mips4-cc
|
*** irix64-mips4-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1499,6 +1573,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** irix64-mips4-gcc
|
*** irix64-mips4-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1519,6 +1594,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-alpha+bwx-ccc
|
*** linux-alpha+bwx-ccc
|
||||||
$cc = ccc
|
$cc = ccc
|
||||||
@@ -1539,13 +1615,14 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-alpha+bwx-gcc
|
*** linux-alpha+bwx-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -O3 -DL_ENDIAN -DTERMIO
|
$cflags = -O3 -DL_ENDIAN -DTERMIO
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -D_REENTRANT
|
$thread_cflag = -D_REENTRANT
|
||||||
$lflags =
|
$lflags = -ldl
|
||||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
|
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
|
||||||
$bn_obj = asm/alpha.o
|
$bn_obj = asm/alpha.o
|
||||||
$des_obj =
|
$des_obj =
|
||||||
@@ -1556,9 +1633,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= linux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** linux-alpha-ccc
|
*** linux-alpha-ccc
|
||||||
$cc = ccc
|
$cc = ccc
|
||||||
@@ -1579,13 +1657,14 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-alpha-gcc
|
*** linux-alpha-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -O3 -DL_ENDIAN -DTERMIO
|
$cflags = -O3 -DL_ENDIAN -DTERMIO
|
||||||
$unistd =
|
$unistd =
|
||||||
$thread_cflag = -D_REENTRANT
|
$thread_cflag = -D_REENTRANT
|
||||||
$lflags =
|
$lflags = -ldl
|
||||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL
|
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL
|
||||||
$bn_obj = asm/alpha.o
|
$bn_obj = asm/alpha.o
|
||||||
$des_obj =
|
$des_obj =
|
||||||
@@ -1596,9 +1675,10 @@ $cast_obj =
|
|||||||
$rc4_obj =
|
$rc4_obj =
|
||||||
$rmd160_obj =
|
$rmd160_obj =
|
||||||
$rc5_obj =
|
$rc5_obj =
|
||||||
$dso_scheme =
|
$dso_scheme = dlfcn
|
||||||
$shared_target=
|
$shared_target= linux-shared
|
||||||
$shared_cflag =
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** linux-aout
|
*** linux-aout
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1619,6 +1699,7 @@ $rc5_obj = asm/r586-out.o
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-elf
|
*** linux-elf
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1639,6 +1720,7 @@ $rc5_obj = asm/r586-elf.o
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= linux-shared
|
$shared_target= linux-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** linux-elf-arm
|
*** linux-elf-arm
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1659,6 +1741,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= linux-shared
|
$shared_target= linux-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** linux-ia64
|
*** linux-ia64
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1679,6 +1762,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-m68k
|
*** linux-m68k
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1699,6 +1783,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-mips
|
*** linux-mips
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1719,6 +1804,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-ppc
|
*** linux-ppc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1739,6 +1825,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-sparcv7
|
*** linux-sparcv7
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1759,6 +1846,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-sparcv8
|
*** linux-sparcv8
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1779,6 +1867,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** linux-sparcv9
|
*** linux-sparcv9
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1799,6 +1888,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** ncr-scde
|
*** ncr-scde
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1819,6 +1909,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** newsos4-gcc
|
*** newsos4-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1839,6 +1930,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** nextstep
|
*** nextstep
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1859,6 +1951,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** nextstep3.3
|
*** nextstep3.3
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1879,6 +1972,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** purify
|
*** purify
|
||||||
$cc = purify gcc
|
$cc = purify gcc
|
||||||
@@ -1899,6 +1993,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** qnx4
|
*** qnx4
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1919,6 +2014,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** rhapsody-ppc-cc
|
*** rhapsody-ppc-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1939,6 +2035,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** sco5-cc
|
*** sco5-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1959,6 +2056,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** sco5-gcc
|
*** sco5-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -1979,6 +2077,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** solaris-sparc-sc3
|
*** solaris-sparc-sc3
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -1999,6 +2098,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-sparcv7-cc
|
*** solaris-sparcv7-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2019,6 +2119,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-sparcv7-gcc
|
*** solaris-sparcv7-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -2039,6 +2140,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-sparcv8-cc
|
*** solaris-sparcv8-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2059,6 +2161,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-sparcv8-gcc
|
*** solaris-sparcv8-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -2079,6 +2182,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-sparcv9-cc
|
*** solaris-sparcv9-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2099,6 +2203,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-sparcv9-gcc
|
*** solaris-sparcv9-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -2119,6 +2224,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-sparcv9-gcc27
|
*** solaris-sparcv9-gcc27
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -2139,6 +2245,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris-x86-gcc
|
*** solaris-x86-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -2159,6 +2266,7 @@ $rc5_obj = asm/r586-sol.o
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -fPIC
|
$shared_cflag = -fPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** solaris64-sparcv9-cc
|
*** solaris64-sparcv9-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2179,6 +2287,7 @@ $rc5_obj =
|
|||||||
$dso_scheme = dlfcn
|
$dso_scheme = dlfcn
|
||||||
$shared_target= solaris-shared
|
$shared_target= solaris-shared
|
||||||
$shared_cflag = -KPIC
|
$shared_cflag = -KPIC
|
||||||
|
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||||
|
|
||||||
*** sunos-gcc
|
*** sunos-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -2199,6 +2308,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** ultrix-cc
|
*** ultrix-cc
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2219,6 +2329,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** ultrix-gcc
|
*** ultrix-gcc
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
@@ -2239,6 +2350,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** unixware-2.0
|
*** unixware-2.0
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2259,6 +2371,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** unixware-2.0-pentium
|
*** unixware-2.0-pentium
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2279,6 +2392,7 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|
||||||
*** unixware-7
|
*** unixware-7
|
||||||
$cc = cc
|
$cc = cc
|
||||||
@@ -2299,3 +2413,4 @@ $rc5_obj =
|
|||||||
$dso_scheme =
|
$dso_scheme =
|
||||||
$shared_target=
|
$shared_target=
|
||||||
$shared_cflag =
|
$shared_cflag =
|
||||||
|
$shared_extension =
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ app_rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
|||||||
app_rand.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h
|
app_rand.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h
|
||||||
app_rand.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
app_rand.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
||||||
app_rand.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
app_rand.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
app_rand.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
app_rand.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
app_rand.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -178,7 +179,8 @@ apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
|||||||
apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
|
apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
|
||||||
apps.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
apps.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
apps.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
apps.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
apps.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
apps.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
apps.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
apps.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
apps.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
@@ -199,6 +201,7 @@ asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
|||||||
asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
asn1pars.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
asn1pars.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
asn1pars.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
asn1pars.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
asn1pars.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -209,17 +212,17 @@ ca.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
|||||||
ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||||
ca.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h
|
ca.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||||
ca.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
ca.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||||
ca.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
ca.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||||
ca.o: ../include/openssl/err.h ../include/openssl/evp.h
|
ca.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||||
ca.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
ca.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||||
ca.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
ca.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
||||||
ca.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
ca.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
||||||
ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
ca.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||||
ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
ca.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
ca.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
|
||||||
ca.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
ca.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
ca.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
ca.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
ca.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
ca.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
ca.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
ca.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
ca.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||||
@@ -241,7 +244,8 @@ ciphers.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
|||||||
ciphers.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
ciphers.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
ciphers.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
ciphers.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
ciphers.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
ciphers.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
ciphers.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
ciphers.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
ciphers.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||||
ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -264,6 +268,7 @@ crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
|||||||
crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
crl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
crl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
crl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
crl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
crl.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
crl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
crl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -285,6 +290,7 @@ crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
|||||||
crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
crl2p7.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
crl2p7.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
crl2p7.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
crl2p7.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
crl2p7.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -296,16 +302,16 @@ dgst.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
dgst.o: ../include/openssl/des.h ../include/openssl/dh.h
|
dgst.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
dgst.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
dgst.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
dgst.o: ../include/openssl/engine.h ../include/openssl/err.h
|
dgst.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
dgst.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
dgst.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
dgst.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
dgst.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
dgst.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
dgst.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
dgst.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
dgst.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
dgst.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
dgst.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
dgst.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
dgst.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
dgst.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
dgst.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
dgst.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
dgst.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -316,17 +322,17 @@ dh.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
|||||||
dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||||
dh.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h
|
dh.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||||
dh.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
dh.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||||
dh.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
dh.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||||
dh.o: ../include/openssl/err.h ../include/openssl/evp.h
|
dh.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||||
dh.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
dh.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||||
dh.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
dh.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
||||||
dh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
dh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
||||||
dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
dh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||||
dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
dh.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
dh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
|
||||||
dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
dh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
dh.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
dh.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
dh.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
dh.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
dh.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
dh.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
@@ -338,16 +344,16 @@ dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
dsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
dsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
dsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
dsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
dsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
dsa.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
dsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
dsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
dsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
dsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
dsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
dsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
dsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
dsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
dsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
dsa.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
dsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
dsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
dsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
dsa.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
dsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
dsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -359,16 +365,16 @@ dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
dsaparam.o: ../include/openssl/des.h ../include/openssl/dh.h
|
dsaparam.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
dsaparam.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
dsaparam.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
|
dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
dsaparam.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
dsaparam.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
dsaparam.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
dsaparam.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
dsaparam.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
dsaparam.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
dsaparam.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
dsaparam.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
dsaparam.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
dsaparam.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
dsaparam.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
dsaparam.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
dsaparam.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
dsaparam.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
dsaparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
dsaparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -380,20 +386,21 @@ enc.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
enc.o: ../include/openssl/des.h ../include/openssl/dh.h
|
enc.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
enc.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
enc.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
enc.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
enc.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
enc.o: ../include/openssl/engine.h ../include/openssl/err.h
|
enc.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
enc.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
enc.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
enc.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
enc.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
enc.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
enc.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
enc.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
enc.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||||
enc.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
enc.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
enc.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
enc.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
enc.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
enc.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
enc.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
enc.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
|
enc.o: ../include/openssl/x509_vfy.h apps.h
|
||||||
errstr.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
errstr.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||||
errstr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
errstr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||||
errstr.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
errstr.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||||
@@ -410,7 +417,8 @@ errstr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
|||||||
errstr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
errstr.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
errstr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
errstr.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
errstr.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
errstr.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
errstr.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
errstr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
errstr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||||
errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -424,20 +432,21 @@ gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
gendh.o: ../include/openssl/des.h ../include/openssl/dh.h
|
gendh.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
gendh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
gendh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
gendh.o: ../include/openssl/engine.h ../include/openssl/err.h
|
gendh.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
gendh.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
gendh.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
gendh.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
gendh.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
gendh.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
gendh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
gendh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
gendh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
gendh.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||||
gendh.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
gendh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
gendh.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
gendh.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
gendh.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
gendh.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
gendh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
gendh.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
|
gendh.o: ../include/openssl/x509_vfy.h apps.h
|
||||||
gendsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
gendsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||||
gendsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
gendsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||||
gendsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
gendsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||||
@@ -445,16 +454,16 @@ gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
gendsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
gendsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
gendsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
gendsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
gendsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
gendsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
gendsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
gendsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
gendsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
gendsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
gendsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
gendsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
gendsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
gendsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
gendsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
gendsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
gendsa.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
gendsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
gendsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -466,16 +475,16 @@ genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
genrsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
genrsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
genrsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
genrsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
genrsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
genrsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
genrsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
genrsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
genrsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
genrsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
genrsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
genrsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
genrsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
genrsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
genrsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
genrsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
genrsa.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
genrsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
genrsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
genrsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
genrsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -496,6 +505,7 @@ nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
|||||||
nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
nseq.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
nseq.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
nseq.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
nseq.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
nseq.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
nseq.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
nseq.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -516,7 +526,8 @@ openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
|||||||
openssl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
openssl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
openssl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
openssl.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
openssl.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
openssl.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
openssl.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
openssl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
openssl.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||||
openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -539,7 +550,8 @@ passwd.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
|||||||
passwd.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
passwd.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||||
passwd.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
passwd.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
passwd.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
passwd.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
passwd.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
passwd.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
passwd.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
@@ -551,17 +563,17 @@ pkcs12.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
pkcs12.o: ../include/openssl/des.h ../include/openssl/dh.h
|
pkcs12.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
pkcs12.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
pkcs12.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
pkcs12.o: ../include/openssl/engine.h ../include/openssl/err.h
|
pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
pkcs12.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
pkcs12.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
pkcs12.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
pkcs12.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
pkcs12.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
pkcs12.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
pkcs12.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
pkcs12.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
pkcs12.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
pkcs12.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
pkcs12.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
pkcs12.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
pkcs12.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
|
pkcs12.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
|
||||||
pkcs12.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
|
||||||
pkcs12.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
pkcs12.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
pkcs12.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
pkcs12.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
pkcs12.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
pkcs12.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
pkcs12.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
pkcs12.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
pkcs12.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
pkcs12.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
pkcs12.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
@@ -573,16 +585,16 @@ pkcs7.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
pkcs7.o: ../include/openssl/des.h ../include/openssl/dh.h
|
pkcs7.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
pkcs7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
pkcs7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
pkcs7.o: ../include/openssl/engine.h ../include/openssl/err.h
|
pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
pkcs7.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
pkcs7.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
pkcs7.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
pkcs7.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
pkcs7.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
pkcs7.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
pkcs7.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
pkcs7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
pkcs7.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
pkcs7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
pkcs7.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
pkcs7.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
pkcs7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
pkcs7.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
pkcs7.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
pkcs7.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
pkcs7.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
pkcs7.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
pkcs7.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
pkcs7.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
pkcs7.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
pkcs7.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
pkcs7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
pkcs7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -594,17 +606,17 @@ pkcs8.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
pkcs8.o: ../include/openssl/des.h ../include/openssl/dh.h
|
pkcs8.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
pkcs8.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
pkcs8.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
pkcs8.o: ../include/openssl/engine.h ../include/openssl/err.h
|
pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
pkcs8.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
pkcs8.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
pkcs8.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
pkcs8.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
pkcs8.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
pkcs8.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
pkcs8.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
pkcs8.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
pkcs8.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
pkcs8.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
pkcs8.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
pkcs8.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
pkcs8.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h
|
pkcs8.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h
|
||||||
pkcs8.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
|
||||||
pkcs8.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
pkcs8.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
pkcs8.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
pkcs8.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
pkcs8.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
pkcs8.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
pkcs8.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
pkcs8.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
pkcs8.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
pkcs8.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
pkcs8.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
@@ -616,19 +628,20 @@ rand.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
rand.o: ../include/openssl/des.h ../include/openssl/dh.h
|
rand.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
rand.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
rand.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
rand.o: ../include/openssl/engine.h ../include/openssl/err.h
|
rand.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
rand.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
rand.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
rand.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
rand.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
rand.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
rand.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
rand.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
rand.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h
|
rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||||
rand.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
rand.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
rand.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
rand.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
rand.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
rand.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
rand.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
rand.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
rand.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
|
rand.o: ../include/openssl/x509_vfy.h apps.h
|
||||||
req.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
req.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||||
req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||||
req.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
req.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||||
@@ -636,16 +649,16 @@ req.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
req.o: ../include/openssl/des.h ../include/openssl/dh.h
|
req.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
req.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
req.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
req.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
req.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
req.o: ../include/openssl/engine.h ../include/openssl/err.h
|
req.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
req.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
req.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
req.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
req.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
req.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
req.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
req.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
req.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
req.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
req.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
req.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
req.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
req.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
req.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
req.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
req.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
req.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
req.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
req.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -658,16 +671,16 @@ rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
rsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
rsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
rsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
rsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
rsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
rsa.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
rsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
rsa.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
rsa.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
rsa.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
rsa.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
rsa.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
rsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
rsa.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
rsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
rsa.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
rsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
rsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
rsa.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
rsa.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
rsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
rsa.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
rsa.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
rsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
rsa.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
rsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
rsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -679,16 +692,16 @@ rsautl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
rsautl.o: ../include/openssl/des.h ../include/openssl/dh.h
|
rsautl.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
rsautl.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
rsautl.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
rsautl.o: ../include/openssl/engine.h ../include/openssl/err.h
|
rsautl.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
rsautl.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
rsautl.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
rsautl.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
rsautl.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
rsautl.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
rsautl.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
rsautl.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
rsautl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
rsautl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
rsautl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
rsautl.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
rsautl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
rsautl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
rsautl.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
rsautl.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
rsautl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
rsautl.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
rsautl.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
rsautl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
rsautl.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
rsautl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
rsautl.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
rsautl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
rsautl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -709,7 +722,8 @@ s_cb.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
|||||||
s_cb.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
s_cb.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
s_cb.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
s_cb.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
s_cb.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
s_cb.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
s_cb.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
s_cb.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
s_cb.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.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/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -723,17 +737,17 @@ s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
|||||||
s_client.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
s_client.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||||
s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||||
s_client.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
s_client.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||||
s_client.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
s_client.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||||
s_client.o: ../include/openssl/err.h ../include/openssl/evp.h
|
s_client.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||||
s_client.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
s_client.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||||
s_client.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
s_client.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
||||||
s_client.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
s_client.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
||||||
s_client.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
s_client.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||||
s_client.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
s_client.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
s_client.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
s_client.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
|
||||||
s_client.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
s_client.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
s_client.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
s_client.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
s_client.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
s_client.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
s_client.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
s_client.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||||
s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
s_client.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -748,17 +762,17 @@ s_server.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
|||||||
s_server.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
s_server.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||||
s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||||
s_server.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
s_server.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||||
s_server.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
s_server.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||||
s_server.o: ../include/openssl/err.h ../include/openssl/evp.h
|
s_server.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||||
s_server.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
s_server.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||||
s_server.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
s_server.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
||||||
s_server.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
s_server.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
||||||
s_server.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
s_server.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||||
s_server.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
s_server.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
s_server.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
s_server.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
|
||||||
s_server.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
s_server.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
s_server.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
s_server.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
s_server.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||||
s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -782,6 +796,7 @@ s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
|||||||
s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
s_socket.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
s_socket.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
s_socket.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
s_socket.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
s_socket.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.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/ssl.h ../include/openssl/ssl2.h
|
||||||
@@ -805,7 +820,8 @@ s_time.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
|||||||
s_time.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
s_time.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
s_time.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
s_time.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
s_time.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
s_time.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
s_time.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
s_time.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
s_time.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||||
s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -829,7 +845,8 @@ sess_id.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
|||||||
sess_id.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
sess_id.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||||
sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||||
sess_id.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
sess_id.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
sess_id.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
sess_id.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
sess_id.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
sess_id.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
sess_id.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||||
sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||||
@@ -843,16 +860,16 @@ smime.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
smime.o: ../include/openssl/des.h ../include/openssl/dh.h
|
smime.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
smime.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
smime.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
smime.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
smime.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
smime.o: ../include/openssl/engine.h ../include/openssl/err.h
|
smime.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
smime.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
smime.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
smime.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
smime.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
smime.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
smime.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
smime.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
smime.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
smime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
smime.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
smime.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
smime.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
smime.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
smime.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
smime.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
smime.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
smime.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
smime.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
smime.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
smime.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
smime.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
smime.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
smime.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
smime.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -864,20 +881,21 @@ speed.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
speed.o: ../include/openssl/des.h ../include/openssl/dh.h
|
speed.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
speed.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
speed.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
speed.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
speed.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
speed.o: ../include/openssl/engine.h ../include/openssl/err.h
|
speed.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h
|
speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h
|
||||||
speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
speed.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||||
speed.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
speed.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
||||||
speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
speed.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
||||||
speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
speed.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||||
speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
speed.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h
|
||||||
speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
||||||
speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
speed.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
speed.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
speed.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
speed.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
speed.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
speed.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
speed.o: ../include/openssl/x509_vfy.h ./testdsa.h ./testrsa.h apps.h
|
speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ./testdsa.h
|
||||||
|
speed.o: ./testrsa.h apps.h
|
||||||
spkac.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
spkac.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||||
spkac.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
spkac.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||||
spkac.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
spkac.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||||
@@ -885,16 +903,16 @@ spkac.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
spkac.o: ../include/openssl/des.h ../include/openssl/dh.h
|
spkac.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
spkac.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
spkac.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
spkac.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
spkac.o: ../include/openssl/engine.h ../include/openssl/err.h
|
spkac.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
spkac.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
spkac.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
spkac.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
spkac.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
spkac.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
spkac.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
spkac.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
spkac.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
spkac.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
spkac.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
spkac.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
spkac.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
spkac.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
spkac.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
spkac.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
spkac.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
spkac.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
spkac.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
spkac.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
spkac.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
spkac.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
spkac.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
spkac.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
spkac.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -906,16 +924,16 @@ verify.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
verify.o: ../include/openssl/des.h ../include/openssl/dh.h
|
verify.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
verify.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
verify.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
verify.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
verify.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
verify.o: ../include/openssl/engine.h ../include/openssl/err.h
|
verify.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
verify.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
verify.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
verify.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
verify.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
verify.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
verify.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
verify.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
verify.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
verify.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
verify.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
verify.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
verify.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
verify.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
verify.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
verify.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
verify.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
verify.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
verify.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
verify.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
verify.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
verify.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
verify.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
verify.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
verify.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
@@ -935,7 +953,8 @@ version.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
|||||||
version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||||
version.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h
|
version.o: ../include/openssl/opensslv.h ../include/openssl/pkcs7.h
|
||||||
version.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
version.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||||
version.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
version.o: ../include/openssl/rc5.h ../include/openssl/rijndael-alg-fst.h
|
||||||
|
version.o: ../include/openssl/rijndael.h ../include/openssl/ripemd.h
|
||||||
version.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
version.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||||
version.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
version.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||||
version.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
version.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||||
@@ -947,16 +966,16 @@ x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
|||||||
x509.o: ../include/openssl/des.h ../include/openssl/dh.h
|
x509.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||||
x509.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
x509.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||||
x509.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
x509.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||||
x509.o: ../include/openssl/engine.h ../include/openssl/err.h
|
x509.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||||
x509.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
x509.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||||
x509.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
x509.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||||
x509.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
x509.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||||
x509.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
x509.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||||
x509.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
x509.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||||
x509.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
x509.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||||
x509.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
x509.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h
|
||||||
x509.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
|
||||||
x509.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
x509.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||||
|
x509.o: ../include/openssl/rijndael-alg-fst.h ../include/openssl/rijndael.h
|
||||||
x509.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
x509.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||||
x509.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
x509.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||||
x509.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
x509.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||||
|
|||||||
@@ -142,18 +142,21 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn)
|
|||||||
}
|
}
|
||||||
if (file == NULL || !RAND_load_file(file, -1))
|
if (file == NULL || !RAND_load_file(file, -1))
|
||||||
{
|
{
|
||||||
if (RAND_status() == 0 && !dont_warn)
|
if (RAND_status() == 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_e,"unable to load 'random state'\n");
|
if (!dont_warn)
|
||||||
BIO_printf(bio_e,"This means that the random number generator has not been seeded\n");
|
|
||||||
BIO_printf(bio_e,"with much random data.\n");
|
|
||||||
if (consider_randfile) /* explanation does not apply when a file is explicitly named */
|
|
||||||
{
|
{
|
||||||
BIO_printf(bio_e,"Consider setting the RANDFILE environment variable to point at a file that\n");
|
BIO_printf(bio_e,"unable to load 'random state'\n");
|
||||||
BIO_printf(bio_e,"'random' data can be kept in (the file will be overwritten).\n");
|
BIO_printf(bio_e,"This means that the random number generator has not been seeded\n");
|
||||||
|
BIO_printf(bio_e,"with much random data.\n");
|
||||||
|
if (consider_randfile) /* explanation does not apply when a file is explicitly named */
|
||||||
|
{
|
||||||
|
BIO_printf(bio_e,"Consider setting the RANDFILE environment variable to point at a file that\n");
|
||||||
|
BIO_printf(bio_e,"'random' data can be kept in (the file will be overwritten).\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
seeded = 1;
|
seeded = 1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
59
apps/apps.c
59
apps/apps.c
@@ -74,6 +74,14 @@
|
|||||||
# include "bss_file.c"
|
# include "bss_file.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char *name;
|
||||||
|
unsigned long flag;
|
||||||
|
unsigned long mask;
|
||||||
|
} NAME_EX_TBL;
|
||||||
|
|
||||||
|
static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
|
||||||
|
|
||||||
int app_init(long mesgwin);
|
int app_init(long mesgwin);
|
||||||
#ifdef undef /* never finished - probably never will be :-) */
|
#ifdef undef /* never finished - probably never will be :-) */
|
||||||
int args_from_file(char *file, int *argc, char **argv[])
|
int args_from_file(char *file, int *argc, char **argv[])
|
||||||
@@ -170,8 +178,6 @@ int str2fmt(char *s)
|
|||||||
|| (strcmp(s,"PKCS12") == 0) || (strcmp(s,"pkcs12") == 0)
|
|| (strcmp(s,"PKCS12") == 0) || (strcmp(s,"pkcs12") == 0)
|
||||||
|| (strcmp(s,"P12") == 0) || (strcmp(s,"p12") == 0))
|
|| (strcmp(s,"P12") == 0) || (strcmp(s,"p12") == 0))
|
||||||
return(FORMAT_PKCS12);
|
return(FORMAT_PKCS12);
|
||||||
else if ((*s == 'E') || (*s == 'e'))
|
|
||||||
return(FORMAT_ENGINE);
|
|
||||||
else
|
else
|
||||||
return(FORMAT_UNDEF);
|
return(FORMAT_UNDEF);
|
||||||
}
|
}
|
||||||
@@ -696,16 +702,43 @@ end:
|
|||||||
return(othercerts);
|
return(othercerts);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char *name;
|
#define X509V3_EXT_UNKNOWN_MASK (0xfL << 16)
|
||||||
unsigned long flag;
|
/* Return error for unknown extensions */
|
||||||
unsigned long mask;
|
#define X509V3_EXT_DEFAULT 0
|
||||||
} NAME_EX_TBL;
|
/* Print error for unknown extensions */
|
||||||
|
#define X509V3_EXT_ERROR_UNKNOWN (1L << 16)
|
||||||
|
/* ASN1 parse unknown extensions */
|
||||||
|
#define X509V3_EXT_PARSE_UNKNOWN (2L << 16)
|
||||||
|
/* BIO_dump unknown extensions */
|
||||||
|
#define X509V3_EXT_DUMP_UNKNOWN (3L << 16)
|
||||||
|
|
||||||
|
int set_cert_ex(unsigned long *flags, const char *arg)
|
||||||
|
{
|
||||||
|
static const NAME_EX_TBL cert_tbl[] = {
|
||||||
|
{ "compatible", X509_FLAG_COMPAT, 0xffffffffl},
|
||||||
|
{ "no_header", X509_FLAG_NO_HEADER, 0},
|
||||||
|
{ "no_version", X509_FLAG_NO_VERSION, 0},
|
||||||
|
{ "no_serial", X509_FLAG_NO_SERIAL, 0},
|
||||||
|
{ "no_signame", X509_FLAG_NO_SIGNAME, 0},
|
||||||
|
{ "no_validity", X509_FLAG_NO_VALIDITY, 0},
|
||||||
|
{ "no_subject", X509_FLAG_NO_SUBJECT, 0},
|
||||||
|
{ "no_pubkey", X509_FLAG_NO_PUBKEY, 0},
|
||||||
|
{ "no_extensions", X509_FLAG_NO_EXTENSIONS, 0},
|
||||||
|
{ "no_sigdump", X509_FLAG_NO_SIGDUMP, 0},
|
||||||
|
{ "no_aux", X509_FLAG_NO_AUX, 0},
|
||||||
|
{ "ext_default", X509V3_EXT_DEFAULT, X509V3_EXT_UNKNOWN_MASK},
|
||||||
|
{ "ext_error", X509V3_EXT_ERROR_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
|
||||||
|
{ "ext_parse", X509V3_EXT_PARSE_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
|
||||||
|
{ "ext_dump", X509V3_EXT_DUMP_UNKNOWN, X509V3_EXT_UNKNOWN_MASK},
|
||||||
|
{ NULL, 0, 0}
|
||||||
|
};
|
||||||
|
return set_table_opts(flags, arg, cert_tbl);
|
||||||
|
}
|
||||||
|
|
||||||
int set_name_ex(unsigned long *flags, const char *arg)
|
int set_name_ex(unsigned long *flags, const char *arg)
|
||||||
{
|
{
|
||||||
char c;
|
static const NAME_EX_TBL ex_tbl[] = {
|
||||||
const NAME_EX_TBL *ptbl, ex_tbl[] = {
|
|
||||||
{ "esc_2253", ASN1_STRFLGS_ESC_2253, 0},
|
{ "esc_2253", ASN1_STRFLGS_ESC_2253, 0},
|
||||||
{ "esc_ctrl", ASN1_STRFLGS_ESC_CTRL, 0},
|
{ "esc_ctrl", ASN1_STRFLGS_ESC_CTRL, 0},
|
||||||
{ "esc_msb", ASN1_STRFLGS_ESC_MSB, 0},
|
{ "esc_msb", ASN1_STRFLGS_ESC_MSB, 0},
|
||||||
@@ -733,7 +766,13 @@ int set_name_ex(unsigned long *flags, const char *arg)
|
|||||||
{ "multiline", XN_FLAG_MULTILINE, 0xffffffffL},
|
{ "multiline", XN_FLAG_MULTILINE, 0xffffffffL},
|
||||||
{ NULL, 0, 0}
|
{ NULL, 0, 0}
|
||||||
};
|
};
|
||||||
|
return set_table_opts(flags, arg, ex_tbl);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl)
|
||||||
|
{
|
||||||
|
char c;
|
||||||
|
const NAME_EX_TBL *ptbl;
|
||||||
c = arg[0];
|
c = arg[0];
|
||||||
|
|
||||||
if(c == '-') {
|
if(c == '-') {
|
||||||
@@ -744,7 +783,7 @@ int set_name_ex(unsigned long *flags, const char *arg)
|
|||||||
arg++;
|
arg++;
|
||||||
} else c = 1;
|
} else c = 1;
|
||||||
|
|
||||||
for(ptbl = ex_tbl; ptbl->name; ptbl++) {
|
for(ptbl = in_tbl; ptbl->name; ptbl++) {
|
||||||
if(!strcmp(arg, ptbl->name)) {
|
if(!strcmp(arg, ptbl->name)) {
|
||||||
*flags &= ~ptbl->mask;
|
*flags &= ~ptbl->mask;
|
||||||
if(c) *flags |= ptbl->flag;
|
if(c) *flags |= ptbl->flag;
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]);
|
|||||||
int dump_cert_text(BIO *out, X509 *x);
|
int dump_cert_text(BIO *out, X509 *x);
|
||||||
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags);
|
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags);
|
||||||
#endif
|
#endif
|
||||||
|
int set_cert_ex(unsigned long *flags, const char *arg);
|
||||||
int set_name_ex(unsigned long *flags, const char *arg);
|
int set_name_ex(unsigned long *flags, const char *arg);
|
||||||
int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
|
int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
|
||||||
int add_oid_section(BIO *err, LHASH *conf);
|
int add_oid_section(BIO *err, LHASH *conf);
|
||||||
@@ -162,8 +163,6 @@ STACK_OF(X509) *load_certs(BIO *err, char *file, int format);
|
|||||||
#define FORMAT_NETSCAPE 4
|
#define FORMAT_NETSCAPE 4
|
||||||
#define FORMAT_PKCS12 5
|
#define FORMAT_PKCS12 5
|
||||||
#define FORMAT_SMIME 6
|
#define FORMAT_SMIME 6
|
||||||
/* Since this is currently inofficial, let's give it a high number */
|
|
||||||
#define FORMAT_ENGINE 127
|
|
||||||
|
|
||||||
#define NETSCAPE_CERT_HDR "certificate"
|
#define NETSCAPE_CERT_HDR "certificate"
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
05
|
07
|
||||||
|
|||||||
27
apps/ca.c
27
apps/ca.c
@@ -74,7 +74,6 @@
|
|||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#ifndef W_OK
|
#ifndef W_OK
|
||||||
# ifdef VMS
|
# ifdef VMS
|
||||||
@@ -168,7 +167,6 @@ static char *ca_usage[]={
|
|||||||
" -revoke file - Revoke a certificate (given in file)\n",
|
" -revoke file - Revoke a certificate (given in file)\n",
|
||||||
" -extensions .. - Extension section (override value in config file)\n",
|
" -extensions .. - Extension section (override value in config file)\n",
|
||||||
" -crlexts .. - CRL extension section (override value in config file)\n",
|
" -crlexts .. - CRL extension section (override value in config file)\n",
|
||||||
" -engine e - use engine e, possibly a hardware device.\n",
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -218,7 +216,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
char *key=NULL,*passargin=NULL;
|
char *key=NULL,*passargin=NULL;
|
||||||
int total=0;
|
int total=0;
|
||||||
int total_done=0;
|
int total_done=0;
|
||||||
@@ -271,7 +268,6 @@ int MAIN(int argc, char **argv)
|
|||||||
#define BSIZE 256
|
#define BSIZE 256
|
||||||
MS_STATIC char buf[3][BSIZE];
|
MS_STATIC char buf[3][BSIZE];
|
||||||
char *randfile=NULL;
|
char *randfile=NULL;
|
||||||
char *engine = NULL;
|
|
||||||
|
|
||||||
#ifdef EFENCE
|
#ifdef EFENCE
|
||||||
EF_PROTECT_FREE=1;
|
EF_PROTECT_FREE=1;
|
||||||
@@ -423,11 +419,6 @@ EF_ALIGNMENT=0;
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
crl_ext= *(++argv);
|
crl_ext= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bad:
|
bad:
|
||||||
@@ -448,24 +439,6 @@ bad:
|
|||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
|
if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
|
||||||
if (configfile == NULL) configfile = getenv("SSLEAY_CONF");
|
if (configfile == NULL) configfile = getenv("SSLEAY_CONF");
|
||||||
|
|||||||
27
apps/dgst.c
27
apps/dgst.c
@@ -66,7 +66,6 @@
|
|||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef BUFSIZE
|
#undef BUFSIZE
|
||||||
#define BUFSIZE 1024*8
|
#define BUFSIZE 1024*8
|
||||||
@@ -81,7 +80,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
unsigned char *buf=NULL;
|
unsigned char *buf=NULL;
|
||||||
int i,err=0;
|
int i,err=0;
|
||||||
const EVP_MD *md=NULL,*m;
|
const EVP_MD *md=NULL,*m;
|
||||||
@@ -99,7 +97,6 @@ int MAIN(int argc, char **argv)
|
|||||||
EVP_PKEY *sigkey = NULL;
|
EVP_PKEY *sigkey = NULL;
|
||||||
unsigned char *sigbuf = NULL;
|
unsigned char *sigbuf = NULL;
|
||||||
int siglen = 0;
|
int siglen = 0;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -157,11 +154,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) break;
|
if (--argc < 1) break;
|
||||||
sigfile=*(++argv);
|
sigfile=*(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) break;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-hex") == 0)
|
else if (strcmp(*argv,"-hex") == 0)
|
||||||
out_bin = 0;
|
out_bin = 0;
|
||||||
else if (strcmp(*argv,"-binary") == 0)
|
else if (strcmp(*argv,"-binary") == 0)
|
||||||
@@ -198,7 +190,6 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err,"-prverify file verify a signature using private key in file\n");
|
BIO_printf(bio_err,"-prverify file verify a signature using private key in file\n");
|
||||||
BIO_printf(bio_err,"-signature file signature to verify\n");
|
BIO_printf(bio_err,"-signature file signature to verify\n");
|
||||||
BIO_printf(bio_err,"-binary output in binary form\n");
|
BIO_printf(bio_err,"-binary output in binary form\n");
|
||||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
|
||||||
|
|
||||||
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
|
BIO_printf(bio_err,"-%3s to use the %s message digest algorithm (default)\n",
|
||||||
LN_md5,LN_md5);
|
LN_md5,LN_md5);
|
||||||
@@ -218,24 +209,6 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
in=BIO_new(BIO_s_file());
|
in=BIO_new(BIO_s_file());
|
||||||
bmd=BIO_new(BIO_f_md());
|
bmd=BIO_new(BIO_f_md());
|
||||||
if (debug)
|
if (debug)
|
||||||
|
|||||||
29
apps/dh.c
29
apps/dh.c
@@ -69,7 +69,6 @@
|
|||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG dh_main
|
#define PROG dh_main
|
||||||
@@ -88,12 +87,11 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
DH *dh=NULL;
|
DH *dh=NULL;
|
||||||
int i,badops=0,text=0;
|
int i,badops=0,text=0;
|
||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
||||||
char *infile,*outfile,*prog,*engine;
|
char *infile,*outfile,*prog;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -101,7 +99,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
engine=NULL;
|
|
||||||
infile=NULL;
|
infile=NULL;
|
||||||
outfile=NULL;
|
outfile=NULL;
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
@@ -132,11 +129,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
outfile= *(++argv);
|
outfile= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-check") == 0)
|
else if (strcmp(*argv,"-check") == 0)
|
||||||
check=1;
|
check=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
@@ -168,30 +160,11 @@ bad:
|
|||||||
BIO_printf(bio_err," -text print a text form of the DH parameters\n");
|
BIO_printf(bio_err," -text print a text form of the DH parameters\n");
|
||||||
BIO_printf(bio_err," -C Output C code\n");
|
BIO_printf(bio_err," -C Output C code\n");
|
||||||
BIO_printf(bio_err," -noout no output\n");
|
BIO_printf(bio_err," -noout no output\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
in=BIO_new(BIO_s_file());
|
in=BIO_new(BIO_s_file());
|
||||||
out=BIO_new(BIO_s_file());
|
out=BIO_new(BIO_s_file());
|
||||||
if ((in == NULL) || (out == NULL))
|
if ((in == NULL) || (out == NULL))
|
||||||
|
|||||||
@@ -121,7 +121,6 @@
|
|||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#ifndef NO_DSA
|
#ifndef NO_DSA
|
||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
@@ -149,7 +148,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
DH *dh=NULL;
|
DH *dh=NULL;
|
||||||
int i,badops=0,text=0;
|
int i,badops=0,text=0;
|
||||||
#ifndef NO_DSA
|
#ifndef NO_DSA
|
||||||
@@ -158,7 +156,7 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
int informat,outformat,check=0,noout=0,C=0,ret=1;
|
||||||
char *infile,*outfile,*prog;
|
char *infile,*outfile,*prog;
|
||||||
char *inrand=NULL,*engine=NULL;
|
char *inrand=NULL;
|
||||||
int num = 0, g = 0;
|
int num = 0, g = 0;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
@@ -197,11 +195,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
outfile= *(++argv);
|
outfile= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-check") == 0)
|
else if (strcmp(*argv,"-check") == 0)
|
||||||
check=1;
|
check=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
@@ -247,7 +240,6 @@ bad:
|
|||||||
BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n");
|
BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n");
|
||||||
BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n");
|
BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n");
|
||||||
BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n");
|
BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
@@ -257,24 +249,6 @@ bad:
|
|||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g && !num)
|
if (g && !num)
|
||||||
num = DEFBITS;
|
num = DEFBITS;
|
||||||
|
|
||||||
|
|||||||
29
apps/dsa.c
29
apps/dsa.c
@@ -68,7 +68,6 @@
|
|||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG dsa_main
|
#define PROG dsa_main
|
||||||
@@ -88,7 +87,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int ret=1;
|
int ret=1;
|
||||||
DSA *dsa=NULL;
|
DSA *dsa=NULL;
|
||||||
int i,badops=0;
|
int i,badops=0;
|
||||||
@@ -96,7 +94,7 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,text=0,noout=0;
|
int informat,outformat,text=0,noout=0;
|
||||||
int pubin = 0, pubout = 0;
|
int pubin = 0, pubout = 0;
|
||||||
char *infile,*outfile,*prog,*engine;
|
char *infile,*outfile,*prog;
|
||||||
char *passargin = NULL, *passargout = NULL;
|
char *passargin = NULL, *passargout = NULL;
|
||||||
char *passin = NULL, *passout = NULL;
|
char *passin = NULL, *passout = NULL;
|
||||||
int modulus=0;
|
int modulus=0;
|
||||||
@@ -107,7 +105,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
|
|
||||||
engine=NULL;
|
|
||||||
infile=NULL;
|
infile=NULL;
|
||||||
outfile=NULL;
|
outfile=NULL;
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
@@ -148,11 +145,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passargout= *(++argv);
|
passargout= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-noout") == 0)
|
else if (strcmp(*argv,"-noout") == 0)
|
||||||
noout=1;
|
noout=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
@@ -184,7 +176,6 @@ bad:
|
|||||||
BIO_printf(bio_err," -passin arg input file pass phrase source\n");
|
BIO_printf(bio_err," -passin arg input file pass phrase source\n");
|
||||||
BIO_printf(bio_err," -out arg output file\n");
|
BIO_printf(bio_err," -out arg output file\n");
|
||||||
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err," -des encrypt PEM output with cbc des\n");
|
BIO_printf(bio_err," -des encrypt PEM output with cbc des\n");
|
||||||
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
|
||||||
#ifndef NO_IDEA
|
#ifndef NO_IDEA
|
||||||
@@ -198,24 +189,6 @@ bad:
|
|||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting passwords\n");
|
BIO_printf(bio_err, "Error getting passwords\n");
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
@@ -69,7 +69,6 @@
|
|||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG dsaparam_main
|
#define PROG dsaparam_main
|
||||||
@@ -91,12 +90,11 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
DSA *dsa=NULL;
|
DSA *dsa=NULL;
|
||||||
int i,badops=0,text=0;
|
int i,badops=0,text=0;
|
||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,noout=0,C=0,ret=1;
|
int informat,outformat,noout=0,C=0,ret=1;
|
||||||
char *infile,*outfile,*prog,*inrand=NULL,*engine=NULL;
|
char *infile,*outfile,*prog,*inrand=NULL;
|
||||||
int numbits= -1,num,genkey=0;
|
int numbits= -1,num,genkey=0;
|
||||||
int need_rand=0;
|
int need_rand=0;
|
||||||
|
|
||||||
|
|||||||
32
apps/enc.c
32
apps/enc.c
@@ -70,7 +70,6 @@
|
|||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
#endif
|
#endif
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
int set_hex(char *in,unsigned char *out,int size);
|
int set_hex(char *in,unsigned char *out,int size);
|
||||||
#undef SIZE
|
#undef SIZE
|
||||||
@@ -85,7 +84,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
static const char magic[]="Salted__";
|
static const char magic[]="Salted__";
|
||||||
char mbuf[8]; /* should be 1 smaller than magic */
|
char mbuf[8]; /* should be 1 smaller than magic */
|
||||||
char *strbuf=NULL;
|
char *strbuf=NULL;
|
||||||
@@ -103,7 +101,6 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
|
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
|
||||||
#define PROG_NAME_SIZE 16
|
#define PROG_NAME_SIZE 16
|
||||||
char pname[PROG_NAME_SIZE];
|
char pname[PROG_NAME_SIZE];
|
||||||
char *engine = NULL;
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -144,11 +141,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passarg= *(++argv);
|
passarg= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-d") == 0)
|
else if (strcmp(*argv,"-d") == 0)
|
||||||
enc=0;
|
enc=0;
|
||||||
else if (strcmp(*argv,"-p") == 0)
|
else if (strcmp(*argv,"-p") == 0)
|
||||||
@@ -249,7 +241,6 @@ bad:
|
|||||||
BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
|
BIO_printf(bio_err,"%-14s key/iv in hex is the next argument\n","-K/-iv");
|
||||||
BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]");
|
BIO_printf(bio_err,"%-14s print the iv/key (then exit if -P)\n","-[pP]");
|
||||||
BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
|
BIO_printf(bio_err,"%-14s buffer size\n","-bufsize <n>");
|
||||||
BIO_printf(bio_err,"%-14s use engine e, possibly a hardware device.\n","-engine e");
|
|
||||||
|
|
||||||
BIO_printf(bio_err,"Cipher Types\n");
|
BIO_printf(bio_err,"Cipher Types\n");
|
||||||
BIO_printf(bio_err,"des : 56 bit key DES encryption\n");
|
BIO_printf(bio_err,"des : 56 bit key DES encryption\n");
|
||||||
@@ -317,30 +308,17 @@ bad:
|
|||||||
LN_rc5_cfb64, LN_rc5_ofb64);
|
LN_rc5_cfb64, LN_rc5_ofb64);
|
||||||
BIO_printf(bio_err," -%-4s (%s)\n","rc5", LN_rc5_cbc);
|
BIO_printf(bio_err," -%-4s (%s)\n","rc5", LN_rc5_cbc);
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef NO_RIJNDAEL
|
||||||
|
BIO_printf(bio_err," -%-12s -%-12s -%-12s -%-12s\n",
|
||||||
|
LN_rijndael_ecb_k128_b128,"","","","");
|
||||||
|
#endif
|
||||||
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bufsize != NULL)
|
if (bufsize != NULL)
|
||||||
{
|
{
|
||||||
unsigned long n;
|
unsigned long n;
|
||||||
|
|||||||
33
apps/gendh.c
33
apps/gendh.c
@@ -70,7 +70,6 @@
|
|||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#define DEFBITS 512
|
#define DEFBITS 512
|
||||||
#undef PROG
|
#undef PROG
|
||||||
@@ -82,13 +81,11 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
DH *dh=NULL;
|
DH *dh=NULL;
|
||||||
int ret=1,num=DEFBITS;
|
int ret=1,num=DEFBITS;
|
||||||
int g=2;
|
int g=2;
|
||||||
char *outfile=NULL;
|
char *outfile=NULL;
|
||||||
char *inrand=NULL;
|
char *inrand=NULL;
|
||||||
char *engine=NULL;
|
|
||||||
BIO *out=NULL;
|
BIO *out=NULL;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
@@ -113,11 +110,6 @@ int MAIN(int argc, char **argv)
|
|||||||
g=3; */
|
g=3; */
|
||||||
else if (strcmp(*argv,"-5") == 0)
|
else if (strcmp(*argv,"-5") == 0)
|
||||||
g=5;
|
g=5;
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -133,34 +125,15 @@ int MAIN(int argc, char **argv)
|
|||||||
bad:
|
bad:
|
||||||
BIO_printf(bio_err,"usage: gendh [args] [numbits]\n");
|
BIO_printf(bio_err,"usage: gendh [args] [numbits]\n");
|
||||||
BIO_printf(bio_err," -out file - output the key to 'file\n");
|
BIO_printf(bio_err," -out file - output the key to 'file\n");
|
||||||
BIO_printf(bio_err," -2 - use 2 as the generator value\n");
|
BIO_printf(bio_err," -2 use 2 as the generator value\n");
|
||||||
/* BIO_printf(bio_err," -3 - use 3 as the generator value\n"); */
|
/* BIO_printf(bio_err," -3 use 3 as the generator value\n"); */
|
||||||
BIO_printf(bio_err," -5 - use 5 as the generator value\n");
|
BIO_printf(bio_err," -5 use 5 as the generator value\n");
|
||||||
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
out=BIO_new(BIO_s_file());
|
out=BIO_new(BIO_s_file());
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,6 @@
|
|||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#define DEFBITS 512
|
#define DEFBITS 512
|
||||||
#undef PROG
|
#undef PROG
|
||||||
@@ -78,7 +77,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
DSA *dsa=NULL;
|
DSA *dsa=NULL;
|
||||||
int ret=1;
|
int ret=1;
|
||||||
char *outfile=NULL;
|
char *outfile=NULL;
|
||||||
@@ -86,7 +84,6 @@ int MAIN(int argc, char **argv)
|
|||||||
char *passargout = NULL, *passout = NULL;
|
char *passargout = NULL, *passout = NULL;
|
||||||
BIO *out=NULL,*in=NULL;
|
BIO *out=NULL,*in=NULL;
|
||||||
EVP_CIPHER *enc=NULL;
|
EVP_CIPHER *enc=NULL;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -109,11 +106,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passargout= *(++argv);
|
passargout= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -153,7 +145,6 @@ bad:
|
|||||||
#ifndef NO_IDEA
|
#ifndef NO_IDEA
|
||||||
BIO_printf(bio_err," -idea - encrypt the generated key with IDEA in cbc mode\n");
|
BIO_printf(bio_err," -idea - encrypt the generated key with IDEA in cbc mode\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," - load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
@@ -162,24 +153,6 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
|
if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting password\n");
|
BIO_printf(bio_err, "Error getting password\n");
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
@@ -69,7 +69,6 @@
|
|||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#define DEFBITS 512
|
#define DEFBITS 512
|
||||||
#undef PROG
|
#undef PROG
|
||||||
@@ -81,7 +80,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int ret=1;
|
int ret=1;
|
||||||
RSA *rsa=NULL;
|
RSA *rsa=NULL;
|
||||||
int i,num=DEFBITS;
|
int i,num=DEFBITS;
|
||||||
@@ -90,7 +88,6 @@ int MAIN(int argc, char **argv)
|
|||||||
unsigned long f4=RSA_F4;
|
unsigned long f4=RSA_F4;
|
||||||
char *outfile=NULL;
|
char *outfile=NULL;
|
||||||
char *passargout = NULL, *passout = NULL;
|
char *passargout = NULL, *passout = NULL;
|
||||||
char *engine=NULL;
|
|
||||||
char *inrand=NULL;
|
char *inrand=NULL;
|
||||||
BIO *out=NULL;
|
BIO *out=NULL;
|
||||||
|
|
||||||
@@ -119,11 +116,6 @@ int MAIN(int argc, char **argv)
|
|||||||
f4=3;
|
f4=3;
|
||||||
else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
|
else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
|
||||||
f4=RSA_F4;
|
f4=RSA_F4;
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-rand") == 0)
|
else if (strcmp(*argv,"-rand") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -162,7 +154,6 @@ bad:
|
|||||||
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
|
||||||
BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n");
|
BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n");
|
||||||
BIO_printf(bio_err," -3 use 3 for the E value\n");
|
BIO_printf(bio_err," -3 use 3 for the E value\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err," load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err," load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err," the random number generator\n");
|
BIO_printf(bio_err," the random number generator\n");
|
||||||
@@ -176,24 +167,6 @@ bad:
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
@@ -213,8 +186,7 @@ bad:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL
|
if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL)
|
||||||
&& !RAND_status())
|
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"warning, not much extra random data, consider using the -rand option\n");
|
BIO_printf(bio_err,"warning, not much extra random data, consider using the -rand option\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
01
|
07
|
||||||
|
|||||||
@@ -66,7 +66,6 @@
|
|||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/pkcs12.h>
|
#include <openssl/pkcs12.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#define PROG pkcs12_main
|
#define PROG pkcs12_main
|
||||||
|
|
||||||
@@ -93,7 +92,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
char *infile=NULL, *outfile=NULL, *keyname = NULL;
|
char *infile=NULL, *outfile=NULL, *keyname = NULL;
|
||||||
char *certfile=NULL;
|
char *certfile=NULL;
|
||||||
BIO *in=NULL, *out = NULL, *inkey = NULL, *certsin = NULL;
|
BIO *in=NULL, *out = NULL, *inkey = NULL, *certsin = NULL;
|
||||||
@@ -120,7 +118,6 @@ int MAIN(int argc, char **argv)
|
|||||||
char *passin = NULL, *passout = NULL;
|
char *passin = NULL, *passout = NULL;
|
||||||
char *inrand = NULL;
|
char *inrand = NULL;
|
||||||
char *CApath = NULL, *CAfile = NULL;
|
char *CApath = NULL, *CAfile = NULL;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -239,11 +236,6 @@ int MAIN(int argc, char **argv)
|
|||||||
args++;
|
args++;
|
||||||
CAfile = *args;
|
CAfile = *args;
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
} else if (!strcmp(*args,"-engine")) {
|
|
||||||
if (args[1]) {
|
|
||||||
args++;
|
|
||||||
engine = *args;
|
|
||||||
} else badarg = 1;
|
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
|
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
@@ -287,27 +279,12 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-password p set import/export password source\n");
|
BIO_printf (bio_err, "-password p set import/export password source\n");
|
||||||
BIO_printf (bio_err, "-passin p input file pass phrase source\n");
|
BIO_printf (bio_err, "-passin p input file pass phrase source\n");
|
||||||
BIO_printf (bio_err, "-passout p output file pass phrase source\n");
|
BIO_printf (bio_err, "-passout p output file pass phrase source\n");
|
||||||
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err, " the random number generator\n");
|
BIO_printf(bio_err, " the random number generator\n");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL) {
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL) {
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n", engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(passarg) {
|
if(passarg) {
|
||||||
if(export_cert) passargout = passarg;
|
if(export_cert) passargout = passarg;
|
||||||
else passargin = passarg;
|
else passargin = passarg;
|
||||||
|
|||||||
27
apps/pkcs7.c
27
apps/pkcs7.c
@@ -67,7 +67,6 @@
|
|||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pkcs7.h>
|
#include <openssl/pkcs7.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG pkcs7_main
|
#define PROG pkcs7_main
|
||||||
@@ -83,7 +82,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
PKCS7 *p7=NULL;
|
PKCS7 *p7=NULL;
|
||||||
int i,badops=0;
|
int i,badops=0;
|
||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
@@ -91,7 +89,6 @@ int MAIN(int argc, char **argv)
|
|||||||
char *infile,*outfile,*prog;
|
char *infile,*outfile,*prog;
|
||||||
int print_certs=0,text=0,noout=0;
|
int print_certs=0,text=0,noout=0;
|
||||||
int ret=0;
|
int ret=0;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -135,11 +132,6 @@ int MAIN(int argc, char **argv)
|
|||||||
text=1;
|
text=1;
|
||||||
else if (strcmp(*argv,"-print_certs") == 0)
|
else if (strcmp(*argv,"-print_certs") == 0)
|
||||||
print_certs=1;
|
print_certs=1;
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||||
@@ -162,30 +154,11 @@ bad:
|
|||||||
BIO_printf(bio_err," -print_certs print any certs or crl in the input\n");
|
BIO_printf(bio_err," -print_certs print any certs or crl in the input\n");
|
||||||
BIO_printf(bio_err," -text print full details of certificates\n");
|
BIO_printf(bio_err," -text print full details of certificates\n");
|
||||||
BIO_printf(bio_err," -noout don't output encoded data\n");
|
BIO_printf(bio_err," -noout don't output encoded data\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
EXIT(1);
|
EXIT(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
in=BIO_new(BIO_s_file());
|
in=BIO_new(BIO_s_file());
|
||||||
out=BIO_new(BIO_s_file());
|
out=BIO_new(BIO_s_file());
|
||||||
if ((in == NULL) || (out == NULL))
|
if ((in == NULL) || (out == NULL))
|
||||||
|
|||||||
30
apps/pkcs8.c
30
apps/pkcs8.c
@@ -62,7 +62,6 @@
|
|||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/pkcs12.h>
|
#include <openssl/pkcs12.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#include "apps.h"
|
#include "apps.h"
|
||||||
#define PROG pkcs8_main
|
#define PROG pkcs8_main
|
||||||
@@ -71,7 +70,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
char **args, *infile = NULL, *outfile = NULL;
|
char **args, *infile = NULL, *outfile = NULL;
|
||||||
char *passargin = NULL, *passargout = NULL;
|
char *passargin = NULL, *passargout = NULL;
|
||||||
BIO *in = NULL, *out = NULL;
|
BIO *in = NULL, *out = NULL;
|
||||||
@@ -87,13 +85,9 @@ int MAIN(int argc, char **argv)
|
|||||||
EVP_PKEY *pkey;
|
EVP_PKEY *pkey;
|
||||||
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
|
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
|
||||||
int badarg = 0;
|
int badarg = 0;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
if (bio_err == NULL) bio_err = BIO_new_fp (stderr, BIO_NOCLOSE);
|
||||||
|
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
outformat=FORMAT_PEM;
|
outformat=FORMAT_PEM;
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
OpenSSL_add_all_algorithms();
|
OpenSSL_add_all_algorithms();
|
||||||
args = argv + 1;
|
args = argv + 1;
|
||||||
@@ -144,11 +138,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (!args[1]) goto bad;
|
if (!args[1]) goto bad;
|
||||||
passargout= *(++args);
|
passargout= *(++args);
|
||||||
}
|
}
|
||||||
else if (strcmp(*args,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (!args[1]) goto bad;
|
|
||||||
engine= *(++args);
|
|
||||||
}
|
|
||||||
else if (!strcmp (*args, "-in")) {
|
else if (!strcmp (*args, "-in")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
args++;
|
args++;
|
||||||
@@ -181,28 +170,9 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n");
|
BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n");
|
||||||
BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n");
|
BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n");
|
||||||
BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n");
|
BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting passwords\n");
|
BIO_printf(bio_err, "Error getting passwords\n");
|
||||||
return (1);
|
return (1);
|
||||||
|
|||||||
35
apps/rand.c
35
apps/rand.c
@@ -9,7 +9,6 @@
|
|||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG rand_main
|
#define PROG rand_main
|
||||||
@@ -24,7 +23,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int i, r, ret = 1;
|
int i, r, ret = 1;
|
||||||
int badopt;
|
int badopt;
|
||||||
char *outfile = NULL;
|
char *outfile = NULL;
|
||||||
@@ -32,7 +30,6 @@ int MAIN(int argc, char **argv)
|
|||||||
int base64 = 0;
|
int base64 = 0;
|
||||||
BIO *out = NULL;
|
BIO *out = NULL;
|
||||||
int num = -1;
|
int num = -1;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -51,13 +48,6 @@ int MAIN(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
badopt = 1;
|
badopt = 1;
|
||||||
}
|
}
|
||||||
if (strcmp(argv[i], "-engine") == 0)
|
|
||||||
{
|
|
||||||
if ((argv[i+1] != NULL) && (engine == NULL))
|
|
||||||
engine = argv[++i];
|
|
||||||
else
|
|
||||||
badopt = 1;
|
|
||||||
}
|
|
||||||
else if (strcmp(argv[i], "-rand") == 0)
|
else if (strcmp(argv[i], "-rand") == 0)
|
||||||
{
|
{
|
||||||
if ((argv[i+1] != NULL) && (inrand == NULL))
|
if ((argv[i+1] != NULL) && (inrand == NULL))
|
||||||
@@ -94,31 +84,12 @@ int MAIN(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
BIO_printf(bio_err, "Usage: rand [options] num\n");
|
BIO_printf(bio_err, "Usage: rand [options] num\n");
|
||||||
BIO_printf(bio_err, "where options are\n");
|
BIO_printf(bio_err, "where options are\n");
|
||||||
BIO_printf(bio_err, "-out file - write to file\n");
|
BIO_printf(bio_err, "-out file - write to file\n");
|
||||||
BIO_printf(bio_err," -engine e - use engine e, possibly a hardware device.\n");
|
BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err, "-base64 - encode output\n");
|
||||||
BIO_printf(bio_err, "-base64 - encode output\n");
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
|
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
|
||||||
if (inrand != NULL)
|
if (inrand != NULL)
|
||||||
BIO_printf(bio_err,"%ld semi-random bytes loaded\n",
|
BIO_printf(bio_err,"%ld semi-random bytes loaded\n",
|
||||||
|
|||||||
84
apps/req.c
84
apps/req.c
@@ -73,7 +73,6 @@
|
|||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#define SECTION "req"
|
#define SECTION "req"
|
||||||
|
|
||||||
@@ -141,10 +140,10 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
#ifndef NO_DSA
|
#ifndef NO_DSA
|
||||||
DSA *dsa_params=NULL;
|
DSA *dsa_params=NULL;
|
||||||
#endif
|
#endif
|
||||||
|
unsigned long nmflag = 0;
|
||||||
int ex=1,x509=0,days=30;
|
int ex=1,x509=0,days=30;
|
||||||
X509 *x509ss=NULL;
|
X509 *x509ss=NULL;
|
||||||
X509_REQ *req=NULL;
|
X509_REQ *req=NULL;
|
||||||
@@ -152,9 +151,8 @@ int MAIN(int argc, char **argv)
|
|||||||
int i,badops=0,newreq=0,newkey= -1,pkey_type=0;
|
int i,badops=0,newreq=0,newkey= -1,pkey_type=0;
|
||||||
BIO *in=NULL,*out=NULL;
|
BIO *in=NULL,*out=NULL;
|
||||||
int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
|
int informat,outformat,verify=0,noout=0,text=0,keyform=FORMAT_PEM;
|
||||||
int nodes=0,kludge=0,newhdr=0;
|
int nodes=0,kludge=0,newhdr=0,subject=0;
|
||||||
char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
|
char *infile,*outfile,*prog,*keyfile=NULL,*template=NULL,*keyout=NULL;
|
||||||
char *engine=NULL;
|
|
||||||
char *extensions = NULL;
|
char *extensions = NULL;
|
||||||
char *req_exts = NULL;
|
char *req_exts = NULL;
|
||||||
EVP_CIPHER *cipher=NULL;
|
EVP_CIPHER *cipher=NULL;
|
||||||
@@ -198,11 +196,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
outformat=str2fmt(*(++argv));
|
outformat=str2fmt(*(++argv));
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-key") == 0)
|
else if (strcmp(*argv,"-key") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -330,6 +323,13 @@ int MAIN(int argc, char **argv)
|
|||||||
nodes=1;
|
nodes=1;
|
||||||
else if (strcmp(*argv,"-noout") == 0)
|
else if (strcmp(*argv,"-noout") == 0)
|
||||||
noout=1;
|
noout=1;
|
||||||
|
else if (strcmp(*argv,"-nameopt") == 0)
|
||||||
|
{
|
||||||
|
if (--argc < 1) goto bad;
|
||||||
|
if (!set_name_ex(&nmflag, *(++argv))) goto bad;
|
||||||
|
}
|
||||||
|
else if (strcmp(*argv,"-subject") == 0)
|
||||||
|
subject=1;
|
||||||
else if (strcmp(*argv,"-text") == 0)
|
else if (strcmp(*argv,"-text") == 0)
|
||||||
text=1;
|
text=1;
|
||||||
else if (strcmp(*argv,"-x509") == 0)
|
else if (strcmp(*argv,"-x509") == 0)
|
||||||
@@ -383,7 +383,6 @@ bad:
|
|||||||
BIO_printf(bio_err," -verify verify signature on REQ\n");
|
BIO_printf(bio_err," -verify verify signature on REQ\n");
|
||||||
BIO_printf(bio_err," -modulus RSA modulus\n");
|
BIO_printf(bio_err," -modulus RSA modulus\n");
|
||||||
BIO_printf(bio_err," -nodes don't encrypt the output key\n");
|
BIO_printf(bio_err," -nodes don't encrypt the output key\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err," -key file use the private key contained in file\n");
|
BIO_printf(bio_err," -key file use the private key contained in file\n");
|
||||||
BIO_printf(bio_err," -keyform arg key file format\n");
|
BIO_printf(bio_err," -keyform arg key file format\n");
|
||||||
BIO_printf(bio_err," -keyout arg file to send the key to\n");
|
BIO_printf(bio_err," -keyout arg file to send the key to\n");
|
||||||
@@ -531,55 +530,24 @@ bad:
|
|||||||
if ((in == NULL) || (out == NULL))
|
if ((in == NULL) || (out == NULL))
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyfile != NULL)
|
if (keyfile != NULL)
|
||||||
{
|
{
|
||||||
if (keyform == FORMAT_ENGINE)
|
if (BIO_read_filename(in,keyfile) <= 0)
|
||||||
{
|
{
|
||||||
if (!e)
|
perror(keyfile);
|
||||||
{
|
goto end;
|
||||||
BIO_printf(bio_err,"no engine specified\n");
|
}
|
||||||
goto end;
|
|
||||||
}
|
if (keyform == FORMAT_ASN1)
|
||||||
pkey = ENGINE_load_private_key(e, keyfile, NULL);
|
pkey=d2i_PrivateKey_bio(in,NULL);
|
||||||
|
else if (keyform == FORMAT_PEM)
|
||||||
|
{
|
||||||
|
pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,passin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (BIO_read_filename(in,keyfile) <= 0)
|
BIO_printf(bio_err,"bad input format specified for X509 request\n");
|
||||||
{
|
goto end;
|
||||||
perror(keyfile);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyform == FORMAT_ASN1)
|
|
||||||
pkey=d2i_PrivateKey_bio(in,NULL);
|
|
||||||
else if (keyform == FORMAT_PEM)
|
|
||||||
{
|
|
||||||
pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,
|
|
||||||
passin);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"bad input format specified for X509 request\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pkey == NULL)
|
if (pkey == NULL)
|
||||||
@@ -843,7 +811,7 @@ loop:
|
|||||||
BIO_printf(bio_err,"verify OK\n");
|
BIO_printf(bio_err,"verify OK\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noout && !text && !modulus)
|
if (noout && !text && !modulus && !subject)
|
||||||
{
|
{
|
||||||
ex=0;
|
ex=0;
|
||||||
goto end;
|
goto end;
|
||||||
@@ -880,6 +848,14 @@ loop:
|
|||||||
X509_REQ_print(out,req);
|
X509_REQ_print(out,req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(subject)
|
||||||
|
{
|
||||||
|
if(x509)
|
||||||
|
print_name(out, "subject=", X509_get_subject_name(x509ss), nmflag);
|
||||||
|
else
|
||||||
|
print_name(out, "subject=", X509_REQ_get_subject_name(req), nmflag);
|
||||||
|
}
|
||||||
|
|
||||||
if (modulus)
|
if (modulus)
|
||||||
{
|
{
|
||||||
EVP_PKEY *pubkey;
|
EVP_PKEY *pubkey;
|
||||||
|
|||||||
27
apps/rsa.c
27
apps/rsa.c
@@ -68,7 +68,6 @@
|
|||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG rsa_main
|
#define PROG rsa_main
|
||||||
@@ -91,7 +90,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int ret=1;
|
int ret=1;
|
||||||
RSA *rsa=NULL;
|
RSA *rsa=NULL;
|
||||||
int i,badops=0, sgckey=0;
|
int i,badops=0, sgckey=0;
|
||||||
@@ -102,7 +100,6 @@ int MAIN(int argc, char **argv)
|
|||||||
char *infile,*outfile,*prog;
|
char *infile,*outfile,*prog;
|
||||||
char *passargin = NULL, *passargout = NULL;
|
char *passargin = NULL, *passargout = NULL;
|
||||||
char *passin = NULL, *passout = NULL;
|
char *passin = NULL, *passout = NULL;
|
||||||
char *engine=NULL;
|
|
||||||
int modulus=0;
|
int modulus=0;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
@@ -151,11 +148,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
passargout= *(++argv);
|
passargout= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-sgckey") == 0)
|
else if (strcmp(*argv,"-sgckey") == 0)
|
||||||
sgckey=1;
|
sgckey=1;
|
||||||
else if (strcmp(*argv,"-pubin") == 0)
|
else if (strcmp(*argv,"-pubin") == 0)
|
||||||
@@ -203,30 +195,11 @@ bad:
|
|||||||
BIO_printf(bio_err," -check verify key consistency\n");
|
BIO_printf(bio_err," -check verify key consistency\n");
|
||||||
BIO_printf(bio_err," -pubin expect a public key in input file\n");
|
BIO_printf(bio_err," -pubin expect a public key in input file\n");
|
||||||
BIO_printf(bio_err," -pubout output a public key\n");
|
BIO_printf(bio_err," -pubout output a public key\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
if(!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
|
||||||
BIO_printf(bio_err, "Error getting passwords\n");
|
BIO_printf(bio_err, "Error getting passwords\n");
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
@@ -55,11 +55,13 @@
|
|||||||
* Hudson (tjh@cryptsoft.com).
|
* Hudson (tjh@cryptsoft.com).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef NO_RSA
|
||||||
|
|
||||||
#include "apps.h"
|
#include "apps.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#define RSA_SIGN 1
|
#define RSA_SIGN 1
|
||||||
#define RSA_VERIFY 2
|
#define RSA_VERIFY 2
|
||||||
@@ -80,7 +82,6 @@ int MAIN(int argc, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
BIO *in = NULL, *out = NULL;
|
BIO *in = NULL, *out = NULL;
|
||||||
char *infile = NULL, *outfile = NULL;
|
char *infile = NULL, *outfile = NULL;
|
||||||
char *keyfile = NULL;
|
char *keyfile = NULL;
|
||||||
@@ -94,7 +95,6 @@ int MAIN(int argc, char **argv)
|
|||||||
unsigned char *rsa_in = NULL, *rsa_out = NULL, pad;
|
unsigned char *rsa_in = NULL, *rsa_out = NULL, pad;
|
||||||
int rsa_inlen, rsa_outlen = 0;
|
int rsa_inlen, rsa_outlen = 0;
|
||||||
int keysize;
|
int keysize;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
|
|
||||||
@@ -117,9 +117,6 @@ int MAIN(int argc, char **argv)
|
|||||||
} else if(!strcmp(*argv, "-inkey")) {
|
} else if(!strcmp(*argv, "-inkey")) {
|
||||||
if (--argc < 1) badarg = 1;
|
if (--argc < 1) badarg = 1;
|
||||||
keyfile = *(++argv);
|
keyfile = *(++argv);
|
||||||
} else if(!strcmp(*argv, "-engine")) {
|
|
||||||
if (--argc < 1) badarg = 1;
|
|
||||||
engine = *(++argv);
|
|
||||||
} else if(!strcmp(*argv, "-pubin")) {
|
} else if(!strcmp(*argv, "-pubin")) {
|
||||||
key_type = KEY_PUBKEY;
|
key_type = KEY_PUBKEY;
|
||||||
} else if(!strcmp(*argv, "-certin")) {
|
} else if(!strcmp(*argv, "-certin")) {
|
||||||
@@ -154,24 +151,6 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: seed PRNG only if needed */
|
/* FIXME: seed PRNG only if needed */
|
||||||
app_RAND_load_file(NULL, bio_err, 0);
|
app_RAND_load_file(NULL, bio_err, 0);
|
||||||
|
|
||||||
@@ -301,7 +280,6 @@ static void usage()
|
|||||||
BIO_printf(bio_err, "-inkey file input key\n");
|
BIO_printf(bio_err, "-inkey file input key\n");
|
||||||
BIO_printf(bio_err, "-pubin input is an RSA public\n");
|
BIO_printf(bio_err, "-pubin input is an RSA public\n");
|
||||||
BIO_printf(bio_err, "-certin input is a certificate carrying an RSA public key\n");
|
BIO_printf(bio_err, "-certin input is a certificate carrying an RSA public key\n");
|
||||||
BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err, "-ssl use SSL v2 padding\n");
|
BIO_printf(bio_err, "-ssl use SSL v2 padding\n");
|
||||||
BIO_printf(bio_err, "-raw use no padding\n");
|
BIO_printf(bio_err, "-raw use no padding\n");
|
||||||
BIO_printf(bio_err, "-pkcs use PKCS#1 v1.5 padding (default)\n");
|
BIO_printf(bio_err, "-pkcs use PKCS#1 v1.5 padding (default)\n");
|
||||||
@@ -313,3 +291,4 @@ static void usage()
|
|||||||
BIO_printf(bio_err, "-hexdump hex dump output\n");
|
BIO_printf(bio_err, "-hexdump hex dump output\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ typedef unsigned int u_int;
|
|||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
@@ -153,7 +152,6 @@ static void sc_usage(void)
|
|||||||
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
|
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
|
||||||
BIO_printf(bio_err," -cipher - preferred cipher to use, use the 'openssl ciphers'\n");
|
BIO_printf(bio_err," -cipher - preferred cipher to use, use the 'openssl ciphers'\n");
|
||||||
BIO_printf(bio_err," command to see what is available\n");
|
BIO_printf(bio_err," command to see what is available\n");
|
||||||
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,8 +179,6 @@ int MAIN(int argc, char **argv)
|
|||||||
int prexit = 0;
|
int prexit = 0;
|
||||||
SSL_METHOD *meth=NULL;
|
SSL_METHOD *meth=NULL;
|
||||||
BIO *sbio;
|
BIO *sbio;
|
||||||
char *engine_id=NULL;
|
|
||||||
ENGINE *e=NULL;
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
#endif
|
#endif
|
||||||
@@ -320,11 +316,6 @@ int MAIN(int argc, char **argv)
|
|||||||
else if (strcmp(*argv,"-nbio") == 0)
|
else if (strcmp(*argv,"-nbio") == 0)
|
||||||
{ c_nbio=1; }
|
{ c_nbio=1; }
|
||||||
#endif
|
#endif
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine_id = *(++argv);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||||
@@ -358,30 +349,6 @@ bad:
|
|||||||
|
|
||||||
OpenSSL_add_ssl_algorithms();
|
OpenSSL_add_ssl_algorithms();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
|
|
||||||
if (engine_id != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine_id)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if (c_debug)
|
|
||||||
{
|
|
||||||
ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM,
|
|
||||||
0, bio_err, 0);
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine_id);
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx=SSL_CTX_new(meth);
|
ctx=SSL_CTX_new(meth);
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ typedef unsigned int u_int;
|
|||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
@@ -177,7 +176,6 @@ static int s_debug=0;
|
|||||||
static int s_quiet=0;
|
static int s_quiet=0;
|
||||||
|
|
||||||
static int hack=0;
|
static int hack=0;
|
||||||
static char *engine_id=NULL;
|
|
||||||
|
|
||||||
#ifdef MONOLITH
|
#ifdef MONOLITH
|
||||||
static void s_server_init(void)
|
static void s_server_init(void)
|
||||||
@@ -200,7 +198,6 @@ static void s_server_init(void)
|
|||||||
s_debug=0;
|
s_debug=0;
|
||||||
s_quiet=0;
|
s_quiet=0;
|
||||||
hack=0;
|
hack=0;
|
||||||
engine_id=NULL;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -245,7 +242,6 @@ static void sv_usage(void)
|
|||||||
BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n");
|
BIO_printf(bio_err," -bugs - Turn on SSL bug compatibility\n");
|
||||||
BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n");
|
BIO_printf(bio_err," -www - Respond to a 'GET /' with a status page\n");
|
||||||
BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
BIO_printf(bio_err," -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>\n");
|
||||||
BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int local_argc=0;
|
static int local_argc=0;
|
||||||
@@ -415,7 +411,6 @@ int MAIN(int argc, char *argv[])
|
|||||||
int no_tmp_rsa=0,no_dhe=0,nocert=0;
|
int no_tmp_rsa=0,no_dhe=0,nocert=0;
|
||||||
int state=0;
|
int state=0;
|
||||||
SSL_METHOD *meth=NULL;
|
SSL_METHOD *meth=NULL;
|
||||||
ENGINE *e=NULL;
|
|
||||||
#ifndef NO_DH
|
#ifndef NO_DH
|
||||||
DH *dh=NULL;
|
DH *dh=NULL;
|
||||||
#endif
|
#endif
|
||||||
@@ -570,11 +565,6 @@ int MAIN(int argc, char *argv[])
|
|||||||
else if (strcmp(*argv,"-tls1") == 0)
|
else if (strcmp(*argv,"-tls1") == 0)
|
||||||
{ meth=TLSv1_server_method(); }
|
{ meth=TLSv1_server_method(); }
|
||||||
#endif
|
#endif
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine_id= *(++argv);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
BIO_printf(bio_err,"unknown option %s\n",*argv);
|
||||||
@@ -619,29 +609,6 @@ bad:
|
|||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
OpenSSL_add_ssl_algorithms();
|
OpenSSL_add_ssl_algorithms();
|
||||||
|
|
||||||
if (engine_id != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine_id)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if (s_debug)
|
|
||||||
{
|
|
||||||
ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM,
|
|
||||||
0, bio_err, 0);
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine_id);
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx=SSL_CTX_new(meth);
|
ctx=SSL_CTX_new(meth);
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
|
||||||
subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Server test cert (512 bit)
|
subject= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Server test cert (512 bit)
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIIB6TCCAVICAQQwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV
|
MIIB6TCCAVICAQYwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV
|
||||||
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD
|
BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD
|
||||||
VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNOTgwNjI5MjM1MjQwWhcNMDAwNjI4
|
VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNMDAxMDE2MjIzMTAzWhcNMDMwMTE0
|
||||||
MjM1MjQwWjBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG
|
MjIzMTAzWjBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG
|
||||||
A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0IGNl
|
A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0IGNl
|
||||||
cnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8SMVIP
|
cnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8SMVIP
|
||||||
Fe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8Ey2//
|
Fe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8Ey2//
|
||||||
Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQCVvvfkGSe2GHgDFfmOua4Isjb9
|
Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQCT0grFQeZaqYb5EYfk20XixZV4
|
||||||
JVhImWMASiOClkZlMESDJjsszg/6+d/W+8TrbObhazpl95FivXBVucbj9dudh7AO
|
GmyAbXMftG1Eo7qGiMhYzRwGNWxEYojf5PZkYZXvSqZ/ZXHXa4g59jK/rJNnaVGM
|
||||||
IZu1h1MAPlyknc9Ud816vz3FejB4qqUoaXjnlkrIgEbr/un7jSS86WOe0hRhwHkJ
|
k+xIX8mxQvlV0n5O9PIha5BX5teZnkHKgL8aKKLKW1BK7YTngsfSzzaeame5iKfz
|
||||||
FUGcPZf9ND22Etc+AQ==
|
itAE+OjGF+PFKbwX8Q==
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
-----BEGIN RSA PRIVATE KEY-----
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
MIIBPAIBAAJBAJ+zw4Qnlf8SMVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVD
|
MIIBPAIBAAJBAJ+zw4Qnlf8SMVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVD
|
||||||
|
|||||||
29
apps/smime.c
29
apps/smime.c
@@ -64,7 +64,6 @@
|
|||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG smime_main
|
#define PROG smime_main
|
||||||
@@ -82,7 +81,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int operation = 0;
|
int operation = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char **args;
|
char **args;
|
||||||
@@ -105,9 +103,8 @@ int MAIN(int argc, char **argv)
|
|||||||
char *inrand = NULL;
|
char *inrand = NULL;
|
||||||
int need_rand = 0;
|
int need_rand = 0;
|
||||||
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
|
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
args = argv + 1;
|
args = argv + 1;
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
while (!badarg && *args && *args[0] == '-') {
|
while (!badarg && *args && *args[0] == '-') {
|
||||||
@@ -156,11 +153,6 @@ int MAIN(int argc, char **argv)
|
|||||||
inrand = *args;
|
inrand = *args;
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
need_rand = 1;
|
need_rand = 1;
|
||||||
} else if (!strcmp(*args,"-engine")) {
|
|
||||||
if (args[1]) {
|
|
||||||
args++;
|
|
||||||
engine = *args;
|
|
||||||
} else badarg = 1;
|
|
||||||
} else if (!strcmp(*args,"-passin")) {
|
} else if (!strcmp(*args,"-passin")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
args++;
|
args++;
|
||||||
@@ -298,7 +290,6 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf (bio_err, "-text include or delete text MIME headers\n");
|
BIO_printf (bio_err, "-text include or delete text MIME headers\n");
|
||||||
BIO_printf (bio_err, "-CApath dir trusted certificates directory\n");
|
BIO_printf (bio_err, "-CApath dir trusted certificates directory\n");
|
||||||
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
|
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
|
||||||
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
|
|
||||||
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
|
||||||
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
|
||||||
BIO_printf(bio_err, " the random number generator\n");
|
BIO_printf(bio_err, " the random number generator\n");
|
||||||
@@ -306,24 +297,6 @@ int MAIN(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
|
if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
|
||||||
BIO_printf(bio_err, "Error getting password\n");
|
BIO_printf(bio_err, "Error getting password\n");
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
41
apps/speed.c
41
apps/speed.c
@@ -81,7 +81,6 @@
|
|||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
# define USE_TOD
|
# define USE_TOD
|
||||||
@@ -311,7 +310,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e;
|
|
||||||
unsigned char *buf=NULL,*buf2=NULL;
|
unsigned char *buf=NULL,*buf2=NULL;
|
||||||
int mret=1;
|
int mret=1;
|
||||||
#define ALGOR_NUM 15
|
#define ALGOR_NUM 15
|
||||||
@@ -472,37 +470,6 @@ int MAIN(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if ((argc > 0) && (strcmp(*argv,"-elapsed") == 0))
|
if ((argc > 0) && (strcmp(*argv,"-elapsed") == 0))
|
||||||
usertime = 0;
|
usertime = 0;
|
||||||
else
|
|
||||||
if ((argc > 0) && (strcmp(*argv,"-engine") == 0))
|
|
||||||
{
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
if(argc == 0)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"no engine given\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if((e = ENGINE_by_id(*argv)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
*argv);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", *argv);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
/* It will be increased again further down. We just
|
|
||||||
don't want speed to confuse an engine with an
|
|
||||||
algorithm, especially when none is given (which
|
|
||||||
means all of them should be run) */
|
|
||||||
j--;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#ifndef NO_MD2
|
#ifndef NO_MD2
|
||||||
if (strcmp(*argv,"md2") == 0) doit[D_MD2]=1;
|
if (strcmp(*argv,"md2") == 0) doit[D_MD2]=1;
|
||||||
else
|
else
|
||||||
@@ -550,7 +517,7 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifdef RSAref
|
#ifdef RSAref
|
||||||
if (strcmp(*argv,"rsaref") == 0)
|
if (strcmp(*argv,"rsaref") == 0)
|
||||||
{
|
{
|
||||||
RSA_set_default_openssl_method(RSA_PKCS1_RSAref());
|
RSA_set_default_method(RSA_PKCS1_RSAref());
|
||||||
j--;
|
j--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -558,7 +525,7 @@ int MAIN(int argc, char **argv)
|
|||||||
#ifndef RSA_NULL
|
#ifndef RSA_NULL
|
||||||
if (strcmp(*argv,"openssl") == 0)
|
if (strcmp(*argv,"openssl") == 0)
|
||||||
{
|
{
|
||||||
RSA_set_default_openssl_method(RSA_PKCS1_SSLeay());
|
RSA_set_default_method(RSA_PKCS1_SSLeay());
|
||||||
j--;
|
j--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -703,12 +670,11 @@ int MAIN(int argc, char **argv)
|
|||||||
BIO_printf(bio_err,"\n");
|
BIO_printf(bio_err,"\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TIMES
|
||||||
BIO_printf(bio_err,"\n");
|
BIO_printf(bio_err,"\n");
|
||||||
BIO_printf(bio_err,"Available options:\n");
|
BIO_printf(bio_err,"Available options:\n");
|
||||||
#ifdef TIMES
|
|
||||||
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
|
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
|
||||||
#endif
|
#endif
|
||||||
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
argc--;
|
argc--;
|
||||||
@@ -1413,7 +1379,6 @@ int MAIN(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
mret=0;
|
mret=0;
|
||||||
end:
|
end:
|
||||||
ERR_print_errors(bio_err);
|
|
||||||
if (buf != NULL) OPENSSL_free(buf);
|
if (buf != NULL) OPENSSL_free(buf);
|
||||||
if (buf2 != NULL) OPENSSL_free(buf2);
|
if (buf2 != NULL) OPENSSL_free(buf2);
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
|
|||||||
27
apps/spkac.c
27
apps/spkac.c
@@ -69,7 +69,6 @@
|
|||||||
#include <openssl/lhash.h>
|
#include <openssl/lhash.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG spkac_main
|
#define PROG spkac_main
|
||||||
@@ -82,7 +81,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int i,badops=0, ret = 1;
|
int i,badops=0, ret = 1;
|
||||||
BIO *in = NULL,*out = NULL, *key = NULL;
|
BIO *in = NULL,*out = NULL, *key = NULL;
|
||||||
int verify=0,noout=0,pubkey=0;
|
int verify=0,noout=0,pubkey=0;
|
||||||
@@ -93,7 +91,6 @@ int MAIN(int argc, char **argv)
|
|||||||
LHASH *conf = NULL;
|
LHASH *conf = NULL;
|
||||||
NETSCAPE_SPKI *spki = NULL;
|
NETSCAPE_SPKI *spki = NULL;
|
||||||
EVP_PKEY *pkey = NULL;
|
EVP_PKEY *pkey = NULL;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
@@ -139,11 +136,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
spksect= *(++argv);
|
spksect= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-noout") == 0)
|
else if (strcmp(*argv,"-noout") == 0)
|
||||||
noout=1;
|
noout=1;
|
||||||
else if (strcmp(*argv,"-pubkey") == 0)
|
else if (strcmp(*argv,"-pubkey") == 0)
|
||||||
@@ -169,7 +161,6 @@ bad:
|
|||||||
BIO_printf(bio_err," -noout don't print SPKAC\n");
|
BIO_printf(bio_err," -noout don't print SPKAC\n");
|
||||||
BIO_printf(bio_err," -pubkey output public key\n");
|
BIO_printf(bio_err," -pubkey output public key\n");
|
||||||
BIO_printf(bio_err," -verify verify SPKAC signature\n");
|
BIO_printf(bio_err," -verify verify SPKAC signature\n");
|
||||||
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,24 +170,6 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(keyfile) {
|
if(keyfile) {
|
||||||
if(strcmp(keyfile, "-")) key = BIO_new_file(keyfile, "r");
|
if(strcmp(keyfile, "-")) key = BIO_new_file(keyfile, "r");
|
||||||
else key = BIO_new_fp(stdin, BIO_NOCLOSE);
|
else key = BIO_new_fp(stdin, BIO_NOCLOSE);
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG verify_main
|
#define PROG verify_main
|
||||||
@@ -79,7 +78,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int i,ret=1;
|
int i,ret=1;
|
||||||
int purpose = -1;
|
int purpose = -1;
|
||||||
char *CApath=NULL,*CAfile=NULL;
|
char *CApath=NULL,*CAfile=NULL;
|
||||||
@@ -87,7 +85,6 @@ int MAIN(int argc, char **argv)
|
|||||||
STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
|
STACK_OF(X509) *untrusted = NULL, *trusted = NULL;
|
||||||
X509_STORE *cert_ctx=NULL;
|
X509_STORE *cert_ctx=NULL;
|
||||||
X509_LOOKUP *lookup=NULL;
|
X509_LOOKUP *lookup=NULL;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
cert_ctx=X509_STORE_new();
|
cert_ctx=X509_STORE_new();
|
||||||
if (cert_ctx == NULL) goto end;
|
if (cert_ctx == NULL) goto end;
|
||||||
@@ -140,11 +137,6 @@ int MAIN(int argc, char **argv)
|
|||||||
if (argc-- < 1) goto end;
|
if (argc-- < 1) goto end;
|
||||||
trustfile= *(++argv);
|
trustfile= *(++argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto end;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-help") == 0)
|
else if (strcmp(*argv,"-help") == 0)
|
||||||
goto end;
|
goto end;
|
||||||
else if (strcmp(*argv,"-issuer_checks") == 0)
|
else if (strcmp(*argv,"-issuer_checks") == 0)
|
||||||
@@ -162,24 +154,6 @@ int MAIN(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
|
lookup=X509_STORE_add_lookup(cert_ctx,X509_LOOKUP_file());
|
||||||
if (lookup == NULL) abort();
|
if (lookup == NULL) abort();
|
||||||
if (CAfile) {
|
if (CAfile) {
|
||||||
@@ -227,7 +201,7 @@ int MAIN(int argc, char **argv)
|
|||||||
ret=0;
|
ret=0;
|
||||||
end:
|
end:
|
||||||
if (ret == 1) {
|
if (ret == 1) {
|
||||||
BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-engine e] cert1 cert2 ...\n");
|
BIO_printf(bio_err,"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] cert1 cert2 ...\n");
|
||||||
BIO_printf(bio_err,"recognized usages:\n");
|
BIO_printf(bio_err,"recognized usages:\n");
|
||||||
for(i = 0; i < X509_PURPOSE_get_count(); i++) {
|
for(i = 0; i < X509_PURPOSE_get_count(); i++) {
|
||||||
X509_PURPOSE *ptmp;
|
X509_PURPOSE *ptmp;
|
||||||
|
|||||||
37
apps/x509.c
37
apps/x509.c
@@ -73,7 +73,6 @@
|
|||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#undef PROG
|
#undef PROG
|
||||||
#define PROG x509_main
|
#define PROG x509_main
|
||||||
@@ -130,7 +129,7 @@ static char *x509_usage[]={
|
|||||||
" -extensions - section from config file with X509V3 extensions to add\n",
|
" -extensions - section from config file with X509V3 extensions to add\n",
|
||||||
" -clrext - delete extensions before signing and input certificate\n",
|
" -clrext - delete extensions before signing and input certificate\n",
|
||||||
" -nameopt arg - various certificate name options\n",
|
" -nameopt arg - various certificate name options\n",
|
||||||
" -engine e - use engine e, possibly a hardware device.\n",
|
" -certopt arg - various certificate text options\n",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -147,7 +146,6 @@ int MAIN(int, char **);
|
|||||||
|
|
||||||
int MAIN(int argc, char **argv)
|
int MAIN(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ENGINE *e = NULL;
|
|
||||||
int ret=1;
|
int ret=1;
|
||||||
X509_REQ *req=NULL;
|
X509_REQ *req=NULL;
|
||||||
X509 *x=NULL,*xca=NULL;
|
X509 *x=NULL,*xca=NULL;
|
||||||
@@ -177,8 +175,7 @@ int MAIN(int argc, char **argv)
|
|||||||
char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL;
|
char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL;
|
||||||
int need_rand = 0;
|
int need_rand = 0;
|
||||||
int checkend=0,checkoffset=0;
|
int checkend=0,checkoffset=0;
|
||||||
unsigned long nmflag = 0;
|
unsigned long nmflag = 0, certflag = 0;
|
||||||
char *engine=NULL;
|
|
||||||
|
|
||||||
reqfile=0;
|
reqfile=0;
|
||||||
|
|
||||||
@@ -330,6 +327,11 @@ int MAIN(int argc, char **argv)
|
|||||||
alias= *(++argv);
|
alias= *(++argv);
|
||||||
trustout = 1;
|
trustout = 1;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(*argv,"-certopt") == 0)
|
||||||
|
{
|
||||||
|
if (--argc < 1) goto bad;
|
||||||
|
if (!set_cert_ex(&certflag, *(++argv))) goto bad;
|
||||||
|
}
|
||||||
else if (strcmp(*argv,"-nameopt") == 0)
|
else if (strcmp(*argv,"-nameopt") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
@@ -341,11 +343,6 @@ int MAIN(int argc, char **argv)
|
|||||||
alias= *(++argv);
|
alias= *(++argv);
|
||||||
trustout = 1;
|
trustout = 1;
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-engine") == 0)
|
|
||||||
{
|
|
||||||
if (--argc < 1) goto bad;
|
|
||||||
engine= *(++argv);
|
|
||||||
}
|
|
||||||
else if (strcmp(*argv,"-C") == 0)
|
else if (strcmp(*argv,"-C") == 0)
|
||||||
C= ++num;
|
C= ++num;
|
||||||
else if (strcmp(*argv,"-email") == 0)
|
else if (strcmp(*argv,"-email") == 0)
|
||||||
@@ -429,24 +426,6 @@ bad:
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine != NULL)
|
|
||||||
{
|
|
||||||
if((e = ENGINE_by_id(engine)) == NULL)
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"invalid engine \"%s\"\n",
|
|
||||||
engine);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
|
|
||||||
{
|
|
||||||
BIO_printf(bio_err,"can't use that engine\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
BIO_printf(bio_err,"engine \"%s\" set.\n", engine);
|
|
||||||
/* Free our "structural" reference. */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (need_rand)
|
if (need_rand)
|
||||||
app_RAND_load_file(NULL, bio_err, 0);
|
app_RAND_load_file(NULL, bio_err, 0);
|
||||||
|
|
||||||
@@ -801,7 +780,7 @@ bad:
|
|||||||
}
|
}
|
||||||
else if (text == i)
|
else if (text == i)
|
||||||
{
|
{
|
||||||
X509_print(out,x);
|
X509_print_ex(out,x,nmflag, certflag);
|
||||||
}
|
}
|
||||||
else if (startdate == i)
|
else if (startdate == i)
|
||||||
{
|
{
|
||||||
|
|||||||
28
config
28
config
@@ -168,7 +168,7 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
NetBSD:*:*:*386*)
|
NetBSD:*:*:*386*)
|
||||||
echo "`/usr/sbin/sysctl -n hw.model | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
|
echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
NetBSD:*)
|
NetBSD:*)
|
||||||
@@ -482,27 +482,11 @@ case "$GUESSOS" in
|
|||||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# NB: This atalla support has been superceded by the ENGINE support
|
|
||||||
# That contains its own header and definitions anyway. Support can
|
|
||||||
# be enabled or disabled on any supported platform without external
|
|
||||||
# headers, eg. by adding the "hw-atalla" switch to ./config or
|
|
||||||
# perl Configure
|
|
||||||
#
|
|
||||||
# See whether we can compile Atalla support
|
# See whether we can compile Atalla support
|
||||||
#if [ -f /usr/include/atasi.h ]
|
if [ -f /usr/include/atasi.h ]
|
||||||
#then
|
then
|
||||||
# options="$options -DATALLA"
|
options="$options -DATALLA"
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
#get some basic shared lib support (behnke@trustcenter.de)
|
|
||||||
case "$OUT" in
|
|
||||||
solaris-*-gcc)
|
|
||||||
if [ "$SHARED" = "true" ]
|
|
||||||
then
|
|
||||||
options="$options -DPIC -fPIC"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# gcc < 2.8 does not support -mcpu=ultrasparc
|
# gcc < 2.8 does not support -mcpu=ultrasparc
|
||||||
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
|
if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ]
|
||||||
@@ -573,7 +557,7 @@ OUT="$PREFIX$OUT"
|
|||||||
|
|
||||||
$PERL ./Configure LIST | grep "$OUT" > /dev/null
|
$PERL ./Configure LIST | grep "$OUT" > /dev/null
|
||||||
if [ $? = "0" ]; then
|
if [ $? = "0" ]; then
|
||||||
#echo Configuring for $OUT
|
echo Configuring for $OUT
|
||||||
|
|
||||||
if [ "$TEST" = "true" ]; then
|
if [ "$TEST" = "true" ]; then
|
||||||
echo $PERL ./Configure $OUT $options
|
echo $PERL ./Configure $OUT $options
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ LIBS=
|
|||||||
|
|
||||||
SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
SDIRS= md2 md5 sha mdc2 hmac ripemd \
|
||||||
des rc2 rc4 rc5 idea bf cast \
|
des rc2 rc4 rc5 idea bf cast \
|
||||||
bn rsa dsa dh dso engine \
|
bn rsa dsa dh dso \
|
||||||
buffer bio stack lhash rand err objects \
|
buffer bio stack lhash rand err objects \
|
||||||
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp
|
evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp rijndael
|
||||||
|
|
||||||
GENERAL=Makefile README crypto-lib.com install.com
|
GENERAL=Makefile README crypto-lib.com install.com
|
||||||
|
|
||||||
@@ -90,7 +90,8 @@ links:
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
libs:
|
libs:
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
@@ -170,7 +171,9 @@ a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
a_digest.o: ../../include/openssl/opensslconf.h
|
a_digest.o: ../../include/openssl/opensslconf.h
|
||||||
a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
a_digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
a_digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
a_digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
a_digest.o: ../../include/openssl/rc5.h
|
||||||
|
a_digest.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
a_digest.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
a_digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
a_digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
a_digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
a_digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
a_digest.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
a_digest.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -295,11 +298,12 @@ a_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
a_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
a_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
a_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
a_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||||
a_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
a_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
a_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
a_sign.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
a_sign.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
a_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
a_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
a_sign.o: ../cryptlib.h
|
a_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
a_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
|
||||||
a_strex.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
a_strex.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||||
a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||||
@@ -313,11 +317,12 @@ a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
a_strex.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
a_strex.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||||
a_strex.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
a_strex.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
a_strex.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
a_strex.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
a_strex.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
a_strex.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
a_strex.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
a_strex.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
a_strex.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
a_strex.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
a_strex.o: charmap.h
|
a_strex.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
a_strex.o: ../../include/openssl/x509_vfy.h charmap.h
|
||||||
a_strnid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
a_strnid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
a_strnid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
a_strnid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
a_strnid.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
|
a_strnid.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
|
||||||
@@ -373,7 +378,9 @@ a_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
a_verify.o: ../../include/openssl/opensslconf.h
|
a_verify.o: ../../include/openssl/opensslconf.h
|
||||||
a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
a_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
a_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
a_verify.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
a_verify.o: ../../include/openssl/rc5.h
|
||||||
|
a_verify.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
a_verify.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
a_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
a_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
a_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
a_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
a_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
a_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -452,7 +459,8 @@ d2i_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|||||||
d2i_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
d2i_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
d2i_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
d2i_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
d2i_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
d2i_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
d2i_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
d2i_pr.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
d2i_pr.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
d2i_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
d2i_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
d2i_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
@@ -469,7 +477,8 @@ d2i_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|||||||
d2i_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
d2i_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
d2i_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
d2i_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
d2i_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
d2i_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
d2i_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
d2i_pu.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
d2i_pu.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
d2i_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
d2i_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
d2i_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
d2i_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
@@ -580,7 +589,8 @@ i2d_pr.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|||||||
i2d_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
i2d_pr.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
i2d_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
i2d_pr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
i2d_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
i2d_pr.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
i2d_pr.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
i2d_pr.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
i2d_pr.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
i2d_pr.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
i2d_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
i2d_pr.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
@@ -597,7 +607,8 @@ i2d_pu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|||||||
i2d_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
i2d_pu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
i2d_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
i2d_pu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
i2d_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
i2d_pu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
i2d_pu.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
i2d_pu.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
i2d_pu.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
i2d_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
i2d_pu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
i2d_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
i2d_pu.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
@@ -657,7 +668,8 @@ n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
n_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
n_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
n_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
n_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
n_pkey.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
n_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
n_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
n_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
n_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
n_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
n_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -676,10 +688,12 @@ nsseq.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
nsseq.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
nsseq.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||||
nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
nsseq.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
nsseq.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
nsseq.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
nsseq.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
nsseq.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
nsseq.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
|
nsseq.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
nsseq.o: ../../include/openssl/x509_vfy.h
|
||||||
p5_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
p5_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||||
p5_pbe.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
p5_pbe.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||||
p5_pbe.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
p5_pbe.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
@@ -695,11 +709,12 @@ p5_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
|||||||
p5_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p5_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||||
p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
p5_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
p5_pbe.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
p5_pbe.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
p5_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
p5_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p5_pbe.o: ../cryptlib.h
|
p5_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
p5_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
|
||||||
p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||||
p5_pbev2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
p5_pbev2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||||
p5_pbev2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
p5_pbev2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
@@ -715,11 +730,12 @@ p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
|||||||
p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p5_pbev2.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
p5_pbev2.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||||
p5_pbev2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
p5_pbev2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
p5_pbev2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
p5_pbev2.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
p5_pbev2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
p5_pbev2.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p5_pbev2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
p5_pbev2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p5_pbev2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
p5_pbev2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p5_pbev2.o: ../cryptlib.h
|
p5_pbev2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
p5_pbev2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
|
||||||
p7_dgst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
p7_dgst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||||
p7_dgst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
p7_dgst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||||
p7_dgst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
p7_dgst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
@@ -734,7 +750,8 @@ p7_dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_dgst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_dgst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_dgst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_dgst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_dgst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_dgst.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_dgst.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_dgst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_dgst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_dgst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_dgst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -753,7 +770,8 @@ p7_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_enc.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_enc.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -772,7 +790,9 @@ p7_enc_c.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_enc_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_enc_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_enc_c.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_enc_c.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_enc_c.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_enc_c.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_enc_c.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_enc_c.o: ../../include/openssl/rc5.h
|
||||||
|
p7_enc_c.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_enc_c.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_enc_c.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_enc_c.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_enc_c.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_enc_c.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_enc_c.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_enc_c.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -791,7 +811,8 @@ p7_evp.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_evp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_evp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_evp.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_evp.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_evp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_evp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_evp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_evp.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_evp.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_evp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_evp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_evp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_evp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_evp.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_evp.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -810,7 +831,8 @@ p7_i_s.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_i_s.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_i_s.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_i_s.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_i_s.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_i_s.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_i_s.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_i_s.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_i_s.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_i_s.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_i_s.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_i_s.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_i_s.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_i_s.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_i_s.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_i_s.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -829,7 +851,8 @@ p7_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_lib.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_lib.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -848,7 +871,9 @@ p7_recip.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_recip.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_recip.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_recip.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_recip.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_recip.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_recip.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_recip.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_recip.o: ../../include/openssl/rc5.h
|
||||||
|
p7_recip.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_recip.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_recip.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_recip.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_recip.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_recip.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_recip.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_recip.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -867,7 +892,8 @@ p7_s_e.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_s_e.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_s_e.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_s_e.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_s_e.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_s_e.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_s_e.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_s_e.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_s_e.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_s_e.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_s_e.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_s_e.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_s_e.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_s_e.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_s_e.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_s_e.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -886,7 +912,9 @@ p7_signd.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_signd.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_signd.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_signd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_signd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_signd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_signd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_signd.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_signd.o: ../../include/openssl/rc5.h
|
||||||
|
p7_signd.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_signd.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_signd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_signd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_signd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_signd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_signd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_signd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -905,7 +933,9 @@ p7_signi.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p7_signi.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p7_signi.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p7_signi.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p7_signi.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p7_signi.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p7_signi.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p7_signi.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p7_signi.o: ../../include/openssl/rc5.h
|
||||||
|
p7_signi.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p7_signi.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p7_signi.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p7_signi.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p7_signi.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p7_signi.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p7_signi.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p7_signi.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -924,7 +954,8 @@ p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
p8_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
p8_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
p8_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
p8_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
p8_pkey.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
p8_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
p8_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
p8_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
p8_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
p8_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
p8_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -944,11 +975,13 @@ t_bitst.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
t_bitst.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
t_bitst.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||||
t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
t_bitst.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
t_bitst.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
t_bitst.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
t_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
t_bitst.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
t_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
t_bitst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
t_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
t_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
t_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
t_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
t_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||||
|
t_bitst.o: ../cryptlib.h
|
||||||
t_crl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
t_crl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
t_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
t_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||||
t_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
t_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||||
@@ -964,11 +997,13 @@ t_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
t_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
t_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
t_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||||
t_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
t_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
t_crl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
t_crl.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
t_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
t_crl.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
t_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
t_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
t_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
t_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||||
|
t_crl.o: ../cryptlib.h
|
||||||
t_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
t_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
t_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
t_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||||
t_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
t_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||||
@@ -993,11 +1028,13 @@ t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
t_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
t_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||||
t_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
t_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
t_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
t_req.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
t_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
t_req.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
t_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
t_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
t_req.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||||
|
t_req.o: ../cryptlib.h
|
||||||
t_spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
t_spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||||
t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||||
t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
@@ -1012,7 +1049,8 @@ t_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
t_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
t_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
t_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
t_spki.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
t_spki.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
t_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
t_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
t_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
t_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
t_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
t_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1032,11 +1070,13 @@ t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
t_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
t_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||||
t_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
t_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
t_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
t_x509.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
t_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
t_x509.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
t_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
t_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
t_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h
|
t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||||
|
t_x509.o: ../cryptlib.h
|
||||||
t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||||
t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||||
t_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
t_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
@@ -1051,7 +1091,8 @@ t_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
t_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
t_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
t_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
t_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
t_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
t_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
t_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
t_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
t_x509a.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
t_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
t_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
t_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
t_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
t_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
t_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1070,7 +1111,8 @@ x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_algor.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_algor.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_algor.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_algor.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_algor.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_algor.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_algor.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_algor.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_algor.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_algor.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_algor.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1089,7 +1131,9 @@ x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_attrib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_attrib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_attrib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_attrib.o: ../../include/openssl/rc5.h
|
||||||
|
x_attrib.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_attrib.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_attrib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_attrib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_attrib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_attrib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_attrib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_attrib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1108,7 +1152,8 @@ x_cinf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_cinf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_cinf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_cinf.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_cinf.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_cinf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_cinf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_cinf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_cinf.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_cinf.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_cinf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_cinf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_cinf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_cinf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_cinf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_cinf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1127,7 +1172,8 @@ x_crl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_crl.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1146,7 +1192,8 @@ x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_exten.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_exten.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_exten.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_exten.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_exten.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_exten.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_exten.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_exten.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_exten.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_exten.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_exten.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1165,7 +1212,8 @@ x_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_info.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_info.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1184,7 +1232,8 @@ x_name.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_name.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_name.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_name.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_name.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1203,7 +1252,8 @@ x_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_pkey.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1222,7 +1272,9 @@ x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_pubkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_pubkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_pubkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_pubkey.o: ../../include/openssl/rc5.h
|
||||||
|
x_pubkey.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_pubkey.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_pubkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_pubkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_pubkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_pubkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_pubkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_pubkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1241,7 +1293,8 @@ x_req.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_req.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_req.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1260,7 +1313,8 @@ x_sig.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_sig.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_sig.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_sig.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_sig.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_sig.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1279,7 +1333,8 @@ x_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_spki.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1298,7 +1353,8 @@ x_val.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_val.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_val.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_val.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_val.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_val.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_val.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_val.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1318,7 +1374,8 @@ x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_x509.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_x509.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
@@ -1338,7 +1395,8 @@ x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|||||||
x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||||
x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||||
x_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
x_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
x_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
x_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
x_x509a.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
x_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
x_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
x_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
x_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
x_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
x_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||||
|
|||||||
@@ -491,12 +491,24 @@ static int do_name_ex(char_io *io_ch, void *arg, X509_NAME *n,
|
|||||||
|
|
||||||
int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags)
|
int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags)
|
||||||
{
|
{
|
||||||
|
if(flags == XN_FLAG_COMPAT)
|
||||||
|
return X509_NAME_print(out, nm, indent);
|
||||||
return do_name_ex(send_bio_chars, out, nm, indent, flags);
|
return do_name_ex(send_bio_chars, out, nm, indent, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags)
|
int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags)
|
||||||
{
|
{
|
||||||
|
if(flags == XN_FLAG_COMPAT)
|
||||||
|
{
|
||||||
|
BIO *btmp;
|
||||||
|
int ret;
|
||||||
|
btmp = BIO_new_fp(fp, BIO_NOCLOSE);
|
||||||
|
if(!btmp) return -1;
|
||||||
|
ret = X509_NAME_print(btmp, nm, indent);
|
||||||
|
BIO_free(btmp);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
return do_name_ex(send_fp_chars, fp, nm, indent, flags);
|
return do_name_ex(send_fp_chars, fp, nm, indent, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
|
|||||||
if(tbl) {
|
if(tbl) {
|
||||||
mask = tbl->mask;
|
mask = tbl->mask;
|
||||||
if(!(tbl->flags & STABLE_NO_MASK)) mask &= global_mask;
|
if(!(tbl->flags & STABLE_NO_MASK)) mask &= global_mask;
|
||||||
ret = ASN1_mbstring_ncopy(out, in, inlen, inform, tbl->mask,
|
ret = ASN1_mbstring_ncopy(out, in, inlen, inform, mask,
|
||||||
tbl->minsize, tbl->maxsize);
|
tbl->minsize, tbl->maxsize);
|
||||||
} else ret = ASN1_mbstring_copy(out, in, inlen, inform, DIRSTRING_TYPE & global_mask);
|
} else ret = ASN1_mbstring_copy(out, in, inlen, inform, DIRSTRING_TYPE & global_mask);
|
||||||
if(ret <= 0) return NULL;
|
if(ret <= 0) return NULL;
|
||||||
|
|||||||
@@ -72,6 +72,11 @@
|
|||||||
|
|
||||||
#ifndef NO_FP_API
|
#ifndef NO_FP_API
|
||||||
int X509_print_fp(FILE *fp, X509 *x)
|
int X509_print_fp(FILE *fp, X509 *x)
|
||||||
|
{
|
||||||
|
return X509_print_ex_fp(fp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cflag)
|
||||||
{
|
{
|
||||||
BIO *b;
|
BIO *b;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -82,17 +87,23 @@ int X509_print_fp(FILE *fp, X509 *x)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
BIO_set_fp(b,fp,BIO_NOCLOSE);
|
BIO_set_fp(b,fp,BIO_NOCLOSE);
|
||||||
ret=X509_print(b, x);
|
ret=X509_print_ex(b, x, nmflag, cflag);
|
||||||
BIO_free(b);
|
BIO_free(b);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int X509_print(BIO *bp, X509 *x)
|
int X509_print(BIO *bp, X509 *x)
|
||||||
|
{
|
||||||
|
return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
|
||||||
{
|
{
|
||||||
long l;
|
long l;
|
||||||
int ret=0,i,j,n;
|
int ret=0,i,j,n;
|
||||||
char *m=NULL,*s;
|
char *m=NULL,*s, mlch = ' ';
|
||||||
|
int nmindent = 0;
|
||||||
X509_CINF *ci;
|
X509_CINF *ci;
|
||||||
ASN1_INTEGER *bs;
|
ASN1_INTEGER *bs;
|
||||||
EVP_PKEY *pkey=NULL;
|
EVP_PKEY *pkey=NULL;
|
||||||
@@ -100,89 +111,127 @@ int X509_print(BIO *bp, X509 *x)
|
|||||||
X509_EXTENSION *ex;
|
X509_EXTENSION *ex;
|
||||||
ASN1_STRING *str=NULL;
|
ASN1_STRING *str=NULL;
|
||||||
|
|
||||||
|
if((nmflags & XN_FLAG_SEP_MASK) == XN_FLAG_SEP_MULTILINE) {
|
||||||
|
mlch = '\n';
|
||||||
|
nmindent = 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nmflags == X509_FLAG_COMPAT)
|
||||||
|
nmindent = 16;
|
||||||
|
|
||||||
ci=x->cert_info;
|
ci=x->cert_info;
|
||||||
if (BIO_write(bp,"Certificate:\n",13) <= 0) goto err;
|
if(!(cflag & X509_FLAG_NO_HEADER))
|
||||||
if (BIO_write(bp," Data:\n",10) <= 0) goto err;
|
|
||||||
l=X509_get_version(x);
|
|
||||||
if (BIO_printf(bp,"%8sVersion: %lu (0x%lx)\n","",l+1,l) <= 0) goto err;
|
|
||||||
if (BIO_write(bp," Serial Number:",22) <= 0) goto err;
|
|
||||||
|
|
||||||
bs=X509_get_serialNumber(x);
|
|
||||||
if (bs->length <= 4)
|
|
||||||
{
|
{
|
||||||
l=ASN1_INTEGER_get(bs);
|
if (BIO_write(bp,"Certificate:\n",13) <= 0) goto err;
|
||||||
if (l < 0)
|
if (BIO_write(bp," Data:\n",10) <= 0) goto err;
|
||||||
{
|
|
||||||
l= -l;
|
|
||||||
neg="-";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
neg="";
|
|
||||||
if (BIO_printf(bp," %s%lu (%s0x%lx)\n",neg,l,neg,l) <= 0)
|
|
||||||
goto err;
|
|
||||||
}
|
}
|
||||||
else
|
if(!(cflag & X509_FLAG_NO_VERSION))
|
||||||
|
{
|
||||||
|
l=X509_get_version(x);
|
||||||
|
if (BIO_printf(bp,"%8sVersion: %lu (0x%lx)\n","",l+1,l) <= 0) goto err;
|
||||||
|
}
|
||||||
|
if(!(cflag & X509_FLAG_NO_SERIAL))
|
||||||
{
|
{
|
||||||
neg=(bs->type == V_ASN1_NEG_INTEGER)?" (Negative)":"";
|
|
||||||
if (BIO_printf(bp,"\n%12s%s","",neg) <= 0) goto err;
|
|
||||||
|
|
||||||
for (i=0; i<bs->length; i++)
|
if (BIO_write(bp," Serial Number:",22) <= 0) goto err;
|
||||||
|
|
||||||
|
bs=X509_get_serialNumber(x);
|
||||||
|
if (bs->length <= 4)
|
||||||
{
|
{
|
||||||
if (BIO_printf(bp,"%02x%c",bs->data[i],
|
l=ASN1_INTEGER_get(bs);
|
||||||
((i+1 == bs->length)?'\n':':')) <= 0)
|
if (l < 0)
|
||||||
|
{
|
||||||
|
l= -l;
|
||||||
|
neg="-";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
neg="";
|
||||||
|
if (BIO_printf(bp," %s%lu (%s0x%lx)\n",neg,l,neg,l) <= 0)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
neg=(bs->type == V_ASN1_NEG_INTEGER)?" (Negative)":"";
|
||||||
|
if (BIO_printf(bp,"\n%12s%s","",neg) <= 0) goto err;
|
||||||
|
|
||||||
|
for (i=0; i<bs->length; i++)
|
||||||
|
{
|
||||||
|
if (BIO_printf(bp,"%02x%c",bs->data[i],
|
||||||
|
((i+1 == bs->length)?'\n':':')) <= 0)
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i=OBJ_obj2nid(ci->signature->algorithm);
|
if(!(cflag & X509_FLAG_NO_SIGNAME))
|
||||||
if (BIO_printf(bp,"%8sSignature Algorithm: %s\n","",
|
|
||||||
(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
if (BIO_write(bp," Issuer: ",16) <= 0) goto err;
|
|
||||||
if (!X509_NAME_print(bp,X509_get_issuer_name(x),16)) goto err;
|
|
||||||
if (BIO_write(bp,"\n Validity\n",18) <= 0) goto err;
|
|
||||||
if (BIO_write(bp," Not Before: ",24) <= 0) goto err;
|
|
||||||
if (!ASN1_TIME_print(bp,X509_get_notBefore(x))) goto err;
|
|
||||||
if (BIO_write(bp,"\n Not After : ",25) <= 0) goto err;
|
|
||||||
if (!ASN1_TIME_print(bp,X509_get_notAfter(x))) goto err;
|
|
||||||
if (BIO_write(bp,"\n Subject: ",18) <= 0) goto err;
|
|
||||||
if (!X509_NAME_print(bp,X509_get_subject_name(x),16)) goto err;
|
|
||||||
if (BIO_write(bp,"\n Subject Public Key Info:\n",34) <= 0)
|
|
||||||
goto err;
|
|
||||||
i=OBJ_obj2nid(ci->key->algor->algorithm);
|
|
||||||
if (BIO_printf(bp,"%12sPublic Key Algorithm: %s\n","",
|
|
||||||
(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
|
|
||||||
|
|
||||||
pkey=X509_get_pubkey(x);
|
|
||||||
if (pkey == NULL)
|
|
||||||
{
|
{
|
||||||
BIO_printf(bp,"%12sUnable to load Public Key\n","");
|
i=OBJ_obj2nid(ci->signature->algorithm);
|
||||||
ERR_print_errors(bp);
|
if (BIO_printf(bp,"%8sSignature Algorithm: %s\n","",
|
||||||
|
(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0)
|
||||||
|
goto err;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if(!(cflag & X509_FLAG_NO_ISSUER))
|
||||||
|
{
|
||||||
|
if (BIO_printf(bp," Issuer:%c",mlch) <= 0) goto err;
|
||||||
|
if (!X509_NAME_print_ex(bp,X509_get_issuer_name(x),nmindent, nmflags)) goto err;
|
||||||
|
}
|
||||||
|
if(!(cflag & X509_FLAG_NO_VALIDITY))
|
||||||
|
{
|
||||||
|
if (BIO_write(bp,"\n Validity\n",18) <= 0) goto err;
|
||||||
|
if (BIO_write(bp," Not Before: ",24) <= 0) goto err;
|
||||||
|
if (!ASN1_TIME_print(bp,X509_get_notBefore(x))) goto err;
|
||||||
|
if (BIO_write(bp,"\n Not After : ",25) <= 0) goto err;
|
||||||
|
if (!ASN1_TIME_print(bp,X509_get_notAfter(x))) goto err;
|
||||||
|
if (BIO_write(bp,"\n",1) <= 0) goto err;
|
||||||
|
}
|
||||||
|
if(!(cflag & X509_FLAG_NO_SUBJECT))
|
||||||
|
{
|
||||||
|
if (BIO_printf(bp," Subject:%c",mlch) <= 0) goto err;
|
||||||
|
if (!X509_NAME_print_ex(bp,X509_get_subject_name(x),nmindent, nmflags)) goto err;
|
||||||
|
}
|
||||||
|
if(!(cflag & X509_FLAG_NO_PUBKEY))
|
||||||
|
{
|
||||||
|
if (BIO_write(bp,"\n Subject Public Key Info:\n",34) <= 0)
|
||||||
|
goto err;
|
||||||
|
i=OBJ_obj2nid(ci->key->algor->algorithm);
|
||||||
|
if (BIO_printf(bp,"%12sPublic Key Algorithm: %s\n","",
|
||||||
|
(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
|
||||||
|
|
||||||
|
pkey=X509_get_pubkey(x);
|
||||||
|
if (pkey == NULL)
|
||||||
|
{
|
||||||
|
BIO_printf(bp,"%12sUnable to load Public Key\n","");
|
||||||
|
ERR_print_errors(bp);
|
||||||
|
}
|
||||||
|
else
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
if (pkey->type == EVP_PKEY_RSA)
|
if (pkey->type == EVP_PKEY_RSA)
|
||||||
{
|
{
|
||||||
BIO_printf(bp,"%12sRSA Public Key: (%d bit)\n","",
|
BIO_printf(bp,"%12sRSA Public Key: (%d bit)\n","",
|
||||||
BN_num_bits(pkey->pkey.rsa->n));
|
BN_num_bits(pkey->pkey.rsa->n));
|
||||||
RSA_print(bp,pkey->pkey.rsa,16);
|
RSA_print(bp,pkey->pkey.rsa,16);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_DSA
|
#ifndef NO_DSA
|
||||||
if (pkey->type == EVP_PKEY_DSA)
|
if (pkey->type == EVP_PKEY_DSA)
|
||||||
{
|
{
|
||||||
BIO_printf(bp,"%12sDSA Public Key:\n","");
|
BIO_printf(bp,"%12sDSA Public Key:\n","");
|
||||||
DSA_print(bp,pkey->pkey.dsa,16);
|
DSA_print(bp,pkey->pkey.dsa,16);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
BIO_printf(bp,"%12sUnknown Public Key:\n","");
|
BIO_printf(bp,"%12sUnknown Public Key:\n","");
|
||||||
|
|
||||||
EVP_PKEY_free(pkey);
|
EVP_PKEY_free(pkey);
|
||||||
|
}
|
||||||
|
|
||||||
n=X509_get_ext_count(x);
|
if (cflag & X509_FLAG_NO_EXTENSIONS)
|
||||||
|
n = 0;
|
||||||
|
else
|
||||||
|
n=X509_get_ext_count(x);
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bp,"%8sX509v3 extensions:\n","");
|
BIO_printf(bp,"%8sX509v3 extensions:\n","");
|
||||||
@@ -196,7 +245,7 @@ int X509_print(BIO *bp, X509 *x)
|
|||||||
j=X509_EXTENSION_get_critical(ex);
|
j=X509_EXTENSION_get_critical(ex);
|
||||||
if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
|
if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
|
||||||
goto err;
|
goto err;
|
||||||
if(!X509V3_EXT_print(bp, ex, 0, 16))
|
if(!X509V3_EXT_print(bp, ex, cflag, 16))
|
||||||
{
|
{
|
||||||
BIO_printf(bp, "%16s", "");
|
BIO_printf(bp, "%16s", "");
|
||||||
M_ASN1_OCTET_STRING_print(bp,ex->value);
|
M_ASN1_OCTET_STRING_print(bp,ex->value);
|
||||||
@@ -205,21 +254,27 @@ int X509_print(BIO *bp, X509 *x)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i=OBJ_obj2nid(x->sig_alg->algorithm);
|
if(!(cflag & X509_FLAG_NO_SIGDUMP))
|
||||||
if (BIO_printf(bp,"%4sSignature Algorithm: %s","",
|
|
||||||
(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
|
|
||||||
|
|
||||||
n=x->signature->length;
|
|
||||||
s=(char *)x->signature->data;
|
|
||||||
for (i=0; i<n; i++)
|
|
||||||
{
|
{
|
||||||
if ((i%18) == 0)
|
i=OBJ_obj2nid(x->sig_alg->algorithm);
|
||||||
if (BIO_write(bp,"\n ",9) <= 0) goto err;
|
if (BIO_printf(bp,"%4sSignature Algorithm: %s","",
|
||||||
if (BIO_printf(bp,"%02x%s",(unsigned char)s[i],
|
(i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) goto err;
|
||||||
((i+1) == n)?"":":") <= 0) goto err;
|
|
||||||
|
n=x->signature->length;
|
||||||
|
s=(char *)x->signature->data;
|
||||||
|
for (i=0; i<n; i++)
|
||||||
|
{
|
||||||
|
if ((i%18) == 0)
|
||||||
|
if (BIO_write(bp,"\n ",9) <= 0) goto err;
|
||||||
|
if (BIO_printf(bp,"%02x%s",(unsigned char)s[i],
|
||||||
|
((i+1) == n)?"":":") <= 0) goto err;
|
||||||
|
}
|
||||||
|
if (BIO_write(bp,"\n",1) != 1) goto err;
|
||||||
|
}
|
||||||
|
if(!(cflag & X509_FLAG_NO_AUX))
|
||||||
|
{
|
||||||
|
if (!X509_CERT_AUX_print(bp, x->aux, 0)) goto err;
|
||||||
}
|
}
|
||||||
if (BIO_write(bp,"\n",1) != 1) goto err;
|
|
||||||
if (!X509_CERT_AUX_print(bp, x->aux, 0)) goto err;
|
|
||||||
ret=1;
|
ret=1;
|
||||||
err:
|
err:
|
||||||
if (str != NULL) ASN1_STRING_free(str);
|
if (str != NULL) ASN1_STRING_free(str);
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
# elf
|
# elf
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
@@ -122,7 +123,8 @@ bf_buff.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|||||||
bf_buff.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
bf_buff.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
bf_buff.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
bf_buff.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
bf_buff.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
bf_buff.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
bf_buff.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
bf_buff.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
bf_buff.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
bf_buff.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
bf_buff.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
bf_buff.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
bf_buff.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
bf_buff.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
bf_buff.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
@@ -140,10 +142,11 @@ bf_nbio.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|||||||
bf_nbio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
bf_nbio.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
bf_nbio.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
||||||
bf_nbio.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
bf_nbio.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||||
bf_nbio.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
bf_nbio.o: ../../include/openssl/rijndael-alg-fst.h
|
||||||
bf_nbio.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
bf_nbio.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
bf_nbio.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
bf_nbio.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
bf_nbio.o: ../cryptlib.h
|
bf_nbio.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
|
bf_nbio.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
bf_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
bf_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
bf_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
bf_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||||
bf_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
bf_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||||
@@ -157,7 +160,8 @@ bf_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|||||||
bf_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
bf_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||||
bf_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
bf_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
bf_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
bf_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||||
bf_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
bf_null.o: ../../include/openssl/rc5.h ../../include/openssl/rijndael-alg-fst.h
|
||||||
|
bf_null.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||||
bf_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
bf_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||||
bf_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
bf_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
bf_null.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
bf_null.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ static void _dopr(char **sbuffer, char **buffer,
|
|||||||
|
|
||||||
/* some handy macros */
|
/* some handy macros */
|
||||||
#define char_to_int(p) (p - '0')
|
#define char_to_int(p) (p - '0')
|
||||||
#define MAX(p,q) ((p >= q) ? p : q)
|
#define OSSL_MAX(p,q) ((p >= q) ? p : q)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_dopr(
|
_dopr(
|
||||||
@@ -502,13 +502,13 @@ fmtint(
|
|||||||
convert[place] = 0;
|
convert[place] = 0;
|
||||||
|
|
||||||
zpadlen = max - place;
|
zpadlen = max - place;
|
||||||
spadlen = min - MAX(max, place) - (signvalue ? 1 : 0);
|
spadlen = min - OSSL_MAX(max, place) - (signvalue ? 1 : 0);
|
||||||
if (zpadlen < 0)
|
if (zpadlen < 0)
|
||||||
zpadlen = 0;
|
zpadlen = 0;
|
||||||
if (spadlen < 0)
|
if (spadlen < 0)
|
||||||
spadlen = 0;
|
spadlen = 0;
|
||||||
if (flags & DP_F_ZERO) {
|
if (flags & DP_F_ZERO) {
|
||||||
zpadlen = MAX(zpadlen, spadlen);
|
zpadlen = OSSL_MAX(zpadlen, spadlen);
|
||||||
spadlen = 0;
|
spadlen = 0;
|
||||||
}
|
}
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ int BIO_get_host_ip(const char *str, unsigned char *ip)
|
|||||||
|
|
||||||
/* At this point, we have something that is most probably correct
|
/* At this point, we have something that is most probably correct
|
||||||
in some way, so let's init the socket. */
|
in some way, so let's init the socket. */
|
||||||
if (!BIO_sock_init())
|
if (BIO_sock_init() != 1)
|
||||||
return(0); /* don't generate another error code here */
|
return 0; /* don't generate another error code here */
|
||||||
|
|
||||||
/* If the string actually contained an IP address, we need not do
|
/* If the string actually contained an IP address, we need not do
|
||||||
anything more */
|
anything more */
|
||||||
@@ -527,7 +527,7 @@ int BIO_get_accept_socket(char *host, int bind_mode)
|
|||||||
unsigned long l;
|
unsigned long l;
|
||||||
int err_num;
|
int err_num;
|
||||||
|
|
||||||
if (!BIO_sock_init()) return(INVALID_SOCKET);
|
if (BIO_sock_init() != 1) return(INVALID_SOCKET);
|
||||||
|
|
||||||
if ((str=BUF_strdup(host)) == NULL) return(INVALID_SOCKET);
|
if ((str=BUF_strdup(host)) == NULL) return(INVALID_SOCKET);
|
||||||
|
|
||||||
@@ -661,6 +661,7 @@ int BIO_accept(int sock, char **addr)
|
|||||||
ret=accept(sock,(struct sockaddr *)&from,(void *)&len);
|
ret=accept(sock,(struct sockaddr *)&from,(void *)&len);
|
||||||
if (ret == INVALID_SOCKET)
|
if (ret == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
|
if(BIO_sock_should_retry(ret)) return -2;
|
||||||
SYSerr(SYS_F_ACCEPT,get_last_socket_error());
|
SYSerr(SYS_F_ACCEPT,get_last_socket_error());
|
||||||
BIOerr(BIO_F_BIO_ACCEPT,BIO_R_ACCEPT_ERROR);
|
BIOerr(BIO_F_BIO_ACCEPT,BIO_R_ACCEPT_ERROR);
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ extern "C" {
|
|||||||
#define BIO_retry_type(a) ((a)->flags & BIO_FLAGS_RWS)
|
#define BIO_retry_type(a) ((a)->flags & BIO_FLAGS_RWS)
|
||||||
#define BIO_should_retry(a) ((a)->flags & BIO_FLAGS_SHOULD_RETRY)
|
#define BIO_should_retry(a) ((a)->flags & BIO_FLAGS_SHOULD_RETRY)
|
||||||
|
|
||||||
/* The next two are used in conjunction with the
|
/* The next three are used in conjunction with the
|
||||||
* BIO_should_io_special() condition. After this returns true,
|
* BIO_should_io_special() condition. After this returns true,
|
||||||
* BIO *BIO_get_retry_BIO(BIO *bio, int *reason); will walk the BIO
|
* BIO *BIO_get_retry_BIO(BIO *bio, int *reason); will walk the BIO
|
||||||
* stack and return the 'reason' for the special and the offending BIO.
|
* stack and return the 'reason' for the special and the offending BIO.
|
||||||
@@ -188,6 +188,8 @@ extern "C" {
|
|||||||
#define BIO_RR_SSL_X509_LOOKUP 0x01
|
#define BIO_RR_SSL_X509_LOOKUP 0x01
|
||||||
/* Returned from the connect BIO when a connect would have blocked */
|
/* Returned from the connect BIO when a connect would have blocked */
|
||||||
#define BIO_RR_CONNECT 0x02
|
#define BIO_RR_CONNECT 0x02
|
||||||
|
/* Returned from the accept BIO when an accept would have blocked */
|
||||||
|
#define BIO_RR_ACCEPT 0x03
|
||||||
|
|
||||||
/* These are passed by the BIO callback */
|
/* These are passed by the BIO callback */
|
||||||
#define BIO_CB_FREE 0x01
|
#define BIO_CB_FREE 0x01
|
||||||
|
|||||||
@@ -236,8 +236,20 @@ again:
|
|||||||
c->state=ACPT_S_OK;
|
c->state=ACPT_S_OK;
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
|
BIO_clear_retry_flags(b);
|
||||||
|
b->retry_reason=0;
|
||||||
i=BIO_accept(c->accept_sock,&(c->addr));
|
i=BIO_accept(c->accept_sock,&(c->addr));
|
||||||
|
|
||||||
|
/* -2 return means we should retry */
|
||||||
|
if(i == -2)
|
||||||
|
{
|
||||||
|
BIO_set_retry_special(b);
|
||||||
|
b->retry_reason=BIO_RR_ACCEPT;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (i < 0) return(i);
|
if (i < 0) return(i);
|
||||||
|
|
||||||
bio=BIO_new_socket(i,BIO_CLOSE);
|
bio=BIO_new_socket(i,BIO_CLOSE);
|
||||||
if (bio == NULL) goto err;
|
if (bio == NULL) goto err;
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ bnbug: bnbug.c ../../libcrypto.a top
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
# elf
|
# elf
|
||||||
|
|||||||
@@ -1611,7 +1611,7 @@ bn_mul_comba4
|
|||||||
.IMPORT $global$,DATA
|
.IMPORT $global$,DATA
|
||||||
.SPACE $TEXT$
|
.SPACE $TEXT$
|
||||||
.SUBSPA $CODE$
|
.SUBSPA $CODE$
|
||||||
.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
|
.SUBSPA $LIT$,ACCESS=0x2c
|
||||||
C$7
|
C$7
|
||||||
.ALIGN 8
|
.ALIGN 8
|
||||||
.STRINGZ "Division would overflow (%d)\n"
|
.STRINGZ "Division would overflow (%d)\n"
|
||||||
|
|||||||
@@ -1598,7 +1598,7 @@ bn_mul_comba4
|
|||||||
.IMPORT $global$,DATA
|
.IMPORT $global$,DATA
|
||||||
.SPACE $TEXT$
|
.SPACE $TEXT$
|
||||||
.SUBSPA $CODE$
|
.SUBSPA $CODE$
|
||||||
.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=16
|
.SUBSPA $LIT$,ACCESS=0x2c
|
||||||
C$4
|
C$4
|
||||||
.ALIGN 8
|
.ALIGN 8
|
||||||
.STRINGZ "Division would overflow (%d)\n"
|
.STRINGZ "Division would overflow (%d)\n"
|
||||||
|
|||||||
@@ -113,6 +113,13 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include "bn_lcl.h"
|
#include "bn_lcl.h"
|
||||||
|
#ifdef ATALLA
|
||||||
|
# include <alloca.h>
|
||||||
|
# include <atasi.h>
|
||||||
|
# include <assert.h>
|
||||||
|
# include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define TABLE_SIZE 32
|
#define TABLE_SIZE 32
|
||||||
|
|
||||||
@@ -176,6 +183,174 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef ATALLA
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This routine will dynamically check for the existance of an Atalla AXL-200
|
||||||
|
* SSL accelerator module. If one is found, the variable
|
||||||
|
* asi_accelerator_present is set to 1 and the function pointers
|
||||||
|
* ptr_ASI_xxxxxx above will be initialized to corresponding ASI API calls.
|
||||||
|
*/
|
||||||
|
typedef int tfnASI_GetPerformanceStatistics(int reset_flag,
|
||||||
|
unsigned int *ret_buf);
|
||||||
|
typedef int tfnASI_GetHardwareConfig(long card_num, unsigned int *ret_buf);
|
||||||
|
typedef int tfnASI_RSAPrivateKeyOpFn(RSAPrivateKey * rsaKey,
|
||||||
|
unsigned char *output,
|
||||||
|
unsigned char *input,
|
||||||
|
unsigned int modulus_len);
|
||||||
|
|
||||||
|
static tfnASI_GetHardwareConfig *ptr_ASI_GetHardwareConfig;
|
||||||
|
static tfnASI_RSAPrivateKeyOpFn *ptr_ASI_RSAPrivateKeyOpFn;
|
||||||
|
static tfnASI_GetPerformanceStatistics *ptr_ASI_GetPerformanceStatistics;
|
||||||
|
static int asi_accelerator_present;
|
||||||
|
static int tried_atalla;
|
||||||
|
|
||||||
|
void atalla_initialize_accelerator_handle(void)
|
||||||
|
{
|
||||||
|
void *dl_handle;
|
||||||
|
int status;
|
||||||
|
unsigned int config_buf[1024];
|
||||||
|
static int tested;
|
||||||
|
|
||||||
|
if(tested)
|
||||||
|
return;
|
||||||
|
|
||||||
|
tested=1;
|
||||||
|
|
||||||
|
bzero((void *)config_buf, 1024);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check to see if the library is present on the system
|
||||||
|
*/
|
||||||
|
dl_handle = dlopen("atasi.so", RTLD_NOW);
|
||||||
|
if (dl_handle == (void *) NULL)
|
||||||
|
{
|
||||||
|
/* printf("atasi.so library is not present on the system\n");
|
||||||
|
printf("No HW acceleration available\n");*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The library is present. Now we'll check to insure that the
|
||||||
|
* LDM is up and running. First we'll get the address of the
|
||||||
|
* function in the atasi library that we need to see if the
|
||||||
|
* LDM is operating.
|
||||||
|
*/
|
||||||
|
|
||||||
|
ptr_ASI_GetHardwareConfig =
|
||||||
|
(tfnASI_GetHardwareConfig *)dlsym(dl_handle,"ASI_GetHardwareConfig");
|
||||||
|
|
||||||
|
if (ptr_ASI_GetHardwareConfig)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* We found the call, now we'll get our config
|
||||||
|
* status. If we get a non 0 result, the LDM is not
|
||||||
|
* running and we cannot use the Atalla ASI *
|
||||||
|
* library.
|
||||||
|
*/
|
||||||
|
status = (*ptr_ASI_GetHardwareConfig)(0L, config_buf);
|
||||||
|
if (status != 0)
|
||||||
|
{
|
||||||
|
printf("atasi.so library is present but not initialized\n");
|
||||||
|
printf("No HW acceleration available\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* printf("We found the library, but not the function. Very Strange!\n");*/
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* It looks like we have acceleration capabilities. Load up the
|
||||||
|
* pointers to our ASI API calls.
|
||||||
|
*/
|
||||||
|
ptr_ASI_RSAPrivateKeyOpFn=
|
||||||
|
(tfnASI_RSAPrivateKeyOpFn *)dlsym(dl_handle, "ASI_RSAPrivateKeyOpFn");
|
||||||
|
if (ptr_ASI_RSAPrivateKeyOpFn == NULL)
|
||||||
|
{
|
||||||
|
/* printf("We found the library, but no RSA function. Very Strange!\n");*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ptr_ASI_GetPerformanceStatistics =
|
||||||
|
(tfnASI_GetPerformanceStatistics *)dlsym(dl_handle, "ASI_GetPerformanceStatistics");
|
||||||
|
if (ptr_ASI_GetPerformanceStatistics == NULL)
|
||||||
|
{
|
||||||
|
/* printf("We found the library, but no stat function. Very Strange!\n");*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Indicate that acceleration is available
|
||||||
|
*/
|
||||||
|
asi_accelerator_present = 1;
|
||||||
|
|
||||||
|
/* printf("This system has acceleration!\n");*/
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* make sure this only gets called once when bn_mod_exp calls bn_mod_exp_mont */
|
||||||
|
int BN_mod_exp_atalla(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m)
|
||||||
|
{
|
||||||
|
unsigned char *abin;
|
||||||
|
unsigned char *pbin;
|
||||||
|
unsigned char *mbin;
|
||||||
|
unsigned char *rbin;
|
||||||
|
int an,pn,mn,ret;
|
||||||
|
RSAPrivateKey keydata;
|
||||||
|
|
||||||
|
atalla_initialize_accelerator_handle();
|
||||||
|
if(!asi_accelerator_present)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
/* We should be able to run without size testing */
|
||||||
|
# define ASIZE 128
|
||||||
|
an=BN_num_bytes(a);
|
||||||
|
pn=BN_num_bytes(p);
|
||||||
|
mn=BN_num_bytes(m);
|
||||||
|
|
||||||
|
if(an <= ASIZE && pn <= ASIZE && mn <= ASIZE)
|
||||||
|
{
|
||||||
|
int size=mn;
|
||||||
|
|
||||||
|
assert(an <= mn);
|
||||||
|
abin=alloca(size);
|
||||||
|
memset(abin,'\0',mn);
|
||||||
|
BN_bn2bin(a,abin+size-an);
|
||||||
|
|
||||||
|
pbin=alloca(pn);
|
||||||
|
BN_bn2bin(p,pbin);
|
||||||
|
|
||||||
|
mbin=alloca(size);
|
||||||
|
memset(mbin,'\0',mn);
|
||||||
|
BN_bn2bin(m,mbin+size-mn);
|
||||||
|
|
||||||
|
rbin=alloca(size);
|
||||||
|
|
||||||
|
memset(&keydata,'\0',sizeof keydata);
|
||||||
|
keydata.privateExponent.data=pbin;
|
||||||
|
keydata.privateExponent.len=pn;
|
||||||
|
keydata.modulus.data=mbin;
|
||||||
|
keydata.modulus.len=size;
|
||||||
|
|
||||||
|
ret=(*ptr_ASI_RSAPrivateKeyOpFn)(&keydata,rbin,abin,keydata.modulus.len);
|
||||||
|
/*fprintf(stderr,"!%s\n",BN_bn2hex(a));*/
|
||||||
|
if(!ret)
|
||||||
|
{
|
||||||
|
BN_bin2bn(rbin,keydata.modulus.len,r);
|
||||||
|
/*fprintf(stderr,"?%s\n",BN_bn2hex(r));*/
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* def ATALLA */
|
||||||
|
|
||||||
|
|
||||||
int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
|
int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
|
||||||
BN_CTX *ctx)
|
BN_CTX *ctx)
|
||||||
{
|
{
|
||||||
@@ -185,6 +360,13 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
|
|||||||
bn_check_top(p);
|
bn_check_top(p);
|
||||||
bn_check_top(m);
|
bn_check_top(m);
|
||||||
|
|
||||||
|
#ifdef ATALLA
|
||||||
|
if(BN_mod_exp_atalla(r,a,p,m))
|
||||||
|
return 1;
|
||||||
|
/* If it fails, try the other methods (but don't try atalla again) */
|
||||||
|
tried_atalla=1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MONT_MUL_MOD
|
#ifdef MONT_MUL_MOD
|
||||||
/* I have finally been able to take out this pre-condition of
|
/* I have finally been able to take out this pre-condition of
|
||||||
* the top bit being set. It was caused by an error in BN_div
|
* the top bit being set. It was caused by an error in BN_div
|
||||||
@@ -210,6 +392,10 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
|
|||||||
{ ret=BN_mod_exp_simple(r,a,p,m,ctx); }
|
{ ret=BN_mod_exp_simple(r,a,p,m,ctx); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ATALLA
|
||||||
|
tried_atalla=0;
|
||||||
|
#endif
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,6 +525,12 @@ int BN_mod_exp_mont(BIGNUM *rr, BIGNUM *a, const BIGNUM *p,
|
|||||||
bn_check_top(p);
|
bn_check_top(p);
|
||||||
bn_check_top(m);
|
bn_check_top(m);
|
||||||
|
|
||||||
|
#ifdef ATALLA
|
||||||
|
if(!tried_atalla && BN_mod_exp_atalla(rr,a,p,m))
|
||||||
|
return 1;
|
||||||
|
/* If it fails, try the other methods */
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!(m->d[0] & 1))
|
if (!(m->d[0] & 1))
|
||||||
{
|
{
|
||||||
BNerr(BN_F_BN_MOD_EXP_MONT,BN_R_CALLED_WITH_EVEN_MODULUS);
|
BNerr(BN_F_BN_MOD_EXP_MONT,BN_R_CALLED_WITH_EVEN_MODULUS);
|
||||||
@@ -501,6 +693,19 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
|
|||||||
t = BN_CTX_get(ctx);
|
t = BN_CTX_get(ctx);
|
||||||
if (d == NULL || r == NULL || t == NULL) goto err;
|
if (d == NULL || r == NULL || t == NULL) goto err;
|
||||||
|
|
||||||
|
#ifdef ATALLA
|
||||||
|
if (!tried_atalla)
|
||||||
|
{
|
||||||
|
BN_set_word(t, a);
|
||||||
|
if (BN_mod_exp_atalla(rr, t, p, m))
|
||||||
|
{
|
||||||
|
BN_CTX_end(ctx);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* If it fails, try the other methods */
|
||||||
|
#endif
|
||||||
|
|
||||||
if (in_mont != NULL)
|
if (in_mont != NULL)
|
||||||
mont=in_mont;
|
mont=in_mont;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
# elf
|
# elf
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -90,10 +90,11 @@ struct conf_method_st
|
|||||||
int (MS_FAR *init)(CONF *conf);
|
int (MS_FAR *init)(CONF *conf);
|
||||||
int (MS_FAR *destroy)(CONF *conf);
|
int (MS_FAR *destroy)(CONF *conf);
|
||||||
int (MS_FAR *destroy_data)(CONF *conf);
|
int (MS_FAR *destroy_data)(CONF *conf);
|
||||||
int (MS_FAR *load)(CONF *conf, BIO *bp, long *eline);
|
int (MS_FAR *load_bio)(CONF *conf, BIO *bp, long *eline);
|
||||||
int (MS_FAR *dump)(CONF *conf, BIO *bp);
|
int (MS_FAR *dump)(CONF *conf, BIO *bp);
|
||||||
int (MS_FAR *is_number)(CONF *conf, char c);
|
int (MS_FAR *is_number)(CONF *conf, char c);
|
||||||
int (MS_FAR *to_int)(CONF *conf, char c);
|
int (MS_FAR *to_int)(CONF *conf, char c);
|
||||||
|
int (MS_FAR *load)(CONF *conf, const char *name, long *eline);
|
||||||
};
|
};
|
||||||
|
|
||||||
int CONF_set_default_method(CONF_METHOD *meth);
|
int CONF_set_default_method(CONF_METHOD *meth);
|
||||||
@@ -136,10 +137,17 @@ int NCONF_load_fp(CONF *conf, FILE *fp,long *eline);
|
|||||||
int NCONF_load_bio(CONF *conf, BIO *bp,long *eline);
|
int NCONF_load_bio(CONF *conf, BIO *bp,long *eline);
|
||||||
STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section);
|
STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section);
|
||||||
char *NCONF_get_string(CONF *conf,char *group,char *name);
|
char *NCONF_get_string(CONF *conf,char *group,char *name);
|
||||||
long NCONF_get_number(CONF *conf,char *group,char *name);
|
int NCONF_get_number_e(CONF *conf,char *group,char *name,long *result);
|
||||||
int NCONF_dump_fp(CONF *conf, FILE *out);
|
int NCONF_dump_fp(CONF *conf, FILE *out);
|
||||||
int NCONF_dump_bio(CONF *conf, BIO *out);
|
int NCONF_dump_bio(CONF *conf, BIO *out);
|
||||||
|
|
||||||
|
#if 0 /* The following function has no error checking,
|
||||||
|
and should therefore be avoided */
|
||||||
|
long NCONF_get_number(CONF *conf,char *group,char *name);
|
||||||
|
#else
|
||||||
|
#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
/* BEGIN ERROR CODES */
|
||||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||||
@@ -156,9 +164,12 @@ int NCONF_dump_bio(CONF *conf, BIO *out);
|
|||||||
#define CONF_F_NCONF_DUMP_BIO 105
|
#define CONF_F_NCONF_DUMP_BIO 105
|
||||||
#define CONF_F_NCONF_DUMP_FP 106
|
#define CONF_F_NCONF_DUMP_FP 106
|
||||||
#define CONF_F_NCONF_GET_NUMBER 107
|
#define CONF_F_NCONF_GET_NUMBER 107
|
||||||
|
#define CONF_F_NCONF_GET_NUMBER_E 112
|
||||||
#define CONF_F_NCONF_GET_SECTION 108
|
#define CONF_F_NCONF_GET_SECTION 108
|
||||||
#define CONF_F_NCONF_GET_STRING 109
|
#define CONF_F_NCONF_GET_STRING 109
|
||||||
|
#define CONF_F_NCONF_LOAD 113
|
||||||
#define CONF_F_NCONF_LOAD_BIO 110
|
#define CONF_F_NCONF_LOAD_BIO 110
|
||||||
|
#define CONF_F_NCONF_LOAD_FP 114
|
||||||
#define CONF_F_NCONF_NEW 111
|
#define CONF_F_NCONF_NEW 111
|
||||||
#define CONF_F_STR_COPY 101
|
#define CONF_F_STR_COPY 101
|
||||||
|
|
||||||
@@ -167,6 +178,9 @@ int NCONF_dump_bio(CONF *conf, BIO *out);
|
|||||||
#define CONF_R_MISSING_EQUAL_SIGN 101
|
#define CONF_R_MISSING_EQUAL_SIGN 101
|
||||||
#define CONF_R_NO_CLOSE_BRACE 102
|
#define CONF_R_NO_CLOSE_BRACE 102
|
||||||
#define CONF_R_NO_CONF 105
|
#define CONF_R_NO_CONF 105
|
||||||
|
#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
|
||||||
|
#define CONF_R_NO_SECTION 107
|
||||||
|
#define CONF_R_NO_VALUE 108
|
||||||
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
|
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
|
||||||
#define CONF_R_VARIABLE_HAS_NO_VALUE 104
|
#define CONF_R_VARIABLE_HAS_NO_VALUE 104
|
||||||
|
|
||||||
|
|||||||
@@ -153,6 +153,9 @@ char *_CONF_get_string(CONF *conf, char *section, char *name)
|
|||||||
return(Getenv(name));
|
return(Getenv(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* There's no way to provide error checking with this function, so
|
||||||
|
force implementors of the higher levels to get a string and read
|
||||||
|
the number themselves. */
|
||||||
long _CONF_get_number(CONF *conf, char *section, char *name)
|
long _CONF_get_number(CONF *conf, char *section, char *name)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
@@ -169,6 +172,7 @@ long _CONF_get_number(CONF *conf, char *section, char *name)
|
|||||||
str++;
|
str++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int _CONF_new_data(CONF *conf)
|
int _CONF_new_data(CONF *conf)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ static int def_init_default(CONF *conf);
|
|||||||
static int def_init_WIN32(CONF *conf);
|
static int def_init_WIN32(CONF *conf);
|
||||||
static int def_destroy(CONF *conf);
|
static int def_destroy(CONF *conf);
|
||||||
static int def_destroy_data(CONF *conf);
|
static int def_destroy_data(CONF *conf);
|
||||||
static int def_load(CONF *conf, BIO *bp, long *eline);
|
static int def_load(CONF *conf, const char *name, long *eline);
|
||||||
|
static int def_load_bio(CONF *conf, BIO *bp, long *eline);
|
||||||
static int def_dump(CONF *conf, BIO *bp);
|
static int def_dump(CONF *conf, BIO *bp);
|
||||||
static int def_is_number(CONF *conf, char c);
|
static int def_is_number(CONF *conf, char c);
|
||||||
static int def_to_int(CONF *conf, char c);
|
static int def_to_int(CONF *conf, char c);
|
||||||
@@ -94,10 +95,11 @@ static CONF_METHOD default_method = {
|
|||||||
def_init_default,
|
def_init_default,
|
||||||
def_destroy,
|
def_destroy,
|
||||||
def_destroy_data,
|
def_destroy_data,
|
||||||
def_load,
|
def_load_bio,
|
||||||
def_dump,
|
def_dump,
|
||||||
def_is_number,
|
def_is_number,
|
||||||
def_to_int
|
def_to_int,
|
||||||
|
def_load
|
||||||
};
|
};
|
||||||
|
|
||||||
static CONF_METHOD WIN32_method = {
|
static CONF_METHOD WIN32_method = {
|
||||||
@@ -106,10 +108,11 @@ static CONF_METHOD WIN32_method = {
|
|||||||
def_init_WIN32,
|
def_init_WIN32,
|
||||||
def_destroy,
|
def_destroy,
|
||||||
def_destroy_data,
|
def_destroy_data,
|
||||||
def_load,
|
def_load_bio,
|
||||||
def_dump,
|
def_dump,
|
||||||
def_is_number,
|
def_is_number,
|
||||||
def_to_int
|
def_to_int,
|
||||||
|
def_load
|
||||||
};
|
};
|
||||||
|
|
||||||
CONF_METHOD *NCONF_default()
|
CONF_METHOD *NCONF_default()
|
||||||
@@ -177,7 +180,29 @@ static int def_destroy_data(CONF *conf)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int def_load(CONF *conf, BIO *in, long *line)
|
static int def_load(CONF *conf, const char *name, long *line)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
BIO *in=NULL;
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
in=BIO_new_file(name, "r");
|
||||||
|
#else
|
||||||
|
in=BIO_new_file(name, "rb");
|
||||||
|
#endif
|
||||||
|
if (in == NULL)
|
||||||
|
{
|
||||||
|
CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = def_load_bio(conf, in, line);
|
||||||
|
BIO_free(in);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int def_load_bio(CONF *conf, BIO *in, long *line)
|
||||||
{
|
{
|
||||||
#define BUFSIZE 512
|
#define BUFSIZE 512
|
||||||
char btmp[16];
|
char btmp[16];
|
||||||
|
|||||||
@@ -73,9 +73,12 @@ static ERR_STRING_DATA CONF_str_functs[]=
|
|||||||
{ERR_PACK(0,CONF_F_NCONF_DUMP_BIO,0), "NCONF_dump_bio"},
|
{ERR_PACK(0,CONF_F_NCONF_DUMP_BIO,0), "NCONF_dump_bio"},
|
||||||
{ERR_PACK(0,CONF_F_NCONF_DUMP_FP,0), "NCONF_dump_fp"},
|
{ERR_PACK(0,CONF_F_NCONF_DUMP_FP,0), "NCONF_dump_fp"},
|
||||||
{ERR_PACK(0,CONF_F_NCONF_GET_NUMBER,0), "NCONF_get_number"},
|
{ERR_PACK(0,CONF_F_NCONF_GET_NUMBER,0), "NCONF_get_number"},
|
||||||
|
{ERR_PACK(0,CONF_F_NCONF_GET_NUMBER_E,0), "NCONF_get_number_e"},
|
||||||
{ERR_PACK(0,CONF_F_NCONF_GET_SECTION,0), "NCONF_get_section"},
|
{ERR_PACK(0,CONF_F_NCONF_GET_SECTION,0), "NCONF_get_section"},
|
||||||
{ERR_PACK(0,CONF_F_NCONF_GET_STRING,0), "NCONF_get_string"},
|
{ERR_PACK(0,CONF_F_NCONF_GET_STRING,0), "NCONF_get_string"},
|
||||||
|
{ERR_PACK(0,CONF_F_NCONF_LOAD,0), "NCONF_load"},
|
||||||
{ERR_PACK(0,CONF_F_NCONF_LOAD_BIO,0), "NCONF_load_bio"},
|
{ERR_PACK(0,CONF_F_NCONF_LOAD_BIO,0), "NCONF_load_bio"},
|
||||||
|
{ERR_PACK(0,CONF_F_NCONF_LOAD_FP,0), "NCONF_load_fp"},
|
||||||
{ERR_PACK(0,CONF_F_NCONF_NEW,0), "NCONF_new"},
|
{ERR_PACK(0,CONF_F_NCONF_NEW,0), "NCONF_new"},
|
||||||
{ERR_PACK(0,CONF_F_STR_COPY,0), "STR_COPY"},
|
{ERR_PACK(0,CONF_F_STR_COPY,0), "STR_COPY"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
@@ -87,6 +90,9 @@ static ERR_STRING_DATA CONF_str_reasons[]=
|
|||||||
{CONF_R_MISSING_EQUAL_SIGN ,"missing equal sign"},
|
{CONF_R_MISSING_EQUAL_SIGN ,"missing equal sign"},
|
||||||
{CONF_R_NO_CLOSE_BRACE ,"no close brace"},
|
{CONF_R_NO_CLOSE_BRACE ,"no close brace"},
|
||||||
{CONF_R_NO_CONF ,"no conf"},
|
{CONF_R_NO_CONF ,"no conf"},
|
||||||
|
{CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE ,"no conf or environment variable"},
|
||||||
|
{CONF_R_NO_SECTION ,"no section"},
|
||||||
|
{CONF_R_NO_VALUE ,"no value"},
|
||||||
{CONF_R_UNABLE_TO_CREATE_NEW_SECTION ,"unable to create new section"},
|
{CONF_R_UNABLE_TO_CREATE_NEW_SECTION ,"unable to create new section"},
|
||||||
{CONF_R_VARIABLE_HAS_NO_VALUE ,"variable has no value"},
|
{CONF_R_VARIABLE_HAS_NO_VALUE ,"variable has no value"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
|
|||||||
@@ -156,13 +156,21 @@ char *CONF_get_string(LHASH *conf,char *group,char *name)
|
|||||||
long CONF_get_number(LHASH *conf,char *group,char *name)
|
long CONF_get_number(LHASH *conf,char *group,char *name)
|
||||||
{
|
{
|
||||||
CONF ctmp;
|
CONF ctmp;
|
||||||
|
int status;
|
||||||
|
long result = 0;
|
||||||
|
|
||||||
if (default_CONF_method == NULL)
|
if (default_CONF_method == NULL)
|
||||||
default_CONF_method = NCONF_default();
|
default_CONF_method = NCONF_default();
|
||||||
|
|
||||||
default_CONF_method->init(&ctmp);
|
default_CONF_method->init(&ctmp);
|
||||||
ctmp.data = conf;
|
ctmp.data = conf;
|
||||||
return NCONF_get_number(&ctmp, group, name);
|
status = NCONF_get_number_e(&ctmp, group, name, &result);
|
||||||
|
if (status == 0)
|
||||||
|
{
|
||||||
|
/* This function does not believe in errors... */
|
||||||
|
ERR_get_error();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CONF_free(LHASH *conf)
|
void CONF_free(LHASH *conf)
|
||||||
@@ -244,24 +252,13 @@ void NCONF_free_data(CONF *conf)
|
|||||||
|
|
||||||
int NCONF_load(CONF *conf, const char *file, long *eline)
|
int NCONF_load(CONF *conf, const char *file, long *eline)
|
||||||
{
|
{
|
||||||
int ret;
|
if (conf == NULL)
|
||||||
BIO *in=NULL;
|
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
in=BIO_new_file(file, "r");
|
|
||||||
#else
|
|
||||||
in=BIO_new_file(file, "rb");
|
|
||||||
#endif
|
|
||||||
if (in == NULL)
|
|
||||||
{
|
{
|
||||||
CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
|
CONFerr(CONF_F_NCONF_LOAD,CONF_R_NO_CONF);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = NCONF_load_bio(conf, in, eline);
|
return conf->meth->load(conf, file, eline);
|
||||||
BIO_free(in);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_FP_API
|
#ifndef NO_FP_API
|
||||||
@@ -271,7 +268,7 @@ int NCONF_load_fp(CONF *conf, FILE *fp,long *eline)
|
|||||||
int ret;
|
int ret;
|
||||||
if(!(btmp = BIO_new_fp(fp, BIO_NOCLOSE)))
|
if(!(btmp = BIO_new_fp(fp, BIO_NOCLOSE)))
|
||||||
{
|
{
|
||||||
CONFerr(CONF_F_CONF_LOAD_FP,ERR_R_BUF_LIB);
|
CONFerr(CONF_F_NCONF_LOAD_FP,ERR_R_BUF_LIB);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ret = NCONF_load_bio(conf, btmp, eline);
|
ret = NCONF_load_bio(conf, btmp, eline);
|
||||||
@@ -288,7 +285,7 @@ int NCONF_load_bio(CONF *conf, BIO *bp,long *eline)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf->meth->load(conf, bp, eline);
|
return conf->meth->load_bio(conf, bp, eline);
|
||||||
}
|
}
|
||||||
|
|
||||||
STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section)
|
STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section)
|
||||||
@@ -299,29 +296,56 @@ STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (section == NULL)
|
||||||
|
{
|
||||||
|
CONFerr(CONF_F_NCONF_GET_SECTION,CONF_R_NO_SECTION);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return _CONF_get_section_values(conf, section);
|
return _CONF_get_section_values(conf, section);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *NCONF_get_string(CONF *conf,char *group,char *name)
|
char *NCONF_get_string(CONF *conf,char *group,char *name)
|
||||||
{
|
{
|
||||||
|
char *s = _CONF_get_string(conf, group, name);
|
||||||
|
|
||||||
|
/* Since we may get a value from an environment variable even
|
||||||
|
if conf is NULL, let's check the value first */
|
||||||
|
if (s) return s;
|
||||||
|
|
||||||
if (conf == NULL)
|
if (conf == NULL)
|
||||||
{
|
{
|
||||||
CONFerr(CONF_F_NCONF_GET_STRING,CONF_R_NO_CONF);
|
CONFerr(CONF_F_NCONF_GET_STRING,
|
||||||
|
CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
CONFerr(CONF_F_NCONF_GET_STRING,
|
||||||
return _CONF_get_string(conf, group, name);
|
CONF_R_NO_VALUE);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
long NCONF_get_number(CONF *conf,char *group,char *name)
|
int NCONF_get_number_e(CONF *conf,char *group,char *name,long *result)
|
||||||
{
|
{
|
||||||
if (conf == NULL)
|
char *str;
|
||||||
|
|
||||||
|
if (result == NULL)
|
||||||
{
|
{
|
||||||
CONFerr(CONF_F_NCONF_GET_NUMBER,CONF_R_NO_CONF);
|
CONFerr(CONF_F_NCONF_GET_NUMBER_E,ERR_R_PASSED_NULL_PARAMETER);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _CONF_get_number(conf, group, name);
|
str = NCONF_get_string(conf,group,name);
|
||||||
|
|
||||||
|
if (str == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (;conf->meth->is_number(conf, *str);)
|
||||||
|
{
|
||||||
|
*result = (*result)*10 + conf->meth->to_int(conf, *str);
|
||||||
|
str++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_FP_API
|
#ifndef NO_FP_API
|
||||||
@@ -350,3 +374,19 @@ int NCONF_dump_bio(CONF *conf, BIO *out)
|
|||||||
return conf->meth->dump(conf, out);
|
return conf->meth->dump(conf, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This function should be avoided */
|
||||||
|
#undef NCONF_get_number
|
||||||
|
long NCONF_get_number(CONF *conf,char *group,char *name)
|
||||||
|
{
|
||||||
|
int status;
|
||||||
|
long ret=0;
|
||||||
|
|
||||||
|
status = NCONF_get_number_e(conf, group, name, &ret);
|
||||||
|
if (status == 0)
|
||||||
|
{
|
||||||
|
/* This function does not believe in errors... */
|
||||||
|
ERR_get_error();
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,8 +100,7 @@ static const char* lock_names[CRYPTO_NUM_LOCKS] =
|
|||||||
"debug_malloc2",
|
"debug_malloc2",
|
||||||
"dso",
|
"dso",
|
||||||
"dynlock",
|
"dynlock",
|
||||||
"engine",
|
#if CRYPTO_NUM_LOCKS != 28
|
||||||
#if CRYPTO_NUM_LOCKS != 29
|
|
||||||
# error "Inconsistency between crypto.h and cryptlib.c"
|
# error "Inconsistency between crypto.h and cryptlib.c"
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ $! Define The Different Encryption Types.
|
|||||||
$!
|
$!
|
||||||
$ ENCRYPT_TYPES = "Basic,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ -
|
$ ENCRYPT_TYPES = "Basic,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ -
|
||||||
"DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ -
|
"DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ -
|
||||||
"BN,RSA,DSA,DH,DSO,ENGINE,"+ -
|
"BN,RSA,DSA,DH,DSO,"+ -
|
||||||
"BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ -
|
"BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ -
|
||||||
"EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
|
"EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
|
||||||
"CONF,TXT_DB,PKCS7,PKCS12,COMP"
|
"CONF,TXT_DB,PKCS7,PKCS12,COMP"
|
||||||
@@ -206,8 +206,6 @@ $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl"
|
|||||||
$ LIB_DH = "dh_gen,dh_key,dh_lib,dh_check,dh_err"
|
$ LIB_DH = "dh_gen,dh_key,dh_lib,dh_check,dh_err"
|
||||||
$ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
|
$ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
|
||||||
"dso_openssl,dso_win32,dso_vms"
|
"dso_openssl,dso_win32,dso_vms"
|
||||||
$ LIB_ENGINE = "engine_err,engine_lib,engine_list,engine_openssl,"+ -
|
|
||||||
"hw_atalla,hw_cswift,hw_ncipher"
|
|
||||||
$ LIB_BUFFER = "buffer,buf_err"
|
$ LIB_BUFFER = "buffer,buf_err"
|
||||||
$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
|
$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
|
||||||
"bss_mem,bss_null,bss_fd,"+ -
|
"bss_mem,bss_null,bss_fd,"+ -
|
||||||
@@ -1196,9 +1194,7 @@ $ CC = "CC"
|
|||||||
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
|
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
|
||||||
THEN CC = "CC/DECC"
|
THEN CC = "CC/DECC"
|
||||||
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
|
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
|
||||||
"/NOLIST/PREFIX=ALL" + -
|
"/NOLIST/PREFIX=ALL/INCLUDE=SYS$DISK:[]" + CCEXTRAFLAGS
|
||||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
|
|
||||||
CCEXTRAFLAGS
|
|
||||||
$!
|
$!
|
||||||
$! Define The Linker Options File Name.
|
$! Define The Linker Options File Name.
|
||||||
$!
|
$!
|
||||||
@@ -1230,8 +1226,7 @@ $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
|
|||||||
$ EXIT
|
$ EXIT
|
||||||
$ ENDIF
|
$ ENDIF
|
||||||
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
|
||||||
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST/INCLUDE=SYS$DISK:[]" + -
|
||||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
|
|
||||||
CCEXTRAFLAGS
|
CCEXTRAFLAGS
|
||||||
$ CCDEFS = """VAXC""," + CCDEFS
|
$ CCDEFS = """VAXC""," + CCDEFS
|
||||||
$!
|
$!
|
||||||
@@ -1263,8 +1258,7 @@ $!
|
|||||||
$! Use GNU C...
|
$! Use GNU C...
|
||||||
$!
|
$!
|
||||||
$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
|
||||||
"/INCLUDE=(SYS$DISK:[],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
|
"/INCLUDE=SYS$DISK:[]" + CCEXTRAFLAGS
|
||||||
CCEXTRAFLAGS
|
|
||||||
$!
|
$!
|
||||||
$! Define The Linker Options File Name.
|
$! Define The Linker Options File Name.
|
||||||
$!
|
$!
|
||||||
|
|||||||
@@ -122,8 +122,7 @@ extern "C" {
|
|||||||
#define CRYPTO_LOCK_MALLOC2 25
|
#define CRYPTO_LOCK_MALLOC2 25
|
||||||
#define CRYPTO_LOCK_DSO 26
|
#define CRYPTO_LOCK_DSO 26
|
||||||
#define CRYPTO_LOCK_DYNLOCK 27
|
#define CRYPTO_LOCK_DYNLOCK 27
|
||||||
#define CRYPTO_LOCK_ENGINE 28
|
#define CRYPTO_NUM_LOCKS 28
|
||||||
#define CRYPTO_NUM_LOCKS 29
|
|
||||||
|
|
||||||
#define CRYPTO_LOCK 1
|
#define CRYPTO_LOCK 1
|
||||||
#define CRYPTO_UNLOCK 2
|
#define CRYPTO_UNLOCK 2
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
des: des.o cbc3_enc.o lib
|
des: des.o cbc3_enc.o lib
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
@@ -100,39 +101,19 @@ dh_gen.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
|||||||
dh_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
dh_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||||
dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
dh_gen.o: ../cryptlib.h
|
dh_gen.o: ../cryptlib.h
|
||||||
dh_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
dh_key.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
dh_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||||
dh_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
dh_key.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h
|
||||||
dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
dh_key.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||||
dh_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
dh_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
dh_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
|
||||||
dh_key.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
||||||
dh_key.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
|
||||||
dh_key.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
|
||||||
dh_key.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
dh_key.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
dh_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
|
||||||
dh_key.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
dh_key.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
||||||
dh_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
dh_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
dh_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
dh_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
dh_key.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
dh_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
dh_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
dh_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
dh_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||||
dh_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
dh_lib.o: ../../include/openssl/dh.h ../../include/openssl/e_os.h
|
||||||
dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
dh_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||||
dh_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
dh_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||||
dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
dh_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
dh_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
dh_lib.o: ../cryptlib.h
|
||||||
dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
|
||||||
dh_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
dh_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
dh_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
|
||||||
dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
dh_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
dh_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
dh_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
dh_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
dh_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
|
||||||
|
|||||||
@@ -115,11 +115,7 @@ struct dh_st
|
|||||||
|
|
||||||
int references;
|
int references;
|
||||||
CRYPTO_EX_DATA ex_data;
|
CRYPTO_EX_DATA ex_data;
|
||||||
#if 0
|
|
||||||
DH_METHOD *meth;
|
DH_METHOD *meth;
|
||||||
#else
|
|
||||||
struct engine_st *engine;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DH_GENERATOR_2 2
|
#define DH_GENERATOR_2 2
|
||||||
@@ -154,15 +150,10 @@ struct dh_st
|
|||||||
|
|
||||||
DH_METHOD *DH_OpenSSL(void);
|
DH_METHOD *DH_OpenSSL(void);
|
||||||
|
|
||||||
void DH_set_default_openssl_method(DH_METHOD *meth);
|
void DH_set_default_method(DH_METHOD *meth);
|
||||||
DH_METHOD *DH_get_default_openssl_method(void);
|
DH_METHOD *DH_get_default_method(void);
|
||||||
#if 0
|
|
||||||
DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth);
|
DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth);
|
||||||
DH *DH_new_method(DH_METHOD *meth);
|
DH *DH_new_method(DH_METHOD *meth);
|
||||||
#else
|
|
||||||
int DH_set_method(DH *dh, struct engine_st *engine);
|
|
||||||
DH *DH_new_method(struct engine_st *engine);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DH * DH_new(void);
|
DH * DH_new(void);
|
||||||
void DH_free(DH *dh);
|
void DH_free(DH *dh);
|
||||||
|
|||||||
@@ -61,7 +61,6 @@
|
|||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
static int generate_key(DH *dh);
|
static int generate_key(DH *dh);
|
||||||
static int compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);
|
static int compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);
|
||||||
@@ -73,12 +72,12 @@ static int dh_finish(DH *dh);
|
|||||||
|
|
||||||
int DH_generate_key(DH *dh)
|
int DH_generate_key(DH *dh)
|
||||||
{
|
{
|
||||||
return ENGINE_get_DH(dh->engine)->generate_key(dh);
|
return dh->meth->generate_key(dh);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh)
|
int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh)
|
||||||
{
|
{
|
||||||
return ENGINE_get_DH(dh->engine)->compute_key(key, pub_key, dh);
|
return dh->meth->compute_key(key, pub_key, dh);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DH_METHOD dh_ossl = {
|
static DH_METHOD dh_ossl = {
|
||||||
@@ -138,9 +137,8 @@ static int generate_key(DH *dh)
|
|||||||
}
|
}
|
||||||
mont=(BN_MONT_CTX *)dh->method_mont_p;
|
mont=(BN_MONT_CTX *)dh->method_mont_p;
|
||||||
|
|
||||||
if (!ENGINE_get_DH(dh->engine)->bn_mod_exp(dh, pub_key, dh->g,
|
if (!dh->meth->bn_mod_exp(dh, pub_key,dh->g,priv_key,dh->p,&ctx,mont))
|
||||||
priv_key,dh->p,&ctx,mont))
|
goto err;
|
||||||
goto err;
|
|
||||||
|
|
||||||
dh->pub_key=pub_key;
|
dh->pub_key=pub_key;
|
||||||
dh->priv_key=priv_key;
|
dh->priv_key=priv_key;
|
||||||
@@ -179,8 +177,7 @@ static int compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mont=(BN_MONT_CTX *)dh->method_mont_p;
|
mont=(BN_MONT_CTX *)dh->method_mont_p;
|
||||||
if (!ENGINE_get_DH(dh->engine)->bn_mod_exp(dh, tmp, pub_key,
|
if (!dh->meth->bn_mod_exp(dh, tmp,pub_key,dh->priv_key,dh->p,&ctx,mont))
|
||||||
dh->priv_key,dh->p,&ctx,mont))
|
|
||||||
{
|
{
|
||||||
DHerr(DH_F_DH_COMPUTE_KEY,ERR_R_BN_LIB);
|
DHerr(DH_F_DH_COMPUTE_KEY,ERR_R_BN_LIB);
|
||||||
goto err;
|
goto err;
|
||||||
|
|||||||
@@ -60,7 +60,6 @@
|
|||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
const char *DH_version="Diffie-Hellman" OPENSSL_VERSION_PTEXT;
|
const char *DH_version="Diffie-Hellman" OPENSSL_VERSION_PTEXT;
|
||||||
|
|
||||||
@@ -68,32 +67,17 @@ static DH_METHOD *default_DH_method;
|
|||||||
static int dh_meth_num = 0;
|
static int dh_meth_num = 0;
|
||||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL;
|
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dh_meth = NULL;
|
||||||
|
|
||||||
void DH_set_default_openssl_method(DH_METHOD *meth)
|
void DH_set_default_method(DH_METHOD *meth)
|
||||||
{
|
{
|
||||||
ENGINE *e;
|
default_DH_method = meth;
|
||||||
/* We'll need to notify the "openssl" ENGINE of this
|
|
||||||
* change too. We won't bother locking things down at
|
|
||||||
* our end as there was never any locking in these
|
|
||||||
* functions! */
|
|
||||||
if(default_DH_method != meth)
|
|
||||||
{
|
|
||||||
default_DH_method = meth;
|
|
||||||
e = ENGINE_by_id("openssl");
|
|
||||||
if(e)
|
|
||||||
{
|
|
||||||
ENGINE_set_DH(e, meth);
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DH_METHOD *DH_get_default_openssl_method(void)
|
DH_METHOD *DH_get_default_method(void)
|
||||||
{
|
{
|
||||||
if(!default_DH_method) default_DH_method = DH_OpenSSL();
|
if(!default_DH_method) default_DH_method = DH_OpenSSL();
|
||||||
return default_DH_method;
|
return default_DH_method;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth)
|
DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth)
|
||||||
{
|
{
|
||||||
DH_METHOD *mtmp;
|
DH_METHOD *mtmp;
|
||||||
@@ -103,37 +87,14 @@ DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth)
|
|||||||
if (meth->init) meth->init(dh);
|
if (meth->init) meth->init(dh);
|
||||||
return mtmp;
|
return mtmp;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int DH_set_method(DH *dh, ENGINE *engine)
|
|
||||||
{
|
|
||||||
ENGINE *mtmp;
|
|
||||||
DH_METHOD *meth;
|
|
||||||
mtmp = dh->engine;
|
|
||||||
meth = ENGINE_get_DH(mtmp);
|
|
||||||
if (!ENGINE_init(engine))
|
|
||||||
return 0;
|
|
||||||
if (meth->finish) meth->finish(dh);
|
|
||||||
dh->engine= engine;
|
|
||||||
meth = ENGINE_get_DH(engine);
|
|
||||||
if (meth->init) meth->init(dh);
|
|
||||||
/* SHOULD ERROR CHECK THIS!!! */
|
|
||||||
ENGINE_finish(mtmp);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DH *DH_new(void)
|
DH *DH_new(void)
|
||||||
{
|
{
|
||||||
return DH_new_method(NULL);
|
return DH_new_method(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
DH *DH_new_method(DH_METHOD *meth)
|
DH *DH_new_method(DH_METHOD *meth)
|
||||||
#else
|
|
||||||
DH *DH_new_method(ENGINE *engine)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DH_METHOD *meth;
|
|
||||||
DH *ret;
|
DH *ret;
|
||||||
ret=(DH *)OPENSSL_malloc(sizeof(DH));
|
ret=(DH *)OPENSSL_malloc(sizeof(DH));
|
||||||
|
|
||||||
@@ -142,17 +103,8 @@ DH *DH_new_method(ENGINE *engine)
|
|||||||
DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE);
|
DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
if(engine)
|
if(meth) ret->meth = meth;
|
||||||
ret->engine = engine;
|
else ret->meth = DH_get_default_method();
|
||||||
else
|
|
||||||
{
|
|
||||||
if((ret->engine=ENGINE_get_default_DH()) == NULL)
|
|
||||||
{
|
|
||||||
OPENSSL_free(ret);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
meth = ENGINE_get_DH(ret->engine);
|
|
||||||
ret->pad=0;
|
ret->pad=0;
|
||||||
ret->version=0;
|
ret->version=0;
|
||||||
ret->p=NULL;
|
ret->p=NULL;
|
||||||
@@ -167,8 +119,8 @@ DH *DH_new_method(ENGINE *engine)
|
|||||||
ret->counter = NULL;
|
ret->counter = NULL;
|
||||||
ret->method_mont_p=NULL;
|
ret->method_mont_p=NULL;
|
||||||
ret->references = 1;
|
ret->references = 1;
|
||||||
ret->flags=meth->flags;
|
ret->flags=ret->meth->flags;
|
||||||
if ((meth->init != NULL) && !meth->init(ret))
|
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
|
||||||
{
|
{
|
||||||
OPENSSL_free(ret);
|
OPENSSL_free(ret);
|
||||||
ret=NULL;
|
ret=NULL;
|
||||||
@@ -180,7 +132,6 @@ DH *DH_new_method(ENGINE *engine)
|
|||||||
|
|
||||||
void DH_free(DH *r)
|
void DH_free(DH *r)
|
||||||
{
|
{
|
||||||
DH_METHOD *meth;
|
|
||||||
int i;
|
int i;
|
||||||
if(r == NULL) return;
|
if(r == NULL) return;
|
||||||
i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH);
|
i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH);
|
||||||
@@ -198,9 +149,7 @@ void DH_free(DH *r)
|
|||||||
|
|
||||||
CRYPTO_free_ex_data(dh_meth, r, &r->ex_data);
|
CRYPTO_free_ex_data(dh_meth, r, &r->ex_data);
|
||||||
|
|
||||||
meth = ENGINE_get_DH(r->engine);
|
if(r->meth->finish) r->meth->finish(r);
|
||||||
if(meth->finish) meth->finish(r);
|
|
||||||
ENGINE_finish(r->engine);
|
|
||||||
|
|
||||||
if (r->p != NULL) BN_clear_free(r->p);
|
if (r->p != NULL) BN_clear_free(r->p);
|
||||||
if (r->g != NULL) BN_clear_free(r->g);
|
if (r->g != NULL) BN_clear_free(r->g);
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
@@ -115,75 +116,39 @@ dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
|||||||
dsa_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
dsa_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||||
dsa_key.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
dsa_key.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
dsa_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
dsa_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
dsa_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
dsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
dsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||||
dsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
dsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||||
dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||||
dsa_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||||
dsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
dsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
dsa_lib.o: ../cryptlib.h
|
||||||
dsa_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
dsa_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
dsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
|
||||||
dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
dsa_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
dsa_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
dsa_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
dsa_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
dsa_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
dsa_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
dsa_ossl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
dsa_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
dsa_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||||
dsa_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
dsa_ossl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||||
dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||||
dsa_ossl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
dsa_ossl.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
||||||
dsa_ossl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
dsa_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
dsa_ossl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
dsa_ossl.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
dsa_ossl.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
dsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
dsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
||||||
dsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
dsa_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||||
dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
dsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
|
||||||
dsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
||||||
dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||||
dsa_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||||
dsa_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
||||||
dsa_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
|
||||||
dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
|
||||||
dsa_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
dsa_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
dsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
|
||||||
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
||||||
dsa_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||||
dsa_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
dsa_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
dsa_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
dsa_sign.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
dsa_sign.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||||
dsa_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
dsa_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
|
||||||
dsa_vrf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
dsa_vrf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||||
dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
dsa_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||||
dsa_vrf.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
|
dsa_vrf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||||
dsa_vrf.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
dsa_vrf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||||
dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
|
dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||||
dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||||
dsa_vrf.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
dsa_vrf.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||||
dsa_vrf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
|
||||||
dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
dsa_vrf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||||
dsa_vrf.o: ../cryptlib.h
|
dsa_vrf.o: ../cryptlib.h
|
||||||
|
|||||||
@@ -133,11 +133,7 @@ struct dsa_st
|
|||||||
char *method_mont_p;
|
char *method_mont_p;
|
||||||
int references;
|
int references;
|
||||||
CRYPTO_EX_DATA ex_data;
|
CRYPTO_EX_DATA ex_data;
|
||||||
#if 0
|
|
||||||
DSA_METHOD *meth;
|
DSA_METHOD *meth;
|
||||||
#else
|
|
||||||
struct engine_st *engine;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DSAparams_dup(x) (DSA *)ASN1_dup((int (*)())i2d_DSAparams, \
|
#define DSAparams_dup(x) (DSA *)ASN1_dup((int (*)())i2d_DSAparams, \
|
||||||
@@ -163,20 +159,12 @@ int DSA_do_verify(const unsigned char *dgst,int dgst_len,
|
|||||||
|
|
||||||
DSA_METHOD *DSA_OpenSSL(void);
|
DSA_METHOD *DSA_OpenSSL(void);
|
||||||
|
|
||||||
void DSA_set_default_openssl_method(DSA_METHOD *);
|
void DSA_set_default_method(DSA_METHOD *);
|
||||||
DSA_METHOD *DSA_get_default_openssl_method(void);
|
DSA_METHOD *DSA_get_default_method(void);
|
||||||
#if 0
|
|
||||||
DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *);
|
DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *);
|
||||||
#else
|
|
||||||
int DSA_set_method(DSA *dsa, struct engine_st *engine);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DSA * DSA_new(void);
|
DSA * DSA_new(void);
|
||||||
#if 0
|
|
||||||
DSA * DSA_new_method(DSA_METHOD *meth);
|
DSA * DSA_new_method(DSA_METHOD *meth);
|
||||||
#else
|
|
||||||
DSA * DSA_new_method(struct engine_st *engine);
|
|
||||||
#endif
|
|
||||||
int DSA_size(DSA *);
|
int DSA_size(DSA *);
|
||||||
/* next 4 return -1 on error */
|
/* next 4 return -1 on error */
|
||||||
int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp);
|
int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp);
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT;
|
const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT;
|
||||||
|
|
||||||
@@ -71,26 +70,12 @@ static DSA_METHOD *default_DSA_method;
|
|||||||
static int dsa_meth_num = 0;
|
static int dsa_meth_num = 0;
|
||||||
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dsa_meth = NULL;
|
static STACK_OF(CRYPTO_EX_DATA_FUNCS) *dsa_meth = NULL;
|
||||||
|
|
||||||
void DSA_set_default_openssl_method(DSA_METHOD *meth)
|
void DSA_set_default_method(DSA_METHOD *meth)
|
||||||
{
|
{
|
||||||
ENGINE *e;
|
default_DSA_method = meth;
|
||||||
/* We'll need to notify the "openssl" ENGINE of this
|
|
||||||
* change too. We won't bother locking things down at
|
|
||||||
* our end as there was never any locking in these
|
|
||||||
* functions! */
|
|
||||||
if(default_DSA_method != meth)
|
|
||||||
{
|
|
||||||
default_DSA_method = meth;
|
|
||||||
e = ENGINE_by_id("openssl");
|
|
||||||
if(e)
|
|
||||||
{
|
|
||||||
ENGINE_set_DSA(e, meth);
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DSA_METHOD *DSA_get_default_openssl_method(void)
|
DSA_METHOD *DSA_get_default_method(void)
|
||||||
{
|
{
|
||||||
if(!default_DSA_method) default_DSA_method = DSA_OpenSSL();
|
if(!default_DSA_method) default_DSA_method = DSA_OpenSSL();
|
||||||
return default_DSA_method;
|
return default_DSA_method;
|
||||||
@@ -101,7 +86,6 @@ DSA *DSA_new(void)
|
|||||||
return DSA_new_method(NULL);
|
return DSA_new_method(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth)
|
DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth)
|
||||||
{
|
{
|
||||||
DSA_METHOD *mtmp;
|
DSA_METHOD *mtmp;
|
||||||
@@ -111,33 +95,10 @@ DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth)
|
|||||||
if (meth->init) meth->init(dsa);
|
if (meth->init) meth->init(dsa);
|
||||||
return mtmp;
|
return mtmp;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int DSA_set_method(DSA *dsa, ENGINE *engine)
|
|
||||||
{
|
|
||||||
ENGINE *mtmp;
|
|
||||||
DSA_METHOD *meth;
|
|
||||||
mtmp = dsa->engine;
|
|
||||||
meth = ENGINE_get_DSA(mtmp);
|
|
||||||
if (!ENGINE_init(engine))
|
|
||||||
return 0;
|
|
||||||
if (meth->finish) meth->finish(dsa);
|
|
||||||
dsa->engine = engine;
|
|
||||||
meth = ENGINE_get_DSA(engine);
|
|
||||||
if (meth->init) meth->init(dsa);
|
|
||||||
/* SHOULD ERROR CHECK THIS!!! */
|
|
||||||
ENGINE_finish(mtmp);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
DSA *DSA_new_method(DSA_METHOD *meth)
|
DSA *DSA_new_method(DSA_METHOD *meth)
|
||||||
#else
|
|
||||||
DSA *DSA_new_method(ENGINE *engine)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
DSA_METHOD *meth;
|
|
||||||
DSA *ret;
|
DSA *ret;
|
||||||
|
|
||||||
ret=(DSA *)OPENSSL_malloc(sizeof(DSA));
|
ret=(DSA *)OPENSSL_malloc(sizeof(DSA));
|
||||||
@@ -146,17 +107,8 @@ DSA *DSA_new_method(ENGINE *engine)
|
|||||||
DSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE);
|
DSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
if(engine)
|
if(meth) ret->meth = meth;
|
||||||
ret->engine = engine;
|
else ret->meth = DSA_get_default_method();
|
||||||
else
|
|
||||||
{
|
|
||||||
if((ret->engine=ENGINE_get_default_DSA()) == NULL)
|
|
||||||
{
|
|
||||||
OPENSSL_free(ret);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
meth = ENGINE_get_DSA(ret->engine);
|
|
||||||
ret->pad=0;
|
ret->pad=0;
|
||||||
ret->version=0;
|
ret->version=0;
|
||||||
ret->write_params=1;
|
ret->write_params=1;
|
||||||
@@ -172,8 +124,8 @@ DSA *DSA_new_method(ENGINE *engine)
|
|||||||
ret->method_mont_p=NULL;
|
ret->method_mont_p=NULL;
|
||||||
|
|
||||||
ret->references=1;
|
ret->references=1;
|
||||||
ret->flags=meth->flags;
|
ret->flags=ret->meth->flags;
|
||||||
if ((meth->init != NULL) && !meth->init(ret))
|
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
|
||||||
{
|
{
|
||||||
OPENSSL_free(ret);
|
OPENSSL_free(ret);
|
||||||
ret=NULL;
|
ret=NULL;
|
||||||
@@ -186,7 +138,6 @@ DSA *DSA_new_method(ENGINE *engine)
|
|||||||
|
|
||||||
void DSA_free(DSA *r)
|
void DSA_free(DSA *r)
|
||||||
{
|
{
|
||||||
DSA_METHOD *meth;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (r == NULL) return;
|
if (r == NULL) return;
|
||||||
@@ -206,9 +157,7 @@ void DSA_free(DSA *r)
|
|||||||
|
|
||||||
CRYPTO_free_ex_data(dsa_meth, r, &r->ex_data);
|
CRYPTO_free_ex_data(dsa_meth, r, &r->ex_data);
|
||||||
|
|
||||||
meth = ENGINE_get_DSA(r->engine);
|
if(r->meth->finish) r->meth->finish(r);
|
||||||
if(meth->finish) meth->finish(r);
|
|
||||||
ENGINE_finish(r->engine);
|
|
||||||
|
|
||||||
if (r->p != NULL) BN_clear_free(r->p);
|
if (r->p != NULL) BN_clear_free(r->p);
|
||||||
if (r->q != NULL) BN_clear_free(r->q);
|
if (r->q != NULL) BN_clear_free(r->q);
|
||||||
|
|||||||
@@ -64,7 +64,6 @@
|
|||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
||||||
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
|
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
|
||||||
@@ -196,7 +195,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Compute r = (g^k mod p) mod q */
|
/* Compute r = (g^k mod p) mod q */
|
||||||
if (!ENGINE_get_DSA(dsa->engine)->bn_mod_exp(dsa, r,dsa->g,&k,dsa->p,ctx,
|
if (!dsa->meth->bn_mod_exp(dsa, r,dsa->g,&k,dsa->p,ctx,
|
||||||
(BN_MONT_CTX *)dsa->method_mont_p)) goto err;
|
(BN_MONT_CTX *)dsa->method_mont_p)) goto err;
|
||||||
if (!BN_mod(r,r,dsa->q,ctx)) goto err;
|
if (!BN_mod(r,r,dsa->q,ctx)) goto err;
|
||||||
|
|
||||||
@@ -274,7 +273,7 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
|||||||
if (!BN_mod(&u1,&u1,dsa->q,ctx)) goto err;
|
if (!BN_mod(&u1,&u1,dsa->q,ctx)) goto err;
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
if (!ENGINE_get_DSA(dsa->engine)->dsa_mod_exp(dsa, &t1,dsa->g,&u1,dsa->pub_key,&u2,
|
if (!dsa->meth->dsa_mod_exp(dsa, &t1,dsa->g,&u1,dsa->pub_key,&u2,
|
||||||
dsa->p,ctx,mont)) goto err;
|
dsa->p,ctx,mont)) goto err;
|
||||||
/* BN_copy(&u1,&t1); */
|
/* BN_copy(&u1,&t1); */
|
||||||
/* let u1 = u1 mod q */
|
/* let u1 = u1 mod q */
|
||||||
|
|||||||
@@ -64,11 +64,10 @@
|
|||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
DSA_SIG * DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
||||||
{
|
{
|
||||||
return ENGINE_get_DSA(dsa->engine)->dsa_do_sign(dgst, dlen, dsa);
|
return dsa->meth->dsa_do_sign(dgst, dlen, dsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
|
int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
|
||||||
@@ -88,6 +87,6 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
|
|||||||
|
|
||||||
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||||
{
|
{
|
||||||
return ENGINE_get_DSA(dsa->engine)->dsa_sign_setup(dsa, ctx_in, kinvp, rp);
|
return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,12 +65,11 @@
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/asn1.h>
|
#include <openssl/asn1.h>
|
||||||
#include <openssl/asn1_mac.h>
|
#include <openssl/asn1_mac.h>
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig,
|
||||||
DSA *dsa)
|
DSA *dsa)
|
||||||
{
|
{
|
||||||
return ENGINE_get_DSA(dsa->engine)->dsa_do_verify(dgst, dgst_len, sig, dsa);
|
return dsa->meth->dsa_do_verify(dgst, dgst_len, sig, dsa);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* data has already been hashed (probably with SHA or SHA-1). */
|
/* data has already been hashed (probably with SHA or SHA-1). */
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ all: lib
|
|||||||
|
|
||||||
lib: $(LIBOBJ)
|
lib: $(LIBOBJ)
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
$(AR) $(LIB) $(LIBOBJ)
|
||||||
$(RANLIB) $(LIB)
|
@echo You may get an error following this line. Please ignore.
|
||||||
|
- $(RANLIB) $(LIB)
|
||||||
@touch lib
|
@touch lib
|
||||||
|
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
TODO
|
|
||||||
----
|
|
||||||
|
|
||||||
Find a way where name-translation can be done in a way that is
|
|
||||||
sensitive to particular methods (ie. generic code could still do
|
|
||||||
different path/filename substitutions on win32 to what it does on
|
|
||||||
*nix) but doesn't assume some canonical form. Already one case
|
|
||||||
exists where the "blah -> (libblah.so,blah.dll)" mapping doesn't
|
|
||||||
suffice. I suspect a callback with an enumerated (or string?)
|
|
||||||
parameter could be the way to go here ... DSO_ctrl the callback
|
|
||||||
into place and it can be invoked to handle name translation with
|
|
||||||
some clue to the calling code as to what kind of system it is.
|
|
||||||
|
|
||||||
NOTES
|
NOTES
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@@ -21,4 +8,15 @@ according to their man page, prefer developers to move to that.
|
|||||||
I'll leave Richard's changes there as I guess dso_dl is needed
|
I'll leave Richard's changes there as I guess dso_dl is needed
|
||||||
for HPUX10.20.
|
for HPUX10.20.
|
||||||
|
|
||||||
|
There is now a callback scheme in place where filename conversion can
|
||||||
|
(a) be turned off altogether through the use of the
|
||||||
|
DSO_FLAG_NO_NAME_TRANSLATION flag,
|
||||||
|
(b) be handled by default using the default DSO_METHOD's converter
|
||||||
|
(c) overriden per-DSO by setting the override callback
|
||||||
|
(d) a mix of (b) and (c) - eg. implement an override callback that;
|
||||||
|
(i) checks if we're win32 (if(strstr(dso->meth->name, "win32")....)
|
||||||
|
and if so, convert "blah" into "blah32.dll" (the default is
|
||||||
|
otherwise to make it "blah.dll").
|
||||||
|
(ii) default to the normal behaviour - we're not on win32, eg.
|
||||||
|
finish with (return dso->meth->dso_name_converter(dso,NULL)).
|
||||||
|
|
||||||
|
|||||||
159
crypto/dso/dso.h
159
crypto/dso/dso.h
@@ -70,31 +70,51 @@ extern "C" {
|
|||||||
#define DSO_CTRL_SET_FLAGS 2
|
#define DSO_CTRL_SET_FLAGS 2
|
||||||
#define DSO_CTRL_OR_FLAGS 3
|
#define DSO_CTRL_OR_FLAGS 3
|
||||||
|
|
||||||
/* These flags control the translation of file-names from canonical to
|
/* By default, DSO_load() will translate the provided filename into a form
|
||||||
* native. Eg. in the CryptoSwift support, the "dl" and "dlfcn"
|
* typical for the platform (more specifically the DSO_METHOD) using the
|
||||||
* methods will translate "swift" -> "libswift.so" whereas the "win32"
|
* dso_name_converter function of the method. Eg. win32 will transform "blah"
|
||||||
* method will translate "swift" -> "swift.dll". NB: Until I can figure
|
* into "blah.dll", and dlfcn will transform it into "libblah.so". The
|
||||||
* out how to be more "conventional" with this, the methods will only
|
* behaviour can be overriden by setting the name_converter callback in the DSO
|
||||||
* honour this flag if it looks like it was passed a file without any
|
* object (using DSO_set_name_converter()). This callback could even utilise
|
||||||
* path and if the filename is small enough.
|
* the DSO_METHOD's converter too if it only wants to override behaviour for
|
||||||
*/
|
* one or two possible DSO methods. However, the following flag can be set in a
|
||||||
#define DSO_FLAG_NAME_TRANSLATION 0x01
|
* DSO to prevent *any* native name-translation at all - eg. if the caller has
|
||||||
|
* prompted the user for a path to a driver library so the filename should be
|
||||||
|
* interpreted as-is. */
|
||||||
|
#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
|
||||||
|
/* An extra flag to give if only the extension should be added as
|
||||||
|
* translation. This is obviously only of importance on Unix and
|
||||||
|
* other operating systems where the translation also may prefix
|
||||||
|
* the name with something, like 'lib', and ignored everywhere else.
|
||||||
|
* This flag is also ignored if DSO_FLAG_NO_NAME_TRANSLATION is used
|
||||||
|
* at the same time. */
|
||||||
|
#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
|
||||||
|
|
||||||
/* The following flag controls the translation of symbol names to upper
|
/* The following flag controls the translation of symbol names to upper
|
||||||
* case. This is currently only being implemented for OpenVMS.
|
* case. This is currently only being implemented for OpenVMS.
|
||||||
*/
|
*/
|
||||||
#define DSO_FLAG_UPCASE_SYMBOL 0x02
|
#define DSO_FLAG_UPCASE_SYMBOL 0x10
|
||||||
|
|
||||||
|
|
||||||
typedef void (*DSO_FUNC_TYPE)(void);
|
typedef void (*DSO_FUNC_TYPE)(void);
|
||||||
|
|
||||||
typedef struct dso_st DSO;
|
typedef struct dso_st DSO;
|
||||||
|
|
||||||
|
/* The function prototype used for method functions (or caller-provided
|
||||||
|
* callbacks) that transform filenames. They are passed a DSO structure pointer
|
||||||
|
* (or NULL if they are to be used independantly of a DSO object) and a
|
||||||
|
* filename to transform. They should either return NULL (if there is an error
|
||||||
|
* condition) or a newly allocated string containing the transformed form that
|
||||||
|
* the caller will need to free with OPENSSL_free() when done. */
|
||||||
|
typedef char* (*DSO_NAME_CONVERTER_FUNC)(DSO *, const char *);
|
||||||
|
|
||||||
typedef struct dso_meth_st
|
typedef struct dso_meth_st
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
/* Loads a shared library */
|
/* Loads a shared library, NB: new DSO_METHODs must ensure that a
|
||||||
int (*dso_load)(DSO *dso, const char *filename);
|
* successful load populates the loaded_filename field, and likewise a
|
||||||
|
* successful unload OPENSSL_frees and NULLs it out. */
|
||||||
|
int (*dso_load)(DSO *dso);
|
||||||
/* Unloads a shared library */
|
/* Unloads a shared library */
|
||||||
int (*dso_unload)(DSO *dso);
|
int (*dso_unload)(DSO *dso);
|
||||||
/* Binds a variable */
|
/* Binds a variable */
|
||||||
@@ -117,6 +137,9 @@ typedef struct dso_meth_st
|
|||||||
/* The generic (yuck) "ctrl()" function. NB: Negative return
|
/* The generic (yuck) "ctrl()" function. NB: Negative return
|
||||||
* values (rather than zero) indicate errors. */
|
* values (rather than zero) indicate errors. */
|
||||||
long (*dso_ctrl)(DSO *dso, int cmd, long larg, void *parg);
|
long (*dso_ctrl)(DSO *dso, int cmd, long larg, void *parg);
|
||||||
|
/* The default DSO_METHOD-specific function for converting filenames to
|
||||||
|
* a canonical native form. */
|
||||||
|
DSO_NAME_CONVERTER_FUNC dso_name_converter;
|
||||||
|
|
||||||
/* [De]Initialisation handlers. */
|
/* [De]Initialisation handlers. */
|
||||||
int (*init)(DSO *dso);
|
int (*init)(DSO *dso);
|
||||||
@@ -140,6 +163,23 @@ struct dso_st
|
|||||||
/* For use by applications etc ... use this for your bits'n'pieces,
|
/* For use by applications etc ... use this for your bits'n'pieces,
|
||||||
* don't touch meth_data! */
|
* don't touch meth_data! */
|
||||||
CRYPTO_EX_DATA ex_data;
|
CRYPTO_EX_DATA ex_data;
|
||||||
|
/* If this callback function pointer is set to non-NULL, then it will
|
||||||
|
* be used on DSO_load() in place of meth->dso_name_converter. NB: This
|
||||||
|
* should normally set using DSO_set_name_converter(). */
|
||||||
|
DSO_NAME_CONVERTER_FUNC name_converter;
|
||||||
|
/* This is populated with (a copy of) the platform-independant
|
||||||
|
* filename used for this DSO. */
|
||||||
|
char *filename;
|
||||||
|
/* This is populated with (a copy of) the translated filename by which
|
||||||
|
* the DSO was actually loaded. It is NULL iff the DSO is not currently
|
||||||
|
* loaded. NB: This is here because the filename translation process
|
||||||
|
* may involve a callback being invoked more than once not only to
|
||||||
|
* convert to a platform-specific form, but also to try different
|
||||||
|
* filenames in the process of trying to perform a load. As such, this
|
||||||
|
* variable can be used to indicate (a) whether this DSO structure
|
||||||
|
* corresponds to a loaded library or not, and (b) the filename with
|
||||||
|
* which it was actually loaded. */
|
||||||
|
char *loaded_filename;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +190,35 @@ int DSO_flags(DSO *dso);
|
|||||||
int DSO_up(DSO *dso);
|
int DSO_up(DSO *dso);
|
||||||
long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
||||||
|
|
||||||
void DSO_set_default_method(DSO_METHOD *meth);
|
/* This function sets the DSO's name_converter callback. If it is non-NULL,
|
||||||
|
* then it will be used instead of the associated DSO_METHOD's function. If
|
||||||
|
* oldcb is non-NULL then it is set to the function pointer value being
|
||||||
|
* replaced. Return value is non-zero for success. */
|
||||||
|
int DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb,
|
||||||
|
DSO_NAME_CONVERTER_FUNC *oldcb);
|
||||||
|
/* These functions can be used to get/set the platform-independant filename
|
||||||
|
* used for a DSO. NB: set will fail if the DSO is already loaded. */
|
||||||
|
const char *DSO_get_filename(DSO *dso);
|
||||||
|
int DSO_set_filename(DSO *dso, const char *filename);
|
||||||
|
/* This function will invoke the DSO's name_converter callback to translate a
|
||||||
|
* filename, or if the callback isn't set it will instead use the DSO_METHOD's
|
||||||
|
* converter. If "filename" is NULL, the "filename" in the DSO itself will be
|
||||||
|
* used. If the DSO_FLAG_NO_NAME_TRANSLATION flag is set, then the filename is
|
||||||
|
* simply duplicated. NB: This function is usually called from within a
|
||||||
|
* DSO_METHOD during the processing of a DSO_load() call, and is exposed so that
|
||||||
|
* caller-created DSO_METHODs can do the same thing. A non-NULL return value
|
||||||
|
* will need to be OPENSSL_free()'d. */
|
||||||
|
char *DSO_convert_filename(DSO *dso, const char *filename);
|
||||||
|
/* If the DSO is currently loaded, this returns the filename that it was loaded
|
||||||
|
* under, otherwise it returns NULL. So it is also useful as a test as to
|
||||||
|
* whether the DSO is currently loaded. NB: This will not necessarily return
|
||||||
|
* the same value as DSO_convert_filename(dso, dso->filename), because the
|
||||||
|
* DSO_METHOD's load function may have tried a variety of filenames (with
|
||||||
|
* and/or without the aid of the converters) before settling on the one it
|
||||||
|
* actually loaded. */
|
||||||
|
const char *DSO_get_loaded_filename(DSO *dso);
|
||||||
|
|
||||||
|
void DSO_set_default_method(DSO_METHOD *meth);
|
||||||
DSO_METHOD *DSO_get_default_method(void);
|
DSO_METHOD *DSO_get_default_method(void);
|
||||||
DSO_METHOD *DSO_get_method(DSO *dso);
|
DSO_METHOD *DSO_get_method(DSO *dso);
|
||||||
DSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth);
|
DSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth);
|
||||||
@@ -206,40 +274,47 @@ void ERR_load_DSO_strings(void);
|
|||||||
/* Function codes. */
|
/* Function codes. */
|
||||||
#define DSO_F_DLFCN_BIND_FUNC 100
|
#define DSO_F_DLFCN_BIND_FUNC 100
|
||||||
#define DSO_F_DLFCN_BIND_VAR 101
|
#define DSO_F_DLFCN_BIND_VAR 101
|
||||||
#define DSO_F_DLFCN_CTRL 102
|
#define DSO_F_DLFCN_LOAD 102
|
||||||
#define DSO_F_DLFCN_LOAD 103
|
#define DSO_F_DLFCN_NAME_CONVERTER 123
|
||||||
#define DSO_F_DLFCN_UNLOAD 104
|
#define DSO_F_DLFCN_UNLOAD 103
|
||||||
#define DSO_F_DL_BIND_FUNC 105
|
#define DSO_F_DL_BIND_FUNC 104
|
||||||
#define DSO_F_DL_BIND_VAR 106
|
#define DSO_F_DL_BIND_VAR 105
|
||||||
#define DSO_F_DL_CTRL 107
|
#define DSO_F_DL_LOAD 106
|
||||||
#define DSO_F_DL_LOAD 108
|
#define DSO_F_DL_NAME_CONVERTER 124
|
||||||
#define DSO_F_DL_UNLOAD 109
|
#define DSO_F_DL_UNLOAD 107
|
||||||
#define DSO_F_DSO_BIND_FUNC 110
|
#define DSO_F_DSO_BIND_FUNC 108
|
||||||
#define DSO_F_DSO_BIND_VAR 111
|
#define DSO_F_DSO_BIND_VAR 109
|
||||||
#define DSO_F_DSO_CTRL 112
|
#define DSO_F_DSO_CONVERT_FILENAME 126
|
||||||
#define DSO_F_DSO_FREE 113
|
#define DSO_F_DSO_CTRL 110
|
||||||
#define DSO_F_DSO_LOAD 114
|
#define DSO_F_DSO_FREE 111
|
||||||
#define DSO_F_DSO_NEW_METHOD 115
|
#define DSO_F_DSO_GET_FILENAME 127
|
||||||
#define DSO_F_DSO_UP 116
|
#define DSO_F_DSO_GET_LOADED_FILENAME 128
|
||||||
#define DSO_F_VMS_BIND_VAR 122
|
#define DSO_F_DSO_LOAD 112
|
||||||
#define DSO_F_VMS_CTRL 123
|
#define DSO_F_DSO_NEW_METHOD 113
|
||||||
#define DSO_F_VMS_LOAD 124
|
#define DSO_F_DSO_SET_FILENAME 129
|
||||||
#define DSO_F_VMS_UNLOAD 125
|
#define DSO_F_DSO_SET_NAME_CONVERTER 122
|
||||||
#define DSO_F_WIN32_BIND_FUNC 117
|
#define DSO_F_DSO_UP 114
|
||||||
#define DSO_F_WIN32_BIND_VAR 118
|
#define DSO_F_VMS_BIND_VAR 115
|
||||||
#define DSO_F_WIN32_CTRL 119
|
#define DSO_F_VMS_LOAD 116
|
||||||
|
#define DSO_F_VMS_UNLOAD 117
|
||||||
|
#define DSO_F_WIN32_BIND_FUNC 118
|
||||||
|
#define DSO_F_WIN32_BIND_VAR 119
|
||||||
#define DSO_F_WIN32_LOAD 120
|
#define DSO_F_WIN32_LOAD 120
|
||||||
|
#define DSO_F_WIN32_NAME_CONVERTER 125
|
||||||
#define DSO_F_WIN32_UNLOAD 121
|
#define DSO_F_WIN32_UNLOAD 121
|
||||||
|
|
||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
#define DSO_R_CTRL_FAILED 100
|
#define DSO_R_CTRL_FAILED 100
|
||||||
#define DSO_R_FILENAME_TOO_BIG 109
|
#define DSO_R_DSO_ALREADY_LOADED 110
|
||||||
#define DSO_R_FINISH_FAILED 101
|
#define DSO_R_FILENAME_TOO_BIG 101
|
||||||
#define DSO_R_LOAD_FAILED 102
|
#define DSO_R_FINISH_FAILED 102
|
||||||
#define DSO_R_NULL_HANDLE 103
|
#define DSO_R_LOAD_FAILED 103
|
||||||
#define DSO_R_STACK_ERROR 104
|
#define DSO_R_NAME_TRANSLATION_FAILED 109
|
||||||
#define DSO_R_SYM_FAILURE 105
|
#define DSO_R_NO_FILENAME 111
|
||||||
#define DSO_R_UNKNOWN_COMMAND 106
|
#define DSO_R_NULL_HANDLE 104
|
||||||
|
#define DSO_R_SET_FILENAME_FAILED 112
|
||||||
|
#define DSO_R_STACK_ERROR 105
|
||||||
|
#define DSO_R_SYM_FAILURE 106
|
||||||
#define DSO_R_UNLOAD_FAILED 107
|
#define DSO_R_UNLOAD_FAILED 107
|
||||||
#define DSO_R_UNSUPPORTED 108
|
#define DSO_R_UNSUPPORTED 108
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ DSO_METHOD *DSO_METHOD_dl(void)
|
|||||||
/* Part of the hack in "dl_load" ... */
|
/* Part of the hack in "dl_load" ... */
|
||||||
#define DSO_MAX_TRANSLATED_SIZE 256
|
#define DSO_MAX_TRANSLATED_SIZE 256
|
||||||
|
|
||||||
static int dl_load(DSO *dso, const char *filename);
|
static int dl_load(DSO *dso);
|
||||||
static int dl_unload(DSO *dso);
|
static int dl_unload(DSO *dso);
|
||||||
static void *dl_bind_var(DSO *dso, const char *symname);
|
static void *dl_bind_var(DSO *dso, const char *symname);
|
||||||
static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname);
|
static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname);
|
||||||
@@ -81,8 +81,9 @@ static int dl_unbind_var(DSO *dso, char *symname, void *symptr);
|
|||||||
static int dl_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
|
static int dl_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
|
||||||
static int dl_init(DSO *dso);
|
static int dl_init(DSO *dso);
|
||||||
static int dl_finish(DSO *dso);
|
static int dl_finish(DSO *dso);
|
||||||
#endif
|
|
||||||
static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
||||||
|
#endif
|
||||||
|
static char *dl_name_converter(DSO *dso, const char *filename);
|
||||||
|
|
||||||
static DSO_METHOD dso_meth_dl = {
|
static DSO_METHOD dso_meth_dl = {
|
||||||
"OpenSSL 'dl' shared library method",
|
"OpenSSL 'dl' shared library method",
|
||||||
@@ -95,7 +96,8 @@ static DSO_METHOD dso_meth_dl = {
|
|||||||
NULL, /* unbind_var */
|
NULL, /* unbind_var */
|
||||||
NULL, /* unbind_func */
|
NULL, /* unbind_func */
|
||||||
#endif
|
#endif
|
||||||
dl_ctrl,
|
NULL, /* ctrl */
|
||||||
|
dl_name_converter,
|
||||||
NULL, /* init */
|
NULL, /* init */
|
||||||
NULL /* finish */
|
NULL /* finish */
|
||||||
};
|
};
|
||||||
@@ -111,35 +113,41 @@ DSO_METHOD *DSO_METHOD_dl(void)
|
|||||||
* type so the cast is safe.
|
* type so the cast is safe.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int dl_load(DSO *dso, const char *filename)
|
static int dl_load(DSO *dso)
|
||||||
{
|
{
|
||||||
shl_t ptr;
|
shl_t ptr = NULL;
|
||||||
char translated[DSO_MAX_TRANSLATED_SIZE];
|
/* We don't do any fancy retries or anything, just take the method's
|
||||||
int len;
|
* (or DSO's if it has the callback set) best translation of the
|
||||||
|
* platform-independant filename and try once with that. */
|
||||||
|
char *filename= DSO_convert_filename(dso, NULL);
|
||||||
|
|
||||||
/* The same comment as in dlfcn_load applies here. bleurgh. */
|
if(filename == NULL)
|
||||||
len = strlen(filename);
|
|
||||||
if((dso->flags & DSO_FLAG_NAME_TRANSLATION) &&
|
|
||||||
(len + 6 < DSO_MAX_TRANSLATED_SIZE) &&
|
|
||||||
(strstr(filename, "/") == NULL))
|
|
||||||
{
|
{
|
||||||
sprintf(translated, "lib%s.so", filename);
|
DSOerr(DSO_F_DL_LOAD,DSO_R_NO_FILENAME);
|
||||||
ptr = shl_load(translated, BIND_IMMEDIATE, NULL);
|
goto err;
|
||||||
}
|
}
|
||||||
else
|
ptr = shl_load(filename, BIND_IMMEDIATE, NULL);
|
||||||
ptr = shl_load(filename, BIND_IMMEDIATE, NULL);
|
|
||||||
if(ptr == NULL)
|
if(ptr == NULL)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED);
|
DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED);
|
||||||
return(0);
|
goto err;
|
||||||
}
|
}
|
||||||
if(!sk_push(dso->meth_data, (char *)ptr))
|
if(!sk_push(dso->meth_data, (char *)ptr))
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DL_LOAD,DSO_R_STACK_ERROR);
|
DSOerr(DSO_F_DL_LOAD,DSO_R_STACK_ERROR);
|
||||||
shl_unload(ptr);
|
goto err;
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
/* Success, stick the converted filename we've loaded under into the DSO
|
||||||
|
* (it also serves as the indicator that we are currently loaded). */
|
||||||
|
dso->loaded_filename = filename;
|
||||||
return(1);
|
return(1);
|
||||||
|
err:
|
||||||
|
/* Cleanup! */
|
||||||
|
if(filename != NULL)
|
||||||
|
OPENSSL_free(filename);
|
||||||
|
if(ptr != NULL)
|
||||||
|
shl_unload(ptr);
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dl_unload(DSO *dso)
|
static int dl_unload(DSO *dso)
|
||||||
@@ -187,7 +195,7 @@ static void *dl_bind_var(DSO *dso, const char *symname)
|
|||||||
DSOerr(DSO_F_DL_BIND_VAR,DSO_R_NULL_HANDLE);
|
DSOerr(DSO_F_DL_BIND_VAR,DSO_R_NULL_HANDLE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0)
|
if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE);
|
DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
@@ -216,7 +224,7 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname)
|
|||||||
DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_NULL_HANDLE);
|
DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_NULL_HANDLE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0)
|
if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE);
|
DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
@@ -224,28 +232,47 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname)
|
|||||||
return((DSO_FUNC_TYPE)sym);
|
return((DSO_FUNC_TYPE)sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg)
|
/* This function is identical to the one in dso_dlfcn.c, but as it is highly
|
||||||
|
* unlikely that both the "dl" *and* "dlfcn" variants are being compiled at the
|
||||||
|
* same time, there's no great duplicating the code. Figuring out an elegant
|
||||||
|
* way to share one copy of the code would be more difficult and would not
|
||||||
|
* leave the implementations independant. */
|
||||||
|
#if defined(__hpux)
|
||||||
|
static const char extension[] = ".sl";
|
||||||
|
#else
|
||||||
|
static const char extension[] = ".so";
|
||||||
|
#endif
|
||||||
|
static char *dl_name_converter(DSO *dso, const char *filename)
|
||||||
{
|
{
|
||||||
if(dso == NULL)
|
char *translated;
|
||||||
|
int len, rsize, transform;
|
||||||
|
|
||||||
|
len = strlen(filename);
|
||||||
|
rsize = len + 1;
|
||||||
|
transform = (strstr(filename, "/") == NULL);
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DL_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
/* We will convert this to "%s.s?" or "lib%s.s?" */
|
||||||
return(-1);
|
rsize += strlen(extension);/* The length of ".s?" */
|
||||||
|
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||||
|
rsize += 3; /* The length of "lib" */
|
||||||
}
|
}
|
||||||
switch(cmd)
|
translated = OPENSSL_malloc(rsize);
|
||||||
|
if(translated == NULL)
|
||||||
{
|
{
|
||||||
case DSO_CTRL_GET_FLAGS:
|
DSOerr(DSO_F_DL_NAME_CONVERTER,
|
||||||
return dso->flags;
|
DSO_R_NAME_TRANSLATION_FAILED);
|
||||||
case DSO_CTRL_SET_FLAGS:
|
return(NULL);
|
||||||
dso->flags = (int)larg;
|
|
||||||
return(0);
|
|
||||||
case DSO_CTRL_OR_FLAGS:
|
|
||||||
dso->flags |= (int)larg;
|
|
||||||
return(0);
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
DSOerr(DSO_F_DL_CTRL,DSO_R_UNKNOWN_COMMAND);
|
if(transform)
|
||||||
return(-1);
|
{
|
||||||
|
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||||
|
sprintf(translated, "lib%s%s", filename, extension);
|
||||||
|
else
|
||||||
|
sprintf(translated, "%s%s", filename, extension);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sprintf(translated, "%s", filename);
|
||||||
|
return(translated);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* DSO_DL */
|
#endif /* DSO_DL */
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ DSO_METHOD *DSO_METHOD_dlfcn(void)
|
|||||||
/* Part of the hack in "dlfcn_load" ... */
|
/* Part of the hack in "dlfcn_load" ... */
|
||||||
#define DSO_MAX_TRANSLATED_SIZE 256
|
#define DSO_MAX_TRANSLATED_SIZE 256
|
||||||
|
|
||||||
static int dlfcn_load(DSO *dso, const char *filename);
|
static int dlfcn_load(DSO *dso);
|
||||||
static int dlfcn_unload(DSO *dso);
|
static int dlfcn_unload(DSO *dso);
|
||||||
static void *dlfcn_bind_var(DSO *dso, const char *symname);
|
static void *dlfcn_bind_var(DSO *dso, const char *symname);
|
||||||
static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname);
|
static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname);
|
||||||
@@ -82,8 +82,9 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname);
|
|||||||
static int dlfcn_unbind(DSO *dso, char *symname, void *symptr);
|
static int dlfcn_unbind(DSO *dso, char *symname, void *symptr);
|
||||||
static int dlfcn_init(DSO *dso);
|
static int dlfcn_init(DSO *dso);
|
||||||
static int dlfcn_finish(DSO *dso);
|
static int dlfcn_finish(DSO *dso);
|
||||||
#endif
|
|
||||||
static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
||||||
|
#endif
|
||||||
|
static char *dlfcn_name_converter(DSO *dso, const char *filename);
|
||||||
|
|
||||||
static DSO_METHOD dso_meth_dlfcn = {
|
static DSO_METHOD dso_meth_dlfcn = {
|
||||||
"OpenSSL 'dlfcn' shared library method",
|
"OpenSSL 'dlfcn' shared library method",
|
||||||
@@ -96,7 +97,8 @@ static DSO_METHOD dso_meth_dlfcn = {
|
|||||||
NULL, /* unbind_var */
|
NULL, /* unbind_var */
|
||||||
NULL, /* unbind_func */
|
NULL, /* unbind_func */
|
||||||
#endif
|
#endif
|
||||||
dlfcn_ctrl,
|
NULL, /* ctrl */
|
||||||
|
dlfcn_name_converter,
|
||||||
NULL, /* init */
|
NULL, /* init */
|
||||||
NULL /* finish */
|
NULL /* finish */
|
||||||
};
|
};
|
||||||
@@ -130,41 +132,39 @@ DSO_METHOD *DSO_METHOD_dlfcn(void)
|
|||||||
* (i) the handle (void*) returned from dlopen().
|
* (i) the handle (void*) returned from dlopen().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int dlfcn_load(DSO *dso, const char *filename)
|
static int dlfcn_load(DSO *dso)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr = NULL;
|
||||||
char translated[DSO_MAX_TRANSLATED_SIZE];
|
/* See applicable comments in dso_dl.c */
|
||||||
int len;
|
char *filename = DSO_convert_filename(dso, NULL);
|
||||||
|
|
||||||
/* NB: This is a hideous hack, but I'm not yet sure what
|
if(filename == NULL)
|
||||||
* to replace it with. This attempts to convert any filename,
|
|
||||||
* that looks like it has no path information, into a
|
|
||||||
* translated form, e. "blah" -> "libblah.so" */
|
|
||||||
len = strlen(filename);
|
|
||||||
if((dso->flags & DSO_FLAG_NAME_TRANSLATION) &&
|
|
||||||
(len + 6 < DSO_MAX_TRANSLATED_SIZE) &&
|
|
||||||
(strstr(filename, "/") == NULL))
|
|
||||||
{
|
{
|
||||||
sprintf(translated, "lib%s.so", filename);
|
DSOerr(DSO_F_DLFCN_LOAD,DSO_R_NO_FILENAME);
|
||||||
ptr = dlopen(translated, DLOPEN_FLAG);
|
goto err;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ptr = dlopen(filename, DLOPEN_FLAG);
|
|
||||||
}
|
}
|
||||||
|
ptr = dlopen(filename, DLOPEN_FLAG);
|
||||||
if(ptr == NULL)
|
if(ptr == NULL)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DLFCN_LOAD,DSO_R_LOAD_FAILED);
|
DSOerr(DSO_F_DLFCN_LOAD,DSO_R_LOAD_FAILED);
|
||||||
return(0);
|
goto err;
|
||||||
}
|
}
|
||||||
if(!sk_push(dso->meth_data, (char *)ptr))
|
if(!sk_push(dso->meth_data, (char *)ptr))
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DLFCN_LOAD,DSO_R_STACK_ERROR);
|
DSOerr(DSO_F_DLFCN_LOAD,DSO_R_STACK_ERROR);
|
||||||
dlclose(ptr);
|
goto err;
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
/* Success */
|
||||||
|
dso->loaded_filename = filename;
|
||||||
return(1);
|
return(1);
|
||||||
}
|
err:
|
||||||
|
/* Cleanup! */
|
||||||
|
if(filename != NULL)
|
||||||
|
OPENSSL_free(filename);
|
||||||
|
if(ptr != NULL)
|
||||||
|
dlclose(ptr);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
static int dlfcn_unload(DSO *dso)
|
static int dlfcn_unload(DSO *dso)
|
||||||
{
|
{
|
||||||
@@ -249,28 +249,38 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
|
|||||||
return(sym);
|
return(sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long dlfcn_ctrl(DSO *dso, int cmd, long larg, void *parg)
|
static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
||||||
{
|
{
|
||||||
if(dso == NULL)
|
char *translated;
|
||||||
|
int len, rsize, transform;
|
||||||
|
|
||||||
|
len = strlen(filename);
|
||||||
|
rsize = len + 1;
|
||||||
|
transform = (strstr(filename, "/") == NULL);
|
||||||
|
if(transform)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DLFCN_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
/* We will convert this to "%s.so" or "lib%s.so" */
|
||||||
return(-1);
|
rsize += 3; /* The length of ".so" */
|
||||||
|
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||||
|
rsize += 3; /* The length of "lib" */
|
||||||
}
|
}
|
||||||
switch(cmd)
|
translated = OPENSSL_malloc(rsize);
|
||||||
|
if(translated == NULL)
|
||||||
{
|
{
|
||||||
case DSO_CTRL_GET_FLAGS:
|
DSOerr(DSO_F_DLFCN_NAME_CONVERTER,
|
||||||
return dso->flags;
|
DSO_R_NAME_TRANSLATION_FAILED);
|
||||||
case DSO_CTRL_SET_FLAGS:
|
return(NULL);
|
||||||
dso->flags = (int)larg;
|
|
||||||
return(0);
|
|
||||||
case DSO_CTRL_OR_FLAGS:
|
|
||||||
dso->flags |= (int)larg;
|
|
||||||
return(0);
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
DSOerr(DSO_F_DLFCN_CTRL,DSO_R_UNKNOWN_COMMAND);
|
if(transform)
|
||||||
return(-1);
|
{
|
||||||
|
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||||
|
sprintf(translated, "lib%s.so", filename);
|
||||||
|
else
|
||||||
|
sprintf(translated, "%s.so", filename);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sprintf(translated, "%s", filename);
|
||||||
|
return(translated);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* DSO_DLFCN */
|
#endif /* DSO_DLFCN */
|
||||||
|
|||||||
@@ -68,29 +68,33 @@ static ERR_STRING_DATA DSO_str_functs[]=
|
|||||||
{
|
{
|
||||||
{ERR_PACK(0,DSO_F_DLFCN_BIND_FUNC,0), "DLFCN_BIND_FUNC"},
|
{ERR_PACK(0,DSO_F_DLFCN_BIND_FUNC,0), "DLFCN_BIND_FUNC"},
|
||||||
{ERR_PACK(0,DSO_F_DLFCN_BIND_VAR,0), "DLFCN_BIND_VAR"},
|
{ERR_PACK(0,DSO_F_DLFCN_BIND_VAR,0), "DLFCN_BIND_VAR"},
|
||||||
{ERR_PACK(0,DSO_F_DLFCN_CTRL,0), "DLFCN_CTRL"},
|
|
||||||
{ERR_PACK(0,DSO_F_DLFCN_LOAD,0), "DLFCN_LOAD"},
|
{ERR_PACK(0,DSO_F_DLFCN_LOAD,0), "DLFCN_LOAD"},
|
||||||
|
{ERR_PACK(0,DSO_F_DLFCN_NAME_CONVERTER,0), "DLFCN_NAME_CONVERTER"},
|
||||||
{ERR_PACK(0,DSO_F_DLFCN_UNLOAD,0), "DLFCN_UNLOAD"},
|
{ERR_PACK(0,DSO_F_DLFCN_UNLOAD,0), "DLFCN_UNLOAD"},
|
||||||
{ERR_PACK(0,DSO_F_DL_BIND_FUNC,0), "DL_BIND_FUNC"},
|
{ERR_PACK(0,DSO_F_DL_BIND_FUNC,0), "DL_BIND_FUNC"},
|
||||||
{ERR_PACK(0,DSO_F_DL_BIND_VAR,0), "DL_BIND_VAR"},
|
{ERR_PACK(0,DSO_F_DL_BIND_VAR,0), "DL_BIND_VAR"},
|
||||||
{ERR_PACK(0,DSO_F_DL_CTRL,0), "DL_CTRL"},
|
|
||||||
{ERR_PACK(0,DSO_F_DL_LOAD,0), "DL_LOAD"},
|
{ERR_PACK(0,DSO_F_DL_LOAD,0), "DL_LOAD"},
|
||||||
|
{ERR_PACK(0,DSO_F_DL_NAME_CONVERTER,0), "DL_NAME_CONVERTER"},
|
||||||
{ERR_PACK(0,DSO_F_DL_UNLOAD,0), "DL_UNLOAD"},
|
{ERR_PACK(0,DSO_F_DL_UNLOAD,0), "DL_UNLOAD"},
|
||||||
{ERR_PACK(0,DSO_F_DSO_BIND_FUNC,0), "DSO_bind_func"},
|
{ERR_PACK(0,DSO_F_DSO_BIND_FUNC,0), "DSO_bind_func"},
|
||||||
{ERR_PACK(0,DSO_F_DSO_BIND_VAR,0), "DSO_bind_var"},
|
{ERR_PACK(0,DSO_F_DSO_BIND_VAR,0), "DSO_bind_var"},
|
||||||
|
{ERR_PACK(0,DSO_F_DSO_CONVERT_FILENAME,0), "DSO_convert_filename"},
|
||||||
{ERR_PACK(0,DSO_F_DSO_CTRL,0), "DSO_ctrl"},
|
{ERR_PACK(0,DSO_F_DSO_CTRL,0), "DSO_ctrl"},
|
||||||
{ERR_PACK(0,DSO_F_DSO_FREE,0), "DSO_free"},
|
{ERR_PACK(0,DSO_F_DSO_FREE,0), "DSO_free"},
|
||||||
|
{ERR_PACK(0,DSO_F_DSO_GET_FILENAME,0), "DSO_get_filename"},
|
||||||
|
{ERR_PACK(0,DSO_F_DSO_GET_LOADED_FILENAME,0), "DSO_get_loaded_filename"},
|
||||||
{ERR_PACK(0,DSO_F_DSO_LOAD,0), "DSO_load"},
|
{ERR_PACK(0,DSO_F_DSO_LOAD,0), "DSO_load"},
|
||||||
{ERR_PACK(0,DSO_F_DSO_NEW_METHOD,0), "DSO_new_method"},
|
{ERR_PACK(0,DSO_F_DSO_NEW_METHOD,0), "DSO_new_method"},
|
||||||
|
{ERR_PACK(0,DSO_F_DSO_SET_FILENAME,0), "DSO_set_filename"},
|
||||||
|
{ERR_PACK(0,DSO_F_DSO_SET_NAME_CONVERTER,0), "DSO_set_name_converter"},
|
||||||
{ERR_PACK(0,DSO_F_DSO_UP,0), "DSO_up"},
|
{ERR_PACK(0,DSO_F_DSO_UP,0), "DSO_up"},
|
||||||
{ERR_PACK(0,DSO_F_VMS_BIND_VAR,0), "VMS_BIND_VAR"},
|
{ERR_PACK(0,DSO_F_VMS_BIND_VAR,0), "VMS_BIND_VAR"},
|
||||||
{ERR_PACK(0,DSO_F_VMS_CTRL,0), "VMS_CTRL"},
|
|
||||||
{ERR_PACK(0,DSO_F_VMS_LOAD,0), "VMS_LOAD"},
|
{ERR_PACK(0,DSO_F_VMS_LOAD,0), "VMS_LOAD"},
|
||||||
{ERR_PACK(0,DSO_F_VMS_UNLOAD,0), "VMS_UNLOAD"},
|
{ERR_PACK(0,DSO_F_VMS_UNLOAD,0), "VMS_UNLOAD"},
|
||||||
{ERR_PACK(0,DSO_F_WIN32_BIND_FUNC,0), "WIN32_BIND_FUNC"},
|
{ERR_PACK(0,DSO_F_WIN32_BIND_FUNC,0), "WIN32_BIND_FUNC"},
|
||||||
{ERR_PACK(0,DSO_F_WIN32_BIND_VAR,0), "WIN32_BIND_VAR"},
|
{ERR_PACK(0,DSO_F_WIN32_BIND_VAR,0), "WIN32_BIND_VAR"},
|
||||||
{ERR_PACK(0,DSO_F_WIN32_CTRL,0), "WIN32_CTRL"},
|
|
||||||
{ERR_PACK(0,DSO_F_WIN32_LOAD,0), "WIN32_LOAD"},
|
{ERR_PACK(0,DSO_F_WIN32_LOAD,0), "WIN32_LOAD"},
|
||||||
|
{ERR_PACK(0,DSO_F_WIN32_NAME_CONVERTER,0), "WIN32_NAME_CONVERTER"},
|
||||||
{ERR_PACK(0,DSO_F_WIN32_UNLOAD,0), "WIN32_UNLOAD"},
|
{ERR_PACK(0,DSO_F_WIN32_UNLOAD,0), "WIN32_UNLOAD"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
@@ -98,13 +102,16 @@ static ERR_STRING_DATA DSO_str_functs[]=
|
|||||||
static ERR_STRING_DATA DSO_str_reasons[]=
|
static ERR_STRING_DATA DSO_str_reasons[]=
|
||||||
{
|
{
|
||||||
{DSO_R_CTRL_FAILED ,"control command failed"},
|
{DSO_R_CTRL_FAILED ,"control command failed"},
|
||||||
|
{DSO_R_DSO_ALREADY_LOADED ,"dso already loaded"},
|
||||||
{DSO_R_FILENAME_TOO_BIG ,"filename too big"},
|
{DSO_R_FILENAME_TOO_BIG ,"filename too big"},
|
||||||
{DSO_R_FINISH_FAILED ,"cleanup method function failed"},
|
{DSO_R_FINISH_FAILED ,"cleanup method function failed"},
|
||||||
{DSO_R_LOAD_FAILED ,"could not load the shared library"},
|
{DSO_R_LOAD_FAILED ,"could not load the shared library"},
|
||||||
|
{DSO_R_NAME_TRANSLATION_FAILED ,"name translation failed"},
|
||||||
|
{DSO_R_NO_FILENAME ,"no filename"},
|
||||||
{DSO_R_NULL_HANDLE ,"a null shared library handle was used"},
|
{DSO_R_NULL_HANDLE ,"a null shared library handle was used"},
|
||||||
|
{DSO_R_SET_FILENAME_FAILED ,"set filename failed"},
|
||||||
{DSO_R_STACK_ERROR ,"the meth_data stack is corrupt"},
|
{DSO_R_STACK_ERROR ,"the meth_data stack is corrupt"},
|
||||||
{DSO_R_SYM_FAILURE ,"could not bind to the requested symbol name"},
|
{DSO_R_SYM_FAILURE ,"could not bind to the requested symbol name"},
|
||||||
{DSO_R_UNKNOWN_COMMAND ,"unknown control command"},
|
|
||||||
{DSO_R_UNLOAD_FAILED ,"could not unload the shared library"},
|
{DSO_R_UNLOAD_FAILED ,"could not unload the shared library"},
|
||||||
{DSO_R_UNSUPPORTED ,"functionality not supported"},
|
{DSO_R_UNSUPPORTED ,"functionality not supported"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
|
|||||||
@@ -164,6 +164,10 @@ int DSO_free(DSO *dso)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sk_free(dso->meth_data);
|
sk_free(dso->meth_data);
|
||||||
|
if(dso->filename != NULL)
|
||||||
|
OPENSSL_free(dso->filename);
|
||||||
|
if(dso->loaded_filename != NULL)
|
||||||
|
OPENSSL_free(dso->loaded_filename);
|
||||||
|
|
||||||
OPENSSL_free(dso);
|
OPENSSL_free(dso);
|
||||||
return(1);
|
return(1);
|
||||||
@@ -192,48 +196,61 @@ DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags)
|
|||||||
DSO *ret;
|
DSO *ret;
|
||||||
int allocated = 0;
|
int allocated = 0;
|
||||||
|
|
||||||
if(filename == NULL)
|
|
||||||
{
|
|
||||||
DSOerr(DSO_F_DSO_LOAD,ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
if(dso == NULL)
|
if(dso == NULL)
|
||||||
{
|
{
|
||||||
ret = DSO_new_method(meth);
|
ret = DSO_new_method(meth);
|
||||||
if(ret == NULL)
|
if(ret == NULL)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DSO_LOAD,ERR_R_MALLOC_FAILURE);
|
DSOerr(DSO_F_DSO_LOAD,ERR_R_MALLOC_FAILURE);
|
||||||
return(NULL);
|
goto err;
|
||||||
}
|
}
|
||||||
allocated = 1;
|
allocated = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = dso;
|
ret = dso;
|
||||||
|
/* Don't load if we're currently already loaded */
|
||||||
|
if(dso->filename != NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_LOAD,DSO_R_DSO_ALREADY_LOADED);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
/* filename can only be NULL if we were passed a dso that already has
|
||||||
|
* one set. */
|
||||||
|
if(filename != NULL)
|
||||||
|
if(!DSO_set_filename(dso, filename))
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_LOAD,DSO_R_SET_FILENAME_FAILED);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
filename = dso->filename;
|
||||||
|
if(filename == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_LOAD,DSO_R_NO_FILENAME);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
/* Bleurgh ... have to check for negative return values for
|
/* Bleurgh ... have to check for negative return values for
|
||||||
* errors. <grimace> */
|
* errors. <grimace> */
|
||||||
if(DSO_ctrl(ret, DSO_CTRL_SET_FLAGS, flags, NULL) < 0)
|
if(DSO_ctrl(ret, DSO_CTRL_SET_FLAGS, flags, NULL) < 0)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DSO_LOAD,DSO_R_CTRL_FAILED);
|
DSOerr(DSO_F_DSO_LOAD,DSO_R_CTRL_FAILED);
|
||||||
if(allocated)
|
goto err;
|
||||||
DSO_free(ret);
|
|
||||||
return(NULL);
|
|
||||||
}
|
}
|
||||||
if(ret->meth->dso_load == NULL)
|
if(ret->meth->dso_load == NULL)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DSO_LOAD,DSO_R_UNSUPPORTED);
|
DSOerr(DSO_F_DSO_LOAD,DSO_R_UNSUPPORTED);
|
||||||
if(allocated)
|
goto err;
|
||||||
DSO_free(ret);
|
|
||||||
return(NULL);
|
|
||||||
}
|
}
|
||||||
if(!ret->meth->dso_load(ret, filename))
|
if(!ret->meth->dso_load(ret))
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DSO_LOAD,DSO_R_LOAD_FAILED);
|
DSOerr(DSO_F_DSO_LOAD,DSO_R_LOAD_FAILED);
|
||||||
if(allocated)
|
goto err;
|
||||||
DSO_free(ret);
|
|
||||||
return(NULL);
|
|
||||||
}
|
}
|
||||||
/* Load succeeded */
|
/* Load succeeded */
|
||||||
return(ret);
|
return(ret);
|
||||||
|
err:
|
||||||
|
if(allocated)
|
||||||
|
DSO_free(ret);
|
||||||
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *DSO_bind_var(DSO *dso, const char *symname)
|
void *DSO_bind_var(DSO *dso, const char *symname)
|
||||||
@@ -297,6 +314,22 @@ long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg)
|
|||||||
DSOerr(DSO_F_DSO_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
DSOerr(DSO_F_DSO_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
/* We should intercept certain generic commands and only pass control
|
||||||
|
* to the method-specific ctrl() function if it's something we don't
|
||||||
|
* handle. */
|
||||||
|
switch(cmd)
|
||||||
|
{
|
||||||
|
case DSO_CTRL_GET_FLAGS:
|
||||||
|
return dso->flags;
|
||||||
|
case DSO_CTRL_SET_FLAGS:
|
||||||
|
dso->flags = (int)larg;
|
||||||
|
return(0);
|
||||||
|
case DSO_CTRL_OR_FLAGS:
|
||||||
|
dso->flags |= (int)larg;
|
||||||
|
return(0);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
if((dso->meth == NULL) || (dso->meth->dso_ctrl == NULL))
|
if((dso->meth == NULL) || (dso->meth->dso_ctrl == NULL))
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_DSO_CTRL,DSO_R_UNSUPPORTED);
|
DSOerr(DSO_F_DSO_CTRL,DSO_R_UNSUPPORTED);
|
||||||
@@ -304,3 +337,104 @@ long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg)
|
|||||||
}
|
}
|
||||||
return(dso->meth->dso_ctrl(dso,cmd,larg,parg));
|
return(dso->meth->dso_ctrl(dso,cmd,larg,parg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb,
|
||||||
|
DSO_NAME_CONVERTER_FUNC *oldcb)
|
||||||
|
{
|
||||||
|
if(dso == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_SET_NAME_CONVERTER,
|
||||||
|
ERR_R_PASSED_NULL_PARAMETER);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
if(oldcb)
|
||||||
|
*oldcb = dso->name_converter;
|
||||||
|
dso->name_converter = cb;
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *DSO_get_filename(DSO *dso)
|
||||||
|
{
|
||||||
|
if(dso == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_GET_FILENAME,ERR_R_PASSED_NULL_PARAMETER);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
return(dso->filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
int DSO_set_filename(DSO *dso, const char *filename)
|
||||||
|
{
|
||||||
|
char *copied;
|
||||||
|
|
||||||
|
if((dso == NULL) || (filename == NULL))
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_SET_FILENAME,ERR_R_PASSED_NULL_PARAMETER);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
if(dso->loaded_filename)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_SET_FILENAME,DSO_R_DSO_ALREADY_LOADED);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
/* We'll duplicate filename */
|
||||||
|
copied = OPENSSL_malloc(strlen(filename) + 1);
|
||||||
|
if(copied == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_SET_FILENAME,ERR_R_MALLOC_FAILURE);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
strcpy(copied, filename);
|
||||||
|
if(dso->filename)
|
||||||
|
OPENSSL_free(dso->filename);
|
||||||
|
dso->filename = copied;
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *DSO_convert_filename(DSO *dso, const char *filename)
|
||||||
|
{
|
||||||
|
char *result = NULL;
|
||||||
|
|
||||||
|
if(dso == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_CONVERT_FILENAME,ERR_R_PASSED_NULL_PARAMETER);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
if(filename == NULL)
|
||||||
|
filename = dso->filename;
|
||||||
|
if(filename == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_CONVERT_FILENAME,DSO_R_NO_FILENAME);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
if((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0)
|
||||||
|
{
|
||||||
|
if(dso->name_converter != NULL)
|
||||||
|
result = dso->name_converter(dso, filename);
|
||||||
|
else if(dso->meth->dso_name_converter != NULL)
|
||||||
|
result = dso->meth->dso_name_converter(dso, filename);
|
||||||
|
}
|
||||||
|
if(result == NULL)
|
||||||
|
{
|
||||||
|
result = OPENSSL_malloc(strlen(filename) + 1);
|
||||||
|
if(result == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_CONVERT_FILENAME,
|
||||||
|
ERR_R_MALLOC_FAILURE);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
strcpy(result, filename);
|
||||||
|
}
|
||||||
|
return(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *DSO_get_loaded_filename(DSO *dso)
|
||||||
|
{
|
||||||
|
if(dso == NULL)
|
||||||
|
{
|
||||||
|
DSOerr(DSO_F_DSO_GET_LOADED_FILENAME,
|
||||||
|
ERR_R_PASSED_NULL_PARAMETER);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
return(dso->loaded_filename);
|
||||||
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ DSO_METHOD *DSO_METHOD_vms(void)
|
|||||||
#else
|
#else
|
||||||
#pragma message disable DOLLARID
|
#pragma message disable DOLLARID
|
||||||
|
|
||||||
static int vms_load(DSO *dso, const char *filename);
|
static int vms_load(DSO *dso);
|
||||||
static int vms_unload(DSO *dso);
|
static int vms_unload(DSO *dso);
|
||||||
static void *vms_bind_var(DSO *dso, const char *symname);
|
static void *vms_bind_var(DSO *dso, const char *symname);
|
||||||
static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname);
|
static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname);
|
||||||
@@ -87,8 +87,9 @@ static int vms_unbind_var(DSO *dso, char *symname, void *symptr);
|
|||||||
static int vms_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
|
static int vms_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
|
||||||
static int vms_init(DSO *dso);
|
static int vms_init(DSO *dso);
|
||||||
static int vms_finish(DSO *dso);
|
static int vms_finish(DSO *dso);
|
||||||
#endif
|
|
||||||
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
||||||
|
#endif
|
||||||
|
static char *vms_name_converter(DSO *dso);
|
||||||
|
|
||||||
static DSO_METHOD dso_meth_vms = {
|
static DSO_METHOD dso_meth_vms = {
|
||||||
"OpenSSL 'VMS' shared library method",
|
"OpenSSL 'VMS' shared library method",
|
||||||
@@ -101,7 +102,8 @@ static DSO_METHOD dso_meth_vms = {
|
|||||||
NULL, /* unbind_var */
|
NULL, /* unbind_var */
|
||||||
NULL, /* unbind_func */
|
NULL, /* unbind_func */
|
||||||
#endif
|
#endif
|
||||||
vms_ctrl,
|
NULL, /* ctrl */
|
||||||
|
vms_name_converter,
|
||||||
NULL, /* init */
|
NULL, /* init */
|
||||||
NULL /* finish */
|
NULL /* finish */
|
||||||
};
|
};
|
||||||
@@ -129,8 +131,9 @@ DSO_METHOD *DSO_METHOD_vms(void)
|
|||||||
return(&dso_meth_vms);
|
return(&dso_meth_vms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vms_load(DSO *dso, const char *filename)
|
static int vms_load(DSO *dso)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
DSO_VMS_INTERNAL *p;
|
DSO_VMS_INTERNAL *p;
|
||||||
const char *sp1, *sp2; /* Search result */
|
const char *sp1, *sp2; /* Search result */
|
||||||
|
|
||||||
@@ -208,6 +211,12 @@ static int vms_load(DSO *dso, const char *filename)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
return(1);
|
return(1);
|
||||||
|
#else
|
||||||
|
/* See the comments lower down in the vms_name_converter
|
||||||
|
* "implementation" :-) */
|
||||||
|
please_break_compilation();
|
||||||
|
return(bother_richard);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note that this doesn't actually unload the shared image, as there is no
|
/* Note that this doesn't actually unload the shared image, as there is no
|
||||||
@@ -344,28 +353,26 @@ static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname)
|
|||||||
return sym;
|
return sym;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg)
|
static char *vms_name_converter(DSO *dso)
|
||||||
{
|
{
|
||||||
if(dso == NULL)
|
/* Implementation note: on VMS is it preferable to do real conversions
|
||||||
{
|
* here, or to actually have it performed in-line with the bind calls
|
||||||
DSOerr(DSO_F_VMS_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
* (given that VMS never actually does a load except implicitly within
|
||||||
return(-1);
|
* the bind functions). Another note: normally (eg. dlfcn), the
|
||||||
}
|
* DSO_load call will either load, put the loaded filename into the DSO
|
||||||
switch(cmd)
|
* (which marks it effectively as "read-only"), and return success - or
|
||||||
{
|
* it will fail. VMS needs to work out what to do - otherwise DSO_load
|
||||||
case DSO_CTRL_GET_FLAGS:
|
* will always succeed, but leave the DSO looking unloaded (because the
|
||||||
return dso->flags;
|
* loaded_filename will be NULL still) and then real loading (and
|
||||||
case DSO_CTRL_SET_FLAGS:
|
* setting of loaded_filename) will only happen during the first bind
|
||||||
dso->flags = (int)larg;
|
* call (which should have error checking anyway to prevent you calling
|
||||||
return(0);
|
* it on an "unloaded" DSO - thus giving VMS *serious* grief). Richard,
|
||||||
case DSO_CTRL_OR_FLAGS:
|
* what do you think? Is it worth having DSO_load() try to find and pin
|
||||||
dso->flags |= (int)larg;
|
* itself to a library file (and populate loaded_filename) even though
|
||||||
return(0);
|
* it's unecessary to actually do a load prior to the first bind call?
|
||||||
default:
|
* I leave it to you ... :-) */
|
||||||
break;
|
deliberately_break_compilation_here();
|
||||||
}
|
return(1);
|
||||||
DSOerr(DSO_F_VMS_CTRL,DSO_R_UNKNOWN_COMMAND);
|
}
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* VMS */
|
#endif /* VMS */
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ DSO_METHOD *DSO_METHOD_win32(void)
|
|||||||
/* Part of the hack in "win32_load" ... */
|
/* Part of the hack in "win32_load" ... */
|
||||||
#define DSO_MAX_TRANSLATED_SIZE 256
|
#define DSO_MAX_TRANSLATED_SIZE 256
|
||||||
|
|
||||||
static int win32_load(DSO *dso, const char *filename);
|
static int win32_load(DSO *dso);
|
||||||
static int win32_unload(DSO *dso);
|
static int win32_unload(DSO *dso);
|
||||||
static void *win32_bind_var(DSO *dso, const char *symname);
|
static void *win32_bind_var(DSO *dso, const char *symname);
|
||||||
static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname);
|
static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname);
|
||||||
@@ -80,8 +80,9 @@ static int win32_unbind_var(DSO *dso, char *symname, void *symptr);
|
|||||||
static int win32_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
|
static int win32_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
|
||||||
static int win32_init(DSO *dso);
|
static int win32_init(DSO *dso);
|
||||||
static int win32_finish(DSO *dso);
|
static int win32_finish(DSO *dso);
|
||||||
#endif
|
|
||||||
static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
||||||
|
#endif
|
||||||
|
static char *win32_name_converter(DSO *dso, const char *filename);
|
||||||
|
|
||||||
static DSO_METHOD dso_meth_win32 = {
|
static DSO_METHOD dso_meth_win32 = {
|
||||||
"OpenSSL 'win32' shared library method",
|
"OpenSSL 'win32' shared library method",
|
||||||
@@ -94,7 +95,8 @@ static DSO_METHOD dso_meth_win32 = {
|
|||||||
NULL, /* unbind_var */
|
NULL, /* unbind_var */
|
||||||
NULL, /* unbind_func */
|
NULL, /* unbind_func */
|
||||||
#endif
|
#endif
|
||||||
win32_ctrl,
|
NULL, /* ctrl */
|
||||||
|
win32_name_converter,
|
||||||
NULL, /* init */
|
NULL, /* init */
|
||||||
NULL /* finish */
|
NULL /* finish */
|
||||||
};
|
};
|
||||||
@@ -109,50 +111,47 @@ DSO_METHOD *DSO_METHOD_win32(void)
|
|||||||
* LoadLibrary(), and copied.
|
* LoadLibrary(), and copied.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int win32_load(DSO *dso, const char *filename)
|
static int win32_load(DSO *dso)
|
||||||
{
|
{
|
||||||
HINSTANCE h, *p;
|
HINSTANCE h = NULL, *p = NULL;
|
||||||
char translated[DSO_MAX_TRANSLATED_SIZE];
|
/* See applicable comments from dso_dl.c */
|
||||||
int len;
|
char *filename = DSO_convert_filename(dso, NULL);
|
||||||
|
|
||||||
/* NB: This is a hideous hack, but I'm not yet sure what
|
if(filename == NULL)
|
||||||
* to replace it with. This attempts to convert any filename,
|
|
||||||
* that looks like it has no path information, into a
|
|
||||||
* translated form, e. "blah" -> "blah.dll" ... I'm more
|
|
||||||
* comfortable putting hacks into win32 code though ;-) */
|
|
||||||
len = strlen(filename);
|
|
||||||
if((dso->flags & DSO_FLAG_NAME_TRANSLATION) &&
|
|
||||||
(len + 4 < DSO_MAX_TRANSLATED_SIZE) &&
|
|
||||||
(strstr(filename, "/") == NULL) &&
|
|
||||||
(strstr(filename, "\\") == NULL) &&
|
|
||||||
(strstr(filename, ":") == NULL))
|
|
||||||
{
|
{
|
||||||
sprintf(translated, "%s.dll", filename);
|
DSOerr(DSO_F_WIN32_LOAD,DSO_R_NO_FILENAME);
|
||||||
h = LoadLibrary(translated);
|
goto err;
|
||||||
}
|
}
|
||||||
else
|
h = LoadLibrary(filename);
|
||||||
h = LoadLibrary(filename);
|
|
||||||
if(h == NULL)
|
if(h == NULL)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED);
|
DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED);
|
||||||
return(0);
|
goto err;
|
||||||
}
|
}
|
||||||
p = (HINSTANCE *)OPENSSL_malloc(sizeof(HINSTANCE));
|
p = (HINSTANCE *)OPENSSL_malloc(sizeof(HINSTANCE));
|
||||||
if(p == NULL)
|
if(p == NULL)
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_WIN32_LOAD,ERR_R_MALLOC_FAILURE);
|
DSOerr(DSO_F_WIN32_LOAD,ERR_R_MALLOC_FAILURE);
|
||||||
FreeLibrary(h);
|
goto err;
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
*p = h;
|
*p = h;
|
||||||
if(!sk_push(dso->meth_data, (char *)p))
|
if(!sk_push(dso->meth_data, (char *)p))
|
||||||
{
|
{
|
||||||
DSOerr(DSO_F_WIN32_LOAD,DSO_R_STACK_ERROR);
|
DSOerr(DSO_F_WIN32_LOAD,DSO_R_STACK_ERROR);
|
||||||
FreeLibrary(h);
|
goto err;
|
||||||
OPENSSL_free(p);
|
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
/* Success */
|
||||||
|
dso->loaded_filename = filename;
|
||||||
return(1);
|
return(1);
|
||||||
|
err:
|
||||||
|
/* Cleanup !*/
|
||||||
|
if(filename != NULL)
|
||||||
|
OPENSSL_free(filename);
|
||||||
|
if(p != NULL)
|
||||||
|
OPENSSL_free(p);
|
||||||
|
if(h != NULL)
|
||||||
|
FreeLibrary(h);
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int win32_unload(DSO *dso)
|
static int win32_unload(DSO *dso)
|
||||||
@@ -246,28 +245,32 @@ static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname)
|
|||||||
return((DSO_FUNC_TYPE)sym);
|
return((DSO_FUNC_TYPE)sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg)
|
static char *win32_name_converter(DSO *dso, const char *filename)
|
||||||
{
|
{
|
||||||
if(dso == NULL)
|
char *translated;
|
||||||
{
|
int len, transform;
|
||||||
DSOerr(DSO_F_WIN32_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return(-1);
|
len = strlen(filename);
|
||||||
}
|
transform = ((strstr(filename, "/") == NULL) &&
|
||||||
switch(cmd)
|
(strstr(filename, "\\") == NULL) &&
|
||||||
{
|
(strstr(filename, ":") == NULL));
|
||||||
case DSO_CTRL_GET_FLAGS:
|
if(transform)
|
||||||
return dso->flags;
|
/* We will convert this to "%s.dll" */
|
||||||
case DSO_CTRL_SET_FLAGS:
|
translated = OPENSSL_malloc(len + 5);
|
||||||
dso->flags = (int)larg;
|
else
|
||||||
return(0);
|
/* We will simply duplicate filename */
|
||||||
case DSO_CTRL_OR_FLAGS:
|
translated = OPENSSL_malloc(len + 1);
|
||||||
dso->flags |= (int)larg;
|
if(translated == NULL)
|
||||||
return(0);
|
{
|
||||||
default:
|
DSOerr(DSO_F_WIN32_NAME_CONVERTER,
|
||||||
break;
|
DSO_R_NAME_TRANSLATION_FAILED);
|
||||||
}
|
return(NULL);
|
||||||
DSOerr(DSO_F_WIN32_CTRL,DSO_R_UNKNOWN_COMMAND);
|
}
|
||||||
return(-1);
|
if(transform)
|
||||||
}
|
sprintf(translated, "%s.dll", filename);
|
||||||
|
else
|
||||||
|
sprintf(translated, "%s", filename);
|
||||||
|
return(translated);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
lib
|
|
||||||
Makefile.save
|
|
||||||
@@ -1,220 +0,0 @@
|
|||||||
#
|
|
||||||
# OpenSSL/crypto/engine/Makefile
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR= engine
|
|
||||||
TOP= ../..
|
|
||||||
CC= cc
|
|
||||||
INCLUDES= -I.. -I../../include
|
|
||||||
CFLAG=-g
|
|
||||||
INSTALL_PREFIX=
|
|
||||||
OPENSSLDIR= /usr/local/ssl
|
|
||||||
INSTALLTOP=/usr/local/ssl
|
|
||||||
MAKE= make -f Makefile.ssl
|
|
||||||
MAKEDEPEND= $(TOP)/util/domd $(TOP)
|
|
||||||
MAKEFILE= Makefile.ssl
|
|
||||||
AR= ar r
|
|
||||||
|
|
||||||
CFLAGS= $(INCLUDES) $(CFLAG)
|
|
||||||
|
|
||||||
GENERAL=Makefile
|
|
||||||
TEST= enginetest.c
|
|
||||||
APPS=
|
|
||||||
|
|
||||||
LIB=$(TOP)/libcrypto.a
|
|
||||||
LIBSRC= engine_err.c engine_lib.c engine_list.c engine_openssl.c \
|
|
||||||
hw_atalla.c hw_cswift.c hw_ncipher.c
|
|
||||||
LIBOBJ= engine_err.o engine_lib.o engine_list.o engine_openssl.o \
|
|
||||||
hw_atalla.o hw_cswift.o hw_ncipher.o
|
|
||||||
|
|
||||||
SRC= $(LIBSRC)
|
|
||||||
|
|
||||||
EXHEADER= engine.h
|
|
||||||
HEADER= $(EXHEADER)
|
|
||||||
|
|
||||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
|
||||||
|
|
||||||
top:
|
|
||||||
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
|
|
||||||
|
|
||||||
all: lib
|
|
||||||
|
|
||||||
lib: $(LIBOBJ)
|
|
||||||
$(AR) $(LIB) $(LIBOBJ)
|
|
||||||
$(RANLIB) $(LIB)
|
|
||||||
@touch lib
|
|
||||||
|
|
||||||
files:
|
|
||||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
|
||||||
|
|
||||||
links:
|
|
||||||
@$(TOP)/util/point.sh Makefile.ssl Makefile
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
|
|
||||||
@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
|
|
||||||
|
|
||||||
install:
|
|
||||||
@for i in $(EXHEADER) ; \
|
|
||||||
do \
|
|
||||||
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
|
|
||||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
|
|
||||||
done;
|
|
||||||
|
|
||||||
tags:
|
|
||||||
ctags $(SRC)
|
|
||||||
|
|
||||||
tests:
|
|
||||||
|
|
||||||
lint:
|
|
||||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
|
||||||
|
|
||||||
depend:
|
|
||||||
$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
|
|
||||||
|
|
||||||
dclean:
|
|
||||||
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
|
|
||||||
mv -f Makefile.new $(MAKEFILE)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
|
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
||||||
|
|
||||||
engine_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
|
||||||
engine_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
|
||||||
engine_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
|
|
||||||
engine_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
|
||||||
engine_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
|
||||||
engine_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
||||||
engine_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
|
||||||
engine_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
|
||||||
engine_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
engine_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
engine_err.o: ../../include/openssl/objects.h
|
|
||||||
engine_err.o: ../../include/openssl/opensslconf.h
|
|
||||||
engine_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
engine_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
engine_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
engine_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
engine_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
engine_err.o: ../../include/openssl/symhacks.h
|
|
||||||
engine_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
|
||||||
engine_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
|
||||||
engine_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
|
||||||
engine_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
|
||||||
engine_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
||||||
engine_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
|
||||||
engine_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
||||||
engine_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
|
||||||
engine_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
|
||||||
engine_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
engine_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
engine_lib.o: ../../include/openssl/objects.h
|
|
||||||
engine_lib.o: ../../include/openssl/opensslconf.h
|
|
||||||
engine_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
engine_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
engine_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
engine_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
engine_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
engine_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
|
|
||||||
engine_list.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
|
||||||
engine_list.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
|
||||||
engine_list.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
|
||||||
engine_list.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
|
||||||
engine_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
||||||
engine_list.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
|
||||||
engine_list.o: ../../include/openssl/engine.h ../../include/openssl/err.h
|
|
||||||
engine_list.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
|
||||||
engine_list.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
|
||||||
engine_list.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
|
||||||
engine_list.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
|
||||||
engine_list.o: ../../include/openssl/objects.h
|
|
||||||
engine_list.o: ../../include/openssl/opensslconf.h
|
|
||||||
engine_list.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
engine_list.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
engine_list.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
engine_list.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
engine_list.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
engine_list.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
|
|
||||||
engine_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
|
||||||
engine_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
|
||||||
engine_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
|
||||||
engine_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
|
||||||
engine_openssl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
||||||
engine_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
||||||
engine_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
||||||
engine_openssl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
|
||||||
engine_openssl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
|
||||||
engine_openssl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
|
||||||
engine_openssl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|
||||||
engine_openssl.o: ../../include/openssl/obj_mac.h
|
|
||||||
engine_openssl.o: ../../include/openssl/objects.h
|
|
||||||
engine_openssl.o: ../../include/openssl/opensslconf.h
|
|
||||||
engine_openssl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
engine_openssl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
engine_openssl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
engine_openssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
engine_openssl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
engine_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
|
|
||||||
hw_atalla.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
|
||||||
hw_atalla.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
|
||||||
hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
|
||||||
hw_atalla.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
|
||||||
hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
||||||
hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
||||||
hw_atalla.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
||||||
hw_atalla.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
|
||||||
hw_atalla.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
|
||||||
hw_atalla.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
|
||||||
hw_atalla.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|
||||||
hw_atalla.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|
||||||
hw_atalla.o: ../../include/openssl/opensslconf.h
|
|
||||||
hw_atalla.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
hw_atalla.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
hw_atalla.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
hw_atalla.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
hw_atalla.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
hw_atalla.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
|
|
||||||
hw_atalla.o: vendor_defns/atalla.h
|
|
||||||
hw_cswift.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
|
||||||
hw_cswift.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
|
||||||
hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
|
||||||
hw_cswift.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
|
||||||
hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
||||||
hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
||||||
hw_cswift.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
||||||
hw_cswift.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
|
||||||
hw_cswift.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
|
||||||
hw_cswift.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
|
||||||
hw_cswift.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|
||||||
hw_cswift.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|
||||||
hw_cswift.o: ../../include/openssl/opensslconf.h
|
|
||||||
hw_cswift.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
|
|
||||||
hw_cswift.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
|
||||||
hw_cswift.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
|
||||||
hw_cswift.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
|
||||||
hw_cswift.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
|
||||||
hw_cswift.o: ../../include/openssl/symhacks.h ../cryptlib.h engine_int.h
|
|
||||||
hw_cswift.o: vendor_defns/cswift.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/dso.h ../../include/openssl/e_os.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/opensslconf.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
|
||||||
hw_ncipher.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
|
||||||
hw_ncipher.o: ../cryptlib.h engine_int.h vendor_defns/hwcryptohook.h
|
|
||||||
@@ -1,278 +0,0 @@
|
|||||||
NOTES, THOUGHTS, and EVERYTHING
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
(1) Concurrency and locking ... I made a change to the ENGINE_free code
|
|
||||||
because I spotted a potential hold-up in proceedings (doing too
|
|
||||||
much inside a lock including calling a callback), there may be
|
|
||||||
other bits like this. What do the speed/optimisation freaks think
|
|
||||||
of this aspect of the code and design? There's lots of locking for
|
|
||||||
manipulation functions and I need that to keep things nice and
|
|
||||||
solid, but this manipulation is mostly (de)initialisation, I would
|
|
||||||
think that most run-time locking is purely in the ENGINE_init and
|
|
||||||
ENGINE_finish calls that might be made when getting handles for
|
|
||||||
RSA (and friends') structures. These would be mostly reference
|
|
||||||
count operations as the functional references should always be 1
|
|
||||||
or greater at run-time to prevent init/deinit thrashing.
|
|
||||||
|
|
||||||
(2) nCipher support, via the HWCryptoHook API, is now in the code.
|
|
||||||
Apparently this hasn't been tested too much yet, but it looks
|
|
||||||
good. :-) Atalla support has been added too, but shares a lot in
|
|
||||||
common with Ben's original hooks in bn_exp.c (although it has been
|
|
||||||
ENGINE-ified, and error handling wrapped around it) and it's also
|
|
||||||
had some low-volume testing, so it should be usable.
|
|
||||||
|
|
||||||
(3) Of more concern, we need to work out (a) how to put together usable
|
|
||||||
RAND_METHODs for units that just have one "get n or less random
|
|
||||||
bytes" function, (b) we also need to determine how to hook the code
|
|
||||||
in crypto/rand/ to use the ENGINE defaults in a way similar to what
|
|
||||||
has been done in crypto/rsa/, crypto/dsa/, etc.
|
|
||||||
|
|
||||||
(4) ENGINE should really grow to encompass more than 3 public key
|
|
||||||
algorithms and randomness gathering. The structure/data level of
|
|
||||||
the engine code is hidden from code outside the crypto/engine/
|
|
||||||
directory so change shouldn't be too viral. More important though
|
|
||||||
is how things should evolve ... this needs thought and discussion.
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------==*==-----------------------------------
|
|
||||||
|
|
||||||
More notes 2000-08-01
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
Geoff Thorpe, who designed the engine part, wrote a pretty good description
|
|
||||||
of the thoughts he had when he built it, good enough to include verbatim here
|
|
||||||
(with his permission) -- Richard Levitte
|
|
||||||
|
|
||||||
|
|
||||||
Date: Tue, 1 Aug 2000 16:54:08 +0100 (BST)
|
|
||||||
From: Geoff Thorpe
|
|
||||||
Subject: Re: The thoughts to merge BRANCH_engine into the main trunk are
|
|
||||||
emerging
|
|
||||||
|
|
||||||
Hi there,
|
|
||||||
|
|
||||||
I'm going to try and do some justice to this, but I'm a little short on
|
|
||||||
time and the there is an endless amount that could be discussed on this
|
|
||||||
subject. sigh ... please bear with me :-)
|
|
||||||
|
|
||||||
> The changes in BRANCH_engine dig deep into the core of OpenSSL, for example
|
|
||||||
> into the RSA and RAND routines, adding a level of indirection which is needed
|
|
||||||
> to keep the abstraction, as far as I understand. It would be a good thing if
|
|
||||||
> those who do play with those things took a look at the changes that have been
|
|
||||||
> done in the branch and say out loud how much (or hopefully little) we've made
|
|
||||||
> fools of ourselves.
|
|
||||||
|
|
||||||
The point here is that the code that has emerged in the BRANCH_engine
|
|
||||||
branch was based on some initial requirements of mine that I went in and
|
|
||||||
addressed, and Richard has picked up the ball and run with it too. It
|
|
||||||
would be really useful to get some review of the approach we've taken, but
|
|
||||||
first I think I need to describe as best I can the reasons behind what has
|
|
||||||
been done so far, in particular what issues we have tried to address when
|
|
||||||
doing this, and what issues we have intentionally (or necessarily) tried
|
|
||||||
to avoid.
|
|
||||||
|
|
||||||
methods, engines, and evps
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
There has been some dicussion, particularly with Steve, about where this
|
|
||||||
ENGINE stuff might fit into the conceptual picture as/when we start to
|
|
||||||
abstract algorithms a little bit to make the library more extensible. In
|
|
||||||
particular, it would desirable to have algorithms (symmetric, hash, pkc,
|
|
||||||
etc) abstracted in some way that allows them to be just objects sitting in
|
|
||||||
a list (or database) ... it'll just happen that the "DSA" object doesn't
|
|
||||||
support encryption whereas the "RSA" object does. This requires a lot of
|
|
||||||
consideration to begin to know how to tackle it; in particular how
|
|
||||||
encapsulated should these things be? If the objects also understand their
|
|
||||||
own ASN1 encodings and what-not, then it would for example be possible to
|
|
||||||
add support for elliptic-curve DSA in as a new algorithm and automatically
|
|
||||||
have ECC-DSA certificates supported in SSL applications. Possible, but not
|
|
||||||
easy. :-)
|
|
||||||
|
|
||||||
Whatever, it seems that the way to go (if I've grok'd Steve's comments on
|
|
||||||
this in the past) is to amalgamate these things in EVP as is already done
|
|
||||||
(I think) for ciphers or hashes (Steve, please correct/elaborate). I
|
|
||||||
certainly think something should be done in this direction because right
|
|
||||||
now we have different source directories, types, functions, and methods
|
|
||||||
for each algorithm - even when conceptually they are very much different
|
|
||||||
feathers of the same bird. (This is certainly all true for the public-key
|
|
||||||
stuff, and may be partially true for the other parts.)
|
|
||||||
|
|
||||||
ENGINE was *not* conceived as a way of solving this, far from it. Nor was
|
|
||||||
it conceived as a way of replacing the various "***_METHOD"s. It was
|
|
||||||
conceived as an abstraction of a sort of "virtual crypto device". If we
|
|
||||||
lived in a world where "EVP_ALGO"s (or something like them) encapsulated
|
|
||||||
particular algorithms like RSA,DSA,MD5,RC4,etc, and "***_METHOD"s
|
|
||||||
encapsulated interfaces to algorithms (eg. some algo's might support a
|
|
||||||
PKC_METHOD, a HASH_METHOD, or a CIPHER_METHOD, who knows?), then I would
|
|
||||||
think that ENGINE would encapsulate an implementation of arbitrarily many
|
|
||||||
of those algorithms - perhaps as alternatives to existing algorithms
|
|
||||||
and/or perhaps as new previously unimplemented algorithms. An ENGINE could
|
|
||||||
be used to contain an alternative software implementation, a wrapper for a
|
|
||||||
hardware acceleration and/or key-management unit, a comms-wrapper for
|
|
||||||
distributing cryptographic operations to remote machines, or any other
|
|
||||||
"devices" your imagination can dream up.
|
|
||||||
|
|
||||||
However, what has been done in the ENGINE branch so far is nothing more
|
|
||||||
than starting to get our toes wet. I had a couple of self-imposed
|
|
||||||
requirements when putting the initial abstraction together, and I may have
|
|
||||||
already posed these in one form or another on the list, but briefly;
|
|
||||||
|
|
||||||
(i) only bother with public key algorithms for now, and maybe RAND too
|
|
||||||
(motivated by the need to get hardware support going and the fact
|
|
||||||
this was a comparitively easy subset to address to begin with).
|
|
||||||
|
|
||||||
(ii) don't change (if at all possible) the existing crypto code, ie. the
|
|
||||||
implementations, the way the ***_METHODs work, etc.
|
|
||||||
|
|
||||||
(iii) ensure that if no function from the ENGINE code is ever called then
|
|
||||||
things work the way they always did, and there is no memory
|
|
||||||
allocation (otherwise the failure to cleanup would be a problem -
|
|
||||||
this is part of the reason no STACKs were used, the other part of
|
|
||||||
the reason being I found them inappropriate).
|
|
||||||
|
|
||||||
(iv) ensure that all the built-in crypto was encapsulated by one of
|
|
||||||
these "ENGINE"s and that this engine was automatically selected as
|
|
||||||
the default.
|
|
||||||
|
|
||||||
(v) provide the minimum hooking possible in the existing crypto code
|
|
||||||
so that global functions (eg. RSA_public_encrypt) do not need any
|
|
||||||
extra parameter, yet will use whatever the current default ENGINE
|
|
||||||
for that RSA key is, and that the default can be set "per-key"
|
|
||||||
and globally (new keys will assume the global default, and keys
|
|
||||||
without their own default will be operated on using the global
|
|
||||||
default). NB: Try and make (v) conflict as little as possible with
|
|
||||||
(ii). :-)
|
|
||||||
|
|
||||||
(vi) wrap the ENGINE code up in duct tape so you can't even see the
|
|
||||||
corners. Ie. expose no structures at all, just black-box pointers.
|
|
||||||
|
|
||||||
(v) maintain internally a list of ENGINEs on which a calling
|
|
||||||
application can iterate, interrogate, etc. Allow a calling
|
|
||||||
application to hook in new ENGINEs, remove ENGINEs from the list,
|
|
||||||
and enforce uniqueness within the global list of each ENGINE's
|
|
||||||
"unique id".
|
|
||||||
|
|
||||||
(vi) keep reference counts for everything - eg. this includes storing a
|
|
||||||
reference inside each RSA structure to the ENGINE that it uses.
|
|
||||||
This is freed when the RSA structure is destroyed, or has its
|
|
||||||
ENGINE explicitly changed. The net effect needs to be that at any
|
|
||||||
time, it is deterministic to know whether an ENGINE is in use or
|
|
||||||
can be safely removed (or unloaded in the case of the other type
|
|
||||||
of reference) without invalidating function pointers that may or
|
|
||||||
may not be used indavertently in the future. This was actually
|
|
||||||
one of the biggest problems to overcome in the existing OpenSSL
|
|
||||||
code - implementations had always been assumed to be ever-present,
|
|
||||||
so there was no trivial way to get round this.
|
|
||||||
|
|
||||||
(vii) distinguish between structural references and functional
|
|
||||||
references.
|
|
||||||
|
|
||||||
A *little* detail
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
While my mind is on it; I'll illustrate the bit in item (vii). This idea
|
|
||||||
turned out to be very handy - the ENGINEs themselves need to be operated
|
|
||||||
on and manipulated simply as objects without necessarily trying to
|
|
||||||
"enable" them for use. Eg. most host machines will not have the necessary
|
|
||||||
hardware or software to support all the engines one might compile into
|
|
||||||
OpenSSL, yet it needs to be possible to iterate across the ENGINEs,
|
|
||||||
querying their names, properties, etc - all happening in a thread-safe
|
|
||||||
manner that uses reference counts (if you imagine two threads iterating
|
|
||||||
through a list and one thread removing the ENGINE the other is currently
|
|
||||||
looking at - you can see the gotcha waiting to happen). For all of this,
|
|
||||||
*structural references* are used and operate much like the other reference
|
|
||||||
counts in OpenSSL.
|
|
||||||
|
|
||||||
The other kind of reference count is for *functional* references - these
|
|
||||||
indicate a reference on which the caller can actually assume the
|
|
||||||
particular ENGINE to be initialised and usable to perform the operations
|
|
||||||
it implements. Any increment or decrement of the functional reference
|
|
||||||
count automatically invokes a corresponding change in the structural
|
|
||||||
reference count, as it is fairly obvious that a functional reference is a
|
|
||||||
restricted case of a structural reference. So struct_ref >= funct_ref at
|
|
||||||
all times. NB: functional references are usually obtained by a call to
|
|
||||||
ENGINE_init(), but can also be created implicitly by calls that require a
|
|
||||||
new functional reference to be created, eg. ENGINE_set_default(). Either
|
|
||||||
way the only time the underlying ENGINE's "init" function is really called
|
|
||||||
is when the (functional) reference count increases to 1, similarly the
|
|
||||||
underlying "finish" handler is only called as the count goes down to 0.
|
|
||||||
The effect of this, for example, is that if you set the default ENGINE for
|
|
||||||
RSA operations to be "cswift", then its functional reference count will
|
|
||||||
already be at least 1 so the CryptoSwift shared-library and the card will
|
|
||||||
stay loaded and initialised until such time as all RSA keys using the
|
|
||||||
cswift ENGINE are changed or destroyed and the default ENGINE for RSA
|
|
||||||
operations has been changed. This prevents repeated thrashing of init and
|
|
||||||
finish handling if the count keeps getting down as far as zero.
|
|
||||||
|
|
||||||
Otherwise, the way the ENGINE code has been put together I think pretty
|
|
||||||
much reflects the above points. The reason for the ENGINE structure having
|
|
||||||
individual RSA_METHOD, DSA_METHOD, etc pointers is simply that it was the
|
|
||||||
easiest way to go about things for now, to hook it all into the raw
|
|
||||||
RSA,DSA,etc code, and I was trying to the keep the structure invisible
|
|
||||||
anyway so that the way this is internally managed could be easily changed
|
|
||||||
later on when we start to work out what's to be done about these other
|
|
||||||
abstractions.
|
|
||||||
|
|
||||||
Down the line, if some EVP-based technique emerges for adequately
|
|
||||||
encapsulating algorithms and all their various bits and pieces, then I can
|
|
||||||
imagine that "ENGINE" would turn into a reference-counting database of
|
|
||||||
these EVP things, of which the default "openssl" ENGINE would be the
|
|
||||||
library's own object database of pre-built software implemented algorithms
|
|
||||||
(and such). It would also be cool to see the idea of "METHOD"s detached
|
|
||||||
from the algorithms themselves ... so RSA, DSA, ElGamal, etc can all
|
|
||||||
expose essentially the same METHOD (aka interface), which would include
|
|
||||||
any querying/flagging stuff to identify what the algorithm can/can't do,
|
|
||||||
its name, and other stuff like max/min block sizes, key sizes, etc. This
|
|
||||||
would result in ENGINE similarly detaching its internal database of
|
|
||||||
algorithm implementations from the function definitions that return
|
|
||||||
interfaces to them. I think ...
|
|
||||||
|
|
||||||
As for DSOs etc. Well the DSO code is pretty handy (but could be made much
|
|
||||||
more so) for loading vendor's driver-libraries and talking to them in some
|
|
||||||
generic way, but right now there's still big problems associated with
|
|
||||||
actually putting OpenSSL code (ie. new ENGINEs, or anything else for that
|
|
||||||
matter) in dynamically loadable libraries. These problems won't go away in
|
|
||||||
a hurry so I don't think we should expect to have any kind of
|
|
||||||
shared-library extensions any time soon - but solving the problems is a
|
|
||||||
good thing to aim for, and would as a side-effect probably help make
|
|
||||||
OpenSSL more usable as a shared-library itself (looking at the things
|
|
||||||
needed to do this will show you why).
|
|
||||||
|
|
||||||
One of the problems is that if you look at any of the ENGINE
|
|
||||||
implementations, eg. hw_cswift.c or hw_ncipher.c, you'll see how it needs
|
|
||||||
a variety of functionality and definitions from various areas of OpenSSL,
|
|
||||||
including crypto/bn/, crypto/err/, crypto/ itself (locking for example),
|
|
||||||
crypto/dso/, crypto/engine/, crypto/rsa, etc etc etc. So if similar code
|
|
||||||
were to be suctioned off into shared libraries, the shared libraries would
|
|
||||||
either have to duplicate all the definitions and code and avoid loader
|
|
||||||
conflicts, or OpenSSL would have to somehow expose all that functionality
|
|
||||||
to the shared-library. If this isn't a big enough problem, the issue of
|
|
||||||
binary compatibility will be - anyone writing Apache modules can tell you
|
|
||||||
that (Ralf? Ben? :-). However, I don't think OpenSSL would need to be
|
|
||||||
quite so forgiving as Apache should be, so OpenSSL could simply tell its
|
|
||||||
version to the DSO and leave the DSO with the problem of deciding whether
|
|
||||||
to proceed or bail out for fear of binary incompatibilities.
|
|
||||||
|
|
||||||
Certainly one thing that would go a long way to addressing this is to
|
|
||||||
embark on a bit of an opaqueness mission. I've set the ENGINE code up with
|
|
||||||
this in mind - it's so draconian that even to declare your own ENGINE, you
|
|
||||||
have to get the engine code to create the underlying ENGINE structure, and
|
|
||||||
then feed in the new ENGINE's function/method pointers through various
|
|
||||||
"set" functions. The more of the code that takes on such a black-box
|
|
||||||
approach, the more of the code that will be (a) easy to expose to shared
|
|
||||||
libraries that need it, and (b) easy to expose to applications wanting to
|
|
||||||
use OpenSSL itself as a shared-library. From my own explorations in
|
|
||||||
OpenSSL, the biggest leviathan I've seen that is a problem in this respect
|
|
||||||
is the BIGNUM code. Trying to "expose" the bignum code through any kind of
|
|
||||||
organised "METHODs", let alone do all the necessary bignum operations
|
|
||||||
solely through functions rather than direct access to the structures and
|
|
||||||
macros, will be a massive pain in the "r"s.
|
|
||||||
|
|
||||||
Anyway, I'm done for now - hope it was readable. Thoughts?
|
|
||||||
|
|
||||||
Cheers,
|
|
||||||
Geoff
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------==*==-----------------------------------
|
|
||||||
|
|
||||||
@@ -1,398 +0,0 @@
|
|||||||
/* openssl/engine.h */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef HEADER_ENGINE_H
|
|
||||||
#define HEADER_ENGINE_H
|
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
|
||||||
#include <openssl/rsa.h>
|
|
||||||
#include <openssl/dsa.h>
|
|
||||||
#include <openssl/dh.h>
|
|
||||||
#include <openssl/rand.h>
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
#include <openssl/symhacks.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* These flags are used to control combinations of algorithm (methods)
|
|
||||||
* by bitwise "OR"ing. */
|
|
||||||
#define ENGINE_METHOD_RSA (unsigned int)0x0001
|
|
||||||
#define ENGINE_METHOD_DSA (unsigned int)0x0002
|
|
||||||
#define ENGINE_METHOD_DH (unsigned int)0x0004
|
|
||||||
#define ENGINE_METHOD_RAND (unsigned int)0x0008
|
|
||||||
#define ENGINE_METHOD_BN_MOD_EXP (unsigned int)0x0010
|
|
||||||
#define ENGINE_METHOD_BN_MOD_EXP_CRT (unsigned int)0x0020
|
|
||||||
/* Obvious all-or-nothing cases. */
|
|
||||||
#define ENGINE_METHOD_ALL (unsigned int)0xFFFF
|
|
||||||
#define ENGINE_METHOD_NONE (unsigned int)0x0000
|
|
||||||
|
|
||||||
/* These flags are used to tell the ctrl function what should be done.
|
|
||||||
* All command numbers are shared between all engines, even if some don't
|
|
||||||
* make sense to some engines. In such a case, they do nothing but return
|
|
||||||
* the error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. */
|
|
||||||
#define ENGINE_CTRL_SET_LOGSTREAM 1
|
|
||||||
#define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2
|
|
||||||
/* Flags specific to the nCipher "chil" engine */
|
|
||||||
#define ENGINE_CTRL_CHIL_SET_FORKCHECK 100
|
|
||||||
/* Depending on the value of the (long)i argument, this sets or
|
|
||||||
* unsets the SimpleForkCheck flag in the CHIL API to enable or
|
|
||||||
* disable checking and workarounds for applications that fork().
|
|
||||||
*/
|
|
||||||
#define ENGINE_CTRL_CHIL_NO_LOCKING 101
|
|
||||||
/* This prevents the initialisation function from providing mutex
|
|
||||||
* callbacks to the nCipher library. */
|
|
||||||
|
|
||||||
/* As we're missing a BIGNUM_METHOD, we need a couple of locally
|
|
||||||
* defined function types that engines can implement. */
|
|
||||||
|
|
||||||
#ifndef HEADER_ENGINE_INT_H
|
|
||||||
/* mod_exp operation, calculates; r = a ^ p mod m
|
|
||||||
* NB: ctx can be NULL, but if supplied, the implementation may use
|
|
||||||
* it if it wishes. */
|
|
||||||
typedef int (*BN_MOD_EXP)(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx);
|
|
||||||
|
|
||||||
/* private key operation for RSA, provided seperately in case other
|
|
||||||
* RSA implementations wish to use it. */
|
|
||||||
typedef int (*BN_MOD_EXP_CRT)(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1,
|
|
||||||
const BIGNUM *iqmp, BN_CTX *ctx);
|
|
||||||
|
|
||||||
/* Generic function pointer */
|
|
||||||
typedef void (*ENGINE_GEN_FUNC_PTR)();
|
|
||||||
/* Generic function pointer taking no arguments */
|
|
||||||
typedef void (*ENGINE_GEN_INT_FUNC_PTR)(void);
|
|
||||||
/* Specific control function pointer */
|
|
||||||
typedef int (*ENGINE_CTRL_FUNC_PTR)(int cmd, long i, void *p, void (*f)());
|
|
||||||
|
|
||||||
/* The list of "engine" types is a static array of (const ENGINE*)
|
|
||||||
* pointers (not dynamic because static is fine for now and we otherwise
|
|
||||||
* have to hook an appropriate load/unload function in to initialise and
|
|
||||||
* cleanup). */
|
|
||||||
typedef struct engine_st ENGINE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* STRUCTURE functions ... all of these functions deal with pointers to
|
|
||||||
* ENGINE structures where the pointers have a "structural reference".
|
|
||||||
* This means that their reference is to allow access to the structure
|
|
||||||
* but it does not imply that the structure is functional. To simply
|
|
||||||
* increment or decrement the structural reference count, use ENGINE_new
|
|
||||||
* and ENGINE_free. NB: This is not required when iterating using
|
|
||||||
* ENGINE_get_next as it will automatically decrement the structural
|
|
||||||
* reference count of the "current" ENGINE and increment the structural
|
|
||||||
* reference count of the ENGINE it returns (unless it is NULL). */
|
|
||||||
|
|
||||||
/* Get the first/last "ENGINE" type available. */
|
|
||||||
ENGINE *ENGINE_get_first(void);
|
|
||||||
ENGINE *ENGINE_get_last(void);
|
|
||||||
/* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */
|
|
||||||
ENGINE *ENGINE_get_next(ENGINE *e);
|
|
||||||
ENGINE *ENGINE_get_prev(ENGINE *e);
|
|
||||||
/* Add another "ENGINE" type into the array. */
|
|
||||||
int ENGINE_add(ENGINE *e);
|
|
||||||
/* Remove an existing "ENGINE" type from the array. */
|
|
||||||
int ENGINE_remove(ENGINE *e);
|
|
||||||
/* Retrieve an engine from the list by its unique "id" value. */
|
|
||||||
ENGINE *ENGINE_by_id(const char *id);
|
|
||||||
|
|
||||||
/* These functions are useful for manufacturing new ENGINE
|
|
||||||
* structures. They don't address reference counting at all -
|
|
||||||
* one uses them to populate an ENGINE structure with personalised
|
|
||||||
* implementations of things prior to using it directly or adding
|
|
||||||
* it to the builtin ENGINE list in OpenSSL. These are also here
|
|
||||||
* so that the ENGINE structure doesn't have to be exposed and
|
|
||||||
* break binary compatibility!
|
|
||||||
*
|
|
||||||
* NB: I'm changing ENGINE_new to force the ENGINE structure to
|
|
||||||
* be allocated from within OpenSSL. See the comment for
|
|
||||||
* ENGINE_get_struct_size().
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
ENGINE *ENGINE_new(ENGINE *e);
|
|
||||||
#else
|
|
||||||
ENGINE *ENGINE_new(void);
|
|
||||||
#endif
|
|
||||||
int ENGINE_free(ENGINE *e);
|
|
||||||
int ENGINE_set_id(ENGINE *e, const char *id);
|
|
||||||
int ENGINE_set_name(ENGINE *e, const char *name);
|
|
||||||
int ENGINE_set_RSA(ENGINE *e, RSA_METHOD *rsa_meth);
|
|
||||||
int ENGINE_set_DSA(ENGINE *e, DSA_METHOD *dsa_meth);
|
|
||||||
int ENGINE_set_DH(ENGINE *e, DH_METHOD *dh_meth);
|
|
||||||
int ENGINE_set_RAND(ENGINE *e, RAND_METHOD *rand_meth);
|
|
||||||
int ENGINE_set_BN_mod_exp(ENGINE *e, BN_MOD_EXP bn_mod_exp);
|
|
||||||
int ENGINE_set_BN_mod_exp_crt(ENGINE *e, BN_MOD_EXP_CRT bn_mod_exp_crt);
|
|
||||||
int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);
|
|
||||||
int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
|
|
||||||
int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);
|
|
||||||
|
|
||||||
/* These return values from within the ENGINE structure. These can
|
|
||||||
* be useful with functional references as well as structural
|
|
||||||
* references - it depends which you obtained. Using the result
|
|
||||||
* for functional purposes if you only obtained a structural
|
|
||||||
* reference may be problematic! */
|
|
||||||
const char *ENGINE_get_id(ENGINE *e);
|
|
||||||
const char *ENGINE_get_name(ENGINE *e);
|
|
||||||
RSA_METHOD *ENGINE_get_RSA(ENGINE *e);
|
|
||||||
DSA_METHOD *ENGINE_get_DSA(ENGINE *e);
|
|
||||||
DH_METHOD *ENGINE_get_DH(ENGINE *e);
|
|
||||||
RAND_METHOD *ENGINE_get_RAND(ENGINE *e);
|
|
||||||
BN_MOD_EXP ENGINE_get_BN_mod_exp(ENGINE *e);
|
|
||||||
BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(ENGINE *e);
|
|
||||||
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(ENGINE *e);
|
|
||||||
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(ENGINE *e);
|
|
||||||
ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(ENGINE *e);
|
|
||||||
|
|
||||||
/* ENGINE_new is normally passed a NULL in the first parameter because
|
|
||||||
* the calling code doesn't have access to the definition of the ENGINE
|
|
||||||
* structure (for good reason). However, if the caller wishes to use
|
|
||||||
* its own memory allocation or use a static array, the following call
|
|
||||||
* should be used to check the amount of memory the ENGINE structure
|
|
||||||
* will occupy. This will make the code more future-proof.
|
|
||||||
*
|
|
||||||
* NB: I'm "#if 0"-ing this out because it's better to force the use of
|
|
||||||
* internally allocated memory. See similar change in ENGINE_new().
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
int ENGINE_get_struct_size(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* FUNCTIONAL functions. These functions deal with ENGINE structures
|
|
||||||
* that have (or will) be initialised for use. Broadly speaking, the
|
|
||||||
* structural functions are useful for iterating the list of available
|
|
||||||
* engine types, creating new engine types, and other "list" operations.
|
|
||||||
* These functions actually deal with ENGINEs that are to be used. As
|
|
||||||
* such these functions can fail (if applicable) when particular
|
|
||||||
* engines are unavailable - eg. if a hardware accelerator is not
|
|
||||||
* attached or not functioning correctly. Each ENGINE has 2 reference
|
|
||||||
* counts; structural and functional. Every time a functional reference
|
|
||||||
* is obtained or released, a corresponding structural reference is
|
|
||||||
* automatically obtained or released too. */
|
|
||||||
|
|
||||||
/* Initialise a engine type for use (or up its reference count if it's
|
|
||||||
* already in use). This will fail if the engine is not currently
|
|
||||||
* operational and cannot initialise. */
|
|
||||||
int ENGINE_init(ENGINE *e);
|
|
||||||
/* Free a functional reference to a engine type. This does not require
|
|
||||||
* a corresponding call to ENGINE_free as it also releases a structural
|
|
||||||
* reference. */
|
|
||||||
int ENGINE_finish(ENGINE *e);
|
|
||||||
/* Send control parametrised commands to the engine. The possibilities
|
|
||||||
* to send down an integer, a pointer to data or a function pointer are
|
|
||||||
* provided. Any of the parameters may or may not be NULL, depending
|
|
||||||
* on the command number */
|
|
||||||
/* WARNING: This is currently experimental and may change radically! */
|
|
||||||
int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)());
|
|
||||||
|
|
||||||
/* The following functions handle keys that are stored in some secondary
|
|
||||||
* location, handled by the engine. The storage may be on a card or
|
|
||||||
* whatever. */
|
|
||||||
EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
|
|
||||||
const char *passphrase);
|
|
||||||
EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
|
|
||||||
const char *passphrase);
|
|
||||||
|
|
||||||
/* This returns a pointer for the current ENGINE structure that
|
|
||||||
* is (by default) performing any RSA operations. The value returned
|
|
||||||
* is an incremented reference, so it should be free'd (ENGINE_finish)
|
|
||||||
* before it is discarded. */
|
|
||||||
ENGINE *ENGINE_get_default_RSA(void);
|
|
||||||
/* Same for the other "methods" */
|
|
||||||
ENGINE *ENGINE_get_default_DSA(void);
|
|
||||||
ENGINE *ENGINE_get_default_DH(void);
|
|
||||||
ENGINE *ENGINE_get_default_RAND(void);
|
|
||||||
ENGINE *ENGINE_get_default_BN_mod_exp(void);
|
|
||||||
ENGINE *ENGINE_get_default_BN_mod_exp_crt(void);
|
|
||||||
|
|
||||||
/* This sets a new default ENGINE structure for performing RSA
|
|
||||||
* operations. If the result is non-zero (success) then the ENGINE
|
|
||||||
* structure will have had its reference count up'd so the caller
|
|
||||||
* should still free their own reference 'e'. */
|
|
||||||
int ENGINE_set_default_RSA(ENGINE *e);
|
|
||||||
/* Same for the other "methods" */
|
|
||||||
int ENGINE_set_default_DSA(ENGINE *e);
|
|
||||||
int ENGINE_set_default_DH(ENGINE *e);
|
|
||||||
int ENGINE_set_default_RAND(ENGINE *e);
|
|
||||||
int ENGINE_set_default_BN_mod_exp(ENGINE *e);
|
|
||||||
int ENGINE_set_default_BN_mod_exp_crt(ENGINE *e);
|
|
||||||
|
|
||||||
/* The combination "set" - the flags are bitwise "OR"d from the
|
|
||||||
* ENGINE_METHOD_*** defines above. */
|
|
||||||
int ENGINE_set_default(ENGINE *e, unsigned int flags);
|
|
||||||
|
|
||||||
/* Obligatory error function. */
|
|
||||||
void ERR_load_ENGINE_strings(void);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Error codes for all engine functions. NB: We use "generic"
|
|
||||||
* function names instead of per-implementation ones because this
|
|
||||||
* levels the playing field for externally implemented bootstrapped
|
|
||||||
* support code. As the filename and line number is included, it's
|
|
||||||
* more important to indicate the type of function, so that
|
|
||||||
* bootstrapped code (that can't easily add its own errors in) can
|
|
||||||
* use the same error codes too.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
|
||||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
|
||||||
* made after this point may be overwritten when the script is next run.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Error codes for the ENGINE functions. */
|
|
||||||
|
|
||||||
/* Function codes. */
|
|
||||||
#define ENGINE_F_ATALLA_FINISH 135
|
|
||||||
#define ENGINE_F_ATALLA_INIT 136
|
|
||||||
#define ENGINE_F_ATALLA_MOD_EXP 137
|
|
||||||
#define ENGINE_F_ATALLA_RSA_MOD_EXP 138
|
|
||||||
#define ENGINE_F_CSWIFT_DSA_SIGN 133
|
|
||||||
#define ENGINE_F_CSWIFT_DSA_VERIFY 134
|
|
||||||
#define ENGINE_F_CSWIFT_FINISH 100
|
|
||||||
#define ENGINE_F_CSWIFT_INIT 101
|
|
||||||
#define ENGINE_F_CSWIFT_MOD_EXP 102
|
|
||||||
#define ENGINE_F_CSWIFT_MOD_EXP_CRT 103
|
|
||||||
#define ENGINE_F_CSWIFT_RSA_MOD_EXP 104
|
|
||||||
#define ENGINE_F_ENGINE_ADD 105
|
|
||||||
#define ENGINE_F_ENGINE_BY_ID 106
|
|
||||||
#define ENGINE_F_ENGINE_CTRL 142
|
|
||||||
#define ENGINE_F_ENGINE_FINISH 107
|
|
||||||
#define ENGINE_F_ENGINE_FREE 108
|
|
||||||
#define ENGINE_F_ENGINE_GET_BN_MOD_EXP 109
|
|
||||||
#define ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT 110
|
|
||||||
#define ENGINE_F_ENGINE_GET_CTRL_FUNCTION 144
|
|
||||||
#define ENGINE_F_ENGINE_GET_DH 111
|
|
||||||
#define ENGINE_F_ENGINE_GET_DSA 112
|
|
||||||
#define ENGINE_F_ENGINE_GET_FINISH_FUNCTION 145
|
|
||||||
#define ENGINE_F_ENGINE_GET_ID 113
|
|
||||||
#define ENGINE_F_ENGINE_GET_INIT_FUNCTION 146
|
|
||||||
#define ENGINE_F_ENGINE_GET_NAME 114
|
|
||||||
#define ENGINE_F_ENGINE_GET_NEXT 115
|
|
||||||
#define ENGINE_F_ENGINE_GET_PREV 116
|
|
||||||
#define ENGINE_F_ENGINE_GET_RAND 117
|
|
||||||
#define ENGINE_F_ENGINE_GET_RSA 118
|
|
||||||
#define ENGINE_F_ENGINE_INIT 119
|
|
||||||
#define ENGINE_F_ENGINE_LIST_ADD 120
|
|
||||||
#define ENGINE_F_ENGINE_LIST_REMOVE 121
|
|
||||||
#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150
|
|
||||||
#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151
|
|
||||||
#define ENGINE_F_ENGINE_NEW 122
|
|
||||||
#define ENGINE_F_ENGINE_REMOVE 123
|
|
||||||
#define ENGINE_F_ENGINE_SET_BN_MOD_EXP 124
|
|
||||||
#define ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT 125
|
|
||||||
#define ENGINE_F_ENGINE_SET_CTRL_FUNCTION 147
|
|
||||||
#define ENGINE_F_ENGINE_SET_DEFAULT_TYPE 126
|
|
||||||
#define ENGINE_F_ENGINE_SET_DH 127
|
|
||||||
#define ENGINE_F_ENGINE_SET_DSA 128
|
|
||||||
#define ENGINE_F_ENGINE_SET_FINISH_FUNCTION 148
|
|
||||||
#define ENGINE_F_ENGINE_SET_ID 129
|
|
||||||
#define ENGINE_F_ENGINE_SET_INIT_FUNCTION 149
|
|
||||||
#define ENGINE_F_ENGINE_SET_NAME 130
|
|
||||||
#define ENGINE_F_ENGINE_SET_RAND 131
|
|
||||||
#define ENGINE_F_ENGINE_SET_RSA 132
|
|
||||||
#define ENGINE_F_ENGINE_UNLOAD_KEY 152
|
|
||||||
#define ENGINE_F_HWCRHK_CTRL 143
|
|
||||||
#define ENGINE_F_HWCRHK_FINISH 135
|
|
||||||
#define ENGINE_F_HWCRHK_GET_PASS 155
|
|
||||||
#define ENGINE_F_HWCRHK_INIT 136
|
|
||||||
#define ENGINE_F_HWCRHK_LOAD_PRIVKEY 153
|
|
||||||
#define ENGINE_F_HWCRHK_LOAD_PUBKEY 154
|
|
||||||
#define ENGINE_F_HWCRHK_MOD_EXP 137
|
|
||||||
#define ENGINE_F_HWCRHK_MOD_EXP_CRT 138
|
|
||||||
#define ENGINE_F_HWCRHK_RAND_BYTES 139
|
|
||||||
#define ENGINE_F_HWCRHK_RSA_MOD_EXP 140
|
|
||||||
#define ENGINE_F_LOG_MESSAGE 141
|
|
||||||
|
|
||||||
/* Reason codes. */
|
|
||||||
#define ENGINE_R_ALREADY_LOADED 100
|
|
||||||
#define ENGINE_R_BIO_WAS_FREED 121
|
|
||||||
#define ENGINE_R_BN_CTX_FULL 101
|
|
||||||
#define ENGINE_R_BN_EXPAND_FAIL 102
|
|
||||||
#define ENGINE_R_CHIL_ERROR 123
|
|
||||||
#define ENGINE_R_CONFLICTING_ENGINE_ID 103
|
|
||||||
#define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119
|
|
||||||
#define ENGINE_R_DSO_FAILURE 104
|
|
||||||
#define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105
|
|
||||||
#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128
|
|
||||||
#define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129
|
|
||||||
#define ENGINE_R_FINISH_FAILED 106
|
|
||||||
#define ENGINE_R_GET_HANDLE_FAILED 107
|
|
||||||
#define ENGINE_R_ID_OR_NAME_MISSING 108
|
|
||||||
#define ENGINE_R_INIT_FAILED 109
|
|
||||||
#define ENGINE_R_INTERNAL_LIST_ERROR 110
|
|
||||||
#define ENGINE_R_MISSING_KEY_COMPONENTS 111
|
|
||||||
#define ENGINE_R_NOT_INITIALISED 117
|
|
||||||
#define ENGINE_R_NOT_LOADED 112
|
|
||||||
#define ENGINE_R_NO_CALLBACK 127
|
|
||||||
#define ENGINE_R_NO_CONTROL_FUNCTION 120
|
|
||||||
#define ENGINE_R_NO_KEY 124
|
|
||||||
#define ENGINE_R_NO_LOAD_FUNCTION 125
|
|
||||||
#define ENGINE_R_NO_REFERENCE 130
|
|
||||||
#define ENGINE_R_NO_SUCH_ENGINE 116
|
|
||||||
#define ENGINE_R_NO_UNLOAD_FUNCTION 126
|
|
||||||
#define ENGINE_R_PROVIDE_PARAMETERS 113
|
|
||||||
#define ENGINE_R_REQUEST_FAILED 114
|
|
||||||
#define ENGINE_R_REQUEST_FALLBACK 118
|
|
||||||
#define ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL 122
|
|
||||||
#define ENGINE_R_UNIT_FAILURE 115
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1,183 +0,0 @@
|
|||||||
/* crypto/engine/engine_err.c */
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* openssl-core@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
|
|
||||||
* made to it will be overwritten when the script next updates this file,
|
|
||||||
* only reason strings will be preserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <openssl/err.h>
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
/* BEGIN ERROR CODES */
|
|
||||||
#ifndef NO_ERR
|
|
||||||
static ERR_STRING_DATA ENGINE_str_functs[]=
|
|
||||||
{
|
|
||||||
{ERR_PACK(0,ENGINE_F_ATALLA_FINISH,0), "ATALLA_FINISH"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ATALLA_INIT,0), "ATALLA_INIT"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ATALLA_MOD_EXP,0), "ATALLA_MOD_EXP"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ATALLA_RSA_MOD_EXP,0), "ATALLA_RSA_MOD_EXP"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_CSWIFT_DSA_SIGN,0), "CSWIFT_DSA_SIGN"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_CSWIFT_DSA_VERIFY,0), "CSWIFT_DSA_VERIFY"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_CSWIFT_FINISH,0), "CSWIFT_FINISH"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_CSWIFT_INIT,0), "CSWIFT_INIT"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP,0), "CSWIFT_MOD_EXP"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP_CRT,0), "CSWIFT_MOD_EXP_CRT"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_CSWIFT_RSA_MOD_EXP,0), "CSWIFT_RSA_MOD_EXP"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_ADD,0), "ENGINE_add"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_BY_ID,0), "ENGINE_by_id"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_CTRL,0), "ENGINE_ctrl"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_FINISH,0), "ENGINE_finish"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_FREE,0), "ENGINE_free"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP,0), "ENGINE_get_BN_mod_exp"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT,0), "ENGINE_get_BN_mod_exp_crt"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_CTRL_FUNCTION,0), "ENGINE_get_ctrl_function"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_DH,0), "ENGINE_get_DH"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_DSA,0), "ENGINE_get_DSA"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_FINISH_FUNCTION,0), "ENGINE_get_finish_function"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_ID,0), "ENGINE_get_id"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_INIT_FUNCTION,0), "ENGINE_get_init_function"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_NAME,0), "ENGINE_get_name"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_NEXT,0), "ENGINE_get_next"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_PREV,0), "ENGINE_get_prev"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_RAND,0), "ENGINE_get_RAND"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_GET_RSA,0), "ENGINE_get_RSA"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_INIT,0), "ENGINE_init"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_LIST_ADD,0), "ENGINE_LIST_ADD"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_LIST_REMOVE,0), "ENGINE_LIST_REMOVE"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,0), "ENGINE_load_private_key"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,0), "ENGINE_load_public_key"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_NEW,0), "ENGINE_new"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_REMOVE,0), "ENGINE_remove"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP,0), "ENGINE_set_BN_mod_exp"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT,0), "ENGINE_set_BN_mod_exp_crt"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_CTRL_FUNCTION,0), "ENGINE_set_ctrl_function"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_DEFAULT_TYPE,0), "ENGINE_SET_DEFAULT_TYPE"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_DH,0), "ENGINE_set_DH"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_DSA,0), "ENGINE_set_DSA"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_FINISH_FUNCTION,0), "ENGINE_set_finish_function"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_ID,0), "ENGINE_set_id"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_INIT_FUNCTION,0), "ENGINE_set_init_function"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_NAME,0), "ENGINE_set_name"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_RAND,0), "ENGINE_set_RAND"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_SET_RSA,0), "ENGINE_set_RSA"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_ENGINE_UNLOAD_KEY,0), "ENGINE_UNLOAD_KEY"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_CTRL,0), "HWCRHK_CTRL"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_FINISH,0), "HWCRHK_FINISH"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_GET_PASS,0), "HWCRHK_GET_PASS"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_INIT,0), "HWCRHK_INIT"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PRIVKEY,0), "HWCRHK_LOAD_PRIVKEY"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PUBKEY,0), "HWCRHK_LOAD_PUBKEY"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP,0), "HWCRHK_MOD_EXP"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP_CRT,0), "HWCRHK_MOD_EXP_CRT"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_RAND_BYTES,0), "HWCRHK_RAND_BYTES"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_HWCRHK_RSA_MOD_EXP,0), "HWCRHK_RSA_MOD_EXP"},
|
|
||||||
{ERR_PACK(0,ENGINE_F_LOG_MESSAGE,0), "LOG_MESSAGE"},
|
|
||||||
{0,NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
static ERR_STRING_DATA ENGINE_str_reasons[]=
|
|
||||||
{
|
|
||||||
{ENGINE_R_ALREADY_LOADED ,"already loaded"},
|
|
||||||
{ENGINE_R_BIO_WAS_FREED ,"bio was freed"},
|
|
||||||
{ENGINE_R_BN_CTX_FULL ,"BN_CTX full"},
|
|
||||||
{ENGINE_R_BN_EXPAND_FAIL ,"bn_expand fail"},
|
|
||||||
{ENGINE_R_CHIL_ERROR ,"chil error"},
|
|
||||||
{ENGINE_R_CONFLICTING_ENGINE_ID ,"conflicting engine id"},
|
|
||||||
{ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
|
||||||
{ENGINE_R_DSO_FAILURE ,"DSO failure"},
|
|
||||||
{ENGINE_R_ENGINE_IS_NOT_IN_LIST ,"engine is not in the list"},
|
|
||||||
{ENGINE_R_FAILED_LOADING_PRIVATE_KEY ,"failed loading private key"},
|
|
||||||
{ENGINE_R_FAILED_LOADING_PUBLIC_KEY ,"failed loading public key"},
|
|
||||||
{ENGINE_R_FINISH_FAILED ,"finish failed"},
|
|
||||||
{ENGINE_R_GET_HANDLE_FAILED ,"could not obtain hardware handle"},
|
|
||||||
{ENGINE_R_ID_OR_NAME_MISSING ,"'id' or 'name' missing"},
|
|
||||||
{ENGINE_R_INIT_FAILED ,"init failed"},
|
|
||||||
{ENGINE_R_INTERNAL_LIST_ERROR ,"internal list error"},
|
|
||||||
{ENGINE_R_MISSING_KEY_COMPONENTS ,"missing key components"},
|
|
||||||
{ENGINE_R_NOT_INITIALISED ,"not initialised"},
|
|
||||||
{ENGINE_R_NOT_LOADED ,"not loaded"},
|
|
||||||
{ENGINE_R_NO_CALLBACK ,"no callback"},
|
|
||||||
{ENGINE_R_NO_CONTROL_FUNCTION ,"no control function"},
|
|
||||||
{ENGINE_R_NO_KEY ,"no key"},
|
|
||||||
{ENGINE_R_NO_LOAD_FUNCTION ,"no load function"},
|
|
||||||
{ENGINE_R_NO_REFERENCE ,"no reference"},
|
|
||||||
{ENGINE_R_NO_SUCH_ENGINE ,"no such engine"},
|
|
||||||
{ENGINE_R_NO_UNLOAD_FUNCTION ,"no unload function"},
|
|
||||||
{ENGINE_R_PROVIDE_PARAMETERS ,"provide parameters"},
|
|
||||||
{ENGINE_R_REQUEST_FAILED ,"request failed"},
|
|
||||||
{ENGINE_R_REQUEST_FALLBACK ,"request fallback"},
|
|
||||||
{ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"},
|
|
||||||
{ENGINE_R_UNIT_FAILURE ,"unit failure"},
|
|
||||||
{0,NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ERR_load_ENGINE_strings(void)
|
|
||||||
{
|
|
||||||
static int init=1;
|
|
||||||
|
|
||||||
if (init)
|
|
||||||
{
|
|
||||||
init=0;
|
|
||||||
#ifndef NO_ERR
|
|
||||||
ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_functs);
|
|
||||||
ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_reasons);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
/* crypto/engine/engine_int.h */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef HEADER_ENGINE_INT_H
|
|
||||||
#define HEADER_ENGINE_INT_H
|
|
||||||
|
|
||||||
#include <openssl/rsa.h>
|
|
||||||
#include <openssl/dsa.h>
|
|
||||||
#include <openssl/dh.h>
|
|
||||||
#include <openssl/rand.h>
|
|
||||||
#include <openssl/bn.h>
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Bitwise OR-able values for the "flags" variable in ENGINE. */
|
|
||||||
#define ENGINE_FLAGS_MALLOCED 0x0001
|
|
||||||
|
|
||||||
#ifndef HEADER_ENGINE_H
|
|
||||||
/* Regrettably, we need to reproduce the "BN" function types here
|
|
||||||
* because there is no such "BIGNUM_METHOD" as there is with RSA,
|
|
||||||
* DSA, etc. We do this so that we don't have a case where engine.h
|
|
||||||
* and engine_int.h conflict with each other. */
|
|
||||||
typedef int (*BN_MOD_EXP)(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx);
|
|
||||||
|
|
||||||
/* private key operation for RSA, provided seperately in case other
|
|
||||||
* RSA implementations wish to use it. */
|
|
||||||
typedef int (*BN_MOD_EXP_CRT)(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1,
|
|
||||||
const BIGNUM *iqmp, BN_CTX *ctx);
|
|
||||||
|
|
||||||
/* Generic function pointer */
|
|
||||||
typedef int (*ENGINE_GEN_FUNC_PTR)();
|
|
||||||
/* Generic function pointer taking no arguments */
|
|
||||||
typedef int (*ENGINE_GEN_INT_FUNC_PTR)(void);
|
|
||||||
/* Specific control function pointer */
|
|
||||||
typedef int (*ENGINE_CTRL_FUNC_PTR)(int cmd, long i, void *p, void (*f)());
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is a structure for storing implementations of various crypto
|
|
||||||
* algorithms and functions. */
|
|
||||||
typedef struct engine_st
|
|
||||||
{
|
|
||||||
const char *id;
|
|
||||||
const char *name;
|
|
||||||
RSA_METHOD *rsa_meth;
|
|
||||||
DSA_METHOD *dsa_meth;
|
|
||||||
DH_METHOD *dh_meth;
|
|
||||||
RAND_METHOD *rand_meth;
|
|
||||||
BN_MOD_EXP bn_mod_exp;
|
|
||||||
BN_MOD_EXP_CRT bn_mod_exp_crt;
|
|
||||||
int (*init)(void);
|
|
||||||
int (*finish)(void);
|
|
||||||
int (*ctrl)(int cmd, long i, void *p, void (*f)());
|
|
||||||
EVP_PKEY *(*load_privkey)(const char *key_id, const char *passphrase);
|
|
||||||
EVP_PKEY *(*load_pubkey)(const char *key_id, const char *passphrase);
|
|
||||||
int flags;
|
|
||||||
/* reference count on the structure itself */
|
|
||||||
int struct_ref;
|
|
||||||
/* reference count on usability of the engine type. NB: This
|
|
||||||
* controls the loading and initialisation of any functionlity
|
|
||||||
* required by this engine, whereas the previous count is
|
|
||||||
* simply to cope with (de)allocation of this structure. Hence,
|
|
||||||
* running_ref <= struct_ref at all times. */
|
|
||||||
int funct_ref;
|
|
||||||
/* Used to maintain the linked-list of engines. */
|
|
||||||
struct engine_st *prev;
|
|
||||||
struct engine_st *next;
|
|
||||||
} ENGINE;
|
|
||||||
|
|
||||||
/* BUILT-IN ENGINES. (these functions are only ever called once and
|
|
||||||
* do not return references - they are purely for bootstrapping). */
|
|
||||||
|
|
||||||
/* Returns a structure of software only methods (the default). */
|
|
||||||
ENGINE *ENGINE_openssl();
|
|
||||||
|
|
||||||
#ifndef NO_HW
|
|
||||||
|
|
||||||
#ifndef NO_HW_CSWIFT
|
|
||||||
/* Returns a structure of cswift methods ... NB: This can exist and be
|
|
||||||
* "used" even on non-cswift systems because the "init" will fail if the
|
|
||||||
* card/library are not found. */
|
|
||||||
ENGINE *ENGINE_cswift();
|
|
||||||
#endif /* !NO_HW_CSWIFT */
|
|
||||||
|
|
||||||
#ifndef NO_HW_NCIPHER
|
|
||||||
ENGINE *ENGINE_ncipher();
|
|
||||||
#endif /* !NO_HW_NCIPHER */
|
|
||||||
|
|
||||||
#ifndef NO_HW_ATALLA
|
|
||||||
/* Returns a structure of atalla methods. */
|
|
||||||
ENGINE *ENGINE_atalla();
|
|
||||||
#endif /* !NO_HW_ATALLA */
|
|
||||||
|
|
||||||
#endif /* !NO_HW */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* HEADER_ENGINE_INT_H */
|
|
||||||
@@ -1,488 +0,0 @@
|
|||||||
/* crypto/engine/engine_lib.c */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <openssl/crypto.h>
|
|
||||||
#include "cryptlib.h"
|
|
||||||
#include "engine_int.h"
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
/* These pointers each have their own "functional reference" when they
|
|
||||||
* are non-NULL. Similarly, when they are retrieved by a call to
|
|
||||||
* ENGINE_get_default_[RSA|DSA|...] the returned pointer is also a
|
|
||||||
* reference and the caller is responsible for freeing that when they
|
|
||||||
* are finished with it (with a call to ENGINE_finish() *NOT* just
|
|
||||||
* ENGINE_free()!!!!!!). */
|
|
||||||
static ENGINE *engine_def_rsa = NULL;
|
|
||||||
static ENGINE *engine_def_dsa = NULL;
|
|
||||||
static ENGINE *engine_def_dh = NULL;
|
|
||||||
static ENGINE *engine_def_rand = NULL;
|
|
||||||
static ENGINE *engine_def_bn_mod_exp = NULL;
|
|
||||||
static ENGINE *engine_def_bn_mod_exp_crt = NULL;
|
|
||||||
/* A static "once-only" flag used to control if/when the above were
|
|
||||||
* initialised to suitable start-up defaults. */
|
|
||||||
static int engine_def_flag = 0;
|
|
||||||
|
|
||||||
/* This is used in certain static utility functions to save code
|
|
||||||
* repetition for per-algorithm functions. */
|
|
||||||
typedef enum {
|
|
||||||
ENGINE_TYPE_RSA,
|
|
||||||
ENGINE_TYPE_DSA,
|
|
||||||
ENGINE_TYPE_DH,
|
|
||||||
ENGINE_TYPE_RAND,
|
|
||||||
ENGINE_TYPE_BN_MOD_EXP,
|
|
||||||
ENGINE_TYPE_BN_MOD_EXP_CRT
|
|
||||||
} ENGINE_TYPE;
|
|
||||||
|
|
||||||
static void engine_def_check_util(ENGINE **def, ENGINE *val)
|
|
||||||
{
|
|
||||||
*def = val;
|
|
||||||
val->struct_ref++;
|
|
||||||
val->funct_ref++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* In a slight break with convention - this static function must be
|
|
||||||
* called *outside* any locking of CRYPTO_LOCK_ENGINE. */
|
|
||||||
static void engine_def_check(void)
|
|
||||||
{
|
|
||||||
ENGINE *e;
|
|
||||||
if(engine_def_flag)
|
|
||||||
return;
|
|
||||||
e = ENGINE_get_first();
|
|
||||||
if(e == NULL)
|
|
||||||
/* The list is empty ... not much we can do! */
|
|
||||||
return;
|
|
||||||
/* We have a structural reference, see if getting a functional
|
|
||||||
* reference is possible. This is done to cope with init errors
|
|
||||||
* in the engine - the following locked code does a bunch of
|
|
||||||
* manual "ENGINE_init"s which do *not* allow such an init
|
|
||||||
* error so this is worth doing. */
|
|
||||||
if(ENGINE_init(e))
|
|
||||||
{
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
/* Doing another check here prevents an obvious race
|
|
||||||
* condition because the whole function itself cannot
|
|
||||||
* be locked. */
|
|
||||||
if(engine_def_flag)
|
|
||||||
goto skip_set_defaults;
|
|
||||||
/* OK, we got a functional reference, so we get one each
|
|
||||||
* for the defaults too. */
|
|
||||||
engine_def_check_util(&engine_def_rsa, e);
|
|
||||||
engine_def_check_util(&engine_def_dsa, e);
|
|
||||||
engine_def_check_util(&engine_def_dh, e);
|
|
||||||
engine_def_check_util(&engine_def_rand, e);
|
|
||||||
engine_def_check_util(&engine_def_bn_mod_exp, e);
|
|
||||||
engine_def_check_util(&engine_def_bn_mod_exp_crt, e);
|
|
||||||
engine_def_flag = 1;
|
|
||||||
skip_set_defaults:
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
/* The "if" needs to be balanced out. */
|
|
||||||
ENGINE_finish(e);
|
|
||||||
}
|
|
||||||
/* We need to balance out the fact we obtained a structural
|
|
||||||
* reference to begin with from ENGINE_get_first(). */
|
|
||||||
ENGINE_free(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialise a engine type for use (or up its functional reference count
|
|
||||||
* if it's already in use). */
|
|
||||||
int ENGINE_init(ENGINE *e)
|
|
||||||
{
|
|
||||||
int to_return = 1;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_INIT,ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if((e->funct_ref == 0) && e->init)
|
|
||||||
/* This is the first functional reference and the engine
|
|
||||||
* requires initialisation so we do it now. */
|
|
||||||
to_return = e->init();
|
|
||||||
if(to_return)
|
|
||||||
{
|
|
||||||
/* OK, we return a functional reference which is also a
|
|
||||||
* structural reference. */
|
|
||||||
e->struct_ref++;
|
|
||||||
e->funct_ref++;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free a functional reference to a engine type */
|
|
||||||
int ENGINE_finish(ENGINE *e)
|
|
||||||
{
|
|
||||||
int to_return = 1;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_FINISH,ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if((e->funct_ref == 1) && e->finish)
|
|
||||||
#if 0
|
|
||||||
/* This is the last functional reference and the engine
|
|
||||||
* requires cleanup so we do it now. */
|
|
||||||
to_return = e->finish();
|
|
||||||
if(to_return)
|
|
||||||
{
|
|
||||||
/* Cleanup the functional reference which is also a
|
|
||||||
* structural reference. */
|
|
||||||
e->struct_ref--;
|
|
||||||
e->funct_ref--;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
#else
|
|
||||||
/* I'm going to deliberately do a convoluted version of this
|
|
||||||
* piece of code because we don't want "finish" functions
|
|
||||||
* being called inside a locked block of code, if at all
|
|
||||||
* possible. I'd rather have this call take an extra couple
|
|
||||||
* of ticks than have throughput serialised on a externally-
|
|
||||||
* provided callback function that may conceivably never come
|
|
||||||
* back. :-( */
|
|
||||||
{
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
/* CODE ALERT: This *IS* supposed to be "=" and NOT "==" :-) */
|
|
||||||
if((to_return = e->finish()))
|
|
||||||
{
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
/* Cleanup the functional reference which is also a
|
|
||||||
* structural reference. */
|
|
||||||
e->struct_ref--;
|
|
||||||
e->funct_ref--;
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
#endif
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
|
|
||||||
const char *passphrase)
|
|
||||||
{
|
|
||||||
EVP_PKEY *pkey;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(e->funct_ref == 0)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,
|
|
||||||
ENGINE_R_NOT_INITIALISED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (!e->load_privkey)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,
|
|
||||||
ENGINE_R_NO_LOAD_FUNCTION);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
pkey = e->load_privkey(key_id, passphrase);
|
|
||||||
if (!pkey)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,
|
|
||||||
ENGINE_R_FAILED_LOADING_PRIVATE_KEY);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return pkey;
|
|
||||||
}
|
|
||||||
|
|
||||||
EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
|
|
||||||
const char *passphrase)
|
|
||||||
{
|
|
||||||
EVP_PKEY *pkey;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(e->funct_ref == 0)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,
|
|
||||||
ENGINE_R_NOT_INITIALISED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (!e->load_pubkey)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,
|
|
||||||
ENGINE_R_NO_LOAD_FUNCTION);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
pkey = e->load_pubkey(key_id, passphrase);
|
|
||||||
if (!pkey)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,
|
|
||||||
ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return pkey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialise a engine type for use (or up its functional reference count
|
|
||||||
* if it's already in use). */
|
|
||||||
int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(e->struct_ref == 0)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_REFERENCE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (!e->ctrl)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_CONTROL_FUNCTION);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return e->ctrl(cmd, i, p, f);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ENGINE *engine_get_default_type(ENGINE_TYPE t)
|
|
||||||
{
|
|
||||||
ENGINE *ret = NULL;
|
|
||||||
|
|
||||||
/* engine_def_check is lean and mean and won't replace any
|
|
||||||
* prior default engines ... so we must ensure that it is always
|
|
||||||
* the first function to get to touch the default values. */
|
|
||||||
engine_def_check();
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
switch(t)
|
|
||||||
{
|
|
||||||
case ENGINE_TYPE_RSA:
|
|
||||||
ret = engine_def_rsa; break;
|
|
||||||
case ENGINE_TYPE_DSA:
|
|
||||||
ret = engine_def_dsa; break;
|
|
||||||
case ENGINE_TYPE_DH:
|
|
||||||
ret = engine_def_dh; break;
|
|
||||||
case ENGINE_TYPE_RAND:
|
|
||||||
ret = engine_def_rand; break;
|
|
||||||
case ENGINE_TYPE_BN_MOD_EXP:
|
|
||||||
ret = engine_def_bn_mod_exp; break;
|
|
||||||
case ENGINE_TYPE_BN_MOD_EXP_CRT:
|
|
||||||
ret = engine_def_bn_mod_exp_crt; break;
|
|
||||||
}
|
|
||||||
/* Unforunately we can't do this work outside the lock with a
|
|
||||||
* call to ENGINE_init() because that would leave a race
|
|
||||||
* condition open. */
|
|
||||||
if(ret)
|
|
||||||
{
|
|
||||||
ret->struct_ref++;
|
|
||||||
ret->funct_ref++;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_get_default_RSA(void)
|
|
||||||
{
|
|
||||||
return engine_get_default_type(ENGINE_TYPE_RSA);
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_get_default_DSA(void)
|
|
||||||
{
|
|
||||||
return engine_get_default_type(ENGINE_TYPE_DSA);
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_get_default_DH(void)
|
|
||||||
{
|
|
||||||
return engine_get_default_type(ENGINE_TYPE_DH);
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_get_default_RAND(void)
|
|
||||||
{
|
|
||||||
return engine_get_default_type(ENGINE_TYPE_RAND);
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_get_default_BN_mod_exp(void)
|
|
||||||
{
|
|
||||||
return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP);
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_get_default_BN_mod_exp_crt(void)
|
|
||||||
{
|
|
||||||
return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int engine_set_default_type(ENGINE_TYPE t, ENGINE *e)
|
|
||||||
{
|
|
||||||
ENGINE *old = NULL;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/* engine_def_check is lean and mean and won't replace any
|
|
||||||
* prior default engines ... so we must ensure that it is always
|
|
||||||
* the first function to get to touch the default values. */
|
|
||||||
engine_def_check();
|
|
||||||
/* Attempt to get a functional reference (we need one anyway, but
|
|
||||||
* also, 'e' may be just a structural reference being passed in so
|
|
||||||
* this call may actually be the first). */
|
|
||||||
if(!ENGINE_init(e))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE,
|
|
||||||
ENGINE_R_INIT_FAILED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
switch(t)
|
|
||||||
{
|
|
||||||
case ENGINE_TYPE_RSA:
|
|
||||||
old = engine_def_rsa;
|
|
||||||
engine_def_rsa = e; break;
|
|
||||||
case ENGINE_TYPE_DSA:
|
|
||||||
old = engine_def_dsa;
|
|
||||||
engine_def_dsa = e; break;
|
|
||||||
case ENGINE_TYPE_DH:
|
|
||||||
old = engine_def_dh;
|
|
||||||
engine_def_dh = e; break;
|
|
||||||
case ENGINE_TYPE_RAND:
|
|
||||||
old = engine_def_rand;
|
|
||||||
engine_def_rand = e; break;
|
|
||||||
case ENGINE_TYPE_BN_MOD_EXP:
|
|
||||||
old = engine_def_bn_mod_exp;
|
|
||||||
engine_def_bn_mod_exp = e; break;
|
|
||||||
case ENGINE_TYPE_BN_MOD_EXP_CRT:
|
|
||||||
old = engine_def_bn_mod_exp_crt;
|
|
||||||
engine_def_bn_mod_exp_crt = e; break;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
/* If we've replaced a previous value, then we need to remove the
|
|
||||||
* functional reference we had. */
|
|
||||||
if(old && !ENGINE_finish(old))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE,
|
|
||||||
ENGINE_R_FINISH_FAILED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_default_RSA(ENGINE *e)
|
|
||||||
{
|
|
||||||
return engine_set_default_type(ENGINE_TYPE_RSA, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_default_DSA(ENGINE *e)
|
|
||||||
{
|
|
||||||
return engine_set_default_type(ENGINE_TYPE_DSA, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_default_DH(ENGINE *e)
|
|
||||||
{
|
|
||||||
return engine_set_default_type(ENGINE_TYPE_DH, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_default_RAND(ENGINE *e)
|
|
||||||
{
|
|
||||||
return engine_set_default_type(ENGINE_TYPE_RAND, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_default_BN_mod_exp(ENGINE *e)
|
|
||||||
{
|
|
||||||
return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_default_BN_mod_exp_crt(ENGINE *e)
|
|
||||||
{
|
|
||||||
return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_default(ENGINE *e, unsigned int flags)
|
|
||||||
{
|
|
||||||
if((flags & ENGINE_METHOD_RSA) && e->rsa_meth &&
|
|
||||||
!ENGINE_set_default_RSA(e))
|
|
||||||
return 0;
|
|
||||||
if((flags & ENGINE_METHOD_DSA) && e->dsa_meth &&
|
|
||||||
!ENGINE_set_default_DSA(e))
|
|
||||||
return 0;
|
|
||||||
if((flags & ENGINE_METHOD_DH) && e->dh_meth &&
|
|
||||||
!ENGINE_set_default_DH(e))
|
|
||||||
return 0;
|
|
||||||
if((flags & ENGINE_METHOD_RAND) && e->rand_meth &&
|
|
||||||
!ENGINE_set_default_RAND(e))
|
|
||||||
return 0;
|
|
||||||
if((flags & ENGINE_METHOD_BN_MOD_EXP) && e->bn_mod_exp &&
|
|
||||||
!ENGINE_set_default_BN_mod_exp(e))
|
|
||||||
return 0;
|
|
||||||
if((flags & ENGINE_METHOD_BN_MOD_EXP_CRT) && e->bn_mod_exp_crt &&
|
|
||||||
!ENGINE_set_default_BN_mod_exp_crt(e))
|
|
||||||
return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,675 +0,0 @@
|
|||||||
/* crypto/engine/engine_list.c */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <openssl/crypto.h>
|
|
||||||
#include "cryptlib.h"
|
|
||||||
#include "engine_int.h"
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
/* The linked-list of pointers to engine types. engine_list_head
|
|
||||||
* incorporates an implicit structural reference but engine_list_tail
|
|
||||||
* does not - the latter is a computational niceity and only points
|
|
||||||
* to something that is already pointed to by its predecessor in the
|
|
||||||
* list (or engine_list_head itself). In the same way, the use of the
|
|
||||||
* "prev" pointer in each ENGINE is to save excessive list iteration,
|
|
||||||
* it doesn't correspond to an extra structural reference. Hence,
|
|
||||||
* engine_list_head, and each non-null "next" pointer account for
|
|
||||||
* the list itself assuming exactly 1 structural reference on each
|
|
||||||
* list member. */
|
|
||||||
static ENGINE *engine_list_head = NULL;
|
|
||||||
static ENGINE *engine_list_tail = NULL;
|
|
||||||
/* A boolean switch, used to ensure we only initialise once. This
|
|
||||||
* is needed because the engine list may genuinely become empty during
|
|
||||||
* use (so we can't use engine_list_head as an indicator for example. */
|
|
||||||
static int engine_list_flag = 0;
|
|
||||||
|
|
||||||
/* These static functions starting with a lower case "engine_" always
|
|
||||||
* take place when CRYPTO_LOCK_ENGINE has been locked up. */
|
|
||||||
static int engine_list_add(ENGINE *e)
|
|
||||||
{
|
|
||||||
int conflict = 0;
|
|
||||||
ENGINE *iterator = NULL;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LIST_ADD,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
iterator = engine_list_head;
|
|
||||||
while(iterator && !conflict)
|
|
||||||
{
|
|
||||||
conflict = (strcmp(iterator->id, e->id) == 0);
|
|
||||||
iterator = iterator->next;
|
|
||||||
}
|
|
||||||
if(conflict)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LIST_ADD,
|
|
||||||
ENGINE_R_CONFLICTING_ENGINE_ID);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if(engine_list_head == NULL)
|
|
||||||
{
|
|
||||||
/* We are adding to an empty list. */
|
|
||||||
if(engine_list_tail)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LIST_ADD,
|
|
||||||
ENGINE_R_INTERNAL_LIST_ERROR);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
engine_list_head = e;
|
|
||||||
e->prev = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* We are adding to the tail of an existing list. */
|
|
||||||
if((engine_list_tail == NULL) ||
|
|
||||||
(engine_list_tail->next != NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LIST_ADD,
|
|
||||||
ENGINE_R_INTERNAL_LIST_ERROR);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
engine_list_tail->next = e;
|
|
||||||
e->prev = engine_list_tail;
|
|
||||||
}
|
|
||||||
/* Having the engine in the list assumes a structural
|
|
||||||
* reference. */
|
|
||||||
e->struct_ref++;
|
|
||||||
/* However it came to be, e is the last item in the list. */
|
|
||||||
engine_list_tail = e;
|
|
||||||
e->next = NULL;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int engine_list_remove(ENGINE *e)
|
|
||||||
{
|
|
||||||
ENGINE *iterator;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/* We need to check that e is in our linked list! */
|
|
||||||
iterator = engine_list_head;
|
|
||||||
while(iterator && (iterator != e))
|
|
||||||
iterator = iterator->next;
|
|
||||||
if(iterator == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE,
|
|
||||||
ENGINE_R_ENGINE_IS_NOT_IN_LIST);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/* un-link e from the chain. */
|
|
||||||
if(e->next)
|
|
||||||
e->next->prev = e->prev;
|
|
||||||
if(e->prev)
|
|
||||||
e->prev->next = e->next;
|
|
||||||
/* Correct our head/tail if necessary. */
|
|
||||||
if(engine_list_head == e)
|
|
||||||
engine_list_head = e->next;
|
|
||||||
if(engine_list_tail == e)
|
|
||||||
engine_list_tail = e->prev;
|
|
||||||
/* remove our structural reference. */
|
|
||||||
e->struct_ref--;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This check always takes place with CRYPTO_LOCK_ENGINE locked up
|
|
||||||
* so we're synchronised, but we can't call anything that tries to
|
|
||||||
* lock it again! :-) NB: For convenience (and code-clarity) we
|
|
||||||
* don't output errors for failures of the engine_list_add function
|
|
||||||
* as it will generate errors itself. */
|
|
||||||
static int engine_internal_check(void)
|
|
||||||
{
|
|
||||||
if(engine_list_flag)
|
|
||||||
return 1;
|
|
||||||
/* This is our first time up, we need to populate the list
|
|
||||||
* with our statically compiled-in engines. */
|
|
||||||
if(!engine_list_add(ENGINE_openssl()))
|
|
||||||
return 0;
|
|
||||||
#ifndef NO_HW
|
|
||||||
#ifndef NO_HW_CSWIFT
|
|
||||||
if(!engine_list_add(ENGINE_cswift()))
|
|
||||||
return 0;
|
|
||||||
#endif /* !NO_HW_CSWIFT */
|
|
||||||
#ifndef NO_HW_NCIPHER
|
|
||||||
if(!engine_list_add(ENGINE_ncipher()))
|
|
||||||
return 0;
|
|
||||||
#endif /* !NO_HW_NCIPHER */
|
|
||||||
#ifndef NO_HW_ATALLA
|
|
||||||
if(!engine_list_add(ENGINE_atalla()))
|
|
||||||
return 0;
|
|
||||||
#endif /* !NO_HW_ATALLA */
|
|
||||||
#endif /* !NO_HW */
|
|
||||||
engine_list_flag = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the first/last "ENGINE" type available. */
|
|
||||||
ENGINE *ENGINE_get_first(void)
|
|
||||||
{
|
|
||||||
ENGINE *ret = NULL;
|
|
||||||
|
|
||||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(engine_internal_check())
|
|
||||||
{
|
|
||||||
ret = engine_list_head;
|
|
||||||
if(ret)
|
|
||||||
ret->struct_ref++;
|
|
||||||
}
|
|
||||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
ENGINE *ENGINE_get_last(void)
|
|
||||||
{
|
|
||||||
ENGINE *ret = NULL;
|
|
||||||
|
|
||||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(engine_internal_check())
|
|
||||||
{
|
|
||||||
ret = engine_list_tail;
|
|
||||||
if(ret)
|
|
||||||
ret->struct_ref++;
|
|
||||||
}
|
|
||||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */
|
|
||||||
ENGINE *ENGINE_get_next(ENGINE *e)
|
|
||||||
{
|
|
||||||
ENGINE *ret = NULL;
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_NEXT,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
ret = e->next;
|
|
||||||
e->struct_ref--;
|
|
||||||
if(ret)
|
|
||||||
ret->struct_ref++;
|
|
||||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
ENGINE *ENGINE_get_prev(ENGINE *e)
|
|
||||||
{
|
|
||||||
ENGINE *ret = NULL;
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_PREV,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
ret = e->prev;
|
|
||||||
e->struct_ref--;
|
|
||||||
if(ret)
|
|
||||||
ret->struct_ref++;
|
|
||||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add another "ENGINE" type into the list. */
|
|
||||||
int ENGINE_add(ENGINE *e)
|
|
||||||
{
|
|
||||||
int to_return = 1;
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_ADD,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if((e->id == NULL) || (e->name == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_ADD,
|
|
||||||
ENGINE_R_ID_OR_NAME_MISSING);
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(!engine_internal_check() || !engine_list_add(e))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_ADD,
|
|
||||||
ENGINE_R_INTERNAL_LIST_ERROR);
|
|
||||||
to_return = 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove an existing "ENGINE" type from the array. */
|
|
||||||
int ENGINE_remove(ENGINE *e)
|
|
||||||
{
|
|
||||||
int to_return = 1;
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_REMOVE,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(!engine_internal_check() || !engine_list_remove(e))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_REMOVE,
|
|
||||||
ENGINE_R_INTERNAL_LIST_ERROR);
|
|
||||||
to_return = 0;
|
|
||||||
}
|
|
||||||
CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_by_id(const char *id)
|
|
||||||
{
|
|
||||||
ENGINE *iterator = NULL;
|
|
||||||
if(id == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_BY_ID,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
CRYPTO_r_lock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(!engine_internal_check())
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_BY_ID,
|
|
||||||
ENGINE_R_INTERNAL_LIST_ERROR);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iterator = engine_list_head;
|
|
||||||
while(iterator && (strcmp(id, iterator->id) != 0))
|
|
||||||
iterator = iterator->next;
|
|
||||||
if(iterator)
|
|
||||||
/* We need to return a structural reference */
|
|
||||||
iterator->struct_ref++;
|
|
||||||
}
|
|
||||||
CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE);
|
|
||||||
if(iterator == NULL)
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_BY_ID,
|
|
||||||
ENGINE_R_NO_SUCH_ENGINE);
|
|
||||||
return iterator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* As per the comments in engine.h, it is generally better all round
|
|
||||||
* if the ENGINE structure is allocated within this framework. */
|
|
||||||
#if 0
|
|
||||||
int ENGINE_get_struct_size(void)
|
|
||||||
{
|
|
||||||
return sizeof(ENGINE);
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE *ENGINE_new(ENGINE *e)
|
|
||||||
{
|
|
||||||
ENGINE *ret;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ret = (ENGINE *)(OPENSSL_malloc(sizeof(ENGINE));
|
|
||||||
if(ret == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_NEW,
|
|
||||||
ERR_R_MALLOC_FAILURE);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret = e;
|
|
||||||
memset(ret, 0, sizeof(ENGINE));
|
|
||||||
if(e)
|
|
||||||
ret->flags = ENGINE_FLAGS_MALLOCED;
|
|
||||||
ret->struct_ref = 1;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
ENGINE *ENGINE_new(void)
|
|
||||||
{
|
|
||||||
ENGINE *ret;
|
|
||||||
|
|
||||||
ret = (ENGINE *)OPENSSL_malloc(sizeof(ENGINE));
|
|
||||||
if(ret == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_NEW, ERR_R_MALLOC_FAILURE);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
memset(ret, 0, sizeof(ENGINE));
|
|
||||||
ret->flags = ENGINE_FLAGS_MALLOCED;
|
|
||||||
ret->struct_ref = 1;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int ENGINE_free(ENGINE *e)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_FREE,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
i = CRYPTO_add(&e->struct_ref,-1,CRYPTO_LOCK_ENGINE);
|
|
||||||
#ifdef REF_PRINT
|
|
||||||
REF_PRINT("ENGINE",e);
|
|
||||||
#endif
|
|
||||||
if (i > 0) return 1;
|
|
||||||
#ifdef REF_CHECK
|
|
||||||
if (i < 0)
|
|
||||||
{
|
|
||||||
fprintf(stderr,"ENGINE_free, bad reference count\n");
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if(e->flags & ENGINE_FLAGS_MALLOCED)
|
|
||||||
OPENSSL_free(e);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_id(ENGINE *e, const char *id)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (id == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_ID,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->id = id;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_name(ENGINE *e, const char *name)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (name == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_NAME,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->name = name;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_RSA(ENGINE *e, RSA_METHOD *rsa_meth)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (rsa_meth == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_RSA,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->rsa_meth = rsa_meth;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_DSA(ENGINE *e, DSA_METHOD *dsa_meth)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (dsa_meth == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_DSA,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->dsa_meth = dsa_meth;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_DH(ENGINE *e, DH_METHOD *dh_meth)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (dh_meth == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_DH,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->dh_meth = dh_meth;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_RAND(ENGINE *e, RAND_METHOD *rand_meth)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (rand_meth == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_RAND,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->rand_meth = rand_meth;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_BN_mod_exp(ENGINE *e, BN_MOD_EXP bn_mod_exp)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (bn_mod_exp == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->bn_mod_exp = bn_mod_exp;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_BN_mod_exp_crt(ENGINE *e, BN_MOD_EXP_CRT bn_mod_exp_crt)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (bn_mod_exp_crt == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->bn_mod_exp_crt = bn_mod_exp_crt;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (init_f == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_INIT_FUNCTION,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->init = init_f;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (finish_f == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_FINISH_FUNCTION,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->finish = finish_f;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f)
|
|
||||||
{
|
|
||||||
if((e == NULL) || (ctrl_f == NULL))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_SET_CTRL_FUNCTION,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
e->ctrl = ctrl_f;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *ENGINE_get_id(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_ID,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return e->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *ENGINE_get_name(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_NAME,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return e->name;
|
|
||||||
}
|
|
||||||
|
|
||||||
RSA_METHOD *ENGINE_get_RSA(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_RSA,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->rsa_meth;
|
|
||||||
}
|
|
||||||
|
|
||||||
DSA_METHOD *ENGINE_get_DSA(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_DSA,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->dsa_meth;
|
|
||||||
}
|
|
||||||
|
|
||||||
DH_METHOD *ENGINE_get_DH(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_DH,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->dh_meth;
|
|
||||||
}
|
|
||||||
|
|
||||||
RAND_METHOD *ENGINE_get_RAND(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_RAND,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->rand_meth;
|
|
||||||
}
|
|
||||||
|
|
||||||
BN_MOD_EXP ENGINE_get_BN_mod_exp(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->bn_mod_exp;
|
|
||||||
}
|
|
||||||
|
|
||||||
BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->bn_mod_exp_crt;
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_INIT_FUNCTION,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->init;
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_FINISH_FUNCTION,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->finish;
|
|
||||||
}
|
|
||||||
|
|
||||||
ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(ENGINE *e)
|
|
||||||
{
|
|
||||||
if(e == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ENGINE_GET_CTRL_FUNCTION,
|
|
||||||
ERR_R_PASSED_NULL_PARAMETER);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return e->ctrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,174 +0,0 @@
|
|||||||
/* crypto/engine/engine_openssl.c */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <openssl/crypto.h>
|
|
||||||
#include "cryptlib.h"
|
|
||||||
#include "engine_int.h"
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
#include <openssl/dso.h>
|
|
||||||
#include <openssl/rsa.h>
|
|
||||||
#include <openssl/dsa.h>
|
|
||||||
#include <openssl/dh.h>
|
|
||||||
#include <openssl/rand.h>
|
|
||||||
#include <openssl/bn.h>
|
|
||||||
|
|
||||||
/* This is the only function we need to implement as OpenSSL
|
|
||||||
* doesn't have a native CRT mod_exp. Perhaps this should be
|
|
||||||
* BN_mod_exp_crt and moved into crypto/bn/ ?? ... dunno. */
|
|
||||||
static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1,
|
|
||||||
const BIGNUM *iqmp, BN_CTX *ctx);
|
|
||||||
|
|
||||||
/* The ENGINE structure that can be pointed to. */
|
|
||||||
static ENGINE engine_openssl =
|
|
||||||
{
|
|
||||||
"openssl",
|
|
||||||
"Software default engine support",
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL, /* these methods are "stolen" in ENGINE_openssl() */
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
openssl_mod_exp_crt,
|
|
||||||
NULL, /* no init() */
|
|
||||||
NULL, /* no finish() */
|
|
||||||
NULL, /* no ctrl() */
|
|
||||||
NULL, /* no load_privkey() */
|
|
||||||
NULL, /* no load_pubkey() */
|
|
||||||
0, /* no flags */
|
|
||||||
0, 0, /* no references. */
|
|
||||||
NULL, NULL /* unlinked */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* As this is only ever called once, there's no need for locking
|
|
||||||
* (indeed - the lock will already be held by our caller!!!) */
|
|
||||||
ENGINE *ENGINE_openssl()
|
|
||||||
{
|
|
||||||
/* We need to populate our structure with the software pointers
|
|
||||||
* that we want to steal. */
|
|
||||||
engine_openssl.rsa_meth = RSA_get_default_openssl_method();
|
|
||||||
engine_openssl.dsa_meth = DSA_get_default_openssl_method();
|
|
||||||
engine_openssl.dh_meth = DH_get_default_openssl_method();
|
|
||||||
engine_openssl.rand_meth = RAND_SSLeay();
|
|
||||||
engine_openssl.bn_mod_exp = BN_mod_exp;
|
|
||||||
return &engine_openssl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Chinese Remainder Theorem, taken and adapted from rsa_eay.c */
|
|
||||||
static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *q, const BIGNUM *dmp1,
|
|
||||||
const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx)
|
|
||||||
{
|
|
||||||
BIGNUM r1,m1;
|
|
||||||
int ret=0;
|
|
||||||
BN_CTX *bn_ctx;
|
|
||||||
BIGNUM *temp_bn = NULL;
|
|
||||||
|
|
||||||
if (ctx)
|
|
||||||
bn_ctx = ctx;
|
|
||||||
else
|
|
||||||
if ((bn_ctx=BN_CTX_new()) == NULL) goto err;
|
|
||||||
BN_init(&m1);
|
|
||||||
BN_init(&r1);
|
|
||||||
/* BN_mul() cannot accept const BIGNUMs so I use the BN_CTX
|
|
||||||
* to duplicate what I need. <sigh> */
|
|
||||||
if ((temp_bn = BN_CTX_get(bn_ctx)) == NULL) goto err;
|
|
||||||
if (!BN_copy(temp_bn, iqmp)) goto err;
|
|
||||||
|
|
||||||
if (!BN_mod(&r1, a, q, bn_ctx)) goto err;
|
|
||||||
if (!engine_openssl.bn_mod_exp(&m1, &r1, dmq1, q, bn_ctx))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
if (!BN_mod(&r1, a, p, bn_ctx)) goto err;
|
|
||||||
if (!engine_openssl.bn_mod_exp(r, &r1, dmp1, p, bn_ctx))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
if (!BN_sub(r, r, &m1)) goto err;
|
|
||||||
/* This will help stop the size of r0 increasing, which does
|
|
||||||
* affect the multiply if it optimised for a power of 2 size */
|
|
||||||
if (r->neg)
|
|
||||||
if (!BN_add(r, r, p)) goto err;
|
|
||||||
|
|
||||||
if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err;
|
|
||||||
if (!BN_mod(r, &r1, p, bn_ctx)) goto err;
|
|
||||||
/* If p < q it is occasionally possible for the correction of
|
|
||||||
* adding 'p' if r is negative above to leave the result still
|
|
||||||
* negative. This can break the private key operations: the following
|
|
||||||
* second correction should *always* correct this rare occurrence.
|
|
||||||
* This will *never* happen with OpenSSL generated keys because
|
|
||||||
* they ensure p > q [steve]
|
|
||||||
*/
|
|
||||||
if (r->neg)
|
|
||||||
if (!BN_add(r, r, p)) goto err;
|
|
||||||
/* Again, BN_mul() will need non-const values. */
|
|
||||||
if (!BN_copy(temp_bn, q)) goto err;
|
|
||||||
if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err;
|
|
||||||
if (!BN_add(r, &r1, &m1)) goto err;
|
|
||||||
|
|
||||||
ret=1;
|
|
||||||
err:
|
|
||||||
BN_clear_free(&m1);
|
|
||||||
BN_clear_free(&r1);
|
|
||||||
if (temp_bn)
|
|
||||||
bn_ctx->tos--;
|
|
||||||
if (!ctx)
|
|
||||||
BN_CTX_free(bn_ctx);
|
|
||||||
return(ret);
|
|
||||||
}
|
|
||||||
@@ -1,251 +0,0 @@
|
|||||||
/* crypto/engine/enginetest.c */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
#include <openssl/err.h>
|
|
||||||
|
|
||||||
static void display_engine_list()
|
|
||||||
{
|
|
||||||
ENGINE *h;
|
|
||||||
int loop;
|
|
||||||
|
|
||||||
h = ENGINE_get_first();
|
|
||||||
loop = 0;
|
|
||||||
printf("listing available engine types\n");
|
|
||||||
while(h)
|
|
||||||
{
|
|
||||||
printf("engine %i, id = \"%s\", name = \"%s\"\n",
|
|
||||||
loop++, ENGINE_get_id(h), ENGINE_get_name(h));
|
|
||||||
h = ENGINE_get_next(h);
|
|
||||||
}
|
|
||||||
printf("end of list\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
ENGINE *block[512];
|
|
||||||
char buf[256];
|
|
||||||
const char *id, *name;
|
|
||||||
ENGINE *ptr;
|
|
||||||
int loop;
|
|
||||||
int to_return = 1;
|
|
||||||
ENGINE *new_h1 = NULL;
|
|
||||||
ENGINE *new_h2 = NULL;
|
|
||||||
ENGINE *new_h3 = NULL;
|
|
||||||
ENGINE *new_h4 = NULL;
|
|
||||||
|
|
||||||
ERR_load_crypto_strings();
|
|
||||||
|
|
||||||
memset(block, 0, 512 * sizeof(ENGINE *));
|
|
||||||
if(((new_h1 = ENGINE_new()) == NULL) ||
|
|
||||||
!ENGINE_set_id(new_h1, "test_id0") ||
|
|
||||||
!ENGINE_set_name(new_h1, "First test item") ||
|
|
||||||
((new_h2 = ENGINE_new()) == NULL) ||
|
|
||||||
!ENGINE_set_id(new_h2, "test_id1") ||
|
|
||||||
!ENGINE_set_name(new_h2, "Second test item") ||
|
|
||||||
((new_h3 = ENGINE_new()) == NULL) ||
|
|
||||||
!ENGINE_set_id(new_h3, "test_id2") ||
|
|
||||||
!ENGINE_set_name(new_h3, "Third test item") ||
|
|
||||||
((new_h4 = ENGINE_new()) == NULL) ||
|
|
||||||
!ENGINE_set_id(new_h4, "test_id3") ||
|
|
||||||
!ENGINE_set_name(new_h4, "Fourth test item"))
|
|
||||||
{
|
|
||||||
printf("Couldn't set up test ENGINE structures\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
printf("\nenginetest beginning\n\n");
|
|
||||||
display_engine_list();
|
|
||||||
if(!ENGINE_add(new_h1))
|
|
||||||
{
|
|
||||||
printf("Add failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
ptr = ENGINE_get_first();
|
|
||||||
if(!ENGINE_remove(ptr))
|
|
||||||
{
|
|
||||||
printf("Remove failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2))
|
|
||||||
{
|
|
||||||
printf("Add failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
if(!ENGINE_remove(new_h2))
|
|
||||||
{
|
|
||||||
printf("Remove failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
if(!ENGINE_add(new_h4))
|
|
||||||
{
|
|
||||||
printf("Add failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
if(ENGINE_add(new_h3))
|
|
||||||
{
|
|
||||||
printf("Add *should* have failed but didn't!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
printf("Add that should fail did.\n");
|
|
||||||
ERR_clear_error();
|
|
||||||
if(ENGINE_remove(new_h2))
|
|
||||||
{
|
|
||||||
printf("Remove *should* have failed but didn't!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
printf("Remove that should fail did.\n");
|
|
||||||
if(!ENGINE_remove(new_h1))
|
|
||||||
{
|
|
||||||
printf("Remove failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
if(!ENGINE_remove(new_h3))
|
|
||||||
{
|
|
||||||
printf("Remove failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
if(!ENGINE_remove(new_h4))
|
|
||||||
{
|
|
||||||
printf("Remove failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
display_engine_list();
|
|
||||||
/* Depending on whether there's any hardware support compiled
|
|
||||||
* in, this remove may be destined to fail. */
|
|
||||||
ptr = ENGINE_get_first();
|
|
||||||
if(ptr)
|
|
||||||
if(!ENGINE_remove(ptr))
|
|
||||||
printf("Remove failed!i - probably no hardware "
|
|
||||||
"support present.\n");
|
|
||||||
display_engine_list();
|
|
||||||
if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1))
|
|
||||||
{
|
|
||||||
printf("Couldn't add and remove to an empty list!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
printf("Successfully added and removed to an empty list!\n");
|
|
||||||
printf("About to beef up the engine-type list\n");
|
|
||||||
for(loop = 0; loop < 512; loop++)
|
|
||||||
{
|
|
||||||
sprintf(buf, "id%i", loop);
|
|
||||||
id = strdup(buf);
|
|
||||||
sprintf(buf, "Fake engine type %i", loop);
|
|
||||||
name = strdup(buf);
|
|
||||||
if(((block[loop] = ENGINE_new()) == NULL) ||
|
|
||||||
!ENGINE_set_id(block[loop], id) ||
|
|
||||||
!ENGINE_set_name(block[loop], name))
|
|
||||||
{
|
|
||||||
printf("Couldn't create block of ENGINE structures.\n"
|
|
||||||
"I'll probably also core-dump now, damn.\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(loop = 0; loop < 512; loop++)
|
|
||||||
{
|
|
||||||
if(!ENGINE_add(block[loop]))
|
|
||||||
{
|
|
||||||
printf("\nAdding stopped at %i, (%s,%s)\n",
|
|
||||||
loop, ENGINE_get_id(block[loop]),
|
|
||||||
ENGINE_get_name(block[loop]));
|
|
||||||
goto cleanup_loop;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
printf("."); fflush(stdout);
|
|
||||||
}
|
|
||||||
cleanup_loop:
|
|
||||||
printf("\nAbout to empty the engine-type list\n");
|
|
||||||
while((ptr = ENGINE_get_first()) != NULL)
|
|
||||||
{
|
|
||||||
if(!ENGINE_remove(ptr))
|
|
||||||
{
|
|
||||||
printf("\nRemove failed!\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
printf("."); fflush(stdout);
|
|
||||||
}
|
|
||||||
for(loop = 0; loop < 512; loop++)
|
|
||||||
{
|
|
||||||
free((char *)(ENGINE_get_id(block[loop])));
|
|
||||||
free((char *)(ENGINE_get_name(block[loop])));
|
|
||||||
}
|
|
||||||
printf("\nTests completed happily\n");
|
|
||||||
to_return = 0;
|
|
||||||
end:
|
|
||||||
if(to_return)
|
|
||||||
ERR_print_errors_fp(stderr);
|
|
||||||
if(new_h1) ENGINE_free(new_h1);
|
|
||||||
if(new_h2) ENGINE_free(new_h2);
|
|
||||||
if(new_h3) ENGINE_free(new_h3);
|
|
||||||
if(new_h4) ENGINE_free(new_h4);
|
|
||||||
for(loop = 0; loop < 512; loop++)
|
|
||||||
if(block[loop])
|
|
||||||
ENGINE_free(block[loop]);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
@@ -1,444 +0,0 @@
|
|||||||
/* crypto/engine/hw_atalla.c */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <openssl/crypto.h>
|
|
||||||
#include "cryptlib.h"
|
|
||||||
#include <openssl/dso.h>
|
|
||||||
#include "engine_int.h"
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#ifndef NO_HW
|
|
||||||
#ifndef NO_HW_ATALLA
|
|
||||||
|
|
||||||
#ifdef FLAT_INC
|
|
||||||
#include "atalla.h"
|
|
||||||
#else
|
|
||||||
#include "vendor_defns/atalla.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int atalla_init(void);
|
|
||||||
static int atalla_finish(void);
|
|
||||||
|
|
||||||
/* BIGNUM stuff */
|
|
||||||
static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx);
|
|
||||||
|
|
||||||
/* RSA stuff */
|
|
||||||
static int atalla_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa);
|
|
||||||
/* This function is aliased to mod_exp (with the mont stuff dropped). */
|
|
||||||
static int atalla_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
|
||||||
|
|
||||||
/* DSA stuff */
|
|
||||||
static int atalla_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
|
|
||||||
BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
|
|
||||||
BN_CTX *ctx, BN_MONT_CTX *in_mont);
|
|
||||||
static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a,
|
|
||||||
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
|
|
||||||
BN_MONT_CTX *m_ctx);
|
|
||||||
|
|
||||||
/* DH stuff */
|
|
||||||
/* This function is alised to mod_exp (with the DH and mont dropped). */
|
|
||||||
static int atalla_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
|
||||||
|
|
||||||
|
|
||||||
/* Our internal RSA_METHOD that we provide pointers to */
|
|
||||||
static RSA_METHOD atalla_rsa =
|
|
||||||
{
|
|
||||||
"Atalla RSA method",
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
atalla_rsa_mod_exp,
|
|
||||||
atalla_mod_exp_mont,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Our internal DSA_METHOD that we provide pointers to */
|
|
||||||
static DSA_METHOD atalla_dsa =
|
|
||||||
{
|
|
||||||
"Atalla DSA method",
|
|
||||||
NULL, /* dsa_do_sign */
|
|
||||||
NULL, /* dsa_sign_setup */
|
|
||||||
NULL, /* dsa_do_verify */
|
|
||||||
atalla_dsa_mod_exp, /* dsa_mod_exp */
|
|
||||||
atalla_mod_exp_dsa, /* bn_mod_exp */
|
|
||||||
NULL, /* init */
|
|
||||||
NULL, /* finish */
|
|
||||||
0, /* flags */
|
|
||||||
NULL /* app_data */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Our internal DH_METHOD that we provide pointers to */
|
|
||||||
static DH_METHOD atalla_dh =
|
|
||||||
{
|
|
||||||
"Atalla DH method",
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
atalla_mod_exp_dh,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Our ENGINE structure. */
|
|
||||||
static ENGINE engine_atalla =
|
|
||||||
{
|
|
||||||
"atalla",
|
|
||||||
"Atalla hardware engine support",
|
|
||||||
&atalla_rsa,
|
|
||||||
&atalla_dsa,
|
|
||||||
&atalla_dh,
|
|
||||||
NULL,
|
|
||||||
atalla_mod_exp,
|
|
||||||
NULL,
|
|
||||||
atalla_init,
|
|
||||||
atalla_finish,
|
|
||||||
NULL, /* no ctrl() */
|
|
||||||
NULL, /* no load_privkey() */
|
|
||||||
NULL, /* no load_pubkey() */
|
|
||||||
0, /* no flags */
|
|
||||||
0, 0, /* no references */
|
|
||||||
NULL, NULL /* unlinked */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* As this is only ever called once, there's no need for locking
|
|
||||||
* (indeed - the lock will already be held by our caller!!!) */
|
|
||||||
ENGINE *ENGINE_atalla()
|
|
||||||
{
|
|
||||||
RSA_METHOD *meth1;
|
|
||||||
DSA_METHOD *meth2;
|
|
||||||
DH_METHOD *meth3;
|
|
||||||
|
|
||||||
/* We know that the "PKCS1_SSLeay()" functions hook properly
|
|
||||||
* to the atalla-specific mod_exp and mod_exp_crt so we use
|
|
||||||
* those functions. NB: We don't use ENGINE_openssl() or
|
|
||||||
* anything "more generic" because something like the RSAref
|
|
||||||
* code may not hook properly, and if you own one of these
|
|
||||||
* cards then you have the right to do RSA operations on it
|
|
||||||
* anyway! */
|
|
||||||
meth1 = RSA_PKCS1_SSLeay();
|
|
||||||
atalla_rsa.rsa_pub_enc = meth1->rsa_pub_enc;
|
|
||||||
atalla_rsa.rsa_pub_dec = meth1->rsa_pub_dec;
|
|
||||||
atalla_rsa.rsa_priv_enc = meth1->rsa_priv_enc;
|
|
||||||
atalla_rsa.rsa_priv_dec = meth1->rsa_priv_dec;
|
|
||||||
|
|
||||||
/* Use the DSA_OpenSSL() method and just hook the mod_exp-ish
|
|
||||||
* bits. */
|
|
||||||
meth2 = DSA_OpenSSL();
|
|
||||||
atalla_dsa.dsa_do_sign = meth2->dsa_do_sign;
|
|
||||||
atalla_dsa.dsa_sign_setup = meth2->dsa_sign_setup;
|
|
||||||
atalla_dsa.dsa_do_verify = meth2->dsa_do_verify;
|
|
||||||
|
|
||||||
/* Much the same for Diffie-Hellman */
|
|
||||||
meth3 = DH_OpenSSL();
|
|
||||||
atalla_dh.generate_key = meth3->generate_key;
|
|
||||||
atalla_dh.compute_key = meth3->compute_key;
|
|
||||||
return &engine_atalla;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is a process-global DSO handle used for loading and unloading
|
|
||||||
* the Atalla library. NB: This is only set (or unset) during an
|
|
||||||
* init() or finish() call (reference counts permitting) and they're
|
|
||||||
* operating with global locks, so this should be thread-safe
|
|
||||||
* implicitly. */
|
|
||||||
static DSO *atalla_dso = NULL;
|
|
||||||
|
|
||||||
/* These are the function pointers that are (un)set when the library has
|
|
||||||
* successfully (un)loaded. */
|
|
||||||
static tfnASI_GetHardwareConfig *p_Atalla_GetHardwareConfig = NULL;
|
|
||||||
static tfnASI_RSAPrivateKeyOpFn *p_Atalla_RSAPrivateKeyOpFn = NULL;
|
|
||||||
static tfnASI_GetPerformanceStatistics *p_Atalla_GetPerformanceStatistics = NULL;
|
|
||||||
|
|
||||||
/* (de)initialisation functions. */
|
|
||||||
static int atalla_init()
|
|
||||||
{
|
|
||||||
tfnASI_GetHardwareConfig *p1;
|
|
||||||
tfnASI_RSAPrivateKeyOpFn *p2;
|
|
||||||
tfnASI_GetPerformanceStatistics *p3;
|
|
||||||
/* Not sure of the origin of this magic value, but Ben's code had it
|
|
||||||
* and it seemed to have been working for a few people. :-) */
|
|
||||||
unsigned int config_buf[1024];
|
|
||||||
|
|
||||||
if(atalla_dso != NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_ALREADY_LOADED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Attempt to load libatasi.so/atasi.dll/whatever. Needs to be
|
|
||||||
* changed unfortunately because the Atalla drivers don't have
|
|
||||||
* standard library names that can be platform-translated well. */
|
|
||||||
/* TODO: Work out how to actually map to the names the Atalla
|
|
||||||
* drivers really use - for now a symbollic link needs to be
|
|
||||||
* created on the host system from libatasi.so to atasi.so on
|
|
||||||
* unix variants. */
|
|
||||||
atalla_dso = DSO_load(NULL, ATALLA_LIBNAME, NULL,
|
|
||||||
DSO_FLAG_NAME_TRANSLATION);
|
|
||||||
if(atalla_dso == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_DSO_FAILURE);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!(p1 = (tfnASI_GetHardwareConfig *)DSO_bind_func(
|
|
||||||
atalla_dso, ATALLA_F1)) ||
|
|
||||||
!(p2 = (tfnASI_RSAPrivateKeyOpFn *)DSO_bind_func(
|
|
||||||
atalla_dso, ATALLA_F2)) ||
|
|
||||||
!(p3 = (tfnASI_GetPerformanceStatistics *)DSO_bind_func(
|
|
||||||
atalla_dso, ATALLA_F3)))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_DSO_FAILURE);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Copy the pointers */
|
|
||||||
p_Atalla_GetHardwareConfig = p1;
|
|
||||||
p_Atalla_RSAPrivateKeyOpFn = p2;
|
|
||||||
p_Atalla_GetPerformanceStatistics = p3;
|
|
||||||
/* Perform a basic test to see if there's actually any unit
|
|
||||||
* running. */
|
|
||||||
if(p1(0L, config_buf) != 0)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_UNIT_FAILURE);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Everything's fine. */
|
|
||||||
return 1;
|
|
||||||
err:
|
|
||||||
if(atalla_dso)
|
|
||||||
DSO_free(atalla_dso);
|
|
||||||
p_Atalla_GetHardwareConfig = NULL;
|
|
||||||
p_Atalla_RSAPrivateKeyOpFn = NULL;
|
|
||||||
p_Atalla_GetPerformanceStatistics = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int atalla_finish()
|
|
||||||
{
|
|
||||||
if(atalla_dso == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_FINISH,ENGINE_R_NOT_LOADED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if(!DSO_free(atalla_dso))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_FINISH,ENGINE_R_DSO_FAILURE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
atalla_dso = NULL;
|
|
||||||
p_Atalla_GetHardwareConfig = NULL;
|
|
||||||
p_Atalla_RSAPrivateKeyOpFn = NULL;
|
|
||||||
p_Atalla_GetPerformanceStatistics = NULL;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx)
|
|
||||||
{
|
|
||||||
/* I need somewhere to store temporary serialised values for
|
|
||||||
* use with the Atalla API calls. A neat cheat - I'll use
|
|
||||||
* BIGNUMs from the BN_CTX but access their arrays directly as
|
|
||||||
* byte arrays <grin>. This way I don't have to clean anything
|
|
||||||
* up. */
|
|
||||||
BIGNUM *modulus;
|
|
||||||
BIGNUM *exponent;
|
|
||||||
BIGNUM *argument;
|
|
||||||
BIGNUM *result;
|
|
||||||
RSAPrivateKey keydata;
|
|
||||||
int to_return, numbytes;
|
|
||||||
|
|
||||||
modulus = exponent = argument = result = NULL;
|
|
||||||
to_return = 0; /* expect failure */
|
|
||||||
|
|
||||||
if(!atalla_dso)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_NOT_LOADED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Prepare the params */
|
|
||||||
modulus = BN_CTX_get(ctx);
|
|
||||||
exponent = BN_CTX_get(ctx);
|
|
||||||
argument = BN_CTX_get(ctx);
|
|
||||||
result = BN_CTX_get(ctx);
|
|
||||||
if(!modulus || !exponent || !argument || !result)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_BN_CTX_FULL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, m->top) ||
|
|
||||||
!bn_wexpand(argument, m->top) || !bn_wexpand(result, m->top))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_BN_EXPAND_FAIL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Prepare the key-data */
|
|
||||||
memset(&keydata, 0,sizeof keydata);
|
|
||||||
numbytes = BN_num_bytes(m);
|
|
||||||
memset(exponent->d, 0, numbytes);
|
|
||||||
memset(modulus->d, 0, numbytes);
|
|
||||||
BN_bn2bin(p, (unsigned char *)exponent->d + numbytes - BN_num_bytes(p));
|
|
||||||
BN_bn2bin(m, (unsigned char *)modulus->d + numbytes - BN_num_bytes(m));
|
|
||||||
keydata.privateExponent.data = (unsigned char *)exponent->d;
|
|
||||||
keydata.privateExponent.len = numbytes;
|
|
||||||
keydata.modulus.data = (unsigned char *)modulus->d;
|
|
||||||
keydata.modulus.len = numbytes;
|
|
||||||
/* Prepare the argument */
|
|
||||||
memset(argument->d, 0, numbytes);
|
|
||||||
memset(result->d, 0, numbytes);
|
|
||||||
BN_bn2bin(a, (unsigned char *)argument->d + numbytes - BN_num_bytes(a));
|
|
||||||
/* Perform the operation */
|
|
||||||
if(p_Atalla_RSAPrivateKeyOpFn(&keydata, (unsigned char *)result->d,
|
|
||||||
(unsigned char *)argument->d,
|
|
||||||
keydata.modulus.len) != 0)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_REQUEST_FAILED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Convert the response */
|
|
||||||
BN_bin2bn((unsigned char *)result->d, numbytes, r);
|
|
||||||
to_return = 1;
|
|
||||||
err:
|
|
||||||
if(modulus) ctx->tos--;
|
|
||||||
if(exponent) ctx->tos--;
|
|
||||||
if(argument) ctx->tos--;
|
|
||||||
if(result) ctx->tos--;
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int atalla_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
|
|
||||||
{
|
|
||||||
BN_CTX *ctx = NULL;
|
|
||||||
int to_return = 0;
|
|
||||||
|
|
||||||
if(!atalla_dso)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_RSA_MOD_EXP,ENGINE_R_NOT_LOADED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if((ctx = BN_CTX_new()) == NULL)
|
|
||||||
goto err;
|
|
||||||
if(!rsa->d || !rsa->n)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_ATALLA_RSA_MOD_EXP,ENGINE_R_MISSING_KEY_COMPONENTS);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
to_return = atalla_mod_exp(r0, I, rsa->d, rsa->n, ctx);
|
|
||||||
err:
|
|
||||||
if(ctx)
|
|
||||||
BN_CTX_free(ctx);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This code was liberated and adapted from the commented-out code in
|
|
||||||
* dsa_ossl.c. Because of the unoptimised form of the Atalla acceleration
|
|
||||||
* (it doesn't have a CRT form for RSA), this function means that an
|
|
||||||
* Atalla system running with a DSA server certificate can handshake
|
|
||||||
* around 5 or 6 times faster/more than an equivalent system running with
|
|
||||||
* RSA. Just check out the "signs" statistics from the RSA and DSA parts
|
|
||||||
* of "openssl speed -engine atalla dsa1024 rsa1024". */
|
|
||||||
static int atalla_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1,
|
|
||||||
BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m,
|
|
||||||
BN_CTX *ctx, BN_MONT_CTX *in_mont)
|
|
||||||
{
|
|
||||||
BIGNUM t;
|
|
||||||
int to_return = 0;
|
|
||||||
|
|
||||||
BN_init(&t);
|
|
||||||
/* let rr = a1 ^ p1 mod m */
|
|
||||||
if (!atalla_mod_exp(rr,a1,p1,m,ctx)) goto end;
|
|
||||||
/* let t = a2 ^ p2 mod m */
|
|
||||||
if (!atalla_mod_exp(&t,a2,p2,m,ctx)) goto end;
|
|
||||||
/* let rr = rr * t mod m */
|
|
||||||
if (!BN_mod_mul(rr,rr,&t,m,ctx)) goto end;
|
|
||||||
to_return = 1;
|
|
||||||
end:
|
|
||||||
BN_free(&t);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a,
|
|
||||||
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
|
|
||||||
BN_MONT_CTX *m_ctx)
|
|
||||||
{
|
|
||||||
return atalla_mod_exp(r, a, p, m, ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is aliased to mod_exp (with the mont stuff dropped). */
|
|
||||||
static int atalla_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
|
|
||||||
{
|
|
||||||
return atalla_mod_exp(r, a, p, m, ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is aliased to mod_exp (with the dh and mont dropped). */
|
|
||||||
static int atalla_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
|
|
||||||
{
|
|
||||||
return atalla_mod_exp(r, a, p, m, ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* !NO_HW_ATALLA */
|
|
||||||
#endif /* !NO_HW */
|
|
||||||
@@ -1,807 +0,0 @@
|
|||||||
/* crypto/engine/hw_cswift.c */
|
|
||||||
/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
|
|
||||||
* project 2000.
|
|
||||||
*/
|
|
||||||
/* ====================================================================
|
|
||||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
*
|
|
||||||
* 3. All advertising materials mentioning features or use of this
|
|
||||||
* software must display the following acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
|
||||||
* endorse or promote products derived from this software without
|
|
||||||
* prior written permission. For written permission, please contact
|
|
||||||
* licensing@OpenSSL.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "OpenSSL"
|
|
||||||
* nor may "OpenSSL" appear in their names without prior written
|
|
||||||
* permission of the OpenSSL Project.
|
|
||||||
*
|
|
||||||
* 6. Redistributions of any form whatsoever must retain the following
|
|
||||||
* acknowledgment:
|
|
||||||
* "This product includes software developed by the OpenSSL Project
|
|
||||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
|
||||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
|
||||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
* ====================================================================
|
|
||||||
*
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
|
||||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
|
||||||
* Hudson (tjh@cryptsoft.com).
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <openssl/crypto.h>
|
|
||||||
#include "cryptlib.h"
|
|
||||||
#include <openssl/dso.h>
|
|
||||||
#include "engine_int.h"
|
|
||||||
#include <openssl/engine.h>
|
|
||||||
|
|
||||||
#ifndef NO_HW
|
|
||||||
#ifndef NO_HW_CSWIFT
|
|
||||||
|
|
||||||
/* Attribution notice: Rainbow have generously allowed me to reproduce
|
|
||||||
* the necessary definitions here from their API. This means the support
|
|
||||||
* can build independently of whether application builders have the
|
|
||||||
* API or hardware. This will allow developers to easily produce software
|
|
||||||
* that has latent hardware support for any users that have accelerators
|
|
||||||
* installed, without the developers themselves needing anything extra.
|
|
||||||
*
|
|
||||||
* I have only clipped the parts from the CryptoSwift header files that
|
|
||||||
* are (or seem) relevant to the CryptoSwift support code. This is
|
|
||||||
* simply to keep the file sizes reasonable.
|
|
||||||
* [Geoff]
|
|
||||||
*/
|
|
||||||
#ifdef FLAT_INC
|
|
||||||
#include "cswift.h"
|
|
||||||
#else
|
|
||||||
#include "vendor_defns/cswift.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int cswift_init(void);
|
|
||||||
static int cswift_finish(void);
|
|
||||||
|
|
||||||
/* BIGNUM stuff */
|
|
||||||
static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx);
|
|
||||||
static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1,
|
|
||||||
const BIGNUM *iqmp, BN_CTX *ctx);
|
|
||||||
|
|
||||||
/* RSA stuff */
|
|
||||||
static int cswift_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa);
|
|
||||||
/* This function is aliased to mod_exp (with the mont stuff dropped). */
|
|
||||||
static int cswift_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
|
||||||
|
|
||||||
/* DSA stuff */
|
|
||||||
static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa);
|
|
||||||
static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len,
|
|
||||||
DSA_SIG *sig, DSA *dsa);
|
|
||||||
|
|
||||||
/* DH stuff */
|
|
||||||
/* This function is alised to mod_exp (with the DH and mont dropped). */
|
|
||||||
static int cswift_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
|
||||||
|
|
||||||
|
|
||||||
/* Our internal RSA_METHOD that we provide pointers to */
|
|
||||||
static RSA_METHOD cswift_rsa =
|
|
||||||
{
|
|
||||||
"CryptoSwift RSA method",
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
cswift_rsa_mod_exp,
|
|
||||||
cswift_mod_exp_mont,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Our internal DSA_METHOD that we provide pointers to */
|
|
||||||
static DSA_METHOD cswift_dsa =
|
|
||||||
{
|
|
||||||
"CryptoSwift DSA method",
|
|
||||||
cswift_dsa_sign,
|
|
||||||
NULL, /* dsa_sign_setup */
|
|
||||||
cswift_dsa_verify,
|
|
||||||
NULL, /* dsa_mod_exp */
|
|
||||||
NULL, /* bn_mod_exp */
|
|
||||||
NULL, /* init */
|
|
||||||
NULL, /* finish */
|
|
||||||
0, /* flags */
|
|
||||||
NULL /* app_data */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Our internal DH_METHOD that we provide pointers to */
|
|
||||||
static DH_METHOD cswift_dh =
|
|
||||||
{
|
|
||||||
"CryptoSwift DH method",
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
cswift_mod_exp_dh,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Our ENGINE structure. */
|
|
||||||
static ENGINE engine_cswift =
|
|
||||||
{
|
|
||||||
"cswift",
|
|
||||||
"CryptoSwift hardware engine support",
|
|
||||||
&cswift_rsa,
|
|
||||||
&cswift_dsa,
|
|
||||||
&cswift_dh,
|
|
||||||
NULL,
|
|
||||||
cswift_mod_exp,
|
|
||||||
cswift_mod_exp_crt,
|
|
||||||
cswift_init,
|
|
||||||
cswift_finish,
|
|
||||||
NULL, /* no ctrl() */
|
|
||||||
NULL, /* no load_privkey() */
|
|
||||||
NULL, /* no load_pubkey() */
|
|
||||||
0, /* no flags */
|
|
||||||
0, 0, /* no references */
|
|
||||||
NULL, NULL /* unlinked */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* As this is only ever called once, there's no need for locking
|
|
||||||
* (indeed - the lock will already be held by our caller!!!) */
|
|
||||||
ENGINE *ENGINE_cswift()
|
|
||||||
{
|
|
||||||
RSA_METHOD *meth1;
|
|
||||||
DH_METHOD *meth2;
|
|
||||||
|
|
||||||
/* We know that the "PKCS1_SSLeay()" functions hook properly
|
|
||||||
* to the cswift-specific mod_exp and mod_exp_crt so we use
|
|
||||||
* those functions. NB: We don't use ENGINE_openssl() or
|
|
||||||
* anything "more generic" because something like the RSAref
|
|
||||||
* code may not hook properly, and if you own one of these
|
|
||||||
* cards then you have the right to do RSA operations on it
|
|
||||||
* anyway! */
|
|
||||||
meth1 = RSA_PKCS1_SSLeay();
|
|
||||||
cswift_rsa.rsa_pub_enc = meth1->rsa_pub_enc;
|
|
||||||
cswift_rsa.rsa_pub_dec = meth1->rsa_pub_dec;
|
|
||||||
cswift_rsa.rsa_priv_enc = meth1->rsa_priv_enc;
|
|
||||||
cswift_rsa.rsa_priv_dec = meth1->rsa_priv_dec;
|
|
||||||
|
|
||||||
/* Much the same for Diffie-Hellman */
|
|
||||||
meth2 = DH_OpenSSL();
|
|
||||||
cswift_dh.generate_key = meth2->generate_key;
|
|
||||||
cswift_dh.compute_key = meth2->compute_key;
|
|
||||||
return &engine_cswift;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is a process-global DSO handle used for loading and unloading
|
|
||||||
* the CryptoSwift library. NB: This is only set (or unset) during an
|
|
||||||
* init() or finish() call (reference counts permitting) and they're
|
|
||||||
* operating with global locks, so this should be thread-safe
|
|
||||||
* implicitly. */
|
|
||||||
static DSO *cswift_dso = NULL;
|
|
||||||
|
|
||||||
/* These are the function pointers that are (un)set when the library has
|
|
||||||
* successfully (un)loaded. */
|
|
||||||
t_swAcquireAccContext *p_CSwift_AcquireAccContext = NULL;
|
|
||||||
t_swAttachKeyParam *p_CSwift_AttachKeyParam = NULL;
|
|
||||||
t_swSimpleRequest *p_CSwift_SimpleRequest = NULL;
|
|
||||||
t_swReleaseAccContext *p_CSwift_ReleaseAccContext = NULL;
|
|
||||||
|
|
||||||
/* Used in the DSO operations. */
|
|
||||||
static const char *CSWIFT_LIBNAME = "swift";
|
|
||||||
static const char *CSWIFT_F1 = "swAcquireAccContext";
|
|
||||||
static const char *CSWIFT_F2 = "swAttachKeyParam";
|
|
||||||
static const char *CSWIFT_F3 = "swSimpleRequest";
|
|
||||||
static const char *CSWIFT_F4 = "swReleaseAccContext";
|
|
||||||
|
|
||||||
|
|
||||||
/* CryptoSwift library functions and mechanics - these are used by the
|
|
||||||
* higher-level functions further down. NB: As and where there's no
|
|
||||||
* error checking, take a look lower down where these functions are
|
|
||||||
* called, the checking and error handling is probably down there. */
|
|
||||||
|
|
||||||
/* utility function to obtain a context */
|
|
||||||
static int get_context(SW_CONTEXT_HANDLE *hac)
|
|
||||||
{
|
|
||||||
SW_STATUS status;
|
|
||||||
|
|
||||||
status = p_CSwift_AcquireAccContext(hac);
|
|
||||||
if(status != SW_OK)
|
|
||||||
return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* similarly to release one. */
|
|
||||||
static void release_context(SW_CONTEXT_HANDLE hac)
|
|
||||||
{
|
|
||||||
p_CSwift_ReleaseAccContext(hac);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (de)initialisation functions. */
|
|
||||||
static int cswift_init()
|
|
||||||
{
|
|
||||||
SW_CONTEXT_HANDLE hac;
|
|
||||||
t_swAcquireAccContext *p1;
|
|
||||||
t_swAttachKeyParam *p2;
|
|
||||||
t_swSimpleRequest *p3;
|
|
||||||
t_swReleaseAccContext *p4;
|
|
||||||
|
|
||||||
if(cswift_dso != NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_ALREADY_LOADED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Attempt to load libswift.so/swift.dll/whatever. */
|
|
||||||
cswift_dso = DSO_load(NULL, CSWIFT_LIBNAME, NULL,
|
|
||||||
DSO_FLAG_NAME_TRANSLATION);
|
|
||||||
if(cswift_dso == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_DSO_FAILURE);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!(p1 = (t_swAcquireAccContext *)
|
|
||||||
DSO_bind_func(cswift_dso, CSWIFT_F1)) ||
|
|
||||||
!(p2 = (t_swAttachKeyParam *)
|
|
||||||
DSO_bind_func(cswift_dso, CSWIFT_F2)) ||
|
|
||||||
!(p3 = (t_swSimpleRequest *)
|
|
||||||
DSO_bind_func(cswift_dso, CSWIFT_F3)) ||
|
|
||||||
!(p4 = (t_swReleaseAccContext *)
|
|
||||||
DSO_bind_func(cswift_dso, CSWIFT_F4)))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_DSO_FAILURE);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Copy the pointers */
|
|
||||||
p_CSwift_AcquireAccContext = p1;
|
|
||||||
p_CSwift_AttachKeyParam = p2;
|
|
||||||
p_CSwift_SimpleRequest = p3;
|
|
||||||
p_CSwift_ReleaseAccContext = p4;
|
|
||||||
/* Try and get a context - if not, we may have a DSO but no
|
|
||||||
* accelerator! */
|
|
||||||
if(!get_context(&hac))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_UNIT_FAILURE);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
release_context(hac);
|
|
||||||
/* Everything's fine. */
|
|
||||||
return 1;
|
|
||||||
err:
|
|
||||||
if(cswift_dso)
|
|
||||||
DSO_free(cswift_dso);
|
|
||||||
p_CSwift_AcquireAccContext = NULL;
|
|
||||||
p_CSwift_AttachKeyParam = NULL;
|
|
||||||
p_CSwift_SimpleRequest = NULL;
|
|
||||||
p_CSwift_ReleaseAccContext = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int cswift_finish()
|
|
||||||
{
|
|
||||||
if(cswift_dso == NULL)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_FINISH,ENGINE_R_NOT_LOADED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if(!DSO_free(cswift_dso))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_FINISH,ENGINE_R_DSO_FAILURE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cswift_dso = NULL;
|
|
||||||
p_CSwift_AcquireAccContext = NULL;
|
|
||||||
p_CSwift_AttachKeyParam = NULL;
|
|
||||||
p_CSwift_SimpleRequest = NULL;
|
|
||||||
p_CSwift_ReleaseAccContext = NULL;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Un petit mod_exp */
|
|
||||||
static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx)
|
|
||||||
{
|
|
||||||
/* I need somewhere to store temporary serialised values for
|
|
||||||
* use with the CryptoSwift API calls. A neat cheat - I'll use
|
|
||||||
* BIGNUMs from the BN_CTX but access their arrays directly as
|
|
||||||
* byte arrays <grin>. This way I don't have to clean anything
|
|
||||||
* up. */
|
|
||||||
BIGNUM *modulus;
|
|
||||||
BIGNUM *exponent;
|
|
||||||
BIGNUM *argument;
|
|
||||||
BIGNUM *result;
|
|
||||||
SW_STATUS sw_status;
|
|
||||||
SW_LARGENUMBER arg, res;
|
|
||||||
SW_PARAM sw_param;
|
|
||||||
SW_CONTEXT_HANDLE hac;
|
|
||||||
int to_return, acquired;
|
|
||||||
|
|
||||||
modulus = exponent = argument = result = NULL;
|
|
||||||
to_return = 0; /* expect failure */
|
|
||||||
acquired = 0;
|
|
||||||
|
|
||||||
if(!get_context(&hac))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_GET_HANDLE_FAILED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
acquired = 1;
|
|
||||||
/* Prepare the params */
|
|
||||||
modulus = BN_CTX_get(ctx);
|
|
||||||
exponent = BN_CTX_get(ctx);
|
|
||||||
argument = BN_CTX_get(ctx);
|
|
||||||
result = BN_CTX_get(ctx);
|
|
||||||
if(!modulus || !exponent || !argument || !result)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_BN_CTX_FULL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, p->top) ||
|
|
||||||
!bn_wexpand(argument, a->top) || !bn_wexpand(result, m->top))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_BN_EXPAND_FAIL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
sw_param.type = SW_ALG_EXP;
|
|
||||||
sw_param.up.exp.modulus.nbytes = BN_bn2bin(m,
|
|
||||||
(unsigned char *)modulus->d);
|
|
||||||
sw_param.up.exp.modulus.value = (unsigned char *)modulus->d;
|
|
||||||
sw_param.up.exp.exponent.nbytes = BN_bn2bin(p,
|
|
||||||
(unsigned char *)exponent->d);
|
|
||||||
sw_param.up.exp.exponent.value = (unsigned char *)exponent->d;
|
|
||||||
/* Attach the key params */
|
|
||||||
sw_status = p_CSwift_AttachKeyParam(hac, &sw_param);
|
|
||||||
switch(sw_status)
|
|
||||||
{
|
|
||||||
case SW_OK:
|
|
||||||
break;
|
|
||||||
case SW_ERR_INPUT_SIZE:
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,
|
|
||||||
ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
|
||||||
goto err;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
}
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Prepare the argument and response */
|
|
||||||
arg.nbytes = BN_bn2bin(a, (unsigned char *)argument->d);
|
|
||||||
arg.value = (unsigned char *)argument->d;
|
|
||||||
res.nbytes = BN_num_bytes(m);
|
|
||||||
memset(result->d, 0, res.nbytes);
|
|
||||||
res.value = (unsigned char *)result->d;
|
|
||||||
/* Perform the operation */
|
|
||||||
if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP, &arg, 1,
|
|
||||||
&res, 1)) != SW_OK)
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Convert the response */
|
|
||||||
BN_bin2bn((unsigned char *)result->d, res.nbytes, r);
|
|
||||||
to_return = 1;
|
|
||||||
err:
|
|
||||||
if(acquired)
|
|
||||||
release_context(hac);
|
|
||||||
if(modulus) ctx->tos--;
|
|
||||||
if(exponent) ctx->tos--;
|
|
||||||
if(argument) ctx->tos--;
|
|
||||||
if(result) ctx->tos--;
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Un petit mod_exp chinois */
|
|
||||||
static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *q, const BIGNUM *dmp1,
|
|
||||||
const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx)
|
|
||||||
{
|
|
||||||
SW_STATUS sw_status;
|
|
||||||
SW_LARGENUMBER arg, res;
|
|
||||||
SW_PARAM sw_param;
|
|
||||||
SW_CONTEXT_HANDLE hac;
|
|
||||||
BIGNUM *rsa_p = NULL;
|
|
||||||
BIGNUM *rsa_q = NULL;
|
|
||||||
BIGNUM *rsa_dmp1 = NULL;
|
|
||||||
BIGNUM *rsa_dmq1 = NULL;
|
|
||||||
BIGNUM *rsa_iqmp = NULL;
|
|
||||||
BIGNUM *argument = NULL;
|
|
||||||
BIGNUM *result = NULL;
|
|
||||||
int to_return = 0; /* expect failure */
|
|
||||||
int acquired = 0;
|
|
||||||
|
|
||||||
if(!get_context(&hac))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_GET_HANDLE_FAILED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
acquired = 1;
|
|
||||||
/* Prepare the params */
|
|
||||||
rsa_p = BN_CTX_get(ctx);
|
|
||||||
rsa_q = BN_CTX_get(ctx);
|
|
||||||
rsa_dmp1 = BN_CTX_get(ctx);
|
|
||||||
rsa_dmq1 = BN_CTX_get(ctx);
|
|
||||||
rsa_iqmp = BN_CTX_get(ctx);
|
|
||||||
argument = BN_CTX_get(ctx);
|
|
||||||
result = BN_CTX_get(ctx);
|
|
||||||
if(!rsa_p || !rsa_q || !rsa_dmp1 || !rsa_dmq1 || !rsa_iqmp ||
|
|
||||||
!argument || !result)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_BN_CTX_FULL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!bn_wexpand(rsa_p, p->top) || !bn_wexpand(rsa_q, q->top) ||
|
|
||||||
!bn_wexpand(rsa_dmp1, dmp1->top) ||
|
|
||||||
!bn_wexpand(rsa_dmq1, dmq1->top) ||
|
|
||||||
!bn_wexpand(rsa_iqmp, iqmp->top) ||
|
|
||||||
!bn_wexpand(argument, a->top) ||
|
|
||||||
!bn_wexpand(result, p->top + q->top))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_BN_EXPAND_FAIL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
sw_param.type = SW_ALG_CRT;
|
|
||||||
sw_param.up.crt.p.nbytes = BN_bn2bin(p, (unsigned char *)rsa_p->d);
|
|
||||||
sw_param.up.crt.p.value = (unsigned char *)rsa_p->d;
|
|
||||||
sw_param.up.crt.q.nbytes = BN_bn2bin(q, (unsigned char *)rsa_q->d);
|
|
||||||
sw_param.up.crt.q.value = (unsigned char *)rsa_q->d;
|
|
||||||
sw_param.up.crt.dmp1.nbytes = BN_bn2bin(dmp1,
|
|
||||||
(unsigned char *)rsa_dmp1->d);
|
|
||||||
sw_param.up.crt.dmp1.value = (unsigned char *)rsa_dmp1->d;
|
|
||||||
sw_param.up.crt.dmq1.nbytes = BN_bn2bin(dmq1,
|
|
||||||
(unsigned char *)rsa_dmq1->d);
|
|
||||||
sw_param.up.crt.dmq1.value = (unsigned char *)rsa_dmq1->d;
|
|
||||||
sw_param.up.crt.iqmp.nbytes = BN_bn2bin(iqmp,
|
|
||||||
(unsigned char *)rsa_iqmp->d);
|
|
||||||
sw_param.up.crt.iqmp.value = (unsigned char *)rsa_iqmp->d;
|
|
||||||
/* Attach the key params */
|
|
||||||
sw_status = p_CSwift_AttachKeyParam(hac, &sw_param);
|
|
||||||
switch(sw_status)
|
|
||||||
{
|
|
||||||
case SW_OK:
|
|
||||||
break;
|
|
||||||
case SW_ERR_INPUT_SIZE:
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,
|
|
||||||
ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
|
||||||
goto err;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
}
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Prepare the argument and response */
|
|
||||||
arg.nbytes = BN_bn2bin(a, (unsigned char *)argument->d);
|
|
||||||
arg.value = (unsigned char *)argument->d;
|
|
||||||
res.nbytes = 2 * BN_num_bytes(p);
|
|
||||||
memset(result->d, 0, res.nbytes);
|
|
||||||
res.value = (unsigned char *)result->d;
|
|
||||||
/* Perform the operation */
|
|
||||||
if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP_CRT, &arg, 1,
|
|
||||||
&res, 1)) != SW_OK)
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Convert the response */
|
|
||||||
BN_bin2bn((unsigned char *)result->d, res.nbytes, r);
|
|
||||||
to_return = 1;
|
|
||||||
err:
|
|
||||||
if(acquired)
|
|
||||||
release_context(hac);
|
|
||||||
if(rsa_p) ctx->tos--;
|
|
||||||
if(rsa_q) ctx->tos--;
|
|
||||||
if(rsa_dmp1) ctx->tos--;
|
|
||||||
if(rsa_dmq1) ctx->tos--;
|
|
||||||
if(rsa_iqmp) ctx->tos--;
|
|
||||||
if(argument) ctx->tos--;
|
|
||||||
if(result) ctx->tos--;
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int cswift_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa)
|
|
||||||
{
|
|
||||||
BN_CTX *ctx;
|
|
||||||
int to_return = 0;
|
|
||||||
|
|
||||||
if((ctx = BN_CTX_new()) == NULL)
|
|
||||||
goto err;
|
|
||||||
if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_RSA_MOD_EXP,ENGINE_R_MISSING_KEY_COMPONENTS);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
to_return = cswift_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1,
|
|
||||||
rsa->dmq1, rsa->iqmp, ctx);
|
|
||||||
err:
|
|
||||||
if(ctx)
|
|
||||||
BN_CTX_free(ctx);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is aliased to mod_exp (with the mont stuff dropped). */
|
|
||||||
static int cswift_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
|
|
||||||
{
|
|
||||||
return cswift_mod_exp(r, a, p, m, ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa)
|
|
||||||
{
|
|
||||||
SW_CONTEXT_HANDLE hac;
|
|
||||||
SW_PARAM sw_param;
|
|
||||||
SW_STATUS sw_status;
|
|
||||||
SW_LARGENUMBER arg, res;
|
|
||||||
unsigned char *ptr;
|
|
||||||
BN_CTX *ctx;
|
|
||||||
BIGNUM *dsa_p = NULL;
|
|
||||||
BIGNUM *dsa_q = NULL;
|
|
||||||
BIGNUM *dsa_g = NULL;
|
|
||||||
BIGNUM *dsa_key = NULL;
|
|
||||||
BIGNUM *result = NULL;
|
|
||||||
DSA_SIG *to_return = NULL;
|
|
||||||
int acquired = 0;
|
|
||||||
|
|
||||||
if((ctx = BN_CTX_new()) == NULL)
|
|
||||||
goto err;
|
|
||||||
if(!get_context(&hac))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_GET_HANDLE_FAILED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
acquired = 1;
|
|
||||||
/* Prepare the params */
|
|
||||||
dsa_p = BN_CTX_get(ctx);
|
|
||||||
dsa_q = BN_CTX_get(ctx);
|
|
||||||
dsa_g = BN_CTX_get(ctx);
|
|
||||||
dsa_key = BN_CTX_get(ctx);
|
|
||||||
result = BN_CTX_get(ctx);
|
|
||||||
if(!dsa_p || !dsa_q || !dsa_g || !dsa_key || !result)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_BN_CTX_FULL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!bn_wexpand(dsa_p, dsa->p->top) ||
|
|
||||||
!bn_wexpand(dsa_q, dsa->q->top) ||
|
|
||||||
!bn_wexpand(dsa_g, dsa->g->top) ||
|
|
||||||
!bn_wexpand(dsa_key, dsa->priv_key->top) ||
|
|
||||||
!bn_wexpand(result, dsa->p->top))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_BN_EXPAND_FAIL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
sw_param.type = SW_ALG_DSA;
|
|
||||||
sw_param.up.dsa.p.nbytes = BN_bn2bin(dsa->p,
|
|
||||||
(unsigned char *)dsa_p->d);
|
|
||||||
sw_param.up.dsa.p.value = (unsigned char *)dsa_p->d;
|
|
||||||
sw_param.up.dsa.q.nbytes = BN_bn2bin(dsa->q,
|
|
||||||
(unsigned char *)dsa_q->d);
|
|
||||||
sw_param.up.dsa.q.value = (unsigned char *)dsa_q->d;
|
|
||||||
sw_param.up.dsa.g.nbytes = BN_bn2bin(dsa->g,
|
|
||||||
(unsigned char *)dsa_g->d);
|
|
||||||
sw_param.up.dsa.g.value = (unsigned char *)dsa_g->d;
|
|
||||||
sw_param.up.dsa.key.nbytes = BN_bn2bin(dsa->priv_key,
|
|
||||||
(unsigned char *)dsa_key->d);
|
|
||||||
sw_param.up.dsa.key.value = (unsigned char *)dsa_key->d;
|
|
||||||
/* Attach the key params */
|
|
||||||
sw_status = p_CSwift_AttachKeyParam(hac, &sw_param);
|
|
||||||
switch(sw_status)
|
|
||||||
{
|
|
||||||
case SW_OK:
|
|
||||||
break;
|
|
||||||
case SW_ERR_INPUT_SIZE:
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,
|
|
||||||
ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
|
||||||
goto err;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
}
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Prepare the argument and response */
|
|
||||||
arg.nbytes = dlen;
|
|
||||||
arg.value = (unsigned char *)dgst;
|
|
||||||
res.nbytes = BN_num_bytes(dsa->p);
|
|
||||||
memset(result->d, 0, res.nbytes);
|
|
||||||
res.value = (unsigned char *)result->d;
|
|
||||||
/* Perform the operation */
|
|
||||||
sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_DSS_SIGN, &arg, 1,
|
|
||||||
&res, 1);
|
|
||||||
if(sw_status != SW_OK)
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Convert the response */
|
|
||||||
ptr = (unsigned char *)result->d;
|
|
||||||
if((to_return = DSA_SIG_new()) == NULL)
|
|
||||||
goto err;
|
|
||||||
to_return->r = BN_bin2bn((unsigned char *)result->d, 20, NULL);
|
|
||||||
to_return->s = BN_bin2bn((unsigned char *)result->d + 20, 20, NULL);
|
|
||||||
|
|
||||||
err:
|
|
||||||
if(acquired)
|
|
||||||
release_context(hac);
|
|
||||||
if(dsa_p) ctx->tos--;
|
|
||||||
if(dsa_q) ctx->tos--;
|
|
||||||
if(dsa_g) ctx->tos--;
|
|
||||||
if(dsa_key) ctx->tos--;
|
|
||||||
if(result) ctx->tos--;
|
|
||||||
if(ctx)
|
|
||||||
BN_CTX_free(ctx);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len,
|
|
||||||
DSA_SIG *sig, DSA *dsa)
|
|
||||||
{
|
|
||||||
SW_CONTEXT_HANDLE hac;
|
|
||||||
SW_PARAM sw_param;
|
|
||||||
SW_STATUS sw_status;
|
|
||||||
SW_LARGENUMBER arg[2], res;
|
|
||||||
unsigned long sig_result;
|
|
||||||
BN_CTX *ctx;
|
|
||||||
BIGNUM *dsa_p = NULL;
|
|
||||||
BIGNUM *dsa_q = NULL;
|
|
||||||
BIGNUM *dsa_g = NULL;
|
|
||||||
BIGNUM *dsa_key = NULL;
|
|
||||||
BIGNUM *argument = NULL;
|
|
||||||
int to_return = -1;
|
|
||||||
int acquired = 0;
|
|
||||||
|
|
||||||
if((ctx = BN_CTX_new()) == NULL)
|
|
||||||
goto err;
|
|
||||||
if(!get_context(&hac))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_GET_HANDLE_FAILED);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
acquired = 1;
|
|
||||||
/* Prepare the params */
|
|
||||||
dsa_p = BN_CTX_get(ctx);
|
|
||||||
dsa_q = BN_CTX_get(ctx);
|
|
||||||
dsa_g = BN_CTX_get(ctx);
|
|
||||||
dsa_key = BN_CTX_get(ctx);
|
|
||||||
argument = BN_CTX_get(ctx);
|
|
||||||
if(!dsa_p || !dsa_q || !dsa_g || !dsa_key || !argument)
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_BN_CTX_FULL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if(!bn_wexpand(dsa_p, dsa->p->top) ||
|
|
||||||
!bn_wexpand(dsa_q, dsa->q->top) ||
|
|
||||||
!bn_wexpand(dsa_g, dsa->g->top) ||
|
|
||||||
!bn_wexpand(dsa_key, dsa->pub_key->top) ||
|
|
||||||
!bn_wexpand(argument, 40))
|
|
||||||
{
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_BN_EXPAND_FAIL);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
sw_param.type = SW_ALG_DSA;
|
|
||||||
sw_param.up.dsa.p.nbytes = BN_bn2bin(dsa->p,
|
|
||||||
(unsigned char *)dsa_p->d);
|
|
||||||
sw_param.up.dsa.p.value = (unsigned char *)dsa_p->d;
|
|
||||||
sw_param.up.dsa.q.nbytes = BN_bn2bin(dsa->q,
|
|
||||||
(unsigned char *)dsa_q->d);
|
|
||||||
sw_param.up.dsa.q.value = (unsigned char *)dsa_q->d;
|
|
||||||
sw_param.up.dsa.g.nbytes = BN_bn2bin(dsa->g,
|
|
||||||
(unsigned char *)dsa_g->d);
|
|
||||||
sw_param.up.dsa.g.value = (unsigned char *)dsa_g->d;
|
|
||||||
sw_param.up.dsa.key.nbytes = BN_bn2bin(dsa->pub_key,
|
|
||||||
(unsigned char *)dsa_key->d);
|
|
||||||
sw_param.up.dsa.key.value = (unsigned char *)dsa_key->d;
|
|
||||||
/* Attach the key params */
|
|
||||||
sw_status = p_CSwift_AttachKeyParam(hac, &sw_param);
|
|
||||||
switch(sw_status)
|
|
||||||
{
|
|
||||||
case SW_OK:
|
|
||||||
break;
|
|
||||||
case SW_ERR_INPUT_SIZE:
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,
|
|
||||||
ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL);
|
|
||||||
goto err;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
}
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Prepare the argument and response */
|
|
||||||
arg[0].nbytes = dgst_len;
|
|
||||||
arg[0].value = (unsigned char *)dgst;
|
|
||||||
arg[1].nbytes = 40;
|
|
||||||
arg[1].value = (unsigned char *)argument->d;
|
|
||||||
memset(arg[1].value, 0, 40);
|
|
||||||
BN_bn2bin(sig->r, arg[1].value + 20 - BN_num_bytes(sig->r));
|
|
||||||
BN_bn2bin(sig->s, arg[1].value + 40 - BN_num_bytes(sig->s));
|
|
||||||
res.nbytes = 4; /* unsigned long */
|
|
||||||
res.value = (unsigned char *)(&sig_result);
|
|
||||||
/* Perform the operation */
|
|
||||||
sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_DSS_VERIFY, arg, 2,
|
|
||||||
&res, 1);
|
|
||||||
if(sw_status != SW_OK)
|
|
||||||
{
|
|
||||||
char tmpbuf[20];
|
|
||||||
ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_REQUEST_FAILED);
|
|
||||||
sprintf(tmpbuf, "%ld", sw_status);
|
|
||||||
ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
/* Convert the response */
|
|
||||||
to_return = ((sig_result == 0) ? 0 : 1);
|
|
||||||
|
|
||||||
err:
|
|
||||||
if(acquired)
|
|
||||||
release_context(hac);
|
|
||||||
if(dsa_p) ctx->tos--;
|
|
||||||
if(dsa_q) ctx->tos--;
|
|
||||||
if(dsa_g) ctx->tos--;
|
|
||||||
if(dsa_key) ctx->tos--;
|
|
||||||
if(argument) ctx->tos--;
|
|
||||||
if(ctx)
|
|
||||||
BN_CTX_free(ctx);
|
|
||||||
return to_return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is aliased to mod_exp (with the dh and mont dropped). */
|
|
||||||
static int cswift_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
|
|
||||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
|
|
||||||
{
|
|
||||||
return cswift_mod_exp(r, a, p, m, ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* !NO_HW_CSWIFT */
|
|
||||||
#endif /* !NO_HW */
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user