Compare commits
56 Commits
OpenSSL-en
...
LEVITTE_be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e35b3a1a3 | ||
|
|
ec37635c94 | ||
|
|
fd836aeee0 | ||
|
|
560f7abb7e | ||
|
|
b6358c89a1 | ||
|
|
5d735465d1 | ||
|
|
9e051bac13 | ||
|
|
30fbcaa213 | ||
|
|
93825dddad | ||
|
|
a8aa764d3c | ||
|
|
e7716b7a19 | ||
|
|
a4e3150f00 | ||
|
|
edec614efd | ||
|
|
2457c19df1 | ||
|
|
5fa5eb71a4 | ||
|
|
3f39976da3 | ||
|
|
216ad9ef58 | ||
|
|
bc50157010 | ||
|
|
91180d45f9 | ||
|
|
d9f40bbe55 | ||
|
|
ec7c9ee8b8 | ||
|
|
f82bb9cb9c | ||
|
|
5a8922aed5 | ||
|
|
f2c1812560 | ||
|
|
4cfa4ae820 | ||
|
|
a30af36c77 | ||
|
|
5075521e75 | ||
|
|
ee3a47a994 | ||
|
|
f727266ae8 | ||
|
|
8bb0c8522a | ||
|
|
c6700d2746 | ||
|
|
1b06804491 | ||
|
|
dc90f64d56 | ||
|
|
6c43032121 | ||
|
|
37ead9be0b | ||
|
|
1751034669 | ||
|
|
d4575825f1 | ||
|
|
d04b1b4656 | ||
|
|
1247092776 | ||
|
|
7e22a1df55 | ||
|
|
bb5810d21d | ||
|
|
61a88c31c0 | ||
|
|
b86ed8d18f | ||
|
|
e5886a2388 | ||
|
|
8d1ebe0bd1 | ||
|
|
1fb724449d | ||
|
|
721a5e83f9 | ||
|
|
6df617a59d | ||
|
|
8c6336b0aa | ||
|
|
87203dc99a | ||
|
|
4de65cbc06 | ||
|
|
27b2b78f90 | ||
|
|
3a160f1dc6 | ||
|
|
7f24b1c3e9 | ||
|
|
a5e8bcfb7b | ||
|
|
9d5c3c1939 |
36
CHANGES
36
CHANGES
@@ -4,6 +4,19 @@
|
||||
|
||||
Changes between 0.9.7c and 0.9.8 [xx XXX xxxx]
|
||||
|
||||
*) BN_zero() only needs to set 'top' and 'neg' to zero for correct results,
|
||||
and this should never fail. So the return value from the use of
|
||||
BN_set_word() (which can fail due to needless expansion) is now deprecated;
|
||||
if OPENSSL_NO_DEPRECATED is defined, BN_zero() is a void macro.
|
||||
[Geoff Thorpe]
|
||||
|
||||
*) BN_CTX_get() should return zero-valued bignums, providing the same
|
||||
initialised value as BN_new().
|
||||
[Geoff Thorpe, suggested by Ulf M<>ller]
|
||||
|
||||
*) Support for inhibitAnyPolicy certificate extension.
|
||||
[Steve Henson]
|
||||
|
||||
*) An audit of the BIGNUM code is underway, for which debugging code is
|
||||
enabled when BN_DEBUG is defined. This makes stricter enforcements on what
|
||||
is considered valid when processing BIGNUMs, and causes execution to
|
||||
@@ -18,7 +31,7 @@
|
||||
some point, these tighter rules will become openssl's default to improve
|
||||
maintainability, though the assert()s and other overheads will remain only
|
||||
in debugging configurations. See bn.h for more details.
|
||||
[Geoff Thorpe]
|
||||
[Geoff Thorpe, Nils Larsch, Ulf M<>ller]
|
||||
|
||||
*) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure
|
||||
that can only be obtained through BN_CTX_new() (which implicitly
|
||||
@@ -617,6 +630,27 @@
|
||||
|
||||
Changes between 0.9.7c and 0.9.7d [xx XXX XXXX]
|
||||
|
||||
*) X509 verify fixes. Disable broken certificate workarounds when
|
||||
X509_V_FLAGS_X509_STRICT is set. Check CRL issuer has cRLSign set if
|
||||
keyUsage extension present. Don't accept CRLs with unhandled critical
|
||||
extensions: since verify currently doesn't process CRL extensions this
|
||||
rejects a CRL with *any* critical extensions. Add new verify error codes
|
||||
for these cases.
|
||||
[Steve Henson]
|
||||
|
||||
*) When creating an OCSP nonce use an OCTET STRING inside the extnValue.
|
||||
A clarification of RFC2560 will require the use of OCTET STRINGs and
|
||||
some implementations cannot handle the current raw format. Since OpenSSL
|
||||
copies and compares OCSP nonces as opaque blobs without any attempt at
|
||||
parsing them this should not create any compatibility issues.
|
||||
[Steve Henson]
|
||||
|
||||
*) New md flag EVP_MD_CTX_FLAG_REUSE this allows md_data to be reused when
|
||||
calling EVP_MD_CTX_copy_ex() to avoid calling OPENSSL_malloc(). Without
|
||||
this HMAC (and other) operations are several times slower than OpenSSL
|
||||
< 0.9.7.
|
||||
[Steve Henson]
|
||||
|
||||
*) Print out GeneralizedTime and UTCTime in ASN1_STRING_print_ex().
|
||||
[Peter Sylvester <Peter.Sylvester@EdelWeb.fr>]
|
||||
|
||||
|
||||
36
Configure
36
Configure
@@ -145,10 +145,10 @@ my %table=(
|
||||
"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32::::win32:cygwin-shared:::.dll",
|
||||
"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared",
|
||||
"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn:linux-shared",
|
||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-geoff","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DBN_CTX_DEBUG -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -g -ggdb3 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"dist", "cc:-O::(unknown)::::::",
|
||||
|
||||
@@ -216,13 +216,13 @@ my %table=(
|
||||
"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
#### IRIX 6.x configs
|
||||
# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
|
||||
# './Configure irix-[g]cc' manually.
|
||||
# './Configure irix-cc -o32' manually.
|
||||
# -mips4 flag is added by ./config when appropriate.
|
||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# N64 ABI builds.
|
||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### Unified HP-UX ANSI C configs.
|
||||
# Special notes:
|
||||
@@ -252,21 +252,15 @@ my %table=(
|
||||
# crypto/sha/sha_lcl.h.
|
||||
# <appro@fy.chalmers.se>
|
||||
#
|
||||
#!#"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
|
||||
"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::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-parisc2-gcc","gcc:-march=2.0 -O3 -DB_ENDIAN::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1:asm/pa-risc2.o:::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# 64bit PARISC for GCC without optimization, which seems to make problems.
|
||||
# Submitted by <ross.alexander@uk.neceur.com>
|
||||
"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN::-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:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HP/UX IA-64 targets
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
|
||||
# with debugging of the following config.
|
||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||
#
|
||||
# Chris Ruemmler <ruemmler@cup.hp.com>
|
||||
@@ -278,6 +272,16 @@ my %table=(
|
||||
# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro>
|
||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HP/UX IA-64 targets
|
||||
"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with
|
||||
# with debugging of the following config.
|
||||
"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# GCC builds [not tested yet]...
|
||||
# _ILP32 should have been defined by compiler driver, but it isn't...
|
||||
"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_ILP32::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64.o:::::::::dlfcn:hpux-shared:-fpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-ia64-gcc","gcc:-mlp64 -O3 -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64.o:::::::::dlfcn:hpux-shared:-fpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# HPUX 9.X config.
|
||||
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
||||
# egcs. gcc 2.8.1 is also broken.
|
||||
|
||||
27
FAQ
27
FAQ
@@ -116,11 +116,14 @@ OpenSSL. Information on the OpenSSL mailing lists is available from
|
||||
|
||||
* Where can I get a compiled version of OpenSSL?
|
||||
|
||||
You can finder pointers to binary distributions in
|
||||
http://www.openssl.org/related/binaries.html .
|
||||
|
||||
Some applications that use OpenSSL are distributed in binary form.
|
||||
When using such an application, you don't need to install OpenSSL
|
||||
yourself; the application will include the required parts (e.g. DLLs).
|
||||
|
||||
If you want to install OpenSSL on a Windows system and you don't have
|
||||
If you want to build OpenSSL on a Windows system and you don't have
|
||||
a C compiler, read the "Mingw32" section of INSTALL.W32 for information
|
||||
on how to obtain and install the free GNU C compiler.
|
||||
|
||||
@@ -646,26 +649,26 @@ built OpenSSL with /MD your application must use /MD and cannot use /MDd.
|
||||
* How do I read or write a DER encoded buffer using the ASN1 functions?
|
||||
|
||||
You have two options. You can either use a memory BIO in conjunction
|
||||
with the i2d_XXX_bio() or d2i_XXX_bio() functions or you can use the
|
||||
i2d_XXX(), d2i_XXX() functions directly. Since these are often the
|
||||
with the i2d_*_bio() or d2i_*_bio() functions or you can use the
|
||||
i2d_*(), d2i_*() functions directly. Since these are often the
|
||||
cause of grief here are some code fragments using PKCS7 as an example:
|
||||
|
||||
unsigned char *buf, *p;
|
||||
int len;
|
||||
unsigned char *buf, *p;
|
||||
int len;
|
||||
|
||||
len = i2d_PKCS7(p7, NULL);
|
||||
buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */
|
||||
p = buf;
|
||||
i2d_PKCS7(p7, &p);
|
||||
len = i2d_PKCS7(p7, NULL);
|
||||
buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */
|
||||
p = buf;
|
||||
i2d_PKCS7(p7, &p);
|
||||
|
||||
At this point buf contains the len bytes of the DER encoding of
|
||||
p7.
|
||||
|
||||
The opposite assumes we already have len bytes in buf:
|
||||
|
||||
unsigned char *p;
|
||||
p = buf;
|
||||
p7 = d2i_PKCS7(NULL, &p, len);
|
||||
unsigned char *p;
|
||||
p = buf;
|
||||
p7 = d2i_PKCS7(NULL, &p, len);
|
||||
|
||||
At this point p7 contains a valid PKCS7 structure of NULL if an error
|
||||
occurred. If an error occurred ERR_print_errors(bio) should give more
|
||||
|
||||
@@ -548,8 +548,10 @@ link_o.irix:
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
MINUSWL=""; \
|
||||
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
|
||||
ALLSYMSFLAGS="$${MINUSWL}-all"; \
|
||||
NOALLSYMSFLAGS="$${MINUSWL}-notall"; \
|
||||
SHAREDFLAGS="-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
@@ -562,8 +564,10 @@ link_a.irix:
|
||||
SHLIB=lib$(LIBNAME).so; \
|
||||
SHLIB_SUFFIX=; \
|
||||
LIBDEPS="$(LIBDEPS) -lc"; \
|
||||
ALLSYMSFLAGS='-all'; \
|
||||
NOALLSYMSFLAGS=''; \
|
||||
MINUSWL=""; \
|
||||
($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
|
||||
ALLSYMSFLAGS="$${MINUSWL}-all"; \
|
||||
NOALLSYMSFLAGS="$${MINUSWL}-notall"; \
|
||||
SHAREDFLAGS="-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX -Wl,-rpath,$(LIBRPATH)"; \
|
||||
SHAREDCMD='$(CC)'; \
|
||||
fi; \
|
||||
|
||||
83
TABLE
83
TABLE
@@ -1702,7 +1702,7 @@ $arflags =
|
||||
|
||||
*** debug-levitte-linux-elf
|
||||
$cc = gcc
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -1727,7 +1727,7 @@ $arflags =
|
||||
|
||||
*** debug-levitte-linux-elf-extreme
|
||||
$cc = gcc
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -1752,7 +1752,7 @@ $arflags =
|
||||
|
||||
*** debug-levitte-linux-noasm
|
||||
$cc = gcc
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -1777,7 +1777,7 @@ $arflags =
|
||||
|
||||
*** debug-levitte-linux-noasm-extreme
|
||||
$cc = gcc
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe
|
||||
$cflags = -DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2350,6 +2350,31 @@ $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** hpux-ia64-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -DB_ENDIAN -D_ILP32
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/ia64.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fpic
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** hpux-m68k-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DB_ENDIAN -DBN_DIV2W -O3
|
||||
@@ -2500,6 +2525,31 @@ $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** hpux-parisc2-gcc
|
||||
$cc = gcc
|
||||
$cflags = -march=2.0 -O3 -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -Wl,+s -ldld
|
||||
$bn_ops = SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1
|
||||
$bn_obj = asm/pa-risc2.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** hpux10-brokencc
|
||||
$cc = cc
|
||||
$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
|
||||
@@ -2625,6 +2675,31 @@ $shared_extension = .sl.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** hpux64-ia64-gcc
|
||||
$cc = gcc
|
||||
$cflags = -mlp64 -O3 -DB_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/ia64.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= hpux-shared
|
||||
$shared_cflag = -fpic
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** hpux64-parisc-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DB_ENDIAN -DMD32_XARRAY
|
||||
|
||||
@@ -333,7 +333,15 @@ bad:
|
||||
num=tmplen;
|
||||
}
|
||||
|
||||
if (length == 0) length=(unsigned int)num;
|
||||
if (offset >= num)
|
||||
{
|
||||
BIO_printf(bio_err, "Error: offset too large\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
num -= offset;
|
||||
|
||||
if ((length == 0) || ((long)length > num)) length=(unsigned int)num;
|
||||
if(derout) {
|
||||
if(BIO_write(derout, str + offset, length) != (int)length) {
|
||||
BIO_printf(bio_err, "Error writing output\n");
|
||||
|
||||
@@ -701,7 +701,7 @@ end:
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
int ecparam_print_var(BIO *out, BIGNUM *in, const char *var,
|
||||
static int ecparam_print_var(BIO *out, BIGNUM *in, const char *var,
|
||||
int len, unsigned char *buffer)
|
||||
{
|
||||
BIO_printf(out, "static unsigned char %s_%d[] = {", var, len);
|
||||
|
||||
@@ -102,6 +102,9 @@ int MAIN(int argc, char **argv)
|
||||
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
|
||||
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||
|
||||
if (!load_config(bio_err, NULL))
|
||||
goto end;
|
||||
|
||||
infile=NULL;
|
||||
outfile=NULL;
|
||||
informat=FORMAT_PEM;
|
||||
|
||||
@@ -1322,7 +1322,7 @@ start: for (;;)
|
||||
/* If OBJ not recognised ignore it */
|
||||
if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
|
||||
if (BIO_snprintf(buf,sizeof buf,"%s_default",v->name)
|
||||
>= sizeof buf)
|
||||
>= (int)sizeof(buf))
|
||||
{
|
||||
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
|
||||
return 0;
|
||||
@@ -1387,7 +1387,7 @@ start2: for (;;)
|
||||
goto start2;
|
||||
|
||||
if (BIO_snprintf(buf,sizeof buf,"%s_default",type)
|
||||
>= sizeof buf)
|
||||
>= (int)sizeof(buf))
|
||||
{
|
||||
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
|
||||
return 0;
|
||||
|
||||
19
config
19
config
@@ -683,15 +683,8 @@ EOF
|
||||
RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
|
||||
*-siemens-sysv4) OUT="SINIX" ;;
|
||||
*-hpux1*)
|
||||
if [ $CC = "gcc" ];
|
||||
then
|
||||
if [ $GCC_BITS = "64" ]; then
|
||||
OUT="hpux64-parisc-gcc"
|
||||
else
|
||||
OUT="hpux-parisc-gcc"
|
||||
fi
|
||||
else
|
||||
OUT="hpux-parisc-$CC"
|
||||
if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then
|
||||
OUT="hpux64-parisc2-gcc"
|
||||
fi
|
||||
KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
|
||||
KERNEL_BITS=${KERNEL_BITS:-32}
|
||||
@@ -708,9 +701,7 @@ EOF
|
||||
fi
|
||||
OUT="hpux64-ia64-cc"
|
||||
elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU
|
||||
if [ "$CC" = "cc" ]; then
|
||||
OUT="hpux-parisc2-cc" # can't we have hpux-parisc2-gcc?
|
||||
fi
|
||||
OUT=${OUT:-"hpux-parisc2-${CC}"}
|
||||
if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
|
||||
echo "WARNING! If you wish to build 64-bit library then you have to"
|
||||
echo " invoke './Configure hpux64-parisc2-cc' *manually*."
|
||||
@@ -720,9 +711,9 @@ EOF
|
||||
fi
|
||||
fi
|
||||
elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU
|
||||
:
|
||||
OUT="hpux-parisc-${CC}
|
||||
elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU
|
||||
:
|
||||
OUT="hpux-parisc-${CC}
|
||||
else # Motorola(?) CPU
|
||||
OUT="hpux-$CC"
|
||||
fi
|
||||
|
||||
@@ -97,6 +97,15 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
|
||||
const int nbits,const AES_KEY *key,
|
||||
unsigned char *ivec,const int enc);
|
||||
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num);
|
||||
|
||||
@@ -155,3 +155,96 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
*num=n;
|
||||
}
|
||||
|
||||
/* This expects a single block of size nbits for both in and out. Note that
|
||||
it corrupts any extra bits in the last byte of out */
|
||||
/* Untested, once it is working, it will be optimised */
|
||||
void AES_cfbr_encrypt_block(const unsigned char *in,unsigned char *out,
|
||||
const int nbits,const AES_KEY *key,
|
||||
unsigned char *ivec,const int enc)
|
||||
{
|
||||
int n;
|
||||
unsigned char ovec[AES_BLOCK_SIZE*2];
|
||||
|
||||
assert(in && out && key && ivec);
|
||||
if(enc)
|
||||
{
|
||||
/* construct the new IV */
|
||||
AES_encrypt(ivec,ovec,key);
|
||||
/* encrypt the input */
|
||||
for(n=0 ; n < (nbits+7)/8 ; ++n)
|
||||
out[n]=in[n]^ovec[n];
|
||||
/* fill in the first half of the new IV with the current IV */
|
||||
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||
/* and put the ciphertext in the second half */
|
||||
memcpy(ovec+AES_BLOCK_SIZE,out,(nbits+7)/8);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(nbits%8 != 0)
|
||||
for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
|
||||
{
|
||||
ovec[n]<<=nbits%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-nbits%8);
|
||||
}
|
||||
/* finally, move it back into place */
|
||||
memcpy(ivec,ovec,AES_BLOCK_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* construct the new IV in the first half of ovec */
|
||||
AES_encrypt(ivec,ovec,key);
|
||||
/* decrypt the input */
|
||||
for(n=0 ; n < (nbits+7)/8 ; ++n)
|
||||
out[n]=in[n]^ovec[n];
|
||||
/* fill in the first half of the new IV with the current IV */
|
||||
memcpy(ovec,ivec,AES_BLOCK_SIZE);
|
||||
/* append the ciphertext */
|
||||
memcpy(ovec+AES_BLOCK_SIZE,in,(nbits+7)/8);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+nbits/8,AES_BLOCK_SIZE+(nbits%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(nbits%8 != 0)
|
||||
for(n=0 ; n < AES_BLOCK_SIZE ; ++n)
|
||||
{
|
||||
ovec[n]<<=nbits%8;
|
||||
ovec[n]|=ovec[n+1]>>(8-nbits%8);
|
||||
}
|
||||
/* finally, move it back into place */
|
||||
memcpy(ivec,ovec,AES_BLOCK_SIZE);
|
||||
}
|
||||
/* it is not necessary to cleanse ovec, since the IV is not secret */
|
||||
}
|
||||
|
||||
/* N.B. This expects the input to be packed, MS bit first */
|
||||
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc)
|
||||
{
|
||||
unsigned int n;
|
||||
unsigned char c[1],d[1];
|
||||
|
||||
assert(in && out && key && ivec && num);
|
||||
assert(*num == 0);
|
||||
|
||||
memset(out,0,(length+7)/8);
|
||||
for(n=0 ; n < length ; ++n)
|
||||
{
|
||||
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
|
||||
AES_cfbr_encrypt_block(c,d,1,key,ivec,enc);
|
||||
out[n/8]=(out[n/8]&~(1 << (7-n%8)))|((d[0]&0x80) >> (n%8));
|
||||
}
|
||||
}
|
||||
|
||||
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc)
|
||||
{
|
||||
unsigned int n;
|
||||
|
||||
assert(in && out && key && ivec && num);
|
||||
assert(*num == 0);
|
||||
|
||||
for(n=0 ; n < length ; ++n)
|
||||
AES_cfbr_encrypt_block(&in[n],&out[n],8,key,ivec,enc);
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
||||
return(NULL);
|
||||
|
||||
p=(char *)s->data;
|
||||
if ((p == NULL) || (s->length < len))
|
||||
if ((p == NULL) || ((size_t)s->length < len))
|
||||
{
|
||||
p=OPENSSL_malloc(len);
|
||||
if (p == NULL) return(NULL);
|
||||
|
||||
@@ -200,7 +200,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
||||
return(NULL);
|
||||
|
||||
p=(char *)s->data;
|
||||
if ((p == NULL) || (s->length < len))
|
||||
if ((p == NULL) || ((size_t)s->length < len))
|
||||
{
|
||||
p=OPENSSL_malloc(len);
|
||||
if (p == NULL) return(NULL);
|
||||
|
||||
@@ -87,9 +87,14 @@ static int oid_module_init(CONF_IMODULE *md, const CONF *cnf)
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void oid_module_finish(CONF_IMODULE *md)
|
||||
{
|
||||
OBJ_cleanup();
|
||||
}
|
||||
|
||||
void ASN1_add_oid_module(void)
|
||||
{
|
||||
CONF_module_add("oid_section", oid_module_init, 0);
|
||||
CONF_module_add("oid_section", oid_module_init, oid_module_finish);
|
||||
}
|
||||
|
||||
@@ -122,6 +122,13 @@ asm/ia64-cpp.o: asm/ia64.S
|
||||
|
||||
asm/x86_64-gcc.o: asm/x86_64-gcc.c
|
||||
|
||||
# GNU assembler fails to compile PA-RISC2 modules, insist on calling
|
||||
# vendor assembler...
|
||||
asm/pa-risc2W.o: asm/pa-risc2W.s
|
||||
/usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s
|
||||
asm/pa-risc2.o: asm/pa-risc2.s
|
||||
/usr/ccs/bin/as -o asm/pa-risc2.o asm/pa-risc2.s
|
||||
|
||||
files:
|
||||
$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
|
||||
|
||||
@@ -243,8 +250,13 @@ bn_gf2m.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_gf2m.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_gf2m.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_gf2m.o: ../cryptlib.h bn_gf2m.c bn_lcl.h
|
||||
bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
|
||||
bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h
|
||||
bn_kron.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_kron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_kron.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
bn_kron.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
bn_kron.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
bn_kron.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
bn_kron.o: ../cryptlib.h bn_kron.c bn_lcl.h
|
||||
bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
bn_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
bn_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
|
||||
@@ -142,7 +142,7 @@ void bn_sqr_words(BN_ULONG *r, BN_ULONG *a, int n)
|
||||
BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
|
||||
{ BN_ULONG ret,waste;
|
||||
|
||||
asm ("divq %3"
|
||||
asm ("divq %4"
|
||||
: "=a"(ret),"=d"(waste)
|
||||
: "a"(l),"d"(h),"g"(d)
|
||||
: "cc");
|
||||
|
||||
@@ -372,7 +372,17 @@ int BN_GENCB_call(BN_GENCB *cb, int a, int b);
|
||||
#define BN_is_odd(a) (((a)->top > 0) && ((a)->d[0] & 1))
|
||||
|
||||
#define BN_one(a) (BN_set_word((a),1))
|
||||
#define BN_zero_ex(a) \
|
||||
do { \
|
||||
BIGNUM *_tmp_bn = (a); \
|
||||
_tmp_bn->top = 0; \
|
||||
_tmp_bn->neg = 0; \
|
||||
} while(0)
|
||||
#ifdef OPENSSL_NO_DEPRECATED
|
||||
#define BN_zero(a) BN_zero_ex(a)
|
||||
#else
|
||||
#define BN_zero(a) (BN_set_word((a),0))
|
||||
#endif
|
||||
/* BN_set_sign(BIGNUM *, int) sets the sign of a BIGNUM
|
||||
* (0 for a non-negative value, 1 for negative) */
|
||||
#define BN_set_sign(a,b) ((a)->neg = (b))
|
||||
|
||||
@@ -123,7 +123,8 @@ void BN_CTX_free(BN_CTX *ctx)
|
||||
|
||||
for (i=0; i < BN_CTX_NUM; i++) {
|
||||
bn_check_top(&(ctx->bn[i]));
|
||||
BN_clear_free(&(ctx->bn[i]));
|
||||
if (ctx->bn[i].d)
|
||||
BN_clear_free(&(ctx->bn[i]));
|
||||
}
|
||||
if (ctx->flags & BN_FLG_MALLOCED)
|
||||
OPENSSL_free(ctx);
|
||||
@@ -139,6 +140,7 @@ void BN_CTX_start(BN_CTX *ctx)
|
||||
|
||||
BIGNUM *BN_CTX_get(BN_CTX *ctx)
|
||||
{
|
||||
BIGNUM *ret;
|
||||
/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,
|
||||
* make sure that if BN_CTX_get fails once it will return NULL again
|
||||
* until BN_CTX_end is called. (This is so that callers have to check
|
||||
@@ -154,8 +156,10 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
bn_check_top(&(ctx->bn[ctx->tos]));
|
||||
return (&(ctx->bn[ctx->tos++]));
|
||||
ret = ctx->bn + (ctx->tos++);
|
||||
/* always return a 'zeroed' bignum */
|
||||
BN_zero(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void BN_CTX_end(BN_CTX *ctx)
|
||||
@@ -170,19 +174,11 @@ void BN_CTX_end(BN_CTX *ctx)
|
||||
|
||||
ctx->too_many = 0;
|
||||
ctx->depth--;
|
||||
/* It appears some "scrapbook" uses of BN_CTX result in BIGNUMs being
|
||||
* left in an inconsistent state when they are released (eg. BN_div).
|
||||
* These can trip us up when they get reused, so the safest fix is to
|
||||
* make sure the BIGNUMs are made sane when the context usage is
|
||||
* releasing them. */
|
||||
if (ctx->depth < BN_CTX_NUM_POS)
|
||||
#if 0
|
||||
#ifndef BN_DEBUG
|
||||
ctx->tos = ctx->pos[ctx->depth];
|
||||
#else
|
||||
{
|
||||
while(ctx->tos > ctx->pos[ctx->depth])
|
||||
/* This ensures the BIGNUM is sane(r) for reuse. */
|
||||
ctx->bn[--(ctx->tos)].top = 0;
|
||||
}
|
||||
bn_check_top(&ctx->bn[--(ctx->tos)]);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -214,7 +214,6 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
|
||||
res=BN_CTX_get(ctx);
|
||||
else res=dv;
|
||||
if (sdiv == NULL || res == NULL) goto err;
|
||||
tmp->neg=0;
|
||||
|
||||
/* First we normalise the numbers */
|
||||
norm_shift=BN_BITS2-((BN_num_bits(divisor))%BN_BITS2);
|
||||
@@ -232,10 +231,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
|
||||
wnum.neg = 0;
|
||||
wnum.d = &(snum->d[loop]);
|
||||
wnum.top = div_n;
|
||||
#ifdef BN_DEBUG_RAND
|
||||
/* only needed when BN_ucmp messes up the values between top and max */
|
||||
wnum.dmax = snum->dmax - loop; /* so we don't step out of bounds */
|
||||
#endif
|
||||
|
||||
/* Get the top 2 words of sdiv */
|
||||
/* div_n=sdiv->top; */
|
||||
@@ -256,12 +253,10 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
|
||||
|
||||
if (BN_ucmp(&wnum,sdiv) >= 0)
|
||||
{
|
||||
#ifdef BN_DEBUG_RAND
|
||||
/* If BN_DEBUG_RAND is defined BN_ucmp changes (via
|
||||
* bn_pollute) the const bignum arguments =>
|
||||
* clean the values between top and max again */
|
||||
bn_clear_top2max(&wnum);
|
||||
#endif
|
||||
bn_sub_words(wnum.d, wnum.d, sdiv->d, div_n);
|
||||
*resp=1;
|
||||
}
|
||||
@@ -384,13 +379,13 @@ X) -> 0x%08X\n",
|
||||
/* store part of the result */
|
||||
*resp = q;
|
||||
}
|
||||
bn_correct_top(snum);
|
||||
if (rm != NULL)
|
||||
{
|
||||
/* Keep a copy of the neg flag in num because if rm==num
|
||||
* BN_rshift() will overwrite it.
|
||||
*/
|
||||
int neg = num->neg;
|
||||
bn_correct_top(snum);
|
||||
BN_rshift(rm,snum,norm_shift);
|
||||
if (!BN_is_zero(rm))
|
||||
rm->neg = neg;
|
||||
|
||||
@@ -266,7 +266,8 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
if (!BN_nnmod(&(val[0]),a,m,ctx)) goto err; /* 1 */
|
||||
if (BN_is_zero(&(val[0])))
|
||||
{
|
||||
ret = BN_zero(r);
|
||||
BN_zero(r);
|
||||
ret = 1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -409,7 +410,8 @@ int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
||||
aa=a;
|
||||
if (BN_is_zero(aa))
|
||||
{
|
||||
ret = BN_zero(rr);
|
||||
BN_zero(rr);
|
||||
ret = 1;
|
||||
goto err;
|
||||
}
|
||||
if (!BN_to_montgomery(&(val[0]),aa,mont,ctx)) goto err; /* 1 */
|
||||
@@ -541,7 +543,8 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
|
||||
}
|
||||
if (a == 0)
|
||||
{
|
||||
ret = BN_zero(rr);
|
||||
BN_zero(rr);
|
||||
ret = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -666,7 +669,8 @@ int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
if (!BN_nnmod(&(val[0]),a,m,ctx)) goto err; /* 1 */
|
||||
if (BN_is_zero(&(val[0])))
|
||||
{
|
||||
ret = BN_zero(r);
|
||||
BN_zero(r);
|
||||
ret = 1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,8 @@ int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1,
|
||||
a_mod_m = a1;
|
||||
if (BN_is_zero(a_mod_m))
|
||||
{
|
||||
ret = BN_zero(rr);
|
||||
BN_zero(rr);
|
||||
ret = 1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -214,7 +215,8 @@ int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1,
|
||||
a_mod_m = a2;
|
||||
if (BN_is_zero(a_mod_m))
|
||||
{
|
||||
ret = BN_zero(rr);
|
||||
BN_zero(rr);
|
||||
ret = 1;
|
||||
goto err;
|
||||
}
|
||||
if (!BN_to_montgomery(&(val2[0]),a_mod_m,mont,ctx)) goto err;
|
||||
|
||||
@@ -228,7 +228,7 @@ static void bn_GF2m_mul_1x1(BN_ULONG *r1, BN_ULONG *r0, const BN_ULONG a, const
|
||||
BN_ULONG tab[16], top3b = a >> 61;
|
||||
register BN_ULONG a1, a2, a4, a8;
|
||||
|
||||
a1 = a & (0x1FFFFFFFFFFFFFFF); a2 = a1 << 1; a4 = a2 << 1; a8 = a4 << 1;
|
||||
a1 = a & (0x1FFFFFFFFFFFFFFFULL); a2 = a1 << 1; a4 = a2 << 1; a8 = a4 << 1;
|
||||
|
||||
tab[ 0] = 0; tab[ 1] = a1; tab[ 2] = a2; tab[ 3] = a1^a2;
|
||||
tab[ 4] = a4; tab[ 5] = a1^a4; tab[ 6] = a2^a4; tab[ 7] = a1^a2^a4;
|
||||
@@ -329,8 +329,11 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[])
|
||||
bn_check_top(a);
|
||||
|
||||
if (!p[0])
|
||||
{
|
||||
/* reduction mod 1 => return 0 */
|
||||
return BN_zero(r);
|
||||
BN_zero(r);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Since the algorithm does reduction in the r value, if a != r, copy
|
||||
* the contents of a into r so we can do reduction in r.
|
||||
@@ -590,7 +593,6 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
|
||||
if (v == NULL) goto err;
|
||||
|
||||
if (!BN_one(b)) goto err;
|
||||
if (!BN_zero(c)) goto err;
|
||||
if (!BN_GF2m_mod(u, a, p)) goto err;
|
||||
if (!BN_copy(v, p)) goto err;
|
||||
|
||||
@@ -709,7 +711,6 @@ int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *y, const BIGNUM *x, const BIGNUM *p
|
||||
if (!BN_GF2m_mod(u, y, p)) goto err;
|
||||
if (!BN_GF2m_mod(a, x, p)) goto err;
|
||||
if (!BN_copy(b, p)) goto err;
|
||||
if (!BN_zero(v)) goto err;
|
||||
|
||||
while (!BN_is_odd(a))
|
||||
{
|
||||
@@ -865,13 +866,15 @@ int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_
|
||||
bn_check_top(a);
|
||||
|
||||
if (!p[0])
|
||||
{
|
||||
/* reduction mod 1 => return 0 */
|
||||
return BN_zero(r);
|
||||
BN_zero(r);
|
||||
return 1;
|
||||
}
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
if ((u = BN_CTX_get(ctx)) == NULL) goto err;
|
||||
|
||||
if (!BN_zero(u)) goto err;
|
||||
if (!BN_set_bit(u, p[0] - 1)) goto err;
|
||||
ret = BN_GF2m_mod_exp_arr(r, a, u, p, ctx);
|
||||
bn_check_top(r);
|
||||
@@ -921,8 +924,11 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p
|
||||
bn_check_top(a_);
|
||||
|
||||
if (!p[0])
|
||||
{
|
||||
/* reduction mod 1 => return 0 */
|
||||
return BN_zero(r);
|
||||
BN_zero(r);
|
||||
return 1;
|
||||
}
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
a = BN_CTX_get(ctx);
|
||||
@@ -934,7 +940,8 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p
|
||||
|
||||
if (BN_is_zero(a))
|
||||
{
|
||||
ret = BN_zero(r);
|
||||
BN_zero(r);
|
||||
ret = 1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -960,7 +967,7 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p
|
||||
{
|
||||
if (!BN_rand(rho, p[0], 0, 0)) goto err;
|
||||
if (!BN_GF2m_mod_arr(rho, rho, p)) goto err;
|
||||
if (!BN_zero(z)) goto err;
|
||||
BN_zero(z);
|
||||
if (!BN_copy(w, rho)) goto err;
|
||||
for (j = 1; j <= p[0] - 1; j++)
|
||||
{
|
||||
|
||||
@@ -240,7 +240,7 @@ extern "C" {
|
||||
#define Lw(t) (((BN_ULONG)(t))&BN_MASK2)
|
||||
#define Hw(t) (((BN_ULONG)((t)>>BN_BITS2))&BN_MASK2)
|
||||
|
||||
|
||||
#ifdef BN_DEBUG_RAND
|
||||
#define bn_clear_top2max(a) \
|
||||
{ \
|
||||
int ind = (a)->dmax - (a)->top; \
|
||||
@@ -248,6 +248,9 @@ extern "C" {
|
||||
for (; ind != 0; ind--) \
|
||||
*(++ftl) = 0x0; \
|
||||
}
|
||||
#else
|
||||
#define bn_clear_top2max(a)
|
||||
#endif
|
||||
|
||||
#ifdef BN_LLONG
|
||||
#define mul_add(r,a,w,c) { \
|
||||
|
||||
@@ -149,7 +149,7 @@ int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_
|
||||
* and less than m */
|
||||
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m)
|
||||
{
|
||||
if (!BN_add(r, a, b)) return 0;
|
||||
if (!BN_uadd(r, a, b)) return 0;
|
||||
if (BN_ucmp(r, m) >= 0)
|
||||
return BN_usub(r, r, m);
|
||||
return 1;
|
||||
|
||||
@@ -284,7 +284,7 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
|
||||
BN_ULONG buf[2];
|
||||
|
||||
mont->ri=(BN_num_bits(mod)+(BN_BITS2-1))/BN_BITS2*BN_BITS2;
|
||||
if (!(BN_zero(R))) goto err;
|
||||
BN_zero(R);
|
||||
if (!(BN_set_bit(R,BN_BITS2))) goto err; /* R */
|
||||
|
||||
buf[0]=mod->d[0]; /* tmod = N mod word size */
|
||||
@@ -314,7 +314,7 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
|
||||
#else /* !MONT_WORD */
|
||||
{ /* bignum version */
|
||||
mont->ri=BN_num_bits(&mont->N);
|
||||
if (!BN_zero(R)) goto err;
|
||||
BN_zero(R);
|
||||
if (!BN_set_bit(R,mont->ri)) goto err; /* R = 2^ri */
|
||||
/* Ri = R^-1 mod N*/
|
||||
if ((BN_mod_inverse(&Ri,R,&mont->N,ctx)) == NULL)
|
||||
@@ -328,7 +328,7 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
|
||||
#endif
|
||||
|
||||
/* setup RR for conversions */
|
||||
if (!BN_zero(&(mont->RR))) goto err;
|
||||
BN_zero(&(mont->RR));
|
||||
if (!BN_set_bit(&(mont->RR),mont->ri*2)) goto err;
|
||||
if (!BN_mod(&(mont->RR),&(mont->RR),&(mont->N),ctx)) goto err;
|
||||
|
||||
|
||||
@@ -964,7 +964,7 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
|
||||
|
||||
if ((al == 0) || (bl == 0))
|
||||
{
|
||||
if (!BN_zero(r)) goto err;
|
||||
BN_zero(r);
|
||||
return(1);
|
||||
}
|
||||
top=al+bl;
|
||||
@@ -1094,8 +1094,8 @@ end:
|
||||
if (r != rr) BN_copy(r,rr);
|
||||
ret=1;
|
||||
err:
|
||||
BN_CTX_end(ctx);
|
||||
bn_check_top(r);
|
||||
BN_CTX_end(ctx);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,19 +63,25 @@
|
||||
#define BN_NIST_521_TOP (521+BN_BITS2-1)/BN_BITS2
|
||||
|
||||
#if BN_BITS2 == 64
|
||||
const static BN_ULONG _nist_p_192[] = {0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFE,
|
||||
0xFFFFFFFFFFFFFFFF};
|
||||
const static BN_ULONG _nist_p_224[] = {0x0000000000000001,0xFFFFFFFF00000000,
|
||||
0xFFFFFFFFFFFFFFFF,0x00000000FFFFFFFF};
|
||||
const static BN_ULONG _nist_p_256[] = {0xFFFFFFFFFFFFFFFF,0x00000000FFFFFFFF,
|
||||
0x0000000000000000,0xFFFFFFFF00000001};
|
||||
const static BN_ULONG _nist_p_384[] = {0x00000000FFFFFFFF,0xFFFFFFFF00000000,
|
||||
0xFFFFFFFFFFFFFFFE,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,
|
||||
0xFFFFFFFFFFFFFFFF};
|
||||
const static BN_ULONG _nist_p_521[] = {0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,
|
||||
0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,
|
||||
0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,
|
||||
0x00000000000001FF};
|
||||
const static BN_ULONG _nist_p_192[] =
|
||||
{0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFEULL,
|
||||
0xFFFFFFFFFFFFFFFFULL};
|
||||
const static BN_ULONG _nist_p_224[] =
|
||||
{0x0000000000000001ULL,0xFFFFFFFF00000000ULL,
|
||||
0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL};
|
||||
const static BN_ULONG _nist_p_256[] =
|
||||
{0xFFFFFFFFFFFFFFFFULL,0x00000000FFFFFFFFULL,
|
||||
0x0000000000000000ULL,0xFFFFFFFF00000001ULL};
|
||||
const static BN_ULONG _nist_p_384[] =
|
||||
{0x00000000FFFFFFFFULL,0xFFFFFFFF00000000ULL,
|
||||
0xFFFFFFFFFFFFFFFEULL,0xFFFFFFFFFFFFFFFFULL,
|
||||
0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL};
|
||||
const static BN_ULONG _nist_p_521[] =
|
||||
{0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
|
||||
0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
|
||||
0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
|
||||
0xFFFFFFFFFFFFFFFFULL,0xFFFFFFFFFFFFFFFFULL,
|
||||
0x00000000000001FFULL};
|
||||
#elif BN_BITS2 == 32
|
||||
const static BN_ULONG _nist_p_192[] = {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFE,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF};
|
||||
@@ -313,7 +319,10 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
|
||||
top = BN_ucmp(field, a);
|
||||
if (top == 0)
|
||||
return BN_zero(r);
|
||||
{
|
||||
BN_zero(r);
|
||||
return 1;
|
||||
}
|
||||
else if (top > 0)
|
||||
return (r == a)? 1 : (BN_copy(r ,a) != NULL);
|
||||
|
||||
@@ -353,12 +362,7 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
--carry;
|
||||
}
|
||||
r->top = BN_NIST_192_TOP;
|
||||
|
||||
#if 1
|
||||
bn_clear_top2max(r);
|
||||
#endif
|
||||
bn_correct_top(r);
|
||||
|
||||
if (BN_ucmp(r, field) >= 0)
|
||||
{
|
||||
bn_sub_words(r_d, r_d, _nist_p_192, BN_NIST_192_TOP);
|
||||
@@ -393,7 +397,10 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
|
||||
tmp_int = BN_ucmp(field, a);
|
||||
if (tmp_int == 0)
|
||||
return BN_zero(r);
|
||||
{
|
||||
BN_zero(r);
|
||||
return 1;
|
||||
}
|
||||
else if (tmp_int > 0)
|
||||
return (r == a)? 1 : (BN_copy(r ,a) != NULL);
|
||||
|
||||
@@ -447,11 +454,7 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
}
|
||||
|
||||
r->top = BN_NIST_224_TOP;
|
||||
#if 1
|
||||
bn_clear_top2max(r);
|
||||
#endif
|
||||
bn_correct_top(r);
|
||||
|
||||
if (BN_ucmp(r, field) >= 0)
|
||||
{
|
||||
bn_sub_words(r_d, r_d, _nist_p_224, BN_NIST_224_TOP);
|
||||
@@ -517,7 +520,10 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
|
||||
tmp_int = BN_ucmp(field, a);
|
||||
if (tmp_int == 0)
|
||||
return BN_zero(r);
|
||||
{
|
||||
BN_zero(r);
|
||||
return 1;
|
||||
}
|
||||
else if (tmp_int > 0)
|
||||
return (r == a)? 1 : (BN_copy(r ,a) != NULL);
|
||||
|
||||
@@ -606,11 +612,7 @@ int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
}
|
||||
|
||||
r->top = BN_NIST_256_TOP;
|
||||
#if 1
|
||||
bn_clear_top2max(r);
|
||||
#endif
|
||||
bn_correct_top(r);
|
||||
|
||||
if (BN_ucmp(r, field) >= 0)
|
||||
{
|
||||
bn_sub_words(r_d, r_d, _nist_p_256, BN_NIST_256_TOP);
|
||||
@@ -679,7 +681,10 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
|
||||
tmp_int = BN_ucmp(field, a);
|
||||
if (tmp_int == 0)
|
||||
return BN_zero(r);
|
||||
{
|
||||
BN_zero(r);
|
||||
return 1;
|
||||
}
|
||||
else if (tmp_int > 0)
|
||||
return (r == a)? 1 : (BN_copy(r ,a) != NULL);
|
||||
|
||||
@@ -775,11 +780,7 @@ int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
}
|
||||
|
||||
r->top = BN_NIST_384_TOP;
|
||||
#if 1
|
||||
bn_clear_top2max(r);
|
||||
#endif
|
||||
bn_correct_top(r);
|
||||
|
||||
if (BN_ucmp(r, field) >= 0)
|
||||
{
|
||||
bn_sub_words(r_d, r_d, _nist_p_384, BN_NIST_384_TOP);
|
||||
|
||||
@@ -244,9 +244,7 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
|
||||
/* BN_is_bit_set(range, n - 1) always holds */
|
||||
|
||||
if (n == 1)
|
||||
{
|
||||
if (!BN_zero(r)) return 0;
|
||||
}
|
||||
BN_zero(r);
|
||||
else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3))
|
||||
{
|
||||
/* range = 100..._2,
|
||||
|
||||
@@ -94,7 +94,7 @@ void BN_RECP_CTX_free(BN_RECP_CTX *recp)
|
||||
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
|
||||
{
|
||||
if (!BN_copy(&(recp->N),d)) return 0;
|
||||
if (!BN_zero(&(recp->Nr))) return 0;
|
||||
BN_zero(&(recp->Nr));
|
||||
recp->num_bits=BN_num_bits(d);
|
||||
recp->shift=0;
|
||||
return(1);
|
||||
@@ -148,7 +148,7 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
|
||||
|
||||
if (BN_ucmp(m,&(recp->N)) < 0)
|
||||
{
|
||||
if (!BN_zero(d)) return 0;
|
||||
BN_zero(d);
|
||||
if (!BN_copy(r,m)) return 0;
|
||||
BN_CTX_end(ctx);
|
||||
return(1);
|
||||
@@ -221,7 +221,6 @@ int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx)
|
||||
|
||||
BN_init(&t);
|
||||
|
||||
if (!BN_zero(&t)) goto err;
|
||||
if (!BN_set_bit(&t,len)) goto err;
|
||||
|
||||
if (!BN_div(r,NULL,&t,m,ctx)) goto err;
|
||||
|
||||
@@ -77,15 +77,15 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
|
||||
if (al <= 0)
|
||||
{
|
||||
r->top=0;
|
||||
return(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
rr=(a != r) ? r : BN_CTX_get(ctx);
|
||||
tmp=BN_CTX_get(ctx);
|
||||
if (tmp == NULL) goto err;
|
||||
if (!rr || !tmp) goto err;
|
||||
|
||||
max=(al+al);
|
||||
max = 2 * al; /* Non-zero (from above) */
|
||||
if (bn_wexpand(rr,max+1) == NULL) goto err;
|
||||
|
||||
if (al == 4)
|
||||
@@ -138,14 +138,19 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
|
||||
#endif
|
||||
}
|
||||
|
||||
rr->top=max;
|
||||
rr->neg=0;
|
||||
if ((max > 0) && (rr->d[max-1] == 0)) rr->top--;
|
||||
/* If the most-significant half of the top word of 'a' is zero, then
|
||||
* the square of 'a' will max-1 words. */
|
||||
if(a->d[al - 1] == (a->d[al - 1] & BN_MASK2l))
|
||||
rr->top = max - 1;
|
||||
else
|
||||
rr->top = max;
|
||||
if (rr != r) BN_copy(r,rr);
|
||||
ret = 1;
|
||||
err:
|
||||
if(rr) bn_check_top(rr);
|
||||
if(tmp) bn_check_top(tmp);
|
||||
BN_CTX_end(ctx);
|
||||
bn_check_top(r);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
|
||||
if (BN_is_zero(t))
|
||||
{
|
||||
/* special case: a == 0 (mod p) */
|
||||
if (!BN_zero(ret)) goto end;
|
||||
BN_zero(ret);
|
||||
err = 0;
|
||||
goto end;
|
||||
}
|
||||
@@ -301,7 +301,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
|
||||
if (BN_is_zero(x))
|
||||
{
|
||||
/* special case: a == 0 (mod p) */
|
||||
if (!BN_zero(ret)) goto end;
|
||||
BN_zero(ret);
|
||||
err = 0;
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -196,13 +196,13 @@ ecb3_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ecb3_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ecb3_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
ecb3_enc.o: des_locl.h ecb3_enc.c
|
||||
ecb_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
ecb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
ecb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
ecb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
ecb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h ecb_enc.c
|
||||
ecb_enc.o: spr.h
|
||||
ecb_enc.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
ecb_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
ecb_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
|
||||
ecb_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
ecb_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
|
||||
ecb_enc.o: des_locl.h des_ver.h ecb_enc.c spr.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
|
||||
ede_cbcm_enc.o: ../../include/openssl/opensslconf.h
|
||||
|
||||
@@ -140,3 +140,114 @@ void DES_ede2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
|
||||
DES_ede3_cfb64_encrypt(in,out,length,ks1,ks2,ks1,ivec,num,enc);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This is compatible with the single key CFB-r for DES, even thought that's
|
||||
* not what EVP needs.
|
||||
*/
|
||||
|
||||
void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out,
|
||||
int numbits,long length,DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
||||
DES_cblock *ivec,int enc)
|
||||
{
|
||||
register DES_LONG d0,d1,v0,v1;
|
||||
register unsigned long l=length,n=((unsigned int)numbits+7)/8;
|
||||
register int num=numbits,i;
|
||||
DES_LONG ti[2];
|
||||
unsigned char *iv;
|
||||
unsigned char ovec[16];
|
||||
|
||||
if (num > 64) return;
|
||||
iv = &(*ivec)[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
if (enc)
|
||||
{
|
||||
while (l >= n)
|
||||
{
|
||||
l-=n;
|
||||
ti[0]=v0;
|
||||
ti[1]=v1;
|
||||
DES_encrypt3(ti,ks1,ks2,ks3);
|
||||
c2ln(in,d0,d1,n);
|
||||
in+=n;
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
/* 30-08-94 - eay - changed because l>>32 and
|
||||
* l<<32 are bad under gcc :-( */
|
||||
if (num == 32)
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else
|
||||
{
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(i=0 ; i < 8 ; ++i)
|
||||
{
|
||||
ovec[i]<<=num%8;
|
||||
ovec[i]|=ovec[i+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (l >= n)
|
||||
{
|
||||
l-=n;
|
||||
ti[0]=v0;
|
||||
ti[1]=v1;
|
||||
DES_encrypt3(ti,ks1,ks2,ks3);
|
||||
c2ln(in,d0,d1,n);
|
||||
in+=n;
|
||||
/* 30-08-94 - eay - changed because l>>32 and
|
||||
* l<<32 are bad under gcc :-( */
|
||||
if (num == 32)
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else
|
||||
{
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(i=0 ; i < 8 ; ++i)
|
||||
{
|
||||
ovec[i]<<=num%8;
|
||||
ovec[i]|=ovec[i+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
}
|
||||
}
|
||||
iv = &(*ivec)[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
v0=v1=d0=d1=ti[0]=ti[1]=0;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,38 +65,26 @@
|
||||
* the second. The second 12 bits will come from the 3rd and half the 4th
|
||||
* byte.
|
||||
*/
|
||||
/* Until Aug 1 2003 this function did not correctly implement CFB-r, so it
|
||||
* will not be compatible with any encryption prior to that date. Ben. */
|
||||
void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec, int enc)
|
||||
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
||||
int enc)
|
||||
{
|
||||
register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8;
|
||||
register DES_LONG mask0,mask1;
|
||||
register DES_LONG d0,d1,v0,v1;
|
||||
register unsigned long l=length;
|
||||
register int num=numbits;
|
||||
register int num=numbits,n=(numbits+7)/8,i;
|
||||
DES_LONG ti[2];
|
||||
unsigned char *iv;
|
||||
unsigned char ovec[16];
|
||||
|
||||
if (num > 64) return;
|
||||
if (num > 32)
|
||||
{
|
||||
mask0=0xffffffffL;
|
||||
if (num == 64)
|
||||
mask1=mask0;
|
||||
else mask1=(1L<<(num-32))-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num == 32)
|
||||
mask0=0xffffffffL;
|
||||
else mask0=(1L<<num)-1;
|
||||
mask1=0x00000000L;
|
||||
}
|
||||
|
||||
iv = &(*ivec)[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
if (enc)
|
||||
{
|
||||
while (l >= n)
|
||||
while (l >= (unsigned long)n)
|
||||
{
|
||||
l-=n;
|
||||
ti[0]=v0;
|
||||
@@ -104,8 +92,8 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
DES_encrypt1((DES_LONG *)ti,schedule,DES_ENCRYPT);
|
||||
c2ln(in,d0,d1,n);
|
||||
in+=n;
|
||||
d0=(d0^ti[0])&mask0;
|
||||
d1=(d1^ti[1])&mask1;
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
/* 30-08-94 - eay - changed because l>>32 and
|
||||
@@ -114,21 +102,31 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else if (num > 32) /* && num != 64 */
|
||||
else
|
||||
{
|
||||
v0=((v1>>(num-32))|(d0<<(64-num)))&0xffffffffL;
|
||||
v1=((d0>>(num-32))|(d1<<(64-num)))&0xffffffffL;
|
||||
}
|
||||
else /* num < 32 */
|
||||
{
|
||||
v0=((v0>>num)|(v1<<(32-num)))&0xffffffffL;
|
||||
v1=((v1>>num)|(d0<<(32-num)))&0xffffffffL;
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(i=0 ; i < 8 ; ++i)
|
||||
{
|
||||
ovec[i]<<=num%8;
|
||||
ovec[i]|=ovec[i+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (l >= n)
|
||||
while (l >= (unsigned long)n)
|
||||
{
|
||||
l-=n;
|
||||
ti[0]=v0;
|
||||
@@ -142,18 +140,28 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
||||
{ v0=v1; v1=d0; }
|
||||
else if (num == 64)
|
||||
{ v0=d0; v1=d1; }
|
||||
else if (num > 32) /* && num != 64 */
|
||||
else
|
||||
{
|
||||
v0=((v1>>(num-32))|(d0<<(64-num)))&0xffffffffL;
|
||||
v1=((d0>>(num-32))|(d1<<(64-num)))&0xffffffffL;
|
||||
iv=&ovec[0];
|
||||
l2c(v0,iv);
|
||||
l2c(v1,iv);
|
||||
l2c(d0,iv);
|
||||
l2c(d1,iv);
|
||||
/* shift ovec left most of the bits... */
|
||||
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
|
||||
/* now the remaining bits */
|
||||
if(num%8 != 0)
|
||||
for(i=0 ; i < 8 ; ++i)
|
||||
{
|
||||
ovec[i]<<=num%8;
|
||||
ovec[i]|=ovec[i+1]>>(8-num%8);
|
||||
}
|
||||
iv=&ovec[0];
|
||||
c2l(iv,v0);
|
||||
c2l(iv,v1);
|
||||
}
|
||||
else /* num < 32 */
|
||||
{
|
||||
v0=((v0>>num)|(v1<<(32-num)))&0xffffffffL;
|
||||
v1=((v1>>num)|(d0<<(32-num)))&0xffffffffL;
|
||||
}
|
||||
d0=(d0^ti[0])&mask0;
|
||||
d1=(d1^ti[1])&mask1;
|
||||
d0^=ti[0];
|
||||
d1^=ti[1];
|
||||
l2cn(d0,d1,out,n);
|
||||
out+=n;
|
||||
}
|
||||
|
||||
@@ -187,6 +187,10 @@ void DES_ede3_cfb64_encrypt(const unsigned char *in,unsigned char *out,
|
||||
long length,DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
||||
DES_cblock *ivec,int *num,int enc);
|
||||
void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out,
|
||||
int numbits,long length,DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
||||
DES_cblock *ivec,int enc);
|
||||
void DES_ede3_ofb64_encrypt(const unsigned char *in,unsigned char *out,
|
||||
long length,DES_key_schedule *ks1,
|
||||
DES_key_schedule *ks2,DES_key_schedule *ks3,
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#elif defined(__SUNPRO_C)
|
||||
# if __SUNPRO_C >= 0x520
|
||||
# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -501,5 +505,9 @@ void ERR_load_EC_strings(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#elif defined(__SUNPRO_C)
|
||||
# if __SUNPRO_C >= 0x520
|
||||
# pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -155,8 +155,8 @@ static int gf2m_Mxy(const EC_GROUP *group, const BIGNUM *x, const BIGNUM *y, BIG
|
||||
|
||||
if (BN_is_zero(z1))
|
||||
{
|
||||
if (!BN_zero(x2)) return 0;
|
||||
if (!BN_zero(z2)) return 0;
|
||||
BN_zero(x2);
|
||||
BN_zero(z2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -335,7 +335,8 @@ int ec_GF2m_simple_point_copy(EC_POINT *dest, const EC_POINT *src)
|
||||
int ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *group, EC_POINT *point)
|
||||
{
|
||||
point->Z_is_one = 0;
|
||||
return (BN_zero(&point->Z));
|
||||
BN_zero(&point->Z);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -574,7 +575,7 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point,
|
||||
}
|
||||
form = buf[0];
|
||||
y_bit = form & 1;
|
||||
form = form & ~1;
|
||||
form = form & ~1U;
|
||||
if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED)
|
||||
&& (form != POINT_CONVERSION_UNCOMPRESSED)
|
||||
&& (form != POINT_CONVERSION_HYBRID))
|
||||
|
||||
@@ -75,6 +75,11 @@
|
||||
#include <openssl/obj_mac.h>
|
||||
#include <openssl/ec.h>
|
||||
|
||||
#if defined(__SUNPRO_C)
|
||||
# if __SUNPRO_C >= 0x520
|
||||
# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Structure details are not part of the exported interface,
|
||||
* so all this may change in future versions. */
|
||||
|
||||
@@ -299,12 +299,12 @@ int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIG
|
||||
if (order != NULL)
|
||||
{ if (!BN_copy(&group->order, order)) return 0; }
|
||||
else
|
||||
{ if (!BN_zero(&group->order)) return 0; }
|
||||
BN_zero(&group->order);
|
||||
|
||||
if (cofactor != NULL)
|
||||
{ if (!BN_copy(&group->cofactor, cofactor)) return 0; }
|
||||
else
|
||||
{ if (!BN_zero(&group->cofactor)) return 0; }
|
||||
BN_zero(&group->cofactor);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,8 @@ int ec_GFp_simple_point_copy(EC_POINT *dest, const EC_POINT *src)
|
||||
int ec_GFp_simple_point_set_to_infinity(const EC_GROUP *group, EC_POINT *point)
|
||||
{
|
||||
point->Z_is_one = 0;
|
||||
return (BN_zero(&point->Z));
|
||||
BN_zero(&point->Z);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -901,7 +902,7 @@ int ec_GFp_simple_oct2point(const EC_GROUP *group, EC_POINT *point,
|
||||
}
|
||||
form = buf[0];
|
||||
y_bit = form & 1;
|
||||
form = form & ~1;
|
||||
form = form & ~1U;
|
||||
if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED)
|
||||
&& (form != POINT_CONVERSION_UNCOMPRESSED)
|
||||
&& (form != POINT_CONVERSION_HYBRID))
|
||||
@@ -1093,7 +1094,7 @@ int ec_GFp_simple_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, con
|
||||
else
|
||||
{
|
||||
/* a is the inverse of b */
|
||||
if (!BN_zero(&r->Z)) goto end;
|
||||
BN_zero(&r->Z);
|
||||
r->Z_is_one = 0;
|
||||
ret = 1;
|
||||
goto end;
|
||||
@@ -1169,7 +1170,7 @@ int ec_GFp_simple_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_
|
||||
|
||||
if (EC_POINT_is_at_infinity(group, a))
|
||||
{
|
||||
if (!BN_zero(&r->Z)) return 0;
|
||||
BN_zero(&r->Z);
|
||||
r->Z_is_one = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/* crypto/ecdsa/ecdsa.h */
|
||||
/**
|
||||
* \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
|
||||
* \author Written by Nils Larsch for the OpenSSL project
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 2000-2003 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -96,7 +100,7 @@ typedef struct ecdsa_data_st {
|
||||
/* EC_KEY_METH_DATA part */
|
||||
int (*init)(EC_KEY *);
|
||||
void (*finish)(EC_KEY *);
|
||||
/* method specific part */
|
||||
/* method (ECDSA) specific part */
|
||||
BIGNUM *kinv; /* signing pre-calc */
|
||||
BIGNUM *r; /* signing pre-calc */
|
||||
ENGINE *engine;
|
||||
@@ -105,38 +109,157 @@ typedef struct ecdsa_data_st {
|
||||
CRYPTO_EX_DATA ex_data;
|
||||
} ECDSA_DATA;
|
||||
|
||||
/* signature functions */
|
||||
/** ECDSA_SIG *ECDSA_SIG_new(void)
|
||||
* allocates and initialize a ECDSA_SIG structure
|
||||
* \return pointer to a ECDSA_SIG structure or NULL if an error occurred
|
||||
*/
|
||||
ECDSA_SIG *ECDSA_SIG_new(void);
|
||||
|
||||
/** ECDSA_SIG_free
|
||||
* frees a ECDSA_SIG structure
|
||||
* \param a pointer to the ECDSA_SIG structure
|
||||
*/
|
||||
void ECDSA_SIG_free(ECDSA_SIG *a);
|
||||
|
||||
/** i2d_ECDSA_SIG
|
||||
* DER encode content of ECDSA_SIG object (note: this function modifies *pp
|
||||
* (*pp += length of the DER encoded signature)).
|
||||
* \param a pointer to the ECDSA_SIG object
|
||||
* \param pp pointer to a unsigned char pointer for the output or NULL
|
||||
* \return the length of the DER encoded ECDSA_SIG object or 0
|
||||
*/
|
||||
int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **pp);
|
||||
ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **v, const unsigned char **pp, long length);
|
||||
|
||||
/* ECDSA_DATA functions */
|
||||
/** d2i_ECDSA_SIG
|
||||
* decodes a DER encoded ECDSA signature (note: this function changes *pp
|
||||
* (*pp += len)).
|
||||
* \param v pointer to ECDSA_SIG pointer (may be NULL)
|
||||
* \param pp buffer with the DER encoded signature
|
||||
* \param len bufferlength
|
||||
* \return pointer to the decoded ECDSA_SIG structure (or NULL)
|
||||
*/
|
||||
ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **v, const unsigned char **pp, long len);
|
||||
|
||||
/** ECDSA_DATA_new
|
||||
* creates a new ECDSA_DATA object
|
||||
* \return pointer to a newly allocated (and initialized) ECDSA_DATA object
|
||||
*/
|
||||
ECDSA_DATA *ECDSA_DATA_new(void);
|
||||
ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *);
|
||||
void ECDSA_DATA_free(ECDSA_DATA *);
|
||||
|
||||
ECDSA_DATA *ecdsa_check(EC_KEY *);
|
||||
/** ECDSA_DATA_new_method
|
||||
* creates a new ECDSA_DATA object using a specified ENGINE
|
||||
* \param eng pointer to a ENGINE structure
|
||||
* \return pointer to a newly allocated (and initialized) ECDSA_DATA object
|
||||
*/
|
||||
ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *eng);
|
||||
|
||||
ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, EC_KEY *);
|
||||
/** ECDSA_DATA_free
|
||||
* frees ECDSA_DATA structure
|
||||
* \param data pointer to a ECDSA_DATA structure
|
||||
*/
|
||||
void ECDSA_DATA_free(ECDSA_DATA *data);
|
||||
|
||||
/** ecdsa_check
|
||||
* checks whether ECKEY->meth_data is a pointer to a ECDSA_DATA structure
|
||||
* and if not it removes the old meth_data and creates a ECDSA_DATA structure.
|
||||
* \param eckey pointer to a EC_KEY object
|
||||
* \return pointer to a ECDSA_DATA structure
|
||||
*/
|
||||
ECDSA_DATA *ecdsa_check(EC_KEY *eckey);
|
||||
|
||||
/** ECDSA_do_sign
|
||||
* computes the ECDSA signature of the given hash value using
|
||||
* the supplied private key and returns the created signature.
|
||||
* \param dgst pointer to the hash value
|
||||
* \param dgst_len length of the hash value
|
||||
* \param eckey pointer to the EC_KEY object containing a private EC key
|
||||
* \return pointer to a ECDSA_SIG structure or NULL
|
||||
*/
|
||||
ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,int dgst_len,EC_KEY *eckey);
|
||||
|
||||
/** ECDSA_do_verify
|
||||
* verifies that the supplied signature is a valid ECDSA
|
||||
* signature of the supplied hash value using the supplied public key.
|
||||
* \param dgst pointer to the hash value
|
||||
* \param dgst_len length of the hash value
|
||||
* \param sig pointer to the ECDSA_SIG structure
|
||||
* \param eckey pointer to the EC_KEY object containing a public EC key
|
||||
* \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error
|
||||
*/
|
||||
int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG
|
||||
*sig, EC_KEY* eckey);
|
||||
|
||||
const ECDSA_METHOD *ECDSA_OpenSSL(void);
|
||||
|
||||
void ECDSA_set_default_method(const ECDSA_METHOD *);
|
||||
const ECDSA_METHOD *ECDSA_get_default_method(void);
|
||||
int ECDSA_set_method(EC_KEY *, const ECDSA_METHOD *);
|
||||
/** ECDSA_set_default_method
|
||||
* sets the default ECDSA method
|
||||
* \param meth the new default ECDSA_METHOD
|
||||
*/
|
||||
void ECDSA_set_default_method(const ECDSA_METHOD *meth);
|
||||
|
||||
int ECDSA_size(const EC_KEY *);
|
||||
/** ECDSA_get_default_method
|
||||
* returns the default ECDSA method
|
||||
* \return pointer to ECDSA_METHOD structure containing the default method
|
||||
*/
|
||||
const ECDSA_METHOD *ECDSA_get_default_method(void);
|
||||
|
||||
/** ECDSA_set_method
|
||||
* sets method to be used for the ECDSA operations
|
||||
* \param eckey pointer to the EC_KEY object
|
||||
* \param meth pointer to the new method
|
||||
* \return 1 on success and 0 otherwise
|
||||
*/
|
||||
int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
|
||||
|
||||
/** ECDSA_size
|
||||
* returns the maximum length of the DER encoded signature
|
||||
* \param eckey pointer to a EC_KEY object
|
||||
* \return numbers of bytes required for the DER encoded signature
|
||||
*/
|
||||
int ECDSA_size(const EC_KEY *eckey);
|
||||
|
||||
/** ECDSA_sign_setup
|
||||
* precompute parts of the signing operation (the computed values may be
|
||||
* passed to ECDSA_DATA->kinv and ECDSA_DATA->r for a later signature
|
||||
* computation).
|
||||
* \param eckey pointer to the EC_KEY object containing a private EC key
|
||||
* \param ctx pointer to a BN_CTX object (may be NULL)
|
||||
* \param kinv pointer to a BIGNUM pointer for the inverse of k
|
||||
* \param rp pointer to a BIGNUM pointer for x coordinate of k * generator
|
||||
* \return 1 on success and 0 otherwise
|
||||
*/
|
||||
int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv,
|
||||
BIGNUM **rp);
|
||||
int ECDSA_sign(int type, const unsigned char *dgst, int dgst_len,
|
||||
|
||||
/** ECDSA_sign
|
||||
* computes ECDSA signature of a given hash value using the supplied
|
||||
* private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
|
||||
* \param type this parameter is ignored
|
||||
* \param dgst pointer to the hash value to sign
|
||||
* \param dgstlen length of the hash value
|
||||
* \param sig buffer to hold the DER encoded signature
|
||||
* \param siglen pointer to the length of the returned signature
|
||||
* \param eckey pointer to the EC_KEY object containing a private EC key
|
||||
* \return 1 on success and 0 otherwise
|
||||
*/
|
||||
int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
|
||||
unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
|
||||
int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len,
|
||||
const unsigned char *sig, int sig_len, EC_KEY *eckey);
|
||||
|
||||
/** ECDSA_verify
|
||||
* verifies that the given signature is valid ECDSA signature
|
||||
* of the supplied hash value using the specified public key.
|
||||
* \param type this parameter is ignored
|
||||
* \param dgst pointer to the hash value
|
||||
* \param dgstlen length of the hash value
|
||||
* \param sig pointer to the DER encoded signature
|
||||
* \param siglen length of the DER encoded signature
|
||||
* \param eckey pointer to the EC_KEY object containing a public EC key
|
||||
* \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error
|
||||
*/
|
||||
int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
|
||||
const unsigned char *sig, int siglen, EC_KEY *eckey);
|
||||
|
||||
/* the standard ex_data functions */
|
||||
int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
|
||||
*new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
|
||||
int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/* crypto/ecdsa/ecs_ossl.c */
|
||||
/*
|
||||
* Written by Nils Larsch for the OpenSSL project
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1998-2004 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
|
||||
@@ -86,49 +89,43 @@ static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
|
||||
BIGNUM **rp)
|
||||
{
|
||||
BN_CTX *ctx = NULL;
|
||||
BIGNUM k,*kinv=NULL,*r=NULL,*order=NULL,*X=NULL;
|
||||
BIGNUM *k = NULL, *r = NULL, *order = NULL, *X = NULL;
|
||||
EC_POINT *tmp_point=NULL;
|
||||
EC_GROUP *group;
|
||||
int ret = 0;
|
||||
if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BN_init(&k);
|
||||
group = eckey->group;
|
||||
|
||||
if (ctx_in == NULL)
|
||||
{
|
||||
if ((ctx=BN_CTX_new()) == NULL)
|
||||
if ((ctx = BN_CTX_new()) == NULL)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
ctx=ctx_in;
|
||||
ctx = ctx_in;
|
||||
|
||||
if ((r = BN_new()) == NULL)
|
||||
k = BN_new(); /* this value is later returned in *kinvp */
|
||||
r = BN_new(); /* this value is later returned in *rp */
|
||||
order = BN_new();
|
||||
X = BN_new();
|
||||
if (!k || !r || !order || !X)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
if ((order = BN_new()) == NULL)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
if ((X = BN_new()) == NULL)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
if ((tmp_point = EC_POINT_new(eckey->group)) == NULL)
|
||||
if ((tmp_point = EC_POINT_new(group)) == NULL)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (!EC_GROUP_get_order(eckey->group,order,ctx))
|
||||
if (!EC_GROUP_get_order(group, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
@@ -138,42 +135,39 @@ static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
|
||||
{
|
||||
/* get random k */
|
||||
do
|
||||
if (!BN_rand_range(&k,order))
|
||||
if (!BN_rand_range(k, order))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,
|
||||
ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED);
|
||||
goto err;
|
||||
}
|
||||
while (BN_is_zero(&k));
|
||||
while (BN_is_zero(k));
|
||||
|
||||
/* compute r the x-coordinate of generator * k */
|
||||
if (!EC_POINT_mul(eckey->group, tmp_point, &k, NULL, NULL, ctx))
|
||||
if (!EC_POINT_mul(group, tmp_point, k, NULL, NULL, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (EC_METHOD_get_field_type(EC_GROUP_method_of(eckey->group))
|
||||
== NID_X9_62_prime_field)
|
||||
if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field)
|
||||
{
|
||||
if (!EC_POINT_get_affine_coordinates_GFp(eckey->group,
|
||||
if (!EC_POINT_get_affine_coordinates_GFp(group,
|
||||
tmp_point, X, NULL, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,
|
||||
ERR_R_EC_LIB);
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
else /* NID_X9_62_characteristic_two_field */
|
||||
{
|
||||
if (!EC_POINT_get_affine_coordinates_GF2m(eckey->group,
|
||||
if (!EC_POINT_get_affine_coordinates_GF2m(group,
|
||||
tmp_point, X, NULL, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,
|
||||
ERR_R_EC_LIB);
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if (!BN_nnmod(r,X,order,ctx))
|
||||
if (!BN_nnmod(r, X, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
@@ -182,36 +176,34 @@ static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
|
||||
while (BN_is_zero(r));
|
||||
|
||||
/* compute the inverse of k */
|
||||
if ((kinv = BN_mod_inverse(NULL,&k,order,ctx)) == NULL)
|
||||
if (!BN_mod_inverse(k, k, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (*rp == NULL)
|
||||
/* clear old values if necessary */
|
||||
if (*rp != NULL)
|
||||
BN_clear_free(*rp);
|
||||
*rp = r;
|
||||
if (*kinvp == NULL)
|
||||
if (*kinvp != NULL)
|
||||
BN_clear_free(*kinvp);
|
||||
*kinvp = kinv;
|
||||
kinv = NULL;
|
||||
/* save the pre-computed values */
|
||||
*rp = r;
|
||||
*kinvp = k;
|
||||
ret = 1;
|
||||
err:
|
||||
if (!ret)
|
||||
{
|
||||
if (kinv != NULL) BN_clear_free(kinv);
|
||||
if (k != NULL) BN_clear_free(k);
|
||||
if (r != NULL) BN_clear_free(r);
|
||||
}
|
||||
if (ctx_in == NULL)
|
||||
BN_CTX_free(ctx);
|
||||
if (kinv != NULL)
|
||||
BN_clear_free(kinv);
|
||||
if (order != NULL)
|
||||
BN_clear_free(order);
|
||||
BN_free(order);
|
||||
if (tmp_point != NULL)
|
||||
EC_POINT_free(tmp_point);
|
||||
if (X) BN_clear_free(X);
|
||||
BN_clear_free(&k);
|
||||
if (X)
|
||||
BN_clear_free(X);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@@ -219,32 +211,38 @@ err:
|
||||
static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
|
||||
EC_KEY *eckey)
|
||||
{
|
||||
BIGNUM *kinv=NULL,*r=NULL,*s=NULL,*m=NULL,*tmp=NULL,*order=NULL;
|
||||
BIGNUM xr;
|
||||
BN_CTX *ctx=NULL;
|
||||
ECDSA_SIG *ret=NULL;
|
||||
int ok = 0;
|
||||
BIGNUM *kinv=NULL, *r, *s, *m=NULL,*tmp=NULL,*order=NULL;
|
||||
BN_CTX *ctx = NULL;
|
||||
EC_GROUP *group;
|
||||
ECDSA_SIG *ret;
|
||||
ECDSA_DATA *ecdsa;
|
||||
|
||||
BN_init(&xr);
|
||||
|
||||
ecdsa = ecdsa_check(eckey);
|
||||
|
||||
if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key
|
||||
|| !ecdsa)
|
||||
if (!eckey->group || !eckey->pub_key || !eckey->priv_key || !ecdsa)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER);
|
||||
goto err;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
group = eckey->group;
|
||||
ret = ECDSA_SIG_new();
|
||||
if (!ret)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
s = ret->s;
|
||||
|
||||
if ((ctx = BN_CTX_new()) == NULL || (order = BN_new()) == NULL ||
|
||||
(tmp = BN_new()) == NULL || (m = BN_new()) == NULL ||
|
||||
(s = BN_new()) == NULL )
|
||||
(tmp = BN_new()) == NULL || (m = BN_new()) == NULL)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!EC_GROUP_get_order(eckey->group,order,ctx))
|
||||
if (!EC_GROUP_get_order(group, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
@@ -256,7 +254,7 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (BN_bin2bn(dgst,dgst_len,m) == NULL)
|
||||
if (!BN_bin2bn(dgst, dgst_len, m))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
@@ -265,34 +263,34 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
|
||||
{
|
||||
if (ecdsa->kinv == NULL || ecdsa->r == NULL)
|
||||
{
|
||||
if (!ECDSA_sign_setup(eckey,ctx,&kinv,&r))
|
||||
if (!ECDSA_sign_setup(eckey, ctx, &kinv, &ret->r))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN,
|
||||
ERR_R_ECDSA_LIB);
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN,ERR_R_ECDSA_LIB);
|
||||
goto err;
|
||||
}
|
||||
r = ret->r;
|
||||
}
|
||||
else
|
||||
{
|
||||
kinv = ecdsa->kinv;
|
||||
BN_free(ret->r);
|
||||
kinv = ecdsa->kinv;
|
||||
r = ecdsa->r;
|
||||
ret->r = r;
|
||||
ecdsa->kinv = NULL;
|
||||
r = ecdsa->r;
|
||||
ecdsa->r = NULL;
|
||||
ecdsa->r = NULL;
|
||||
}
|
||||
|
||||
if (!BN_mod_mul(tmp,eckey->priv_key,r,order,ctx))
|
||||
if (!BN_mod_mul(tmp, eckey->priv_key, r, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (!BN_add(s,tmp,m))
|
||||
if (!BN_mod_add_quick(s, tmp, m, order))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (BN_cmp(s,order) > 0)
|
||||
BN_sub(s,s,order);
|
||||
if (!BN_mod_mul(s,s,kinv,order,ctx))
|
||||
if (!BN_mod_mul(s, s, kinv, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
@@ -300,23 +298,13 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
|
||||
}
|
||||
while (BN_is_zero(s));
|
||||
|
||||
if ((ret = ECDSA_SIG_new()) == NULL)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
if (BN_copy(ret->r, r) == NULL || BN_copy(ret->s, s) == NULL)
|
||||
ok = 1;
|
||||
err:
|
||||
if (!ok)
|
||||
{
|
||||
ECDSA_SIG_free(ret);
|
||||
ret = NULL;
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB);
|
||||
}
|
||||
|
||||
err:
|
||||
if (r)
|
||||
BN_clear_free(r);
|
||||
if (s)
|
||||
BN_clear_free(s);
|
||||
if (ctx)
|
||||
BN_CTX_free(ctx);
|
||||
if (m)
|
||||
@@ -324,92 +312,99 @@ err:
|
||||
if (tmp)
|
||||
BN_clear_free(tmp);
|
||||
if (order)
|
||||
BN_clear_free(order);
|
||||
BN_free(order);
|
||||
if (kinv)
|
||||
BN_clear_free(kinv);
|
||||
return(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
ECDSA_SIG *sig, EC_KEY *eckey)
|
||||
{
|
||||
BN_CTX *ctx;
|
||||
BIGNUM *order=NULL,*u1=NULL,*u2=NULL,*m=NULL,*X=NULL;
|
||||
EC_POINT *point=NULL;
|
||||
int ret = -1;
|
||||
BN_CTX *ctx;
|
||||
BIGNUM *order, *u1, *u2, *m, *X;
|
||||
EC_POINT *point = NULL;
|
||||
EC_GROUP *group;
|
||||
/* check input values */
|
||||
if (!eckey || !eckey->group || !eckey->pub_key || !sig)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((ctx = BN_CTX_new()) == NULL || (order = BN_new()) == NULL ||
|
||||
(u1 = BN_new()) == NULL || (u2 = BN_new()) == NULL ||
|
||||
(m = BN_new()) == NULL || (X = BN_new()) == NULL)
|
||||
group = eckey->group;
|
||||
|
||||
ctx = BN_CTX_new();
|
||||
if (!ctx)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
return -1;
|
||||
}
|
||||
if (!EC_GROUP_get_order(eckey->group, order, ctx))
|
||||
BN_CTX_start(ctx);
|
||||
order = BN_CTX_get(ctx);
|
||||
u1 = BN_CTX_get(ctx);
|
||||
u2 = BN_CTX_get(ctx);
|
||||
m = BN_CTX_get(ctx);
|
||||
X = BN_CTX_get(ctx);
|
||||
if (!X)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (BN_is_zero(sig->r) || BN_get_sign(sig->r) ||
|
||||
BN_ucmp(sig->r, order) >= 0)
|
||||
|
||||
if (!EC_GROUP_get_order(group, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE);
|
||||
ret = 0;
|
||||
goto err;
|
||||
}
|
||||
if (BN_is_zero(sig->s) || BN_get_sign(sig->s) ||
|
||||
BN_ucmp(sig->s, order) >= 0)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE);
|
||||
ret = 0;
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (BN_is_zero(sig->r) || BN_get_sign(sig->r) ||
|
||||
BN_ucmp(sig->r, order) >= 0 || BN_is_zero(sig->s) ||
|
||||
BN_get_sign(sig->s) || BN_ucmp(sig->s, order) >= 0)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE);
|
||||
ret = 0; /* signature is invalid */
|
||||
goto err;
|
||||
}
|
||||
/* calculate tmp1 = inv(S) mod order */
|
||||
if ((BN_mod_inverse(u2,sig->s,order,ctx)) == NULL)
|
||||
if (!BN_mod_inverse(u2, sig->s, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
/* digest -> m */
|
||||
if (BN_bin2bn(dgst,dgst_len,m) == NULL)
|
||||
if (!BN_bin2bn(dgst, dgst_len, m))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
/* u1 = m * tmp mod order */
|
||||
if (!BN_mod_mul(u1,m,u2,order,ctx))
|
||||
if (!BN_mod_mul(u1, m, u2, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
/* u2 = r * w mod q */
|
||||
if (!BN_mod_mul(u2,sig->r,u2,order,ctx))
|
||||
if (!BN_mod_mul(u2, sig->r, u2, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if ((point = EC_POINT_new(eckey->group)) == NULL)
|
||||
if ((point = EC_POINT_new(group)) == NULL)
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
if (!EC_POINT_mul(eckey->group, point, u1, eckey->pub_key, u2, ctx))
|
||||
if (!EC_POINT_mul(group, point, u1, eckey->pub_key, u2, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB);
|
||||
goto err;
|
||||
}
|
||||
if (EC_METHOD_get_field_type(EC_GROUP_method_of(eckey->group))
|
||||
== NID_X9_62_prime_field)
|
||||
if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) == NID_X9_62_prime_field)
|
||||
{
|
||||
if (!EC_POINT_get_affine_coordinates_GFp(eckey->group,
|
||||
if (!EC_POINT_get_affine_coordinates_GFp(group,
|
||||
point, X, NULL, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB);
|
||||
@@ -418,7 +413,7 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
}
|
||||
else /* NID_X9_62_characteristic_two_field */
|
||||
{
|
||||
if (!EC_POINT_get_affine_coordinates_GF2m(eckey->group,
|
||||
if (!EC_POINT_get_affine_coordinates_GF2m(group,
|
||||
point, X, NULL, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB);
|
||||
@@ -426,30 +421,17 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
}
|
||||
}
|
||||
|
||||
if (!BN_nnmod(u1,X,order,ctx))
|
||||
if (!BN_nnmod(u1, X, order, ctx))
|
||||
{
|
||||
ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* is now in u1. If the signature is correct, it will be
|
||||
* equal to R. */
|
||||
ret = (BN_ucmp(u1,sig->r) == 0);
|
||||
|
||||
err:
|
||||
if (ctx)
|
||||
BN_CTX_free(ctx);
|
||||
if (u1)
|
||||
BN_clear_free(u1);
|
||||
if (u2)
|
||||
BN_clear_free(u2);
|
||||
if (m)
|
||||
BN_clear_free(m);
|
||||
if (X)
|
||||
BN_clear_free(X);
|
||||
if (order)
|
||||
BN_clear_free(order);
|
||||
/* if the signature is correct u1 is equal to sig->r */
|
||||
ret = (BN_ucmp(u1, sig->r) == 0);
|
||||
err:
|
||||
BN_CTX_end(ctx);
|
||||
BN_CTX_free(ctx);
|
||||
if (point)
|
||||
EC_POINT_free(point);
|
||||
return(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -594,11 +594,11 @@ static void build_SYS_str_reasons()
|
||||
|
||||
#define err_clear(p,i) \
|
||||
do { \
|
||||
es->err_flags[i]=0; \
|
||||
es->err_buffer[i]=0; \
|
||||
(p)->err_flags[i]=0; \
|
||||
(p)->err_buffer[i]=0; \
|
||||
err_clear_data(p,i); \
|
||||
es->err_file[i]=NULL; \
|
||||
es->err_line[i]= -1; \
|
||||
(p)->err_file[i]=NULL; \
|
||||
(p)->err_line[i]= -1; \
|
||||
} while(0)
|
||||
|
||||
static void ERR_STATE_free(ERR_STATE *s)
|
||||
|
||||
@@ -67,6 +67,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
|
||||
#ifndef OPENSSL_NO_DES
|
||||
EVP_add_cipher(EVP_des_cfb());
|
||||
EVP_add_cipher(EVP_des_cfb1());
|
||||
EVP_add_cipher(EVP_des_cfb8());
|
||||
EVP_add_cipher(EVP_des_ede_cfb());
|
||||
EVP_add_cipher(EVP_des_ede3_cfb());
|
||||
|
||||
@@ -150,6 +152,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
EVP_add_cipher(EVP_aes_128_ecb());
|
||||
EVP_add_cipher(EVP_aes_128_cbc());
|
||||
EVP_add_cipher(EVP_aes_128_cfb());
|
||||
EVP_add_cipher(EVP_aes_128_cfb1());
|
||||
EVP_add_cipher(EVP_aes_128_cfb8());
|
||||
EVP_add_cipher(EVP_aes_128_ofb());
|
||||
#if 0
|
||||
EVP_add_cipher(EVP_aes_128_ctr());
|
||||
@@ -159,6 +163,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
EVP_add_cipher(EVP_aes_192_ecb());
|
||||
EVP_add_cipher(EVP_aes_192_cbc());
|
||||
EVP_add_cipher(EVP_aes_192_cfb());
|
||||
EVP_add_cipher(EVP_aes_192_cfb1());
|
||||
EVP_add_cipher(EVP_aes_192_cfb8());
|
||||
EVP_add_cipher(EVP_aes_192_ofb());
|
||||
#if 0
|
||||
EVP_add_cipher(EVP_aes_192_ctr());
|
||||
@@ -168,6 +174,8 @@ void OpenSSL_add_all_ciphers(void)
|
||||
EVP_add_cipher(EVP_aes_256_ecb());
|
||||
EVP_add_cipher(EVP_aes_256_cbc());
|
||||
EVP_add_cipher(EVP_aes_256_cfb());
|
||||
EVP_add_cipher(EVP_aes_256_cfb1());
|
||||
EVP_add_cipher(EVP_aes_256_cfb8());
|
||||
EVP_add_cipher(EVP_aes_256_ofb());
|
||||
#if 0
|
||||
EVP_add_cipher(EVP_aes_256_ctr());
|
||||
|
||||
@@ -248,6 +248,7 @@ int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in)
|
||||
|
||||
int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
|
||||
{
|
||||
unsigned char *tmp_buf;
|
||||
if ((in == NULL) || (in->digest == NULL))
|
||||
{
|
||||
EVPerr(EVP_F_EVP_MD_CTX_COPY,EVP_R_INPUT_NOT_INITIALIZED);
|
||||
@@ -262,15 +263,22 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (out->digest == in->digest)
|
||||
{
|
||||
tmp_buf = out->md_data;
|
||||
EVP_MD_CTX_set_flags(out,EVP_MD_CTX_FLAG_REUSE);
|
||||
}
|
||||
else tmp_buf = NULL;
|
||||
EVP_MD_CTX_cleanup(out);
|
||||
memcpy(out,in,sizeof *out);
|
||||
|
||||
if (out->digest->ctx_size)
|
||||
{
|
||||
out->md_data=OPENSSL_malloc(out->digest->ctx_size);
|
||||
if (tmp_buf) out->md_data = tmp_buf;
|
||||
else out->md_data=OPENSSL_malloc(out->digest->ctx_size);
|
||||
memcpy(out->md_data,in->md_data,out->digest->ctx_size);
|
||||
}
|
||||
|
||||
|
||||
if (out->digest->copy)
|
||||
return out->digest->copy(out,in);
|
||||
|
||||
@@ -308,7 +316,8 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
|
||||
if (ctx->digest && ctx->digest->cleanup
|
||||
&& !EVP_MD_CTX_test_flags(ctx,EVP_MD_CTX_FLAG_CLEANED))
|
||||
ctx->digest->cleanup(ctx);
|
||||
if (ctx->digest && ctx->digest->ctx_size && ctx->md_data)
|
||||
if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
|
||||
&& !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE))
|
||||
{
|
||||
OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size);
|
||||
OPENSSL_free(ctx->md_data);
|
||||
|
||||
@@ -86,17 +86,35 @@ IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
#define IMPLEMENT_AES_CFBR(ksize,cbits) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16)
|
||||
|
||||
IMPLEMENT_AES_CFBR(128,1)
|
||||
IMPLEMENT_AES_CFBR(192,1)
|
||||
IMPLEMENT_AES_CFBR(256,1)
|
||||
|
||||
IMPLEMENT_AES_CFBR(128,8)
|
||||
IMPLEMENT_AES_CFBR(192,8)
|
||||
IMPLEMENT_AES_CFBR(256,8)
|
||||
|
||||
static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
const unsigned char *iv, int enc) {
|
||||
const unsigned char *iv, int enc)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_CFB_MODE
|
||||
|| (ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_OFB_MODE
|
||||
|| enc)
|
||||
AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
ret=AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
else
|
||||
AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
ret=AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
|
||||
|
||||
if(ret < 0)
|
||||
{
|
||||
EVPerr(EVP_F_AES_INIT_KEY,EVP_R_AES_KEY_SETUP_FAILED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -92,20 +92,53 @@ static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
static int des_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
|
||||
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Although we have a CFB-r implementation for DES, it doesn't pack the right
|
||||
way, so wrap it here */
|
||||
static int des_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
unsigned int n;
|
||||
unsigned char c[1],d[1];
|
||||
|
||||
for(n=0 ; n < inl ; ++n)
|
||||
{
|
||||
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
|
||||
DES_cfb_encrypt(c,d,1,1,ctx->cipher_data,(DES_cblock *)ctx->iv,
|
||||
ctx->encrypt);
|
||||
out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_cfb_encrypt(in,out,8,inl,ctx->cipher_data,(DES_cblock *)ctx->iv,
|
||||
ctx->encrypt);
|
||||
return 1;
|
||||
}
|
||||
|
||||
BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64,
|
||||
0, des_init_key, NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1,0,des_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8,0,des_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
const unsigned char *iv, int enc)
|
||||
|
||||
@@ -85,7 +85,8 @@ static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
BLOCK_CIPHER_ecb_loop()
|
||||
DES_ecb3_encrypt((DES_cblock *)(in + i), (DES_cblock *)(out + i),
|
||||
DES_ecb3_encrypt((const_DES_cblock *)(in + i),
|
||||
(DES_cblock *)(out + i),
|
||||
&data(ctx)->ks1, &data(ctx)->ks2,
|
||||
&data(ctx)->ks3,
|
||||
ctx->encrypt);
|
||||
@@ -121,7 +122,7 @@ static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
static int des_ede_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_ede3_cfb64_encrypt(in, out, (long)inl,
|
||||
@@ -130,13 +131,42 @@ static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Although we have a CFB-r implementation for 3-DES, it doesn't pack the right
|
||||
way, so wrap it here */
|
||||
static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
unsigned int n;
|
||||
unsigned char c[1],d[1];
|
||||
|
||||
for(n=0 ; n < inl ; ++n)
|
||||
{
|
||||
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
|
||||
DES_ede3_cfb_encrypt(c,d,1,1,
|
||||
&data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3,
|
||||
(DES_cblock *)ctx->iv,ctx->encrypt);
|
||||
out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int des_ede3_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
const unsigned char *in, unsigned int inl)
|
||||
{
|
||||
DES_ede3_cfb_encrypt(in,out,8,inl,
|
||||
&data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3,
|
||||
(DES_cblock *)ctx->iv,ctx->encrypt);
|
||||
return 1;
|
||||
}
|
||||
|
||||
BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64,
|
||||
0, des_ede_init_key, NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
#define des_ede3_cfb_cipher des_ede_cfb_cipher
|
||||
#define des_ede3_cfb64_cipher des_ede_cfb64_cipher
|
||||
#define des_ede3_ofb_cipher des_ede_ofb_cipher
|
||||
#define des_ede3_cbc_cipher des_ede_cbc_cipher
|
||||
#define des_ede3_ecb_cipher des_ede_ecb_cipher
|
||||
@@ -147,6 +177,16 @@ BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64,
|
||||
EVP_CIPHER_get_asn1_iv,
|
||||
NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1,0,
|
||||
des_ede3_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8,0,
|
||||
des_ede3_init_key,NULL,
|
||||
EVP_CIPHER_set_asn1_iv,
|
||||
EVP_CIPHER_get_asn1_iv,NULL)
|
||||
|
||||
static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||
const unsigned char *iv, int enc)
|
||||
{
|
||||
|
||||
@@ -288,6 +288,8 @@ struct env_md_ctx_st
|
||||
* once only */
|
||||
#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been
|
||||
* cleaned */
|
||||
#define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data
|
||||
* in EVP_MD_CTX_cleanup */
|
||||
|
||||
struct evp_cipher_st
|
||||
{
|
||||
@@ -603,9 +605,20 @@ const EVP_CIPHER *EVP_des_ede(void);
|
||||
const EVP_CIPHER *EVP_des_ede3(void);
|
||||
const EVP_CIPHER *EVP_des_ede_ecb(void);
|
||||
const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
||||
const EVP_CIPHER *EVP_des_cfb(void);
|
||||
const EVP_CIPHER *EVP_des_ede_cfb(void);
|
||||
const EVP_CIPHER *EVP_des_ede3_cfb(void);
|
||||
const EVP_CIPHER *EVP_des_cfb64(void);
|
||||
# define EVP_des_cfb EVP_des_cfb64
|
||||
const EVP_CIPHER *EVP_des_cfb1(void);
|
||||
const EVP_CIPHER *EVP_des_cfb8(void);
|
||||
const EVP_CIPHER *EVP_des_ede_cfb64(void);
|
||||
# define EVP_des_ede_cfb EVP_des_ede_cfb64
|
||||
#if 0
|
||||
const EVP_CIPHER *EVP_des_ede_cfb1(void);
|
||||
const EVP_CIPHER *EVP_des_ede_cfb8(void);
|
||||
#endif
|
||||
const EVP_CIPHER *EVP_des_ede3_cfb64(void);
|
||||
# define EVP_des_ede3_cfb EVP_des_ede3_cfb64
|
||||
const EVP_CIPHER *EVP_des_ede3_cfb1(void);
|
||||
const EVP_CIPHER *EVP_des_ede3_cfb8(void);
|
||||
const EVP_CIPHER *EVP_des_ofb(void);
|
||||
const EVP_CIPHER *EVP_des_ede_ofb(void);
|
||||
const EVP_CIPHER *EVP_des_ede3_ofb(void);
|
||||
@@ -629,7 +642,8 @@ const EVP_CIPHER *EVP_rc4_40(void);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_IDEA
|
||||
const EVP_CIPHER *EVP_idea_ecb(void);
|
||||
const EVP_CIPHER *EVP_idea_cfb(void);
|
||||
const EVP_CIPHER *EVP_idea_cfb64(void);
|
||||
# define EVP_idea_cfb EVP_idea_cfb64
|
||||
const EVP_CIPHER *EVP_idea_ofb(void);
|
||||
const EVP_CIPHER *EVP_idea_cbc(void);
|
||||
#endif
|
||||
@@ -638,45 +652,58 @@ const EVP_CIPHER *EVP_rc2_ecb(void);
|
||||
const EVP_CIPHER *EVP_rc2_cbc(void);
|
||||
const EVP_CIPHER *EVP_rc2_40_cbc(void);
|
||||
const EVP_CIPHER *EVP_rc2_64_cbc(void);
|
||||
const EVP_CIPHER *EVP_rc2_cfb(void);
|
||||
const EVP_CIPHER *EVP_rc2_cfb64(void);
|
||||
# define EVP_rc2_cfb EVP_rc2_cfb64
|
||||
const EVP_CIPHER *EVP_rc2_ofb(void);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_BF
|
||||
const EVP_CIPHER *EVP_bf_ecb(void);
|
||||
const EVP_CIPHER *EVP_bf_cbc(void);
|
||||
const EVP_CIPHER *EVP_bf_cfb(void);
|
||||
const EVP_CIPHER *EVP_bf_cfb64(void);
|
||||
# define EVP_bf_cfb EVP_bf_cfb64
|
||||
const EVP_CIPHER *EVP_bf_ofb(void);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_CAST
|
||||
const EVP_CIPHER *EVP_cast5_ecb(void);
|
||||
const EVP_CIPHER *EVP_cast5_cbc(void);
|
||||
const EVP_CIPHER *EVP_cast5_cfb(void);
|
||||
const EVP_CIPHER *EVP_cast5_cfb64(void);
|
||||
# define EVP_cast5_cfb EVP_cast5_cfb64
|
||||
const EVP_CIPHER *EVP_cast5_ofb(void);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RC5
|
||||
const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void);
|
||||
const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);
|
||||
const EVP_CIPHER *EVP_rc5_32_12_16_cfb(void);
|
||||
const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void);
|
||||
# define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64
|
||||
const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_AES
|
||||
const EVP_CIPHER *EVP_aes_128_ecb(void);
|
||||
const EVP_CIPHER *EVP_aes_128_cbc(void);
|
||||
const EVP_CIPHER *EVP_aes_128_cfb(void);
|
||||
const EVP_CIPHER *EVP_aes_128_cfb1(void);
|
||||
const EVP_CIPHER *EVP_aes_128_cfb8(void);
|
||||
const EVP_CIPHER *EVP_aes_128_cfb128(void);
|
||||
# define EVP_aes_128_cfb EVP_aes_128_cfb128
|
||||
const EVP_CIPHER *EVP_aes_128_ofb(void);
|
||||
#if 0
|
||||
const EVP_CIPHER *EVP_aes_128_ctr(void);
|
||||
#endif
|
||||
const EVP_CIPHER *EVP_aes_192_ecb(void);
|
||||
const EVP_CIPHER *EVP_aes_192_cbc(void);
|
||||
const EVP_CIPHER *EVP_aes_192_cfb(void);
|
||||
const EVP_CIPHER *EVP_aes_192_cfb1(void);
|
||||
const EVP_CIPHER *EVP_aes_192_cfb8(void);
|
||||
const EVP_CIPHER *EVP_aes_192_cfb128(void);
|
||||
# define EVP_aes_192_cfb EVP_aes_192_cfb128
|
||||
const EVP_CIPHER *EVP_aes_192_ofb(void);
|
||||
#if 0
|
||||
const EVP_CIPHER *EVP_aes_192_ctr(void);
|
||||
#endif
|
||||
const EVP_CIPHER *EVP_aes_256_ecb(void);
|
||||
const EVP_CIPHER *EVP_aes_256_cbc(void);
|
||||
const EVP_CIPHER *EVP_aes_256_cfb(void);
|
||||
const EVP_CIPHER *EVP_aes_256_cfb1(void);
|
||||
const EVP_CIPHER *EVP_aes_256_cfb8(void);
|
||||
const EVP_CIPHER *EVP_aes_256_cfb128(void);
|
||||
# define EVP_aes_256_cfb EVP_aes_256_cfb128
|
||||
const EVP_CIPHER *EVP_aes_256_ofb(void);
|
||||
#if 0
|
||||
const EVP_CIPHER *EVP_aes_256_ctr(void);
|
||||
@@ -794,6 +821,7 @@ void ERR_load_EVP_strings(void);
|
||||
/* Error codes for the EVP functions. */
|
||||
|
||||
/* Function codes. */
|
||||
#define EVP_F_AES_INIT_KEY 133
|
||||
#define EVP_F_D2I_PKEY 100
|
||||
#define EVP_F_ECDSA_PKEY2PKCS8 129
|
||||
#define EVP_F_EC_KEY_PKEY2PKCS8 132
|
||||
@@ -828,6 +856,7 @@ void ERR_load_EVP_strings(void);
|
||||
#define EVP_F_RC5_CTRL 125
|
||||
|
||||
/* Reason codes. */
|
||||
#define EVP_R_AES_KEY_SETUP_FAILED 143
|
||||
#define EVP_R_ASN1_LIB 140
|
||||
#define EVP_R_BAD_BLOCK_LENGTH 136
|
||||
#define EVP_R_BAD_DECRYPT 100
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/evp/evp_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -66,6 +66,7 @@
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
static ERR_STRING_DATA EVP_str_functs[]=
|
||||
{
|
||||
{ERR_PACK(0,EVP_F_AES_INIT_KEY,0), "AES_INIT_KEY"},
|
||||
{ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"},
|
||||
{ERR_PACK(0,EVP_F_ECDSA_PKEY2PKCS8,0), "ECDSA_PKEY2PKCS8"},
|
||||
{ERR_PACK(0,EVP_F_EC_KEY_PKEY2PKCS8,0), "EC_KEY_PKEY2PKCS8"},
|
||||
@@ -103,6 +104,7 @@ static ERR_STRING_DATA EVP_str_functs[]=
|
||||
|
||||
static ERR_STRING_DATA EVP_str_reasons[]=
|
||||
{
|
||||
{EVP_R_AES_KEY_SETUP_FAILED ,"aes key setup failed"},
|
||||
{EVP_R_ASN1_LIB ,"asn1 lib"},
|
||||
{EVP_R_BAD_BLOCK_LENGTH ,"bad block length"},
|
||||
{EVP_R_BAD_DECRYPT ,"bad decrypt"},
|
||||
|
||||
@@ -135,6 +135,30 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx)
|
||||
|
||||
return NID_rc4;
|
||||
|
||||
case NID_aes_128_cfb128:
|
||||
case NID_aes_128_cfb8:
|
||||
case NID_aes_128_cfb1:
|
||||
|
||||
return NID_aes_128_cfb128;
|
||||
|
||||
case NID_aes_192_cfb128:
|
||||
case NID_aes_192_cfb8:
|
||||
case NID_aes_192_cfb1:
|
||||
|
||||
return NID_aes_192_cfb128;
|
||||
|
||||
case NID_aes_256_cfb128:
|
||||
case NID_aes_256_cfb8:
|
||||
case NID_aes_256_cfb1:
|
||||
|
||||
return NID_aes_256_cfb128;
|
||||
|
||||
case NID_des_cfb64:
|
||||
case NID_des_cfb8:
|
||||
case NID_des_cfb1:
|
||||
|
||||
return NID_des_cfb64;
|
||||
|
||||
default:
|
||||
/* Check it has an OID and it is valid */
|
||||
otmp = OBJ_nid2obj(nid);
|
||||
|
||||
@@ -90,7 +90,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
|
||||
}
|
||||
|
||||
#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
|
||||
static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
|
||||
static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
|
||||
{\
|
||||
cprefix##_cfb##cbits##_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
|
||||
return 1;\
|
||||
@@ -127,7 +127,7 @@ BLOCK_CIPHER_def1(cname, cbc, cbc, CBC, kstruct, nid, block_size, key_len, \
|
||||
#define BLOCK_CIPHER_def_cfb(cname, kstruct, nid, key_len, \
|
||||
iv_len, cbits, flags, init_key, cleanup, \
|
||||
set_asn1, get_asn1, ctrl) \
|
||||
BLOCK_CIPHER_def1(cname, cfb##cbits, cfb, CFB, kstruct, nid, 1, \
|
||||
BLOCK_CIPHER_def1(cname, cfb##cbits, cfb##cbits, CFB, kstruct, nid, 1, \
|
||||
key_len, iv_len, flags, init_key, cleanup, set_asn1, \
|
||||
get_asn1, ctrl)
|
||||
|
||||
@@ -225,3 +225,12 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
|
||||
get_asn1, ctrl)
|
||||
|
||||
#define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data)
|
||||
|
||||
#define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len) \
|
||||
BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \
|
||||
BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \
|
||||
NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \
|
||||
0, cipher##_init_key, NULL, \
|
||||
EVP_CIPHER_set_asn1_iv, \
|
||||
EVP_CIPHER_get_asn1_iv, \
|
||||
NULL)
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#define NUM_NID 726
|
||||
#define NUM_SN 721
|
||||
#define NUM_LN 721
|
||||
#define NUM_OBJ 693
|
||||
#define NUM_NID 737
|
||||
#define NUM_SN 732
|
||||
#define NUM_LN 732
|
||||
#define NUM_OBJ 694
|
||||
|
||||
static unsigned char lvalues[4882]={
|
||||
static unsigned char lvalues[4885]={
|
||||
0x00, /* [ 0] OBJ_undef */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
|
||||
@@ -761,6 +761,7 @@ static unsigned char lvalues[4882]={
|
||||
0x00, /* [4878] OBJ_itu_t */
|
||||
0x50, /* [4879] OBJ_joint_iso_itu_t */
|
||||
0x67, /* [4880] OBJ_international_organizations */
|
||||
0x55,0x1D,0x36, /* [4881] OBJ_inhibit_any_policy */
|
||||
};
|
||||
|
||||
static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
@@ -1896,20 +1897,38 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
NID_international_organizations,1,&(lvalues[4880]),0},
|
||||
{"Oakley-EC2N-3","ipsec3",NID_ipsec3,0,NULL},
|
||||
{"Oakley-EC2N-4","ipsec4",NID_ipsec4,0,NULL},
|
||||
{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,0,NULL},
|
||||
{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,0,NULL},
|
||||
{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,0,NULL},
|
||||
{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,0,NULL},
|
||||
{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,0,NULL},
|
||||
{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,0,NULL},
|
||||
{"DES-CFB1","des-cfb1",NID_des_cfb1,0,NULL},
|
||||
{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL},
|
||||
{"DES-EDE3-CFB1","des-ede3-cfb1",NID_des_ede3_cfb1,0,NULL},
|
||||
{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL},
|
||||
{"inhibitAnyPolicy","X509v3 Inhibit Any Policy",
|
||||
NID_inhibit_any_policy,3,&(lvalues[4881]),0},
|
||||
};
|
||||
|
||||
static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[364]),/* "AD_DVCS" */
|
||||
&(nid_objs[419]),/* "AES-128-CBC" */
|
||||
&(nid_objs[421]),/* "AES-128-CFB" */
|
||||
&(nid_objs[726]),/* "AES-128-CFB1" */
|
||||
&(nid_objs[729]),/* "AES-128-CFB8" */
|
||||
&(nid_objs[418]),/* "AES-128-ECB" */
|
||||
&(nid_objs[420]),/* "AES-128-OFB" */
|
||||
&(nid_objs[423]),/* "AES-192-CBC" */
|
||||
&(nid_objs[425]),/* "AES-192-CFB" */
|
||||
&(nid_objs[727]),/* "AES-192-CFB1" */
|
||||
&(nid_objs[730]),/* "AES-192-CFB8" */
|
||||
&(nid_objs[422]),/* "AES-192-ECB" */
|
||||
&(nid_objs[424]),/* "AES-192-OFB" */
|
||||
&(nid_objs[427]),/* "AES-256-CBC" */
|
||||
&(nid_objs[429]),/* "AES-256-CFB" */
|
||||
&(nid_objs[728]),/* "AES-256-CFB1" */
|
||||
&(nid_objs[731]),/* "AES-256-CFB8" */
|
||||
&(nid_objs[426]),/* "AES-256-ECB" */
|
||||
&(nid_objs[428]),/* "AES-256-OFB" */
|
||||
&(nid_objs[91]),/* "BF-CBC" */
|
||||
@@ -1929,6 +1948,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[31]),/* "DES-CBC" */
|
||||
&(nid_objs[707]),/* "DES-CDMF" */
|
||||
&(nid_objs[30]),/* "DES-CFB" */
|
||||
&(nid_objs[732]),/* "DES-CFB1" */
|
||||
&(nid_objs[733]),/* "DES-CFB8" */
|
||||
&(nid_objs[29]),/* "DES-ECB" */
|
||||
&(nid_objs[32]),/* "DES-EDE" */
|
||||
&(nid_objs[43]),/* "DES-EDE-CBC" */
|
||||
@@ -1937,6 +1958,8 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[33]),/* "DES-EDE3" */
|
||||
&(nid_objs[44]),/* "DES-EDE3-CBC" */
|
||||
&(nid_objs[61]),/* "DES-EDE3-CFB" */
|
||||
&(nid_objs[734]),/* "DES-EDE3-CFB1" */
|
||||
&(nid_objs[735]),/* "DES-EDE3-CFB8" */
|
||||
&(nid_objs[63]),/* "DES-EDE3-OFB" */
|
||||
&(nid_objs[45]),/* "DES-OFB" */
|
||||
&(nid_objs[80]),/* "DESX-CBC" */
|
||||
@@ -2303,6 +2326,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */
|
||||
&(nid_objs[527]),/* "identified-organization" */
|
||||
&(nid_objs[461]),/* "info" */
|
||||
&(nid_objs[736]),/* "inhibitAnyPolicy" */
|
||||
&(nid_objs[101]),/* "initials" */
|
||||
&(nid_objs[723]),/* "international-organizations" */
|
||||
&(nid_objs[142]),/* "invalidityDate" */
|
||||
@@ -2716,6 +2740,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[89]),/* "X509v3 Certificate Policies" */
|
||||
&(nid_objs[140]),/* "X509v3 Delta CRL Indicator" */
|
||||
&(nid_objs[126]),/* "X509v3 Extended Key Usage" */
|
||||
&(nid_objs[736]),/* "X509v3 Inhibit Any Policy" */
|
||||
&(nid_objs[86]),/* "X509v3 Issuer Alternative Name" */
|
||||
&(nid_objs[83]),/* "X509v3 Key Usage" */
|
||||
&(nid_objs[720]),/* "X509v3 Name Constraints" */
|
||||
@@ -2737,14 +2762,20 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[670]),/* "additional verification" */
|
||||
&(nid_objs[419]),/* "aes-128-cbc" */
|
||||
&(nid_objs[421]),/* "aes-128-cfb" */
|
||||
&(nid_objs[726]),/* "aes-128-cfb1" */
|
||||
&(nid_objs[729]),/* "aes-128-cfb8" */
|
||||
&(nid_objs[418]),/* "aes-128-ecb" */
|
||||
&(nid_objs[420]),/* "aes-128-ofb" */
|
||||
&(nid_objs[423]),/* "aes-192-cbc" */
|
||||
&(nid_objs[425]),/* "aes-192-cfb" */
|
||||
&(nid_objs[727]),/* "aes-192-cfb1" */
|
||||
&(nid_objs[730]),/* "aes-192-cfb8" */
|
||||
&(nid_objs[422]),/* "aes-192-ecb" */
|
||||
&(nid_objs[424]),/* "aes-192-ofb" */
|
||||
&(nid_objs[427]),/* "aes-256-cbc" */
|
||||
&(nid_objs[429]),/* "aes-256-cfb" */
|
||||
&(nid_objs[728]),/* "aes-256-cfb1" */
|
||||
&(nid_objs[731]),/* "aes-256-cfb8" */
|
||||
&(nid_objs[426]),/* "aes-256-ecb" */
|
||||
&(nid_objs[428]),/* "aes-256-ofb" */
|
||||
&(nid_objs[376]),/* "algorithm" */
|
||||
@@ -2803,6 +2834,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[31]),/* "des-cbc" */
|
||||
&(nid_objs[707]),/* "des-cdmf" */
|
||||
&(nid_objs[30]),/* "des-cfb" */
|
||||
&(nid_objs[732]),/* "des-cfb1" */
|
||||
&(nid_objs[733]),/* "des-cfb8" */
|
||||
&(nid_objs[29]),/* "des-ecb" */
|
||||
&(nid_objs[32]),/* "des-ede" */
|
||||
&(nid_objs[43]),/* "des-ede-cbc" */
|
||||
@@ -2811,6 +2844,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[33]),/* "des-ede3" */
|
||||
&(nid_objs[44]),/* "des-ede3-cbc" */
|
||||
&(nid_objs[61]),/* "des-ede3-cfb" */
|
||||
&(nid_objs[734]),/* "des-ede3-cfb1" */
|
||||
&(nid_objs[735]),/* "des-ede3-cfb8" */
|
||||
&(nid_objs[63]),/* "des-ede3-ofb" */
|
||||
&(nid_objs[45]),/* "des-ofb" */
|
||||
&(nid_objs[107]),/* "description" */
|
||||
@@ -3406,6 +3441,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[90]),/* OBJ_authority_key_identifier 2 5 29 35 */
|
||||
&(nid_objs[401]),/* OBJ_policy_constraints 2 5 29 36 */
|
||||
&(nid_objs[126]),/* OBJ_ext_key_usage 2 5 29 37 */
|
||||
&(nid_objs[736]),/* OBJ_inhibit_any_policy 2 5 29 54 */
|
||||
&(nid_objs[402]),/* OBJ_target_information 2 5 29 55 */
|
||||
&(nid_objs[403]),/* OBJ_no_rev_avail 2 5 29 56 */
|
||||
&(nid_objs[577]),/* OBJ_set_ctype 2 23 42 0 */
|
||||
|
||||
@@ -2082,6 +2082,11 @@
|
||||
#define NID_ext_key_usage 126
|
||||
#define OBJ_ext_key_usage OBJ_id_ce,37L
|
||||
|
||||
#define SN_inhibit_any_policy "inhibitAnyPolicy"
|
||||
#define LN_inhibit_any_policy "X509v3 Inhibit Any Policy"
|
||||
#define NID_inhibit_any_policy 736
|
||||
#define OBJ_inhibit_any_policy OBJ_id_ce,54L
|
||||
|
||||
#define SN_target_information "targetInformation"
|
||||
#define LN_target_information "X509v3 AC Targeting"
|
||||
#define NID_target_information 402
|
||||
@@ -2319,6 +2324,46 @@
|
||||
#define NID_aes_256_cfb128 429
|
||||
#define OBJ_aes_256_cfb128 OBJ_aes,44L
|
||||
|
||||
#define SN_aes_128_cfb1 "AES-128-CFB1"
|
||||
#define LN_aes_128_cfb1 "aes-128-cfb1"
|
||||
#define NID_aes_128_cfb1 726
|
||||
|
||||
#define SN_aes_192_cfb1 "AES-192-CFB1"
|
||||
#define LN_aes_192_cfb1 "aes-192-cfb1"
|
||||
#define NID_aes_192_cfb1 727
|
||||
|
||||
#define SN_aes_256_cfb1 "AES-256-CFB1"
|
||||
#define LN_aes_256_cfb1 "aes-256-cfb1"
|
||||
#define NID_aes_256_cfb1 728
|
||||
|
||||
#define SN_aes_128_cfb8 "AES-128-CFB8"
|
||||
#define LN_aes_128_cfb8 "aes-128-cfb8"
|
||||
#define NID_aes_128_cfb8 729
|
||||
|
||||
#define SN_aes_192_cfb8 "AES-192-CFB8"
|
||||
#define LN_aes_192_cfb8 "aes-192-cfb8"
|
||||
#define NID_aes_192_cfb8 730
|
||||
|
||||
#define SN_aes_256_cfb8 "AES-256-CFB8"
|
||||
#define LN_aes_256_cfb8 "aes-256-cfb8"
|
||||
#define NID_aes_256_cfb8 731
|
||||
|
||||
#define SN_des_cfb1 "DES-CFB1"
|
||||
#define LN_des_cfb1 "des-cfb1"
|
||||
#define NID_des_cfb1 732
|
||||
|
||||
#define SN_des_cfb8 "DES-CFB8"
|
||||
#define LN_des_cfb8 "des-cfb8"
|
||||
#define NID_des_cfb8 733
|
||||
|
||||
#define SN_des_ede3_cfb1 "DES-EDE3-CFB1"
|
||||
#define LN_des_ede3_cfb1 "des-ede3-cfb1"
|
||||
#define NID_des_ede3_cfb1 734
|
||||
|
||||
#define SN_des_ede3_cfb8 "DES-EDE3-CFB8"
|
||||
#define LN_des_ede3_cfb8 "des-ede3-cfb8"
|
||||
#define NID_des_ede3_cfb8 735
|
||||
|
||||
#define SN_hold_instruction_code "holdInstructionCode"
|
||||
#define LN_hold_instruction_code "Hold Instruction Code"
|
||||
#define NID_hold_instruction_code 430
|
||||
|
||||
@@ -723,3 +723,14 @@ joint_iso_itu_t 722
|
||||
international_organizations 723
|
||||
ipsec3 724
|
||||
ipsec4 725
|
||||
aes_128_cfb1 726
|
||||
aes_192_cfb1 727
|
||||
aes_256_cfb1 728
|
||||
aes_128_cfb8 729
|
||||
aes_192_cfb8 730
|
||||
aes_256_cfb8 731
|
||||
des_cfb1 732
|
||||
des_cfb8 733
|
||||
des_ede3_cfb1 734
|
||||
des_ede3_cfb8 735
|
||||
inhibit_any_policy 736
|
||||
|
||||
@@ -679,6 +679,8 @@ id-ce 35 : authorityKeyIdentifier : X509v3 Authority Key Identifier
|
||||
id-ce 36 : policyConstraints : X509v3 Policy Constraints
|
||||
!Cname ext-key-usage
|
||||
id-ce 37 : extendedKeyUsage : X509v3 Extended Key Usage
|
||||
!Cname inhibit-any-policy
|
||||
id-ce 54 : inhibitAnyPolicy : X509v3 Inhibit Any Policy
|
||||
!Cname target-information
|
||||
id-ce 55 : targetInformation : X509v3 AC Targeting
|
||||
!Cname no-rev-avail
|
||||
@@ -775,6 +777,19 @@ aes 43 : AES-256-OFB : aes-256-ofb
|
||||
!Cname aes-256-cfb128
|
||||
aes 44 : AES-256-CFB : aes-256-cfb
|
||||
|
||||
# There are no OIDs for these modes...
|
||||
|
||||
: AES-128-CFB1 : aes-128-cfb1
|
||||
: AES-192-CFB1 : aes-192-cfb1
|
||||
: AES-256-CFB1 : aes-256-cfb1
|
||||
: AES-128-CFB8 : aes-128-cfb8
|
||||
: AES-192-CFB8 : aes-192-cfb8
|
||||
: AES-256-CFB8 : aes-256-cfb8
|
||||
: DES-CFB1 : des-cfb1
|
||||
: DES-CFB8 : des-cfb8
|
||||
: DES-EDE3-CFB1 : des-ede3-cfb1
|
||||
: DES-EDE3-CFB8 : des-ede3-cfb8
|
||||
|
||||
# Hold instruction CRL entry extension
|
||||
!Cname hold-instruction-code
|
||||
id-ce 23 : holdInstructionCode : Hold Instruction Code
|
||||
|
||||
@@ -305,6 +305,8 @@ err:
|
||||
|
||||
/* Add a nonce to an extension stack. A nonce can be specificed or if NULL
|
||||
* a random nonce will be generated.
|
||||
* Note: OpenSSL 0.9.7d and later create an OCTET STRING containing the
|
||||
* nonce, previous versions used the raw nonce.
|
||||
*/
|
||||
|
||||
static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, unsigned char *val, int len)
|
||||
@@ -313,20 +315,28 @@ static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, unsigned char *val,
|
||||
ASN1_OCTET_STRING os;
|
||||
int ret = 0;
|
||||
if (len <= 0) len = OCSP_DEFAULT_NONCE_LENGTH;
|
||||
if (val) tmpval = val;
|
||||
/* Create the OCTET STRING manually by writing out the header and
|
||||
* appending the content octets. This avoids an extra memory allocation
|
||||
* operation in some cases. Applications should *NOT* do this because
|
||||
* it relies on library internals.
|
||||
*/
|
||||
os.length = ASN1_object_size(0, len, V_ASN1_OCTET_STRING);
|
||||
os.data = OPENSSL_malloc(os.length);
|
||||
if (os.data == NULL)
|
||||
goto err;
|
||||
tmpval = os.data;
|
||||
ASN1_put_object(&tmpval, 0, len, V_ASN1_OCTET_STRING, V_ASN1_UNIVERSAL);
|
||||
if (val)
|
||||
memcpy(tmpval, val, len);
|
||||
else
|
||||
{
|
||||
if (!(tmpval = OPENSSL_malloc(len))) goto err;
|
||||
RAND_pseudo_bytes(tmpval, len);
|
||||
}
|
||||
os.data = tmpval;
|
||||
os.length = len;
|
||||
if(!X509V3_add1_i2d(exts, NID_id_pkix_OCSP_Nonce,
|
||||
&os, 0, X509V3_ADD_REPLACE))
|
||||
goto err;
|
||||
ret = 1;
|
||||
err:
|
||||
if(!val) OPENSSL_free(tmpval);
|
||||
if (os.data)
|
||||
OPENSSL_free(os.data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -253,6 +253,7 @@ int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pss
|
||||
|
||||
|
||||
err:
|
||||
if (buf) OPENSSL_free(buf);
|
||||
if (*ppath) OPENSSL_free(*ppath);
|
||||
if (*pport) OPENSSL_free(*pport);
|
||||
if (*phost) OPENSSL_free(*phost);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* project 2000.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 2000-2004 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
|
||||
@@ -272,7 +272,7 @@ static int ocsp_check_ids(STACK_OF(OCSP_SINGLERESP) *sresp, OCSP_CERTID **ret)
|
||||
|
||||
for (i = 1; i < idcount; i++)
|
||||
{
|
||||
tmpid = sk_OCSP_SINGLERESP_value(sresp, 0)->certId;
|
||||
tmpid = sk_OCSP_SINGLERESP_value(sresp, i)->certId;
|
||||
/* Check to see if IDs match */
|
||||
if (OCSP_id_issuer_cmp(cid, tmpid))
|
||||
{
|
||||
@@ -330,7 +330,7 @@ static int ocsp_match_issuerid(X509 *cert, OCSP_CERTID *cid,
|
||||
OCSP_CERTID *tmpid;
|
||||
for (i = 0; i < sk_OCSP_SINGLERESP_num(sresp); i++)
|
||||
{
|
||||
tmpid = sk_OCSP_SINGLERESP_value(sresp, 0)->certId;
|
||||
tmpid = sk_OCSP_SINGLERESP_value(sresp, i)->certId;
|
||||
ret = ocsp_match_issuerid(cert, tmpid, NULL);
|
||||
if (ret <= 0) return ret;
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data,
|
||||
long len)
|
||||
{
|
||||
int nlen,n,i,j,outl;
|
||||
unsigned char *buf;
|
||||
unsigned char *buf = NULL;
|
||||
EVP_ENCODE_CTX ctx;
|
||||
int reason=ERR_R_BUF_LIB;
|
||||
|
||||
@@ -557,7 +557,7 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data,
|
||||
goto err;
|
||||
}
|
||||
|
||||
buf=(unsigned char *)OPENSSL_malloc(PEM_BUFSIZE*8);
|
||||
buf = OPENSSL_malloc(PEM_BUFSIZE*8);
|
||||
if (buf == NULL)
|
||||
{
|
||||
reason=ERR_R_MALLOC_FAILURE;
|
||||
@@ -578,12 +578,15 @@ int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data,
|
||||
EVP_EncodeFinal(&ctx,buf,&outl);
|
||||
if ((outl > 0) && (BIO_write(bp,(char *)buf,outl) != outl)) goto err;
|
||||
OPENSSL_free(buf);
|
||||
buf = NULL;
|
||||
if ( (BIO_write(bp,"-----END ",9) != 9) ||
|
||||
(BIO_write(bp,name,nlen) != nlen) ||
|
||||
(BIO_write(bp,"-----\n",6) != 6))
|
||||
goto err;
|
||||
return(i+outl);
|
||||
err:
|
||||
if (buf)
|
||||
OPENSSL_free(buf);
|
||||
PEMerr(PEM_F_PEM_WRITE_BIO,reason);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -89,6 +89,10 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo
|
||||
p8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len);
|
||||
if(!p8inf) goto p8err;
|
||||
ret = EVP_PKCS82PKEY(p8inf);
|
||||
if(x) {
|
||||
if(*x) EVP_PKEY_free((EVP_PKEY *)*x);
|
||||
*x = ret;
|
||||
}
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
} else if (strcmp(nm,PEM_STRING_PKCS8) == 0) {
|
||||
PKCS8_PRIV_KEY_INFO *p8inf;
|
||||
|
||||
@@ -91,7 +91,8 @@ md_rand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
md_rand.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
md_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
md_rand.o: ../../include/openssl/symhacks.h md_rand.c rand_lcl.h
|
||||
rand_egd.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
rand_egd.o: ../../include/openssl/buffer.h ../../include/openssl/e_os2.h
|
||||
rand_egd.o: ../../include/openssl/opensslconf.h
|
||||
rand_egd.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
rand_egd.o: rand_egd.c
|
||||
rand_err.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
|
||||
@@ -165,8 +166,9 @@ rand_win.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
rand_win.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
rand_win.o: ../../include/openssl/symhacks.h ../cryptlib.h rand_lcl.h
|
||||
rand_win.o: rand_win.c
|
||||
randfile.o: ../../e_os.h ../../include/openssl/crypto.h
|
||||
randfile.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
|
||||
randfile.o: ../../e_os.h ../../include/openssl/buffer.h
|
||||
randfile.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
|
||||
randfile.o: ../../include/openssl/opensslconf.h
|
||||
randfile.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
randfile.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
|
||||
randfile.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
|
||||
@@ -315,7 +315,7 @@ static void ssleay_rand_add(const void *buf, int num, double add)
|
||||
|
||||
static void ssleay_rand_seed(const void *buf, int num)
|
||||
{
|
||||
ssleay_rand_add(buf, num, num);
|
||||
ssleay_rand_add(buf, num, (double)num);
|
||||
}
|
||||
|
||||
static int ssleay_rand_bytes(unsigned char *buf, int num)
|
||||
|
||||
@@ -233,19 +233,19 @@ int RAND_poll(void)
|
||||
#if defined(DEVRANDOM) || defined(DEVRANDOM_EGD)
|
||||
if (n > 0)
|
||||
{
|
||||
RAND_add(tmpbuf,sizeof tmpbuf,n);
|
||||
RAND_add(tmpbuf,sizeof tmpbuf,(double)n);
|
||||
OPENSSL_cleanse(tmpbuf,n);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* put in some default random data, we need more than just this */
|
||||
l=curr_pid;
|
||||
RAND_add(&l,sizeof(l),0);
|
||||
RAND_add(&l,sizeof(l),0.0);
|
||||
l=getuid();
|
||||
RAND_add(&l,sizeof(l),0);
|
||||
RAND_add(&l,sizeof(l),0.0);
|
||||
|
||||
l=time(NULL);
|
||||
RAND_add(&l,sizeof(l),0);
|
||||
RAND_add(&l,sizeof(l),0.0);
|
||||
|
||||
#if defined(DEVRANDOM) || defined(DEVRANDOM_EGD)
|
||||
return 1;
|
||||
|
||||
@@ -110,6 +110,7 @@ int RAND_load_file(const char *file, long bytes)
|
||||
|
||||
in=fopen(file,"rb");
|
||||
if (in == NULL) goto err;
|
||||
#if defined(S_IFBLK) && defined(S_IFCHR)
|
||||
if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
|
||||
/* this file is a device. we don't want read an infinite number
|
||||
* of bytes from a random device, nor do we want to use buffered
|
||||
@@ -118,6 +119,7 @@ int RAND_load_file(const char *file, long bytes)
|
||||
bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */
|
||||
setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */
|
||||
}
|
||||
#endif
|
||||
for (;;)
|
||||
{
|
||||
if (bytes > 0)
|
||||
@@ -151,6 +153,7 @@ int RAND_write_file(const char *file)
|
||||
|
||||
i=stat(file,&sb);
|
||||
if (i != -1) {
|
||||
#if defined(S_IFBLK) && defined(S_IFCHR)
|
||||
if (sb.st_mode & (S_IFBLK | S_IFCHR)) {
|
||||
/* this file is a device. we don't write back to it.
|
||||
* we "succeed" on the assumption this is some sort
|
||||
@@ -159,6 +162,7 @@ int RAND_write_file(const char *file)
|
||||
*/
|
||||
return(1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32)
|
||||
|
||||
@@ -243,7 +243,7 @@ static BN_BLINDING *setup_blinding(RSA *rsa, BN_CTX *ctx)
|
||||
if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL)
|
||||
{
|
||||
/* if PRNG is not properly seeded, resort to secret exponent as unpredictable seed */
|
||||
RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0);
|
||||
RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0.0);
|
||||
if (!BN_pseudo_rand_range(A,rsa->n)) goto err;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -343,7 +343,7 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx)
|
||||
if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL)
|
||||
{
|
||||
/* if PRNG is not properly seeded, resort to secret exponent as unpredictable seed */
|
||||
RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0);
|
||||
RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0.0);
|
||||
if (!BN_pseudo_rand_range(A,rsa->n)) goto err;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -117,10 +117,14 @@
|
||||
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
/* need for #define _POSIX_C_SOURCE arises whenever you pass -ansi to gcc
|
||||
* [maybe others?], because it masks interfaces not discussed in standard,
|
||||
* sigaction and fileno included. -pedantic would be more appropriate for
|
||||
* the intended purposes, but we can't prevent users from adding -ansi.
|
||||
*/
|
||||
#define _POSIX_C_SOURCE 1
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#undef _POSIX_C_SOURCE
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
|
||||
{
|
||||
char c = '/';
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
char c = ctx->dirs[i][strlen(ctx->dirs[i])-1];
|
||||
c = ctx->dirs[i][strlen(ctx->dirs[i])-1];
|
||||
if (c != ':' && c != '>' && c != ']')
|
||||
{
|
||||
/* If no separator is present, we assume the
|
||||
|
||||
@@ -147,6 +147,12 @@ const char *X509_verify_cert_error_string(long n)
|
||||
case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION:
|
||||
return("unhandled critical extension");
|
||||
|
||||
case X509_V_ERR_KEYUSAGE_NO_CRL_SIGN:
|
||||
return("key usage does not include CRL signing");
|
||||
|
||||
case X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION:
|
||||
return("unhandled critical CRL extension");
|
||||
|
||||
default:
|
||||
BIO_snprintf(buf,sizeof buf,"error number %ld",n);
|
||||
return(buf);
|
||||
|
||||
@@ -383,6 +383,7 @@ static int check_chain_purpose(X509_STORE_CTX *ctx)
|
||||
/* Check all untrusted certificates */
|
||||
for (i = 0; i < ctx->last_untrusted; i++)
|
||||
{
|
||||
int ret;
|
||||
x = sk_X509_value(ctx->chain, i);
|
||||
if (!(ctx->flags & X509_V_FLAG_IGNORE_CRITICAL)
|
||||
&& (x->ex_flags & EXFLAG_CRITICAL))
|
||||
@@ -393,7 +394,10 @@ static int check_chain_purpose(X509_STORE_CTX *ctx)
|
||||
ok=cb(0,ctx);
|
||||
if (!ok) goto end;
|
||||
}
|
||||
if (!X509_check_purpose(x, ctx->purpose, i))
|
||||
ret = X509_check_purpose(x, ctx->purpose, i);
|
||||
if ((ret == 0)
|
||||
|| ((ctx->flags & X509_V_FLAG_X509_STRICT)
|
||||
&& (ret != 1)))
|
||||
{
|
||||
if (i)
|
||||
ctx->error = X509_V_ERR_INVALID_CA;
|
||||
@@ -537,6 +541,14 @@ static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl)
|
||||
|
||||
if(issuer)
|
||||
{
|
||||
/* Check for cRLSign bit if keyUsage present */
|
||||
if ((issuer->ex_flags & EXFLAG_KUSAGE) &&
|
||||
!(issuer->ex_kusage & KU_CRL_SIGN))
|
||||
{
|
||||
ctx->error = X509_V_ERR_KEYUSAGE_NO_CRL_SIGN;
|
||||
ok = ctx->verify_cb(0, ctx);
|
||||
if(!ok) goto err;
|
||||
}
|
||||
|
||||
/* Attempt to get issuer certificate public key */
|
||||
ikey = X509_get_pubkey(issuer);
|
||||
@@ -611,17 +623,46 @@ static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
|
||||
{
|
||||
int idx, ok;
|
||||
X509_REVOKED rtmp;
|
||||
STACK_OF(X509_EXTENSION) *exts;
|
||||
X509_EXTENSION *ext;
|
||||
/* Look for serial number of certificate in CRL */
|
||||
rtmp.serialNumber = X509_get_serialNumber(x);
|
||||
idx = sk_X509_REVOKED_find(crl->crl->revoked, &rtmp);
|
||||
/* Not found: OK */
|
||||
if(idx == -1) return 1;
|
||||
/* Otherwise revoked: want something cleverer than
|
||||
/* If found assume revoked: want something cleverer than
|
||||
* this to handle entry extensions in V2 CRLs.
|
||||
*/
|
||||
ctx->error = X509_V_ERR_CERT_REVOKED;
|
||||
ok = ctx->verify_cb(0, ctx);
|
||||
return ok;
|
||||
if(idx >= 0)
|
||||
{
|
||||
ctx->error = X509_V_ERR_CERT_REVOKED;
|
||||
ok = ctx->verify_cb(0, ctx);
|
||||
if (!ok) return 0;
|
||||
}
|
||||
|
||||
if (ctx->flags & X509_V_FLAG_IGNORE_CRITICAL)
|
||||
return 1;
|
||||
|
||||
/* See if we have any critical CRL extensions: since we
|
||||
* currently don't handle any CRL extensions the CRL must be
|
||||
* rejected.
|
||||
* This code accesses the X509_CRL structure directly: applications
|
||||
* shouldn't do this.
|
||||
*/
|
||||
|
||||
exts = crl->crl->extensions;
|
||||
|
||||
for (idx = 0; idx < sk_X509_EXTENSION_num(exts); idx++)
|
||||
{
|
||||
ext = sk_X509_EXTENSION_value(exts, idx);
|
||||
if (ext->critical > 0)
|
||||
{
|
||||
ctx->error =
|
||||
X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION;
|
||||
ok = ctx->verify_cb(0, ctx);
|
||||
if(!ok) return 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int internal_verify(X509_STORE_CTX *ctx)
|
||||
|
||||
@@ -305,17 +305,26 @@ struct x509_store_ctx_st /* X509_STORE_CTX */
|
||||
|
||||
#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33
|
||||
#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34
|
||||
#define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35
|
||||
#define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36
|
||||
|
||||
/* The application is not happy */
|
||||
#define X509_V_ERR_APPLICATION_VERIFICATION 50
|
||||
|
||||
/* Certificate verify flags */
|
||||
|
||||
#define X509_V_FLAG_CB_ISSUER_CHECK 0x1 /* Send issuer+subject checks to verify_cb */
|
||||
#define X509_V_FLAG_USE_CHECK_TIME 0x2 /* Use check time instead of current time */
|
||||
#define X509_V_FLAG_CRL_CHECK 0x4 /* Lookup CRLs */
|
||||
#define X509_V_FLAG_CRL_CHECK_ALL 0x8 /* Lookup CRLs for whole chain */
|
||||
#define X509_V_FLAG_IGNORE_CRITICAL 0x10 /* Ignore unhandled critical extensions */
|
||||
/* Send issuer+subject checks to verify_cb */
|
||||
#define X509_V_FLAG_CB_ISSUER_CHECK 0x1
|
||||
/* Use check time instead of current time */
|
||||
#define X509_V_FLAG_USE_CHECK_TIME 0x2
|
||||
/* Lookup CRLs */
|
||||
#define X509_V_FLAG_CRL_CHECK 0x4
|
||||
/* Lookup CRLs for whole chain */
|
||||
#define X509_V_FLAG_CRL_CHECK_ALL 0x8
|
||||
/* Ignore unhandled critical extensions */
|
||||
#define X509_V_FLAG_IGNORE_CRITICAL 0x10
|
||||
/* Disable workarounds for broken certificates */
|
||||
#define X509_V_FLAG_X509_STRICT 0x20
|
||||
|
||||
int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,
|
||||
X509_NAME *name);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* project 1999.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2004 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
|
||||
@@ -65,7 +65,7 @@ extern X509V3_EXT_METHOD v3_ocsp_nonce, v3_ocsp_accresp, v3_ocsp_acutoff;
|
||||
extern X509V3_EXT_METHOD v3_ocsp_crlid, v3_ocsp_nocheck, v3_ocsp_serviceloc;
|
||||
extern X509V3_EXT_METHOD v3_crl_hold;
|
||||
extern X509V3_EXT_METHOD v3_policy_mappings, v3_policy_constraints;
|
||||
extern X509V3_EXT_METHOD v3_name_constraints;
|
||||
extern X509V3_EXT_METHOD v3_name_constraints, v3_inhibit_anyp;
|
||||
|
||||
/* This table will be searched using OBJ_bsearch so it *must* kept in
|
||||
* order of the ext_nid values.
|
||||
@@ -111,7 +111,8 @@ static X509V3_EXT_METHOD *standard_exts[] = {
|
||||
&v3_crl_hold,
|
||||
#endif
|
||||
&v3_policy_mappings,
|
||||
&v3_name_constraints
|
||||
&v3_name_constraints,
|
||||
&v3_inhibit_anyp
|
||||
};
|
||||
|
||||
/* Number of standard extensions */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* project 1999.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2004 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
|
||||
@@ -61,9 +61,22 @@
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
X509V3_EXT_METHOD v3_crl_num = {
|
||||
NID_crl_number, 0, ASN1_ITEM_ref(ASN1_INTEGER),
|
||||
0,0,0,0,
|
||||
(X509V3_EXT_I2S)i2s_ASN1_INTEGER,
|
||||
0,
|
||||
0,0,0,0, NULL};
|
||||
NID_crl_number, 0, ASN1_ITEM_ref(ASN1_INTEGER),
|
||||
0,0,0,0,
|
||||
(X509V3_EXT_I2S)i2s_ASN1_INTEGER,
|
||||
0,
|
||||
0,0,0,0, NULL};
|
||||
|
||||
static void * s2i_asn1_int(X509V3_EXT_METHOD *meth, X509V3_CTX *ctx, char *value)
|
||||
{
|
||||
return s2i_ASN1_INTEGER(meth, value);
|
||||
}
|
||||
|
||||
X509V3_EXT_METHOD v3_inhibit_anyp = {
|
||||
NID_inhibit_any_policy, 0, ASN1_ITEM_ref(ASN1_INTEGER),
|
||||
0,0,0,0,
|
||||
(X509V3_EXT_I2S)i2s_ASN1_INTEGER,
|
||||
(X509V3_EXT_S2I)s2i_asn1_int,
|
||||
0,0,0,0, NULL};
|
||||
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ NULL
|
||||
};
|
||||
|
||||
ASN1_SEQUENCE(POLICY_CONSTRAINTS) = {
|
||||
ASN1_OPT(POLICY_CONSTRAINTS, requireExplicitPolicy, ASN1_INTEGER),
|
||||
ASN1_OPT(POLICY_CONSTRAINTS, inhibitPolicyMapping, ASN1_INTEGER)
|
||||
ASN1_IMP_OPT(POLICY_CONSTRAINTS, requireExplicitPolicy, ASN1_INTEGER,0),
|
||||
ASN1_IMP_OPT(POLICY_CONSTRAINTS, inhibitPolicyMapping, ASN1_INTEGER,1)
|
||||
} ASN1_SEQUENCE_END(POLICY_CONSTRAINTS)
|
||||
|
||||
IMPLEMENT_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* project 2001.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2004 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
|
||||
@@ -415,6 +415,7 @@ static void x509v3_cache_extensions(X509 *x)
|
||||
* 1 is a CA
|
||||
* 2 basicConstraints absent so "maybe" a CA
|
||||
* 3 basicConstraints absent but self signed V1.
|
||||
* 4 basicConstraints absent but keyUsage present and keyCertSign asserted.
|
||||
*/
|
||||
|
||||
#define V1_ROOT (EXFLAG_V1|EXFLAG_SS)
|
||||
@@ -436,7 +437,7 @@ static int ca_check(const X509 *x)
|
||||
} else {
|
||||
if((x->ex_flags & V1_ROOT) == V1_ROOT) return 3;
|
||||
/* If key usage present it must have certSign so tolerate it */
|
||||
else if (x->ex_flags & EXFLAG_KUSAGE) return 3;
|
||||
else if (x->ex_flags & EXFLAG_KUSAGE) return 4;
|
||||
else return 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ config - OpenSSL CONF library configuration files
|
||||
The OpenSSL CONF library can be used to read configuration files.
|
||||
It is used for the OpenSSL master configuration file B<openssl.cnf>
|
||||
and in a few other places like B<SPKAC> files and certificate extension
|
||||
files for the B<x509> utility.
|
||||
files for the B<x509> utility. OpenSSL applications can also use the
|
||||
CONF library for their own purposes.
|
||||
|
||||
A configuration file is divided into a number of sections. Each section
|
||||
starts with a line B<[ section_name ]> and ends when a new section is
|
||||
@@ -51,13 +52,146 @@ or the B<\> character. By making the last character of a line a B<\>
|
||||
a B<value> string can be spread across multiple lines. In addition
|
||||
the sequences B<\n>, B<\r>, B<\b> and B<\t> are recognized.
|
||||
|
||||
=head1 OPENSSL LIBRARY CONFIGURATION
|
||||
|
||||
In OpenSSL 0.9.7 and later applications can automatically configure certain
|
||||
aspects of OpenSSL using the master OpenSSL configuration file, or optionally
|
||||
an alternative configuration file. The B<openssl> utility includes this
|
||||
functionality: any sub command uses the master OpenSSL configuration file
|
||||
unless an option is used in the sub command to use an alternative configuration
|
||||
file.
|
||||
|
||||
To enable library configuration the default section needs to contain an
|
||||
appropriate line which points to the main configuration section. The default
|
||||
name is B<openssl_conf> which is used by the B<openssl> utility. Other
|
||||
applications may use an alternative name such as B<myapplicaton_conf>.
|
||||
|
||||
The configuration section should consist of a set of name value pairs which
|
||||
contain specific module configuration information. The B<name> represents
|
||||
the name of the I<configuration module> the meaning of the B<value> is
|
||||
module specific: it may, for example, represent a further configuration
|
||||
section containing configuration module specific information. E.g.
|
||||
|
||||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
|
||||
oid_section = new_oids
|
||||
engines = engine_section
|
||||
|
||||
[new_oids]
|
||||
|
||||
... new oids here ...
|
||||
|
||||
[engine_section]
|
||||
|
||||
... engine stuff here ...
|
||||
|
||||
Currently there are two configuration modules. One for ASN1 objects another
|
||||
for ENGINE configuration.
|
||||
|
||||
=head2 ASN1 OBJECT CONFIGURATION MODULE
|
||||
|
||||
This module has the name B<oid_section>. The value of this variable points
|
||||
to a section containing name value pairs of OIDs: the name is the OID short
|
||||
and long name, the value is the numerical form of the OID. Although some of
|
||||
the B<openssl> utility sub commands already have their own ASN1 OBJECT section
|
||||
functionality not all do. By using the ASN1 OBJECT configuration module
|
||||
B<all> the B<openssl> utility sub commands can see the new objects as well
|
||||
as any compliant applications. For example:
|
||||
|
||||
[new_oids]
|
||||
|
||||
some_new_oid = 1.2.3.4
|
||||
some_other_oid = 1.2.3.5
|
||||
|
||||
=head2 ENGINE CONFIGURATION MODULE
|
||||
|
||||
This ENGINE configuration module has the name B<engines>. The value of this
|
||||
variable points to a section containing further ENGINE configuration
|
||||
information.
|
||||
|
||||
The section pointed to by B<engines> is a table of engine names (though see
|
||||
B<engine_id> below) and further sections containing configuration informations
|
||||
specific to each ENGINE.
|
||||
|
||||
Each ENGINE specific section is used to set default algorithms, load
|
||||
dynamic, perform initialization and send ctrls. The actual operation performed
|
||||
depends on the I<command> name which is the name of the name value pair. The
|
||||
currently supported commands are listed below.
|
||||
|
||||
For example:
|
||||
|
||||
[engine_section]
|
||||
|
||||
# Configure ENGINE named "foo"
|
||||
foo = foo_section
|
||||
# Configure ENGINE named "bar"
|
||||
bar = bar_section
|
||||
|
||||
[foo_section]
|
||||
... foo ENGINE specific commands ...
|
||||
|
||||
[bar_section]
|
||||
... "bar" ENGINE specific commands ...
|
||||
|
||||
The command B<engine_id> is used to give the ENGINE name. If used this
|
||||
command must be first. For example:
|
||||
|
||||
[engine_section]
|
||||
# This would normally handle an ENGINE named "foo"
|
||||
foo = foo_section
|
||||
|
||||
[foo_section]
|
||||
# Override default name and use "myfoo" instead.
|
||||
engine_id = myfoo
|
||||
|
||||
The command B<dynamic_path> loads and adds an ENGINE from the given path. It
|
||||
is equivalent to sending the ctrls B<SO_PATH> with the path argument followed
|
||||
by B<LIST_ADD> with value 2 and B<LOAD> to the dynamic ENGINE. If this is
|
||||
not the required behaviour then alternative ctrls can be sent directly
|
||||
to the dynamic ENGINE using ctrl commands.
|
||||
|
||||
The command B<init> determines whether to initialize the ENGINE. If the value
|
||||
is B<0> the ENGINE will not be initialized, if B<1> and attempt it made to
|
||||
initialized the ENGINE immediately. If the B<init> command is not present
|
||||
then an attempt will be made to initialize the ENGINE after all commands in
|
||||
its section have been processed.
|
||||
|
||||
The command B<default_algorithms> sets the default algorithms an ENGINE will
|
||||
supply using the functions B<ENGINE_set_default_string()>
|
||||
|
||||
If the name matches none of the above command names it is assumed to be a
|
||||
ctrl command which is sent to the ENGINE. The value of the command is the
|
||||
argument to the ctrl command. If the value is the string B<EMPTY> then no
|
||||
value is sent to the command.
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
[engine_section]
|
||||
|
||||
# Configure ENGINE named "foo"
|
||||
foo = foo_section
|
||||
|
||||
[foo_section]
|
||||
# Load engine from DSO
|
||||
dynamic_path = /some/path/fooengine.so
|
||||
# A foo specific ctrl.
|
||||
some_ctrl = some_value
|
||||
# Another ctrl that doesn't take a value.
|
||||
other_ctrl = EMPTY
|
||||
# Supply all default algorithms
|
||||
default_algorithms = ALL
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
If a configuration file attempts to expand a variable that doesn't exist
|
||||
then an error is flagged and the file will not load. This can happen
|
||||
if an attempt is made to expand an environment variable that doesn't
|
||||
exist. For example the default OpenSSL master configuration file used
|
||||
the value of B<HOME> which may not be defined on non Unix systems.
|
||||
exist. For example in a previous version of OpenSSL the default OpenSSL
|
||||
master configuration file used the value of B<HOME> which may not be
|
||||
defined on non Unix systems and would cause an error.
|
||||
|
||||
This can be worked around by including a B<default> section to provide
|
||||
a default value: then if the environment lookup fails the default value
|
||||
|
||||
@@ -17,6 +17,9 @@ B<openssl> B<smime>
|
||||
[B<-rc2-40>]
|
||||
[B<-rc2-64>]
|
||||
[B<-rc2-128>]
|
||||
[B<-aes128>]
|
||||
[B<-aes192>]
|
||||
[B<-aes256>]
|
||||
[B<-in file>]
|
||||
[B<-certfile file>]
|
||||
[B<-signer file>]
|
||||
@@ -126,11 +129,11 @@ B<-verify>. This directory must be a standard certificate directory: that
|
||||
is a hash of each subject name (using B<x509 -hash>) should be linked
|
||||
to each certificate.
|
||||
|
||||
=item B<-des -des3 -rc2-40 -rc2-64 -rc2-128>
|
||||
=item B<-des -des3 -rc2-40 -rc2-64 -rc2-128 -aes128 -aes192 -aes256>
|
||||
|
||||
the encryption algorithm to use. DES (56 bits), triple DES (168 bits)
|
||||
or 40, 64 or 128 bit RC2 respectively if not specified 40 bit RC2 is
|
||||
used. Only used with B<-encrypt>.
|
||||
the encryption algorithm to use. DES (56 bits), triple DES (168 bits),
|
||||
40, 64 or 128 bit RC2 or 128, 192 or 256 bit AES respectively. If not
|
||||
specified 40 bit RC2 is used. Only used with B<-encrypt>.
|
||||
|
||||
=item B<-nointern>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ BN_new, BN_init, BN_clear, BN_free, BN_clear_free - allocate and free BIGNUMs
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BN_new() allocated and initializes a B<BIGNUM> structure. BN_init()
|
||||
BN_new() allocates and initializes a B<BIGNUM> structure. BN_init()
|
||||
initializes an existing uninitialized B<BIGNUM>.
|
||||
|
||||
BN_clear() is used to destroy sensitive data such as keys when they
|
||||
|
||||
47
doc/crypto/CONF_modules_free.pod
Normal file
47
doc/crypto/CONF_modules_free.pod
Normal file
@@ -0,0 +1,47 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CONF_modules_free, CONF_modules_load, CONF_modules_unload -
|
||||
OpenSSL configuration cleanup functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/conf.h>
|
||||
|
||||
void CONF_modules_free(void);
|
||||
void CONF_modules_unload(int all);
|
||||
void CONF_modules_finish(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
CONF_modules_free() closes down and frees up all memory allocated by all
|
||||
configuration modules.
|
||||
|
||||
CONF_modules_finish() calls each configuration modules B<finish> handler
|
||||
to free up any configuration that module may have performed.
|
||||
|
||||
CONF_modules_unload() finishes and unloads configuration modules. If
|
||||
B<all> is set to B<0> only modules loaded from DSOs will be unloads. If
|
||||
B<all> is B<1> all modules, including builtin modules will be unloaded.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Normally applications will only call CONF_modules_free() at application to
|
||||
tidy up any configuration performed.
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
None of the functions return a value.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>,
|
||||
L<CONF_modules_load_file(3), CONF_modules_load_file(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
CONF_modules_free(), CONF_modules_unload(), and CONF_modules_finish()
|
||||
first appeared in OpenSSL 0.9.7.
|
||||
|
||||
=cut
|
||||
60
doc/crypto/CONF_modules_load_file.pod
Normal file
60
doc/crypto/CONF_modules_load_file.pod
Normal file
@@ -0,0 +1,60 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CONF_modules_load_file, CONF_modules_load - OpenSSL configuration functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/conf.h>
|
||||
|
||||
int CONF_modules_load_file(const char *filename, const char *appname,
|
||||
unsigned long flags);
|
||||
int CONF_modules_load(const CONF *cnf, const char *appname,
|
||||
unsigned long flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The function CONF_modules_load_file() configures OpenSSL using file
|
||||
B<filename> and application name B<appname>. If B<filename> is NULL
|
||||
the standard OpenSSL configuration file is used. If B<appname> is
|
||||
NULL the standard OpenSSL application name B<openssl_conf> is used.
|
||||
The behaviour can be cutomized using B<flags>.
|
||||
|
||||
CONF_modules_load() is idential to CONF_modules_load_file() except it
|
||||
read configuration information from B<cnf>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The following B<flags> are currently recognized:
|
||||
|
||||
B<CONF_MFLAGS_IGNORE_ERRORS> if set errors returned by individual
|
||||
configuration modules are ignored. If not set the first module error is
|
||||
considered fatal and no further modules are loads.
|
||||
|
||||
Normally any modules errors will add error information to the error queue. If
|
||||
B<CONF_MFLAGS_SILENT> is set no error information is added.
|
||||
|
||||
If B<CONF_MFLAGS_NO_DSO> is set configuration module loading from DSOs is
|
||||
disabled.
|
||||
|
||||
B<CONF_MFLAGS_IGNORE_MISSING_FILE> if set will make CONF_load_modules_file()
|
||||
ignore missing configuration files. Normally a missing configuration file
|
||||
return an error.
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
These functions return 1 for success and a zero or negative value for
|
||||
failure. If module errors are not ignored the return code will reflect the
|
||||
return value of the failing module (this will always be zero or negative).
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>,
|
||||
L<CONF_free(3), CONF_free(3)>, L<err(3),err(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
CONF_modules_load_file and CONF_modules_load first appeared in OpenSSL 0.9.7.
|
||||
|
||||
=cut
|
||||
82
doc/crypto/OPENSSL_config.pod
Normal file
82
doc/crypto/OPENSSL_config.pod
Normal file
@@ -0,0 +1,82 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OPENSSL_config, OPENSSL_no_config - simple OpenSSL configuration functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/conf.h>
|
||||
|
||||
void OPENSSL_config(const char *config_name);
|
||||
void OPENSSL_no_config(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
OPENSSL_config() configures OpenSSL using the standard B<openssl.cnf>
|
||||
configuration file name using B<config_name>. If B<config_name> is NULL then
|
||||
the default name B<openssl_conf> will be used. Any errors are ignored. Further
|
||||
calls to OPENSSL_config() will have no effect. The configuration file format
|
||||
is documented in the L<conf(5)|conf(5)> manual page.
|
||||
|
||||
OPENSSL_no_config() disables configuration. If called before OPENSSL_config()
|
||||
no configuration takes place.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
It is B<strongly> recommended that B<all> new applications call OPENSSL_config()
|
||||
or the more sophisticated functions such as CONF_modules_load() during
|
||||
initialization (that is before starting any threads). By doing this
|
||||
an application does not need to keep track of all configuration options
|
||||
and some new functionality can be supported automatically.
|
||||
|
||||
It is also possible to automatically call OPENSSL_config() when an application
|
||||
calls OPENSSL_add_all_algorithms() by compiling an application with the
|
||||
preprocessor symbol B<OPENSSL_LOAD_CONF> #define'd. In this way configuration
|
||||
can be added without source changes.
|
||||
|
||||
The environment variable B<OPENSSL_CONFIG> can be set to specify the location
|
||||
of the configuration file.
|
||||
|
||||
Currently ASN1 OBJECTs and ENGINE configuration can be performed future
|
||||
versions of OpenSSL will add new configuration options.
|
||||
|
||||
There are several reasons why calling the OpenSSL configuration routines is
|
||||
advisable. For example new ENGINE functionality was added to OpenSSL 0.9.7.
|
||||
In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be
|
||||
used (among other things) to load dynamic ENGINEs from shared libraries (DSOs).
|
||||
However very few applications currently support the control interface and so
|
||||
very few can load and use dynamic ENGINEs. Equally in future more sophisticated
|
||||
ENGINEs will require certain control operations to customize them. If an
|
||||
application calls OPENSSL_config() it doesn't need to know or care about
|
||||
ENGINE control operations because they can be performed by editing a
|
||||
configuration file.
|
||||
|
||||
Applications should free up configuration at application closedown by calling
|
||||
CONF_modules_free().
|
||||
|
||||
=head1 RESTRICTIONS
|
||||
|
||||
The OPENSSL_config() function is designed to be a very simple "call it and
|
||||
forget it" function. As a result its behaviour is somewhat limited. It ignores
|
||||
all errors silently and it can only load from the standard configuration file
|
||||
location for example.
|
||||
|
||||
It is however B<much> better than nothing. Applications which need finer
|
||||
control over their configuration functionality should use the configuration
|
||||
functions such as CONF_load_modules() directly.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
Neither OPENSSL_config() nor OPENSSL_no_config() return a value.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<conf(5)|conf(5)>, L<CONF_load_modules_file(3)|CONF_load_modules_file(3)>,
|
||||
L<CONF_modules_free(3),CONF_modules_free(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
OPENSSL_config() and OPENSSL_no_config() first appeared in OpenSSL 0.9.7
|
||||
|
||||
=cut
|
||||
51
doc/crypto/OPENSSL_load_builtin_modules.pod
Normal file
51
doc/crypto/OPENSSL_load_builtin_modules.pod
Normal file
@@ -0,0 +1,51 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OPENSSL_load_builtin_modules - add standard configuration modules
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/conf.h>
|
||||
|
||||
void OPENSSL_load_builtin_modules(void);
|
||||
void ASN1_add_oid_module(void);
|
||||
ENGINE_add_conf_module();
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The function OPENSSL_load_builtin_modules() adds all the standard OpenSSL
|
||||
configuration modules to the internal list. They can then be used by the
|
||||
OpenSSL configuration code.
|
||||
|
||||
ASN1_add_oid_module() adds just the ASN1 OBJECT module.
|
||||
|
||||
ENGINE_add_conf_module() adds just the ENGINE configuration module.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
If the simple configuration function OPENSSL_config() is called then
|
||||
OPENSSL_load_builtin_modules() is called automatically.
|
||||
|
||||
Applications which use the configuration functions directly will need to
|
||||
call OPENSSL_load_builtin_modules() themselves I<before> any other
|
||||
configuration code.
|
||||
|
||||
Applications should call OPENSSL_load_builtin_modules() to load all
|
||||
configuration modules instead of adding modules selectively: otherwise
|
||||
functionality may be missing from the application if an when new
|
||||
modules are added.
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
None of the functions return a value.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<conf(3)|conf(3)>, L<OPENSSL_config(3)|OPENSSL_config(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
These functions first appeared in OpenSSL 0.9.7.
|
||||
|
||||
=cut
|
||||
@@ -1,74 +0,0 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSLeay_version - retrieve version/build information about OpenSSL library
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
const char *SSLeay_version(int type);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSLeay_version() returns a pointer to a constant string describing the
|
||||
version of the OpenSSL library or giving information about the library
|
||||
build.
|
||||
|
||||
The following B<type> values are supported:
|
||||
|
||||
=over 4
|
||||
|
||||
=item SSLEAY_VERSION
|
||||
|
||||
The version of the OpenSSL library including the release date.
|
||||
|
||||
=item SSLEAY_CFLAGS
|
||||
|
||||
The compiler flags set for the compilation process in the form
|
||||
"compiler: ..." if available or "compiler: information not available"
|
||||
otherwise.
|
||||
|
||||
=item SSLEAY_BUILT_ON
|
||||
|
||||
The date of the build process in the form "built on: ..." if available
|
||||
or "built on: date not available" otherwise.
|
||||
|
||||
=item SSLEAY_PLATFORM
|
||||
|
||||
The "Configure" target of the library build in the form "platform: ..."
|
||||
if available or "platform: information not available" otherwise.
|
||||
|
||||
=item SSLEAY_DIR
|
||||
|
||||
The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "...""
|
||||
if available or "OPENSSLDIR: N/A" otherwise.
|
||||
|
||||
=back
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item "not available"
|
||||
|
||||
An invalid value for B<type> was given.
|
||||
|
||||
=item Pointer to constant string
|
||||
|
||||
Textual description.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<crypto(3)|crypto(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
B<SSLEAY_DIR> was added in OpenSSL 0.9.7.
|
||||
|
||||
=cut
|
||||
232
doc/crypto/ecdsa.pod
Normal file
232
doc/crypto/ecdsa.pod
Normal file
@@ -0,0 +1,232 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ecdsa - Elliptic Curve Digital Signature Algorithm
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ecdsa.h>
|
||||
|
||||
ECDSA_SIG* ECDSA_SIG_new(void);
|
||||
void ECDSA_SIG_free(ECDSA_SIG *sig);
|
||||
int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
|
||||
ECDSA_SIG* d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp,
|
||||
long len);
|
||||
|
||||
ECDSA_DATA* ECDSA_DATA_new(void);
|
||||
ECDSA_DATA* ECDSA_DATA_new_method(ENGINE *eng);
|
||||
void ECDSA_DATA_free(ECDSA_DATA *data);
|
||||
ECDSA_DATA* ecdsa_check(EC_KEY *eckey);
|
||||
|
||||
ECDSA_SIG* ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
|
||||
EC_KEY *eckey);
|
||||
int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
ECDSA_SIG *sig, EC_KEY* eckey);
|
||||
int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx,
|
||||
BIGNUM **kinv, BIGNUM **rp);
|
||||
int ECDSA_sign(int type, const unsigned char *dgst,
|
||||
int dgstlen, unsigned char *sig,
|
||||
unsigned int *siglen, EC_KEY *eckey);
|
||||
int ECDSA_verify(int type, const unsigned char *dgst,
|
||||
int dgstlen, const unsigned char *sig,
|
||||
int siglen, EC_KEY *eckey);
|
||||
int ECDSA_size(const EC_KEY *eckey);
|
||||
|
||||
const ECDSA_METHOD* ECDSA_OpenSSL(void);
|
||||
void ECDSA_set_default_method(const ECDSA_METHOD *meth);
|
||||
const ECDSA_METHOD* ECDSA_get_default_method(void);
|
||||
int ECDSA_set_method(EC_KEY *eckey,const ECDSA_METHOD *meth);
|
||||
|
||||
int ECDSA_get_ex_new_index(long argl, void *argp,
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
|
||||
void* ECDSA_get_ex_data(EC_KEY *d, int idx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The B<ECDSA_SIG> structure consists of two BIGNUMs for the
|
||||
r and s value of a ECDSA signature (see X9.62 or FIPS 186-2).
|
||||
|
||||
struct
|
||||
{
|
||||
BIGNUM *r;
|
||||
BIGNUM *s;
|
||||
} ECDSA_SIG;
|
||||
|
||||
ECDSA_SIG_new() allocates a new B<ECDSA_SIG> structure (note: this
|
||||
function also allocates the BIGNUMs) and initialize it.
|
||||
|
||||
ECDSA_SIG_free() frees the B<ECDSA_SIG> structure B<sig>.
|
||||
|
||||
i2d_ECDSA_SIG() creates the DER encoding of the ECDSA signature
|
||||
B<sig> and writes the encoded signature to B<*pp> (note: if B<pp>
|
||||
is NULL B<i2d_ECDSA_SIG> returns the expected length in bytes of
|
||||
the DER encoded signature). B<i2d_ECDSA_SIG> returns the length
|
||||
of the DER encoded signature (or 0 on error).
|
||||
|
||||
d2i_ECDSA_SIG() decodes a DER encoded ECDSA signature and returns
|
||||
the decoded signature in a newly allocated B<ECDSA_SIG> structure.
|
||||
B<*sig> points to the buffer containing the DER encoded signature
|
||||
of size B<len>.
|
||||
|
||||
The B<ECDSA_DATA> structure extends the B<EC_KEY_METH_DATA>
|
||||
structure with ECDSA specific data.
|
||||
|
||||
struct
|
||||
{
|
||||
/* EC_KEY_METH_DATA part */
|
||||
int (*init)(EC_KEY *);
|
||||
void (*finish)(EC_KEY *);
|
||||
/* method (ECDSA) specific part */
|
||||
BIGNUM *kinv; /* signing pre-calc */
|
||||
BIGNUM *r; /* signing pre-calc */
|
||||
...
|
||||
}
|
||||
ECDSA_DATA;
|
||||
|
||||
B<kinv> and B<r> are used to store precomputed values (see
|
||||
B<ECDSA_sign_setup>).
|
||||
|
||||
ECDSA_DATA_new() returns a newly allocated and initialized
|
||||
B<ECDSA_DATA> structure (or NULL on error).
|
||||
|
||||
ECDSA_DATA_free() frees the B<ECDSA_DATA> structure B<data>.
|
||||
|
||||
ecdsa_check() returns the pointer to the B<ECDSA_DATA>
|
||||
structure in B<EC_KEY-E<gt>meth_data> (if B<EC_KEY-E<gt>meth_data>
|
||||
is not a pointer to a B<ECDSA_DATA> structure then the old
|
||||
data is freed and a new B<ECDSA_DATA> structure is allocated
|
||||
using B<ECDSA_DATA_new>).
|
||||
|
||||
ECDSA_size() returns the maximum length of a DER encoded
|
||||
ECDSA signature created with the private EC key B<eckey>.
|
||||
|
||||
ECDSA_sign_setup() may be used to precompute parts of the
|
||||
signing operation. B<eckey> is the private EC key and B<ctx>
|
||||
is a pointer to B<BN_CTX> structure (or NULL). The precomputed
|
||||
values or returned in B<kinv> and B<rp> and can be used in a
|
||||
later call to B<ECDSA_sign> or B<ECDSA_do_sign> when placed in
|
||||
B<ECDSA_DATA-E<gt>kinv> and B<ECDSA_DATA-E<gt>r>.
|
||||
|
||||
ECDSA_sign() computes a digital signature of the B<dgstlen> bytes
|
||||
hash value B<dgst> using the private EC key B<eckey> and places
|
||||
the DER encoding of the created signature in B<sig>. The length
|
||||
of the created signature is returned in B<sig_len>. Note: B<sig>
|
||||
must point to B<ECDSA_size> bytes of memory. The parameter B<type>
|
||||
is ignored.
|
||||
|
||||
ECDSA_verify() verifies that the signature in B<sig> of size
|
||||
B<siglen> is a valid ECDSA signature of the hash value
|
||||
value B<dgst> of size B<dgstlen> using the public key B<eckey>.
|
||||
The parameter B<type> is ignored.
|
||||
|
||||
ECDSA_do_sign() computes a digital signature of the B<dgst_len>
|
||||
bytes hash value B<dgst> using the private key B<eckey> and
|
||||
returns the signature in a newly allocated B<ECDSA_SIG> structure
|
||||
(or NULL on error).
|
||||
|
||||
ECDSA_do_verify() verifies that the signature B<sig> is a valid
|
||||
ECDSA signature of the hash value B<dgst> of size B<dgst_len>
|
||||
using the public key B<eckey>.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
ECDSA_size() returns the maximum length signature or 0 on error.
|
||||
|
||||
ECDSA_sign_setup() and ECDSA_sign() return 1 if successful or -1
|
||||
on error.
|
||||
|
||||
ECDSA_verify() and ECDSA_do_verify() return 1 for a valid
|
||||
signature, 0 for an invalid signature and -1 on error.
|
||||
The error codes can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Creating a ECDSA signature of given SHA-1 hash value using the
|
||||
named curve secp192k1.
|
||||
|
||||
First step: create a EC_KEY object (note: this part is B<not> ECDSA
|
||||
specific)
|
||||
|
||||
int ret;
|
||||
ECDSA_SIG *sig;
|
||||
EC_KEY *eckey = EC_KEY_new();
|
||||
if (eckey == NULL)
|
||||
{
|
||||
/* error */
|
||||
}
|
||||
key->group = EC_GROUP_new_by_nid(NID_secp192k1);
|
||||
if (key->group == NULL)
|
||||
{
|
||||
/* error */
|
||||
}
|
||||
if (!EC_KEY_generate_key(eckey))
|
||||
{
|
||||
/* error */
|
||||
}
|
||||
|
||||
Second step: compute the ECDSA signature of a SHA-1 hash value
|
||||
using B<ECDSA_do_sign>
|
||||
|
||||
sig = ECDSA_do_sign(digest, 20, eckey);
|
||||
if (sig == NULL)
|
||||
{
|
||||
/* error */
|
||||
}
|
||||
|
||||
or using B<ECDSA_sign>
|
||||
|
||||
unsigned char *buffer, *pp;
|
||||
int buf_len;
|
||||
buf_len = ECDSA_size(eckey);
|
||||
buffer = OPENSSL_malloc(buf_len);
|
||||
pp = buffer;
|
||||
if (!ECDSA_sign(0, dgst, dgstlen, pp, &buf_len, eckey);
|
||||
{
|
||||
/* error */
|
||||
}
|
||||
|
||||
Third step: verify the created ECDSA signature using B<ECDSA_do_verify>
|
||||
|
||||
ret = ECDSA_do_verify(digest, 20, sig, eckey);
|
||||
|
||||
or using B<ECDSA_verify>
|
||||
|
||||
ret = ECDSA_verify(0, digest, 20, buffer, buf_len, eckey);
|
||||
|
||||
and finally evaluate the return value:
|
||||
|
||||
if (ret == -1)
|
||||
{
|
||||
/* error */
|
||||
}
|
||||
else if (ret == 0)
|
||||
{
|
||||
/* incorrect signature */
|
||||
}
|
||||
else /* ret == 1 */
|
||||
{
|
||||
/* signature ok */
|
||||
}
|
||||
|
||||
=head1 CONFORMING TO
|
||||
|
||||
ANSI X9.62, US Federal Information Processing Standard FIPS 186-2
|
||||
(Digital Signature Standard, DSS)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<dsa(3)|dsa(3)>, L<rsa(3)|rsa(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The ecdsa implementation was first introduced in OpenSSL 0.9.8
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Nils Larsch for the OpenSSL project (http://www.openssl.org).
|
||||
|
||||
=cut
|
||||
392
ssl/Makefile.ssl
392
ssl/Makefile.ssl
@@ -234,65 +234,63 @@ s23_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s23_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s23_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s23_srvr.o: ../include/openssl/x509_vfy.h s23_srvr.c ssl_locl.h
|
||||
s2_clnt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
s2_clnt.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s2_clnt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s2_clnt.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s2_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s2_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s2_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
s2_clnt.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s2_clnt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s2_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s2_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s2_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s2_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
s2_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s2_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s2_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s2_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s2_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s2_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_clnt.c
|
||||
s2_clnt.o: ssl_locl.h
|
||||
s2_enc.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
s2_enc.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s2_enc.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s2_enc.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s2_enc.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s2_enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s2_enc.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
s2_enc.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s2_enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s2_enc.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s2_enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s2_enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s2_enc.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
s2_enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s2_enc.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s2_enc.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s2_enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s2_enc.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s2_enc.o: ../include/openssl/x509_vfy.h s2_enc.c ssl_locl.h
|
||||
s2_lib.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
s2_lib.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s2_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s2_lib.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s2_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s2_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s2_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
s2_lib.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s2_lib.o: ../include/openssl/lhash.h ../include/openssl/md5.h
|
||||
s2_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s2_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s2_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s2_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s2_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s2_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s2_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s2_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s2_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s2_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_lib.c
|
||||
s2_lib.o: ssl_locl.h
|
||||
s2_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s2_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s2_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s2_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s2_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s2_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s2_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s2_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s2_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s2_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s2_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s2_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s2_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
s2_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s2_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s2_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s2_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s2_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s2_clnt.o: ../include/openssl/x509_vfy.h s2_clnt.c ssl_locl.h
|
||||
s2_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s2_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s2_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s2_enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s2_enc.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s2_enc.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s2_enc.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s2_enc.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s2_enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s2_enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s2_enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s2_enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s2_enc.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s2_enc.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s2_enc.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s2_enc.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s2_enc.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s2_enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_enc.c
|
||||
s2_enc.o: ssl_locl.h
|
||||
s2_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s2_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s2_lib.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s2_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s2_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s2_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s2_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s2_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s2_lib.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
|
||||
s2_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s2_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s2_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s2_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
s2_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s2_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s2_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s2_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s2_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s2_lib.o: ../include/openssl/x509_vfy.h s2_lib.c ssl_locl.h
|
||||
s2_meth.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s2_meth.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s2_meth.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
@@ -312,45 +310,44 @@ s2_meth.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s2_meth.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s2_meth.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_meth.c
|
||||
s2_meth.o: ssl_locl.h
|
||||
s2_pkt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
s2_pkt.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s2_pkt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s2_pkt.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s2_pkt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s2_pkt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s2_pkt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
s2_pkt.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s2_pkt.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s2_pkt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s2_pkt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s2_pkt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s2_pkt.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
s2_pkt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s2_pkt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s2_pkt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s2_pkt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s2_pkt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s2_pkt.o: ../include/openssl/x509_vfy.h s2_pkt.c ssl_locl.h
|
||||
s2_srvr.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
s2_srvr.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s2_srvr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s2_srvr.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s2_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s2_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s2_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
s2_srvr.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s2_srvr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s2_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s2_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s2_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s2_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
s2_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s2_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s2_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s2_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s2_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s2_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_srvr.c
|
||||
s2_srvr.o: ssl_locl.h
|
||||
s2_pkt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s2_pkt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s2_pkt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s2_pkt.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s2_pkt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s2_pkt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s2_pkt.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s2_pkt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s2_pkt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s2_pkt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s2_pkt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s2_pkt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s2_pkt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s2_pkt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s2_pkt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s2_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s2_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s2_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s2_pkt.c
|
||||
s2_pkt.o: ssl_locl.h
|
||||
s2_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s2_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s2_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s2_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s2_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s2_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s2_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s2_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s2_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s2_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s2_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s2_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s2_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
s2_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s2_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s2_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s2_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s2_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s2_srvr.o: ../include/openssl/x509_vfy.h s2_srvr.c ssl_locl.h
|
||||
s3_both.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s3_both.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s3_both.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
@@ -370,26 +367,26 @@ s3_both.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s3_both.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s3_both.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s3_both.o: ../include/openssl/x509_vfy.h s3_both.c ssl_locl.h
|
||||
s3_clnt.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
s3_clnt.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s3_clnt.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s3_clnt.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s3_clnt.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s3_clnt.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s3_clnt.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
s3_clnt.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s3_clnt.o: ../include/openssl/lhash.h ../include/openssl/md5.h
|
||||
s3_clnt.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s3_clnt.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s3_clnt.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s3_clnt.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s3_clnt.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
s3_clnt.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s3_clnt.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s3_clnt.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s3_clnt.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s3_clnt.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s3_clnt.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_clnt.c ssl_locl.h
|
||||
s3_clnt.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s3_clnt.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s3_clnt.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s3_clnt.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s3_clnt.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s3_clnt.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s3_clnt.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s3_clnt.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s3_clnt.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
|
||||
s3_clnt.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s3_clnt.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s3_clnt.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s3_clnt.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
s3_clnt.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s3_clnt.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s3_clnt.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s3_clnt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s3_clnt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s3_clnt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
|
||||
s3_clnt.o: s3_clnt.c ssl_locl.h
|
||||
s3_enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s3_enc.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s3_enc.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
@@ -466,27 +463,26 @@ s3_pkt.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s3_pkt.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s3_pkt.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h s3_pkt.c
|
||||
s3_pkt.o: ssl_locl.h
|
||||
s3_srvr.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
s3_srvr.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
s3_srvr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s3_srvr.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
s3_srvr.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
s3_srvr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s3_srvr.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
s3_srvr.o: ../include/openssl/evp.h ../include/openssl/krb5_asn.h
|
||||
s3_srvr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s3_srvr.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
|
||||
s3_srvr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s3_srvr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s3_srvr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s3_srvr.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
s3_srvr.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s3_srvr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s3_srvr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s3_srvr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s3_srvr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s3_srvr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h kssl_lcl.h
|
||||
s3_srvr.o: s3_srvr.c ssl_locl.h
|
||||
s3_srvr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s3_srvr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s3_srvr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s3_srvr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s3_srvr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s3_srvr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s3_srvr.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s3_srvr.o: ../include/openssl/krb5_asn.h ../include/openssl/kssl.h
|
||||
s3_srvr.o: ../include/openssl/lhash.h ../include/openssl/md5.h
|
||||
s3_srvr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s3_srvr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s3_srvr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s3_srvr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s3_srvr.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
s3_srvr.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s3_srvr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s3_srvr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s3_srvr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
s3_srvr.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
s3_srvr.o: ../include/openssl/x509_vfy.h kssl_lcl.h s3_srvr.c ssl_locl.h
|
||||
ssl_algs.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ssl_algs.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ssl_algs.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
@@ -506,26 +502,25 @@ ssl_algs.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ssl_algs.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ssl_algs.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_algs.c
|
||||
ssl_algs.o: ssl_locl.h
|
||||
ssl_asn1.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
ssl_asn1.o: ../include/openssl/asn1_mac.h ../include/openssl/bio.h
|
||||
ssl_asn1.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ssl_asn1.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
ssl_asn1.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
ssl_asn1.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
ssl_asn1.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
ssl_asn1.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
ssl_asn1.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
ssl_asn1.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
ssl_asn1.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ssl_asn1.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
ssl_asn1.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
ssl_asn1.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
ssl_asn1.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ssl_asn1.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ssl_asn1.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ssl_asn1.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ssl_asn1.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_asn1.c
|
||||
ssl_asn1.o: ssl_locl.h
|
||||
ssl_asn1.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/asn1_mac.h
|
||||
ssl_asn1.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
ssl_asn1.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
ssl_asn1.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
ssl_asn1.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
ssl_asn1.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
ssl_asn1.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
ssl_asn1.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
ssl_asn1.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
ssl_asn1.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
ssl_asn1.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ssl_asn1.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ssl_asn1.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
ssl_asn1.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
ssl_asn1.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
ssl_asn1.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
ssl_asn1.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ssl_asn1.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
ssl_asn1.o: ../include/openssl/x509_vfy.h ssl_asn1.c ssl_locl.h
|
||||
ssl_cert.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ssl_cert.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ssl_cert.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
@@ -601,26 +596,26 @@ ssl_err2.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ssl_err2.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ssl_err2.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ssl_err2.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_err2.c
|
||||
ssl_lib.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
ssl_lib.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
ssl_lib.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
ssl_lib.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
ssl_lib.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
ssl_lib.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
ssl_lib.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
ssl_lib.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
ssl_lib.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
ssl_lib.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
ssl_lib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ssl_lib.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
ssl_lib.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
ssl_lib.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
ssl_lib.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ssl_lib.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ssl_lib.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ssl_lib.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ssl_lib.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
ssl_lib.o: ../include/openssl/x509v3.h kssl_lcl.h ssl_lib.c ssl_locl.h
|
||||
ssl_lib.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ssl_lib.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ssl_lib.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
ssl_lib.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
ssl_lib.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
ssl_lib.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
ssl_lib.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
ssl_lib.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
ssl_lib.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
ssl_lib.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
ssl_lib.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ssl_lib.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ssl_lib.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h
|
||||
ssl_lib.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
ssl_lib.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
ssl_lib.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
ssl_lib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ssl_lib.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
ssl_lib.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h kssl_lcl.h
|
||||
ssl_lib.o: ssl_lib.c ssl_locl.h
|
||||
ssl_rsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ssl_rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ssl_rsa.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
@@ -640,26 +635,25 @@ ssl_rsa.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ssl_rsa.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ssl_rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
|
||||
ssl_rsa.o: ssl_rsa.c
|
||||
ssl_sess.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/asn1.h
|
||||
ssl_sess.o: ../include/openssl/bio.h ../include/openssl/bn.h
|
||||
ssl_sess.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
ssl_sess.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
ssl_sess.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
|
||||
ssl_sess.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
ssl_sess.o: ../include/openssl/ecdsa.h ../include/openssl/err.h
|
||||
ssl_sess.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
ssl_sess.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
ssl_sess.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
ssl_sess.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ssl_sess.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ssl_sess.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
ssl_sess.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
ssl_sess.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ssl_sess.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ssl_sess.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ssl_sess.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ssl_sess.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h ssl_locl.h
|
||||
ssl_sess.o: ssl_sess.c
|
||||
ssl_sess.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ssl_sess.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ssl_sess.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
ssl_sess.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
ssl_sess.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
ssl_sess.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
ssl_sess.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
ssl_sess.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
ssl_sess.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
ssl_sess.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ssl_sess.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
ssl_sess.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
ssl_sess.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
ssl_sess.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
ssl_sess.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
ssl_sess.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
ssl_sess.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ssl_sess.o: ../include/openssl/tls1.h ../include/openssl/x509.h
|
||||
ssl_sess.o: ../include/openssl/x509_vfy.h ssl_locl.h ssl_sess.c
|
||||
ssl_stat.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ssl_stat.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ssl_stat.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
|
||||
@@ -284,20 +284,20 @@ EVP_add_alias 291 NOEXIST::FUNCTION:
|
||||
EVP_add_cipher 292 EXIST::FUNCTION:
|
||||
EVP_add_digest 293 EXIST::FUNCTION:
|
||||
EVP_bf_cbc 294 EXIST::FUNCTION:BF
|
||||
EVP_bf_cfb 295 EXIST::FUNCTION:BF
|
||||
EVP_bf_cfb64 295 EXIST::FUNCTION:BF
|
||||
EVP_bf_ecb 296 EXIST::FUNCTION:BF
|
||||
EVP_bf_ofb 297 EXIST::FUNCTION:BF
|
||||
EVP_cleanup 298 EXIST::FUNCTION:
|
||||
EVP_des_cbc 299 EXIST::FUNCTION:DES
|
||||
EVP_des_cfb 300 EXIST::FUNCTION:DES
|
||||
EVP_des_cfb64 300 EXIST::FUNCTION:DES
|
||||
EVP_des_ecb 301 EXIST::FUNCTION:DES
|
||||
EVP_des_ede 302 EXIST::FUNCTION:DES
|
||||
EVP_des_ede3 303 EXIST::FUNCTION:DES
|
||||
EVP_des_ede3_cbc 304 EXIST::FUNCTION:DES
|
||||
EVP_des_ede3_cfb 305 EXIST::FUNCTION:DES
|
||||
EVP_des_ede3_cfb64 305 EXIST::FUNCTION:DES
|
||||
EVP_des_ede3_ofb 306 EXIST::FUNCTION:DES
|
||||
EVP_des_ede_cbc 307 EXIST::FUNCTION:DES
|
||||
EVP_des_ede_cfb 308 EXIST::FUNCTION:DES
|
||||
EVP_des_ede_cfb64 308 EXIST::FUNCTION:DES
|
||||
EVP_des_ede_ofb 309 EXIST::FUNCTION:DES
|
||||
EVP_des_ofb 310 EXIST::FUNCTION:DES
|
||||
EVP_desx_cbc 311 EXIST::FUNCTION:DES
|
||||
@@ -308,14 +308,14 @@ EVP_get_cipherbyname 315 EXIST::FUNCTION:
|
||||
EVP_get_digestbyname 316 EXIST::FUNCTION:
|
||||
EVP_get_pw_prompt 317 EXIST::FUNCTION:
|
||||
EVP_idea_cbc 318 EXIST::FUNCTION:IDEA
|
||||
EVP_idea_cfb 319 EXIST::FUNCTION:IDEA
|
||||
EVP_idea_cfb64 319 EXIST::FUNCTION:IDEA
|
||||
EVP_idea_ecb 320 EXIST::FUNCTION:IDEA
|
||||
EVP_idea_ofb 321 EXIST::FUNCTION:IDEA
|
||||
EVP_md2 322 EXIST::FUNCTION:MD2
|
||||
EVP_md5 323 EXIST::FUNCTION:MD5
|
||||
EVP_md_null 324 EXIST::FUNCTION:
|
||||
EVP_rc2_cbc 325 EXIST::FUNCTION:RC2
|
||||
EVP_rc2_cfb 326 EXIST::FUNCTION:RC2
|
||||
EVP_rc2_cfb64 326 EXIST::FUNCTION:RC2
|
||||
EVP_rc2_ecb 327 EXIST::FUNCTION:RC2
|
||||
EVP_rc2_ofb 328 EXIST::FUNCTION:RC2
|
||||
EVP_rc4 329 EXIST::FUNCTION:RC4
|
||||
@@ -962,7 +962,7 @@ i2t_ASN1_OBJECT 979 EXIST::FUNCTION:
|
||||
BN_BLINDING_new 980 EXIST::FUNCTION:
|
||||
BN_BLINDING_free 981 EXIST::FUNCTION:
|
||||
EVP_cast5_cbc 983 EXIST::FUNCTION:CAST
|
||||
EVP_cast5_cfb 984 EXIST::FUNCTION:CAST
|
||||
EVP_cast5_cfb64 984 EXIST::FUNCTION:CAST
|
||||
EVP_cast5_ecb 985 EXIST::FUNCTION:CAST
|
||||
EVP_cast5_ofb 986 EXIST::FUNCTION:CAST
|
||||
BF_decrypt 987 EXIST::FUNCTION:BF
|
||||
@@ -1057,7 +1057,7 @@ EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION:
|
||||
EVP_CIPHER_get_asn1_iv 1085 EXIST::FUNCTION:
|
||||
EVP_CIPHER_set_asn1_iv 1086 EXIST::FUNCTION:
|
||||
EVP_rc5_32_12_16_cbc 1087 EXIST::FUNCTION:RC5
|
||||
EVP_rc5_32_12_16_cfb 1088 EXIST::FUNCTION:RC5
|
||||
EVP_rc5_32_12_16_cfb64 1088 EXIST::FUNCTION:RC5
|
||||
EVP_rc5_32_12_16_ecb 1089 EXIST::FUNCTION:RC5
|
||||
EVP_rc5_32_12_16_ofb 1090 EXIST::FUNCTION:RC5
|
||||
asn1_add_error 1091 EXIST::FUNCTION:
|
||||
@@ -2776,10 +2776,10 @@ ENGINE_load_4758cca 3218 EXIST::FUNCTION:ENGINE,STATIC_ENGIN
|
||||
_ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES
|
||||
EVP_aes_256_ofb 3220 EXIST::FUNCTION:AES
|
||||
EVP_aes_192_ofb 3221 EXIST::FUNCTION:AES
|
||||
EVP_aes_128_cfb 3222 EXIST::FUNCTION:AES
|
||||
EVP_aes_256_cfb 3223 EXIST::FUNCTION:AES
|
||||
EVP_aes_128_cfb64 3222 NOEXIST::FUNCTION:
|
||||
EVP_aes_256_cfb64 3223 NOEXIST::FUNCTION:
|
||||
EVP_aes_128_ofb 3224 EXIST::FUNCTION:AES
|
||||
EVP_aes_192_cfb 3225 EXIST::FUNCTION:AES
|
||||
EVP_aes_192_cfb64 3225 NOEXIST::FUNCTION:
|
||||
CONF_modules_free 3226 EXIST::FUNCTION:
|
||||
NCONF_default 3227 EXIST::FUNCTION:
|
||||
OPENSSL_no_config 3228 EXIST::FUNCTION:
|
||||
@@ -3148,3 +3148,17 @@ BN_GF2m_mod_inv_arr 3576 EXIST::FUNCTION:
|
||||
ENGINE_unregister_ECDSA 3577 EXIST::FUNCTION:ENGINE
|
||||
PKCS7_set_digest 3578 EXIST::FUNCTION:
|
||||
PKCS7_set0_type_other 3579 EXIST::FUNCTION:
|
||||
EVP_aes_128_cfb8 3580 EXIST::FUNCTION:AES
|
||||
EVP_aes_256_cfb128 3581 EXIST::FUNCTION:AES
|
||||
EVP_aes_128_cfb1 3582 EXIST::FUNCTION:AES
|
||||
EVP_aes_192_cfb8 3583 EXIST::FUNCTION:AES
|
||||
EVP_aes_256_cfb8 3584 EXIST::FUNCTION:AES
|
||||
DES_ede3_cfb_encrypt 3585 EXIST::FUNCTION:DES
|
||||
EVP_aes_128_cfb128 3586 EXIST::FUNCTION:AES
|
||||
EVP_des_ede3_cfb8 3587 EXIST::FUNCTION:DES
|
||||
EVP_aes_192_cfb128 3588 EXIST::FUNCTION:AES
|
||||
EVP_aes_192_cfb1 3589 EXIST::FUNCTION:AES
|
||||
EVP_des_cfb8 3590 EXIST::FUNCTION:DES
|
||||
EVP_aes_256_cfb1 3591 EXIST::FUNCTION:AES
|
||||
EVP_des_cfb1 3592 EXIST::FUNCTION:DES
|
||||
EVP_des_ede3_cfb1 3593 EXIST::FUNCTION:DES
|
||||
|
||||
Reference in New Issue
Block a user