Compare commits
164 Commits
OpenSSL_0_
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09a7f2e734 | ||
|
|
b2d27e376d | ||
|
|
644c4af11e | ||
|
|
ca3dc3a0a0 | ||
|
|
2b975dfd5b | ||
|
|
0932892278 | ||
|
|
fe0b3d98c2 | ||
|
|
8d56c8b51c | ||
|
|
d8e6409336 | ||
|
|
a4ae746656 | ||
|
|
331a0a7b9b | ||
|
|
c630a3e8d6 | ||
|
|
7435d89edf | ||
|
|
14557c8be4 | ||
|
|
98b4995bad | ||
|
|
3000bdcc3a | ||
|
|
cbe77a6753 | ||
|
|
c58a1f76f8 | ||
|
|
ecf2875ebf | ||
|
|
ce2c19e357 | ||
|
|
1b1081a3ed | ||
|
|
37b200389a | ||
|
|
6b5a8f3a22 | ||
|
|
0b18d8b0c7 | ||
|
|
3d187ede47 | ||
|
|
f3b9c34515 | ||
|
|
c923394924 | ||
|
|
d9dbd24db5 | ||
|
|
b135819d71 | ||
|
|
cbcbd07da2 | ||
|
|
24f6ab73a7 | ||
|
|
5e88347e1b | ||
|
|
cac0d4ee6f | ||
|
|
428759b3d4 | ||
|
|
898d3ecce0 | ||
|
|
004f16f6c4 | ||
|
|
4e2a0e58f2 | ||
|
|
39d29195a7 | ||
|
|
727c9b8027 | ||
|
|
bd4e9b0512 | ||
|
|
7844ff735f | ||
|
|
49e96badcf | ||
|
|
eb6a81bacc | ||
|
|
6687f12988 | ||
|
|
fcd12fc0f1 | ||
|
|
0fb4d54068 | ||
|
|
830a468a23 | ||
|
|
af3ca7b4a9 | ||
|
|
7a6bb17255 | ||
|
|
bc6d459a6e | ||
|
|
ff7f34e353 | ||
|
|
2e3d79aaec | ||
|
|
8a41bcc934 | ||
|
|
e2414b41ad | ||
|
|
266958bce7 | ||
|
|
bc5354cbf0 | ||
|
|
cc4997843e | ||
|
|
ab95eac286 | ||
|
|
1cd76233d1 | ||
|
|
3d5afc8b83 | ||
|
|
d28b7799dd | ||
|
|
b0fb889c29 | ||
|
|
460e80bd1d | ||
|
|
bc1e96e942 | ||
|
|
7ea61df414 | ||
|
|
431712293d | ||
|
|
335ed97263 | ||
|
|
e00b165e9b | ||
|
|
5467ddf0e1 | ||
|
|
7a37dd92ed | ||
|
|
d0c11e9d72 | ||
|
|
5ec52fee2c | ||
|
|
5026bc13bb | ||
|
|
c7d27e5247 | ||
|
|
b7d7af7ea9 | ||
|
|
39663d2c40 | ||
|
|
000299a0e6 | ||
|
|
0a47d82b9b | ||
|
|
198bcece58 | ||
|
|
053677d124 | ||
|
|
804072f014 | ||
|
|
e9429b43ce | ||
|
|
3d37d5e24a | ||
|
|
2728a1b4f3 | ||
|
|
adb040d4cb | ||
|
|
479d7934c0 | ||
|
|
22d1acd5ac | ||
|
|
b257c152c6 | ||
|
|
77b97ee0d7 | ||
|
|
e2ac4732cd | ||
|
|
e8f665b495 | ||
|
|
55f3ef29ea | ||
|
|
c2d78c9623 | ||
|
|
a4578a5413 | ||
|
|
e884fcf785 | ||
|
|
a2c32e2d7f | ||
|
|
80b168a5a9 | ||
|
|
e96025755d | ||
|
|
9426364be9 | ||
|
|
c9028b0ab5 | ||
|
|
b4d2858f95 | ||
|
|
dea446d995 | ||
|
|
5cd94f9e9d | ||
|
|
429168e7ee | ||
|
|
499fca2db3 | ||
|
|
cad811fc41 | ||
|
|
a28a5d9c62 | ||
|
|
3f791ca818 | ||
|
|
69f6a9f007 | ||
|
|
4eeee0c59f | ||
|
|
a5afa6c95f | ||
|
|
625dacb93d | ||
|
|
62e9c2e091 | ||
|
|
e4106a4e24 | ||
|
|
0ebfcc8f92 | ||
|
|
c61f571ce0 | ||
|
|
a506b8c7dd | ||
|
|
e5cd536894 | ||
|
|
60192e96b8 | ||
|
|
629ea39a88 | ||
|
|
7d9e1321c7 | ||
|
|
83af7422a0 | ||
|
|
ce8945f35c | ||
|
|
dd890f0776 | ||
|
|
af4ac437ab | ||
|
|
85991994df | ||
|
|
607585fdaf | ||
|
|
b325518f45 | ||
|
|
2f596aeef5 | ||
|
|
b172dec864 | ||
|
|
69762c75fa | ||
|
|
61391e2314 | ||
|
|
36b29660ce | ||
|
|
4976983f30 | ||
|
|
4b23506594 | ||
|
|
31e4ad25ba | ||
|
|
225f4daf15 | ||
|
|
82d3dda8a1 | ||
|
|
b9927cfa2d | ||
|
|
fe8bf9560d | ||
|
|
af6cafc603 | ||
|
|
e4c9b85e65 | ||
|
|
447aa49007 | ||
|
|
15da07d436 | ||
|
|
fe977f7512 | ||
|
|
886ed3544b | ||
|
|
e476f94212 | ||
|
|
aff2922f9a | ||
|
|
bbbd67108f | ||
|
|
f32e0035a3 | ||
|
|
7f246621b5 | ||
|
|
b67d988915 | ||
|
|
7b1e7706d8 | ||
|
|
cd74dda72a | ||
|
|
851e31ff07 | ||
|
|
032bb2a2c5 | ||
|
|
decc9ffc18 | ||
|
|
3f4657d131 | ||
|
|
67ffa18cce | ||
|
|
788e67e227 | ||
|
|
c50226594d | ||
|
|
51ff6bde38 | ||
|
|
28e4fe34e4 | ||
|
|
c800a070b5 |
18
CHANGES
18
CHANGES
@@ -4,6 +4,13 @@
|
||||
|
||||
Changes between 0.9.7h and 0.9.8 [xx XXX xxxx]
|
||||
|
||||
*) Correct naming of the 'chil' and '4758cca' ENGINEs. This
|
||||
involves renaming the source and generated shared-libs for
|
||||
both. The engines will accept the corrected or legacy ids
|
||||
('ncipher' and '4758_cca' respectively) when binding. NB,
|
||||
this only applies when building 'shared'.
|
||||
[Corinna Vinschen <vinschen@redhat.com> and Geoff Thorpe]
|
||||
|
||||
*) Add attribute functions to EVP_PKEY structure. Modify
|
||||
PKCS12_create() to recognize a CSP name attribute and
|
||||
use it. Make -CSP option work again in pkcs12 utility.
|
||||
@@ -799,6 +806,17 @@
|
||||
|
||||
Changes between 0.9.7g and 0.9.7h [XX xxx XXXX]
|
||||
|
||||
*) Minimal support for X9.31 signatures and PSS padding modes. This is
|
||||
mainly for FIPS compliance and not fully integrated at this stage.
|
||||
[Steve Henson]
|
||||
|
||||
*) For DSA signing, unless DSA_FLAG_NO_EXP_CONSTTIME is set, perform
|
||||
the exponentiation using a fixed-length exponent. (Otherwise,
|
||||
the information leaked through timing could expose the secret key
|
||||
after many signatures; cf. Bleichenbacher's attack on DSA with
|
||||
biased k.)
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Make a new fixed-window mod_exp implementation the default for
|
||||
RSA, DSA, and DH private-key operations so that the sequence of
|
||||
squares and multiplies and the memory access pattern are
|
||||
|
||||
37
Configure
37
Configure
@@ -119,7 +119,7 @@ my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o:dx86-cof.o yx86-cof.o:ax8
|
||||
my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o";
|
||||
|
||||
my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
|
||||
my $ia64_asm=":ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o::";
|
||||
my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o::";
|
||||
|
||||
my $no_asm="::::::::::";
|
||||
|
||||
@@ -164,8 +164,8 @@ my %table=(
|
||||
"debug-geoff","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -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}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"dist", "cc:-O::(unknown)::::::",
|
||||
|
||||
# Basic configs that should work on any (32 and less bit) box
|
||||
@@ -184,7 +184,7 @@ my %table=(
|
||||
# surrounds it with #APP #NO_APP comment pair which (at least Solaris
|
||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
||||
# error message.
|
||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -march=i486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -shared -static-libgcc might appear controversial, but modules taken
|
||||
# from static libgcc do not have relocations and linking them into our
|
||||
# shared objects doesn't have any negative side-effects. On the contrary,
|
||||
@@ -287,7 +287,7 @@ my %table=(
|
||||
# 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 DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:+Z:+DD64 -b:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# GCC builds...
|
||||
"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT::ia64.o::aes-ia64.o:::sha256-ia64.o sha512-ia64.o::rc4-ia64.o:::dlfcn:hpux-shared:-fpic:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux-ia64-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT::bn-ia64.o::aes-ia64.o:::sha256-ia64.o sha512-ia64.o::rc4-ia64.o:::dlfcn:hpux-shared:-fpic:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"hpux64-ia64-gcc","gcc:-mlp64 -O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT:${ia64_asm}:dlfcn:hpux-shared:-fpic:-mlp64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
# Legacy HPUX 9.X configs...
|
||||
@@ -320,13 +320,14 @@ my %table=(
|
||||
#### IA-32 targets...
|
||||
"linux-ia32-icc", "icc:-DL_ENDIAN -DTERMIO -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
|
||||
####
|
||||
"linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -bpowerpc64-linux is transient option, -m64 should be the one to use...
|
||||
"linux-ppc64", "gcc:-bpowerpc64-linux -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-bpowerpc64-linux:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
@@ -370,7 +371,7 @@ my %table=(
|
||||
"BSD-ia64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"BSD-x86_64", "gcc:-DL_ENDIAN -DTERMIOS -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
"nextstep", "cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
@@ -397,10 +398,9 @@ my %table=(
|
||||
"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::",
|
||||
"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"sco3-gcc", "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ...
|
||||
# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc.
|
||||
"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -484,17 +484,20 @@ my %table=(
|
||||
|
||||
# NetWare from David Ward (dsward@novell.com) - requires MetroWerks NLM development tools
|
||||
# netware-clib => legacy CLib c-runtime support
|
||||
"netware-clib", "mwccnlm:::::${x86_gcc_opts}:::",
|
||||
"netware-clib", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
|
||||
# netware-libc => LibC/NKS support
|
||||
"netware-libc", "mwccnlm:::::BN_LLONG ${x86_gcc_opts}:::",
|
||||
"netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall::::${x86_gcc_opts}:::",
|
||||
# NetWare defaults socket bio to WinSock sockets. However, the LibC build can be
|
||||
# configured to use BSD sockets instead.
|
||||
"netware-libc", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
|
||||
"netware-libc-bsdsock", "mwccnlm::::::BN_LLONG ${x86_gcc_opts}::",
|
||||
"netware-libc-gcc", "i586-netware-gcc:-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYSNAME_NETWARE -DTERMIO -O2 -Wall:::::BN_LLONG ${x86_gcc_opts}::",
|
||||
|
||||
# DJGPP
|
||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:",
|
||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:",
|
||||
|
||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
|
||||
"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::",
|
||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::",
|
||||
"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::BN_LLONG::::",
|
||||
# K&R C is no longer supported; you need gcc on old Ultrix installations
|
||||
##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::",
|
||||
|
||||
@@ -511,7 +514,7 @@ my %table=(
|
||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||
|
||||
##### GNU Hurd
|
||||
"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
|
||||
##### OS/2 EMX
|
||||
"OS2-EMX", "gcc::::::::",
|
||||
@@ -530,7 +533,7 @@ my %table=(
|
||||
|
||||
my @MK1MF_Builds=qw(VC-WIN64I VC-WIN64A
|
||||
VC-NT VC-CE VC-WIN32
|
||||
BC-32 OS2-EMX netware-clib netware-libc);
|
||||
BC-32 OS2-EMX netware-clib netware-libc netware-libc-bsdsock);
|
||||
|
||||
my $idx = 0;
|
||||
my $idx_cc = $idx++;
|
||||
@@ -761,7 +764,7 @@ PROCESS_ARGS:
|
||||
}
|
||||
else
|
||||
{
|
||||
die "target already defined - $target\n" if ($target ne "");
|
||||
die "target already defined - $target (offending arg: $_)\n" if ($target ne "");
|
||||
$target=$_;
|
||||
}
|
||||
|
||||
|
||||
23
FAQ
23
FAQ
@@ -46,6 +46,8 @@ OpenSSL - Frequently Asked Questions
|
||||
* Why does the OpenSSL test suite fail on MacOS X?
|
||||
* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]?
|
||||
* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"?
|
||||
* Why does the OpenSSL test suite fail in sha512t on x86 CPU?
|
||||
* Why does compiler fail to compile sha512.c?
|
||||
|
||||
[PROG] Questions about programming with OpenSSL
|
||||
|
||||
@@ -141,8 +143,8 @@ less Unix-centric, it might have been used much earlier.
|
||||
|
||||
With version 0.9.6 OpenSSL was extended to interface to external crypto
|
||||
hardware. This was realized in a special release '0.9.6-engine'. With
|
||||
version 0.9.7 (not yet released) the changes were merged into the main
|
||||
development line, so that the special release is no longer necessary.
|
||||
version 0.9.7 the changes were merged into the main development line,
|
||||
so that the special release is no longer necessary.
|
||||
|
||||
* How do I check the authenticity of the OpenSSL distribution?
|
||||
|
||||
@@ -598,6 +600,23 @@ Reportedly elder *BSD a.out platforms also suffer from this problem and
|
||||
remedy should be same. Provided binary is statically linked and should be
|
||||
working across wider range of *BSD branches, not just OpenBSD.
|
||||
|
||||
* Why does the OpenSSL test suite fail in sha512t on x86 CPU?
|
||||
|
||||
If the test program in question fails withs SIGILL, Illegal Instruction
|
||||
exception, then you more than likely to run SSE2-capable CPU, such as
|
||||
Intel P4, under control of kernel which does not support SSE2
|
||||
instruction extentions. See accompanying INSTALL file and
|
||||
OPENSSL_ia32cap(3) documentation page for further information.
|
||||
|
||||
* Why does compiler fail to compile sha512.c?
|
||||
|
||||
OpenSSL SHA-512 implementation depends on compiler support for 64-bit
|
||||
integer type. Few elder compilers [ULTRIX cc, SCO compiler to mention a
|
||||
couple] lack support for this and therefore are incapable of compiling
|
||||
the module in question. The recommendation is to disable SHA-512 by
|
||||
adding no-sha512 to ./config [or ./Configure] command line. Another
|
||||
possible alternative might be to switch to GCC.
|
||||
|
||||
[PROG] ========================================================================
|
||||
|
||||
* Is OpenSSL thread-safe?
|
||||
|
||||
36
INSTALL.NW
36
INSTALL.NW
@@ -32,6 +32,10 @@ The necessary LibC functionality ships with NetWare 6. However, earlier
|
||||
NetWare 5.x versions will require updates in order to run the OpenSSL LibC
|
||||
build.
|
||||
|
||||
As of June 2005, the LibC build can be configured to use BSD sockets instead
|
||||
of WinSock sockets. Call Configure (usually through netware\build.bat) using
|
||||
a target of "netware-libc-bsdsock" instead of "netware-libc".
|
||||
|
||||
|
||||
REQUIRED TOOLS:
|
||||
---------------
|
||||
@@ -95,7 +99,12 @@ following tools may be required:
|
||||
Microsoft SDK. Note: The winsock2.h support headers may change
|
||||
with various versions of winsock2.h. Check the dependencies
|
||||
section on the NDK WinSock2 download page for the latest
|
||||
information on dependencies.
|
||||
information on dependencies. These components are unsupported by
|
||||
Novell. They are provided as a courtesy, but it is strongly
|
||||
suggested that all development be done using LIBC, not CLIB.
|
||||
|
||||
As of June 2005, the WinSock2 components are available at:
|
||||
http://forgeftp.novell.com//ws2comp/
|
||||
|
||||
|
||||
NLM and NetWare libraries for C (including CLIB and XPlat):
|
||||
@@ -121,7 +130,8 @@ following tools may be required:
|
||||
|
||||
NOTE: The LibC SDK includes the necessary WinSock2 support. It
|
||||
It is not necessary to download the WinSock2 Developer when building
|
||||
for LibC.
|
||||
for LibC. The LibC SDK also includes the appropriate BSD socket support
|
||||
if configuring to use BSD sockets.
|
||||
|
||||
|
||||
BUILDING:
|
||||
@@ -172,8 +182,9 @@ the assembly code. Always run build.bat from the "openssl" directory.
|
||||
|
||||
netware\build [target] [debug opts] [assembly opts] [configure opts]
|
||||
|
||||
target - "netware-clib" - CLib NetWare build
|
||||
- "netware-libc" - LibC NetWare build
|
||||
target - "netware-clib" - CLib NetWare build (WinSock Sockets)
|
||||
- "netware-libc" - LibC NetWare build (WinSock Sockets)
|
||||
- "netware-libc-bsdsock" - LibC NetWare build (BSD Sockets)
|
||||
|
||||
debug opts - "debug" - build debug
|
||||
|
||||
@@ -192,25 +203,29 @@ the assembly code. Always run build.bat from the "openssl" directory.
|
||||
LibC build, non-debug, using NASM assembly:
|
||||
netware\build.bat netware-libc nw-nasm
|
||||
|
||||
LibC build, BSD sockets, non-debug, without assembly:
|
||||
netware\build.bat netware-libc-bsdsock no-asm
|
||||
|
||||
Running build.bat generates a make file to be processed by your make
|
||||
tool (gmake or nmake):
|
||||
|
||||
CLIB ex: gmake -f netware\nlm_clib.mak
|
||||
CLIB ex: gmake -f netware\nlm_clib_dbg.mak
|
||||
LibC ex: gmake -f netware\nlm_libc.mak
|
||||
LibC ex: gmake -f netware\nlm_libc_bsdsock.mak
|
||||
|
||||
|
||||
You can also run the build scripts manually if you do not want to use the
|
||||
build.bat file. Run the following scripts in the "\openssl"
|
||||
subdirectory (in the order listed below):
|
||||
|
||||
perl configure no-asm [other config opts] [netware-clib|netware-libc]
|
||||
perl configure no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock]
|
||||
configures no assembly build for specified netware environment
|
||||
(CLIB or LibC).
|
||||
|
||||
perl util\mkfiles.pl >MINFO
|
||||
generates a listing of source files (used by mk1mf)
|
||||
|
||||
perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc >netware\nlm.mak
|
||||
perl util\mk1mf.pl no-asm [other config opts] [netware-clib|netware-libc|netware-libc-bsdsock >netware\nlm.mak
|
||||
generates the makefile for NetWare
|
||||
|
||||
gmake -f netware\nlm.mak
|
||||
@@ -288,13 +303,6 @@ The do_tests.pl script generates a log file "\openssl\test_out\tests.log"
|
||||
which should be reviewed for errors. Any errors will be denoted by the word
|
||||
"ERROR" in the log.
|
||||
|
||||
NOTE: Currently (11/2002), the LibC test nlms report an error while loading
|
||||
when launched from the perl script (do_tests.pl). The problems are
|
||||
being addressed by the LibC development team and should be fixed in the
|
||||
next release. Until the problems are corrected, the LibC test nlms
|
||||
will have to be executed manually.
|
||||
|
||||
|
||||
DEVELOPING WITH THE OPENSSL SDK:
|
||||
--------------------------------
|
||||
Now that everything is built and tested, you are ready to use the OpenSSL
|
||||
|
||||
29
Makefile.org
29
Makefile.org
@@ -150,9 +150,10 @@ BUILDENV= PLATFORM='${PLATFORM}' PROCESSOR='${PROCESSOR}' \
|
||||
CC='${CC}' CFLAG='${CFLAG}' \
|
||||
AS='${CC}' ASFLAG='${CFLAG} -c' \
|
||||
AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}' \
|
||||
SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib' \
|
||||
SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib' \
|
||||
INSTALL_PREFIX='${INSTALL_PREFIX}' \
|
||||
INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' \
|
||||
MAKEDEPEND='$${TOP}/util/domd $${TOP} -MD ${MAKEDEPPROG}'\
|
||||
MAKEDEPEND='$${TOP}/util/domd $${TOP} -MD ${MAKEDEPPROG}' \
|
||||
DEPFLAG='-DOPENSSL_NO_DEPRECATED ${DEPFLAG}' \
|
||||
MAKEDEPPROG='${MAKEDEPPROG}' \
|
||||
LDFLAGS='${LDFLAGS}' SHARED_LDFLAGS='${SHARED_LDFLAGS}' \
|
||||
@@ -276,7 +277,7 @@ Makefile: Makefile.org Configure config
|
||||
@false
|
||||
|
||||
libclean:
|
||||
rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
|
||||
rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
|
||||
|
||||
clean: libclean
|
||||
rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
|
||||
@@ -391,11 +392,15 @@ crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt c
|
||||
apps/openssl-vms.cnf: apps/openssl.cnf
|
||||
$(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
|
||||
|
||||
crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
|
||||
$(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
|
||||
|
||||
|
||||
TABLE: Configure
|
||||
(echo 'Output of `Configure TABLE'"':"; \
|
||||
$(PERL) Configure TABLE) > TABLE
|
||||
|
||||
update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf TABLE
|
||||
update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
|
||||
|
||||
# Build distribution tar-file. As the list of files returned by "find" is
|
||||
# pretty long, on several platforms a "too many arguments" error or similar
|
||||
@@ -476,13 +481,13 @@ install_sw:
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
else \
|
||||
c=`echo $$i | sed 's/^lib/cyg/'`; \
|
||||
c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
|
||||
cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
|
||||
cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
|
||||
cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
|
||||
fi ); \
|
||||
fi; \
|
||||
done; \
|
||||
@@ -521,8 +526,8 @@ install_docs:
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
grep -v "[ ]" | \
|
||||
(grep -v $$filecase "^$$fn\$$"; true) | \
|
||||
(grep -v "[ ]"; true) | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
@@ -538,8 +543,8 @@ install_docs:
|
||||
--release=$(VERSION) `basename $$i`") \
|
||||
> $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
|
||||
$(PERL) util/extract-names.pl < $$i | \
|
||||
grep -v $$filecase "^$$fn\$$" | \
|
||||
grep -v "[ ]" | \
|
||||
(grep -v $$filecase "^$$fn\$$"; true) | \
|
||||
(grep -v "[ ]"; true) | \
|
||||
(cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
|
||||
while read n; do \
|
||||
$$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
|
||||
|
||||
@@ -231,7 +231,8 @@ link_o.cygwin:
|
||||
SHLIB=cyg$(LIBNAME); \
|
||||
expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
|
||||
SHLIB_SUFFIX=.dll; \
|
||||
SHLIB_SOVER=-$(LIBVERSION); \
|
||||
LIBVERSION="$(LIBVERSION)"; \
|
||||
SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \
|
||||
ALLSYMSFLAGS='-Wl,--whole-archive'; \
|
||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
|
||||
@@ -242,16 +243,16 @@ link_a.cygwin:
|
||||
SHLIB=cyg$(LIBNAME); \
|
||||
expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
|
||||
SHLIB_SUFFIX=.dll; \
|
||||
SHLIB_SOVER=; \
|
||||
SHLIB_SOVER=-$(LIBVERSION); \
|
||||
ALLSYMSFLAGS='-Wl,--whole-archive'; \
|
||||
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
|
||||
base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x61200000; \
|
||||
base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
|
||||
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
|
||||
[ -f apps/$$SHLIB$$SHLIB_SUFFIX ] && rm apps/$$SHLIB$$SHLIB_SUFFIX; \
|
||||
[ -f test/$$SHLIB$$SHLIB_SUFFIX ] && rm test/$$SHLIB$$SHLIB_SUFFIX; \
|
||||
$(LINK_SO_A) || exit 1; \
|
||||
cp -p $$SHLIB$$SHLIB_SUFFIX apps/; \
|
||||
cp -p $$SHLIB$$SHLIB_SUFFIX test/
|
||||
cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX apps/; \
|
||||
cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX test/
|
||||
link_app.cygwin:
|
||||
$(LINK_APP)
|
||||
|
||||
|
||||
6
NEWS
6
NEWS
@@ -69,8 +69,12 @@
|
||||
argument form 'enable-xxx'.
|
||||
o Change the default digest in 'openssl' commands from MD5 to
|
||||
SHA-1.
|
||||
o Added support for DTLS. THIS IS STILL BEING WORKED ON!
|
||||
o Added support for DTLS.
|
||||
o New BIGNUM blinding.
|
||||
o Added support for the RSA-PSS encryption scheme
|
||||
o Added support for the RSA X.931 padding.
|
||||
o Added support for BSD sockets on NetWare.
|
||||
o Added support for files larger than 2GB.
|
||||
|
||||
Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g:
|
||||
|
||||
|
||||
@@ -6,14 +6,15 @@ rem
|
||||
rem usage:
|
||||
rem build [target] [debug opts] [assembly opts] [configure opts]
|
||||
rem
|
||||
rem target - "netware-clib" - CLib NetWare build
|
||||
rem - "netware-libc" - LibC NKS NetWare build
|
||||
rem target - "netware-clib" - CLib NetWare build (WinSock Sockets)
|
||||
rem - "netware-libc" - LibC NKS NetWare build (WinSock Sockets)
|
||||
rem - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets)
|
||||
rem
|
||||
rem debug opts - "debug" - build debug
|
||||
rem
|
||||
rem assembly opts - "nw-mwasm" - use Metrowerks assembler
|
||||
rem "nw-nasm" - use NASM assembler
|
||||
rem "no-asm" - don't use assembly
|
||||
rem - "nw-nasm" - use NASM assembler
|
||||
rem - "no-asm" - don't use assembly
|
||||
rem
|
||||
rem configure opts- all unrecognized arguments are passed to the
|
||||
rem perl configure script
|
||||
@@ -76,6 +77,8 @@ if "%1" == "netware-clib" set BLD_TARGET=netware-clib
|
||||
if "%1" == "netware-clib" set ARG_PROCESSED=YES
|
||||
if "%1" == "netware-libc" set BLD_TARGET=netware-libc
|
||||
if "%1" == "netware-libc" set ARG_PROCESSED=YES
|
||||
if "%1" == "netware-libc-bsdsock" set BLD_TARGET=netware-libc-bsdsock
|
||||
if "%1" == "netware-libc-bsdsock" set ARG_PROCESSED=YES
|
||||
|
||||
rem If we didn't recognize the argument, consider it an option for config
|
||||
if "%ARG_PROCESSED%" == "NO" set CONFIG_OPTS=%CONFIG_OPTS% %1
|
||||
@@ -92,6 +95,7 @@ rem build the nlm make file name which includes target and debug info
|
||||
set NLM_MAKE=
|
||||
if "%BLD_TARGET%" == "netware-clib" set NLM_MAKE=netware\nlm_clib
|
||||
if "%BLD_TARGET%" == "netware-libc" set NLM_MAKE=netware\nlm_libc
|
||||
if "%BLD_TARGET%" == "netware-libc-bsdsock" set NLM_MAKE=netware\nlm_libc_bsdsock
|
||||
if "%DEBUG%" == "" set NLM_MAKE=%NLM_MAKE%.mak
|
||||
if "%DEBUG%" == "debug" set NLM_MAKE=%NLM_MAKE%_dbg.mak
|
||||
|
||||
@@ -184,8 +188,9 @@ echo . No build target specified!!!
|
||||
echo .
|
||||
echo . usage: build [target] [debug opts] [assembly opts] [configure opts]
|
||||
echo .
|
||||
echo . target - "netware-clib" - CLib NetWare build
|
||||
echo . - "netware-libc" - LibC NKS NetWare build
|
||||
echo . target - "netware-clib" - CLib NetWare build (WinSock Sockets)
|
||||
echo . - "netware-libc" - LibC NKS NetWare build (WinSock Sockets)
|
||||
echo . - "netware-libc-bsdsock" - LibC NKS NetWare build (BSD Sockets)
|
||||
echo .
|
||||
echo . debug opts - "debug" - build debug
|
||||
echo .
|
||||
|
||||
@@ -42,8 +42,8 @@ sub main()
|
||||
encryption_tests();
|
||||
pem_tests();
|
||||
verify_tests();
|
||||
ssl_tests();
|
||||
ca_tests();
|
||||
ssl_tests();
|
||||
|
||||
close(OUT);
|
||||
|
||||
@@ -67,10 +67,17 @@ sub algorithm_tests
|
||||
|
||||
foreach $i (@tests)
|
||||
{
|
||||
$outFile = "$output_path\\$i.out";
|
||||
system("$i > $outFile");
|
||||
log_desc("Test: $i\.nlm:");
|
||||
log_output("", $outFile );
|
||||
if (-e "$base_path\\$i.nlm")
|
||||
{
|
||||
$outFile = "$output_path\\$i.out";
|
||||
system("$i > $outFile");
|
||||
log_desc("Test: $i\.nlm:");
|
||||
log_output("", $outFile );
|
||||
}
|
||||
else
|
||||
{
|
||||
log_desc("Test: $i\.nlm: file not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,61 +253,63 @@ sub verify_tests
|
||||
sub ssl_tests
|
||||
{
|
||||
my $outFile = "$output_path\\ssl_tst.out";
|
||||
my($CAcert) = "$output_path\\certCA.ss";
|
||||
my($Ukey) = "$output_path\\keyU.ss";
|
||||
my($Ucert) = "$output_path\\certU.ss";
|
||||
my($ssltest)= "ssltest -key $Ukey -cert $Ucert -c_key $Ukey -c_cert $Ucert -CAfile $CAcert";
|
||||
|
||||
print( "\nRUNNING SSL TESTS:\n\n");
|
||||
|
||||
print( OUT "\n========================================================\n");
|
||||
print( OUT "SSL TESTS:\n\n");
|
||||
|
||||
make_tmp_cert_file();
|
||||
|
||||
system("ssltest -ssl2 >$outFile");
|
||||
log_desc("Testing sslv2:");
|
||||
log_output("ssltest -ssl2", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl2 -server_auth >$outFile");
|
||||
log_desc("Testing sslv2 with server authentication:");
|
||||
log_output("ssltest -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl2 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl2 -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with client authentication:");
|
||||
log_output("ssltest -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl2 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl2 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with both client and server authentication:");
|
||||
log_output("ssltest -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl2 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl3 >$outFile");
|
||||
log_desc("Testing sslv3:");
|
||||
log_output("ssltest -ssl3", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl3 -server_auth >$outFile");
|
||||
log_desc("Testing sslv3 with server authentication:");
|
||||
log_output("ssltest -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl3 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl3 -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with client authentication:");
|
||||
log_output("ssltest -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl3 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -ssl3 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with both client and server authentication:");
|
||||
log_output("ssltest -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -ssl3 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest >$outFile");
|
||||
log_desc("Testing sslv2/sslv3:");
|
||||
log_output("ssltest", $outFile);
|
||||
|
||||
system("ssltest -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -server_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with server authentication:");
|
||||
log_output("ssltest -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -server_auth", $outFile);
|
||||
|
||||
system("ssltest -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with client authentication:");
|
||||
log_output("ssltest -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -client_auth ", $outFile);
|
||||
|
||||
system("ssltest -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with both client and server authentication:");
|
||||
log_output("ssltest -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 >$outFile");
|
||||
log_desc("Testing sslv2 via BIO pair:");
|
||||
@@ -310,49 +319,49 @@ sub ssl_tests
|
||||
log_desc("Testing sslv2/sslv3 with 1024 bit DHE via BIO pair:");
|
||||
log_output("ssltest -bio_pair -dhe1024dsa -v", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl2 -server_auth >$outFile");
|
||||
log_desc("Testing sslv2 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl2 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl2 -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl2 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl2 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl2 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl2 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 >$outFile");
|
||||
log_desc("Testing sslv3 via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl3 -server_auth >$outFile");
|
||||
log_desc("Testing sslv3 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl3 -server_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl3 -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl3 -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -ssl3 -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv3 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -ssl3 -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -ssl3 -server_auth -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 via BIO pair:");
|
||||
log_output("ssltest -bio_pair", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -server_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -server_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -server_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -server_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with client authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -client_auth", $outFile);
|
||||
|
||||
system("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert >$outFile");
|
||||
system("$ssltest -bio_pair -server_auth -client_auth >$outFile");
|
||||
log_desc("Testing sslv2/sslv3 with both client and server authentication via BIO pair:");
|
||||
log_output("ssltest -bio_pair -server_auth -client_auth -CAfile $tmp_cert", $outFile);
|
||||
log_output("$ssltest -bio_pair -server_auth -client_auth", $outFile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
66
PROBLEMS
66
PROBLEMS
@@ -12,8 +12,8 @@ along the whole library path before it bothers looking for .a libraries. This
|
||||
means that -L switches won't matter unless OpenSSL is built with shared
|
||||
library support.
|
||||
|
||||
The workaround may be to change the following lines in apps/Makefile.ssl and
|
||||
test/Makefile.ssl:
|
||||
The workaround may be to change the following lines in apps/Makefile and
|
||||
test/Makefile:
|
||||
|
||||
LIBCRYPTO=-L.. -lcrypto
|
||||
LIBSSL=-L.. -lssl
|
||||
@@ -48,20 +48,34 @@ will interfere with each other and lead to test failure.
|
||||
The solution is simple for now: don't run parallell make when testing.
|
||||
|
||||
|
||||
* Bugs in gcc 3.0 triggered
|
||||
* Bugs in gcc triggered
|
||||
|
||||
According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
- According to a problem report, there are bugs in gcc 3.0 that are
|
||||
triggered by some of the code in OpenSSL, more specifically in
|
||||
PEM_get_EVP_CIPHER_INFO(). The triggering code is the following:
|
||||
|
||||
header+=11;
|
||||
if (*header != '4') return(0); header++;
|
||||
if (*header != ',') return(0); header++;
|
||||
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
What happens is that gcc might optimize a little too agressively, and
|
||||
you end up with an extra incrementation when *header != '4'.
|
||||
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
We recommend that you upgrade gcc to as high a 3.x version as you can.
|
||||
|
||||
- According to multiple problem reports, some of our message digest
|
||||
implementations trigger bug[s] in code optimizer in gcc 3.3 for sparc64
|
||||
and gcc 2.96 for ppc. Former fails to complete RIPEMD160 test, while
|
||||
latter - SHA one.
|
||||
|
||||
The recomendation is to upgrade your compiler. This naturally applies to
|
||||
other similar cases.
|
||||
|
||||
- There is a subtle Solaris x86-specific gcc run-time environment bug, which
|
||||
"falls between" OpenSSL [0.9.8 and later], Solaris ld and GCC. The bug
|
||||
manifests itself as Segmentation Fault upon early application start-up.
|
||||
The problem can be worked around by patching the environment according to
|
||||
http://www.openssl.org/~appro/values.c.
|
||||
|
||||
* solaris64-sparcv9-cc SHA-1 performance with WorkShop 6 compiler.
|
||||
|
||||
@@ -120,3 +134,37 @@ Any information helping to solve this issue would be deeply
|
||||
appreciated.
|
||||
|
||||
NOTE: building non-shared doesn't come with this problem.
|
||||
|
||||
* ULTRIX build fails with shell errors, such as "bad substitution"
|
||||
and "test: argument expected"
|
||||
|
||||
The problem is caused by ULTRIX /bin/sh supporting only original
|
||||
Bourne shell syntax/semantics, and the trouble is that the vast
|
||||
majority is so accustomed to more modern syntax, that very few
|
||||
people [if any] would recognize the ancient syntax even as valid.
|
||||
This inevitably results in non-trivial scripts breaking on ULTRIX,
|
||||
and OpenSSL isn't an exclusion. Fortunately there is workaround,
|
||||
hire /bin/ksh to do the job /bin/sh fails to do.
|
||||
|
||||
1. Trick make(1) to use /bin/ksh by setting up following environ-
|
||||
ment variables *prior* you execute ./Configure and make:
|
||||
|
||||
PROG_ENV=POSIX
|
||||
MAKESHELL=/bin/ksh
|
||||
export PROG_ENV MAKESHELL
|
||||
|
||||
or if your shell is csh-compatible:
|
||||
|
||||
setenv PROG_ENV POSIX
|
||||
setenv MAKESHELL /bin/ksh
|
||||
|
||||
2. Trick /bin/sh to use alternative expression evaluator. Create
|
||||
following 'test' script for example in /tmp:
|
||||
|
||||
#!/bin/ksh
|
||||
${0##*/} "$@"
|
||||
|
||||
Then 'chmod a+x /tmp/test; ln /tmp/test /tmp/[' and *prepend*
|
||||
your $PATH with chosen location, e.g. PATH=/tmp:$PATH. Alter-
|
||||
natively just replace system /bin/test and /bin/[ with the
|
||||
above script.
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.8-beta1 19 May 2005
|
||||
OpenSSL 0.9.8-beta6 21 Jun 2005
|
||||
|
||||
Copyright (c) 1998-2005 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
8
STATUS
8
STATUS
@@ -1,10 +1,16 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2005/05/19 19:42:03 $
|
||||
______________ $Date: 2005/06/21 05:49:47 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.9: Under development...
|
||||
o OpenSSL 0.9.8-beta6: Released on June 21th, 2005
|
||||
OpenVMS/Alpha 7.3-2 w. Compaq C 6.4-005 SUCCESS
|
||||
o OpenSSL 0.9.8-beta5: Released on June 13th, 2005
|
||||
o OpenSSL 0.9.8-beta4: Released on June 6th, 2005
|
||||
o OpenSSL 0.9.8-beta3: Released on May 31th, 2005
|
||||
o OpenSSL 0.9.8-beta2: Released on May 24th, 2005
|
||||
o OpenSSL 0.9.8-beta1: Released on May 19th, 2005
|
||||
o OpenSSL 0.9.7g: Released on April 11th, 2005
|
||||
o OpenSSL 0.9.7f: Released on March 22nd, 2005
|
||||
|
||||
125
TABLE
125
TABLE
@@ -117,7 +117,7 @@ $sys_id =
|
||||
$lflags =
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -326,7 +326,7 @@ $arflags =
|
||||
|
||||
*** DJGPP
|
||||
$cc = gcc
|
||||
$cflags = -I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM="/dev/urandom\x24"
|
||||
$cflags = -I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id = MSDOS
|
||||
@@ -866,7 +866,7 @@ $arflags =
|
||||
|
||||
*** bsdi-elf-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
|
||||
$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
@@ -1433,7 +1433,7 @@ $arflags =
|
||||
|
||||
*** debug-linux-elf
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -1460,7 +1460,7 @@ $arflags =
|
||||
|
||||
*** debug-linux-elf-noefence
|
||||
$cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2007,7 +2007,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2034,7 +2034,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2223,7 +2223,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2250,7 +2250,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX DES_UNROLL DES_RISC1 DES_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2324,7 +2324,7 @@ $arflags =
|
||||
|
||||
*** hurd-x86
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
|
||||
$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -2621,7 +2621,7 @@ $arflags =
|
||||
|
||||
*** linux-aout
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
@@ -2763,7 +2763,7 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -2790,7 +2790,34 @@ $sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = ia64.o
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj = sha1-ia64.o sha256-ia64.o sha512-ia64.o
|
||||
$cast_obj =
|
||||
$rc4_obj = rc4-ia64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= linux-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag =
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** linux-ia64-icc
|
||||
$cc = icc
|
||||
$cflags = -DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
|
||||
$cpuid_obj =
|
||||
$bn_obj = bn-ia64.o
|
||||
$des_obj =
|
||||
$aes_obj = aes_core.o aes_cbc.o aes-ia64.o
|
||||
$bf_obj =
|
||||
@@ -3030,8 +3057,8 @@ $cflags =
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = RC4_INDEX MD2_INT
|
||||
$bn_ops =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3057,8 +3084,35 @@ $cflags =
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = BN_LLONG RC4_INDEX MD2_INT
|
||||
$bn_ops =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** netware-libc-bsdsock
|
||||
$cc = mwccnlm
|
||||
$cflags =
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3084,8 +3138,8 @@ $cflags = -nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_EN
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id =
|
||||
$lflags = RC4_INDEX MD2_INT
|
||||
$bn_ops =
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3348,33 +3402,6 @@ $shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** sco3-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags = -lsocket
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$aes_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
$shared_ldflag =
|
||||
$shared_extension =
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** sco5-cc
|
||||
$cc = cc
|
||||
$cflags = -belf
|
||||
@@ -3620,7 +3647,7 @@ $arflags =
|
||||
|
||||
*** solaris-x86-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM
|
||||
$cflags = -O3 -fomit-frame-pointer -march=i486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
@@ -3868,7 +3895,7 @@ $unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$sys_id =
|
||||
$lflags =
|
||||
$bn_ops =
|
||||
$bn_ops = BN_LLONG
|
||||
$cpuid_obj =
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
@@ -3971,7 +3998,7 @@ $arflags =
|
||||
|
||||
*** unixware-7-gcc
|
||||
$cc = gcc
|
||||
$cflags = -DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall
|
||||
$cflags = -DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=i486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
|
||||
246
apps/Makefile
246
apps/Makefile
@@ -86,7 +86,7 @@ req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
|
||||
shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
fi; \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared $(BUILDENV) \
|
||||
APPNAME=req OBJECTS="sreq.o $(A_OBJ) $(RAND_OBJ)" \
|
||||
LIBDEPS="$(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)" \
|
||||
link_app.$${shlib_target}
|
||||
@@ -158,7 +158,7 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
|
||||
else \
|
||||
LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
|
||||
fi; \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared $(BUILDENV) \
|
||||
APPNAME=$(EXE) OBJECTS="$(PROGRAM).o $(E_OBJ)" \
|
||||
LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
|
||||
link_app.$${shlib_target}
|
||||
@@ -236,17 +236,18 @@ ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
|
||||
ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
ca.o: ../include/openssl/x509v3.h apps.h ca.c
|
||||
ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ciphers.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
ciphers.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
ciphers.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
ciphers.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
ciphers.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
ciphers.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
ciphers.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
ciphers.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
@@ -391,17 +392,18 @@ enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
enc.o: ../include/openssl/x509_vfy.h apps.h enc.c
|
||||
engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
engine.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
engine.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
engine.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
engine.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
engine.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
engine.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
engine.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
engine.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
engine.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
engine.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
engine.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
engine.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
@@ -410,17 +412,18 @@ engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
engine.o: ../include/openssl/x509_vfy.h apps.h engine.c
|
||||
errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
errstr.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
errstr.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
errstr.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
errstr.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
errstr.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
errstr.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
errstr.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
errstr.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
errstr.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
errstr.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
errstr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
@@ -507,25 +510,27 @@ ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h
|
||||
ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
ocsp.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c
|
||||
ocsp.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
|
||||
ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c
|
||||
openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
openssl.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
openssl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
openssl.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
openssl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
openssl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
openssl.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
openssl.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
openssl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
openssl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
openssl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
openssl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
openssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
openssl.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
openssl.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
openssl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
openssl.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
openssl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
openssl.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
openssl.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
openssl.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
openssl.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
openssl.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
@@ -670,17 +675,18 @@ rsautl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
rsautl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
rsautl.o: ../include/openssl/x509_vfy.h apps.h rsautl.c
|
||||
s_cb.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_cb.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_cb.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_cb.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
s_cb.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s_cb.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
s_cb.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s_cb.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s_cb.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s_cb.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_cb.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_cb.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_cb.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_cb.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_cb.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
s_cb.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_cb.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_cb.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
s_cb.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s_cb.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_cb.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_cb.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_cb.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_cb.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
s_cb.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
s_cb.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_cb.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
@@ -689,17 +695,18 @@ s_cb.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_cb.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_cb.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_cb.c
|
||||
s_client.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_client.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_client.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_client.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
s_client.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s_client.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
s_client.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s_client.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s_client.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s_client.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_client.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_client.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_client.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_client.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
s_client.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_client.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_client.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
s_client.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s_client.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_client.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_client.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_client.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_client.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
s_client.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
|
||||
s_client.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_client.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
@@ -721,28 +728,29 @@ s_server.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_server.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_server.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_server.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_server.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
|
||||
s_server.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
s_server.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_server.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_server.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
s_server.o: ../include/openssl/stack.h ../include/openssl/store.h
|
||||
s_server.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_server.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
|
||||
s_server.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
s_server.o: s_apps.h s_server.c timeouts.h
|
||||
s_server.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
s_server.o: ../include/openssl/pqueue.h ../include/openssl/rand.h
|
||||
s_server.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
s_server.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_server.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
s_server.o: ../include/openssl/ssl3.h ../include/openssl/stack.h
|
||||
s_server.o: ../include/openssl/store.h ../include/openssl/symhacks.h
|
||||
s_server.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_server.o: ../include/openssl/ui.h ../include/openssl/x509.h
|
||||
s_server.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_server.c timeouts.h
|
||||
s_socket.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_socket.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_socket.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_socket.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
s_socket.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s_socket.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
s_socket.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s_socket.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_socket.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_socket.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_socket.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_socket.o: ../include/openssl/pkcs7.h ../include/openssl/pqueue.h
|
||||
s_socket.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_socket.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_socket.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
s_socket.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_socket.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_socket.o: ../include/openssl/engine.h ../include/openssl/evp.h
|
||||
s_socket.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s_socket.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s_socket.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_socket.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_socket.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_socket.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h
|
||||
s_socket.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
s_socket.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h
|
||||
s_socket.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h
|
||||
@@ -751,17 +759,18 @@ s_socket.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h
|
||||
s_socket.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
s_socket.o: s_apps.h s_socket.c
|
||||
s_time.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_time.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
s_time.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
s_time.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
s_time.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
s_time.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
s_time.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s_time.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
s_time.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
s_time.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
s_time.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
s_time.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
s_time.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
s_time.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_time.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
s_time.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
s_time.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
s_time.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
s_time.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
s_time.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
s_time.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
s_time.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
s_time.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
s_time.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
s_time.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
s_time.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
s_time.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
@@ -770,17 +779,18 @@ s_time.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h
|
||||
s_time.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
|
||||
s_time.o: ../include/openssl/x509_vfy.h apps.h s_apps.h s_time.c
|
||||
sess_id.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
sess_id.o: ../include/openssl/buffer.h ../include/openssl/comp.h
|
||||
sess_id.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
sess_id.o: ../include/openssl/dtls1.h ../include/openssl/e_os2.h
|
||||
sess_id.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
sess_id.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
sess_id.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
sess_id.o: ../include/openssl/kssl.h ../include/openssl/lhash.h
|
||||
sess_id.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
sess_id.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
sess_id.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
|
||||
sess_id.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
sess_id.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
sess_id.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
sess_id.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h
|
||||
sess_id.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
sess_id.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
sess_id.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
sess_id.o: ../include/openssl/evp.h ../include/openssl/kssl.h
|
||||
sess_id.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
sess_id.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
sess_id.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
sess_id.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
sess_id.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h
|
||||
sess_id.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h
|
||||
sess_id.o: ../include/openssl/sha.h ../include/openssl/ssl.h
|
||||
sess_id.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
* Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifndef OPENSSL_NO_EC
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -650,7 +650,7 @@ $ CCDEFS = "MONOLITH"
|
||||
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
||||
$ CCEXTRAFLAGS = ""
|
||||
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
||||
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
|
||||
$!
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/* pkcs12.c */
|
||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
|
||||
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project.
|
||||
*/
|
||||
@@ -58,6 +56,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -148,6 +148,7 @@ int MAIN(int argc, char **argv)
|
||||
else if(!strcmp(*argv, "-oaep")) pad = RSA_PKCS1_OAEP_PADDING;
|
||||
else if(!strcmp(*argv, "-ssl")) pad = RSA_SSLV23_PADDING;
|
||||
else if(!strcmp(*argv, "-pkcs")) pad = RSA_PKCS1_PADDING;
|
||||
else if(!strcmp(*argv, "-x931")) pad = RSA_X931_PADDING;
|
||||
else if(!strcmp(*argv, "-sign")) {
|
||||
rsa_mode = RSA_SIGN;
|
||||
need_priv = 1;
|
||||
|
||||
@@ -263,6 +263,9 @@ int MAIN(int argc, char **argv)
|
||||
int starttls_proto = 0;
|
||||
int prexit = 0, vflags = 0;
|
||||
SSL_METHOD *meth=NULL;
|
||||
#ifdef sock_type
|
||||
#undef sock_type
|
||||
#endif
|
||||
int sock_type=SOCK_STREAM;
|
||||
BIO *sbio;
|
||||
char *inrand=NULL;
|
||||
|
||||
@@ -262,6 +262,9 @@ static char *engine_id=NULL;
|
||||
static const char *session_id_prefix=NULL;
|
||||
|
||||
static int enable_timeouts = 0;
|
||||
#ifdef mtu
|
||||
#undef mtu
|
||||
#endif
|
||||
static long mtu;
|
||||
static int cert_chain = 0;
|
||||
|
||||
@@ -534,6 +537,9 @@ int MAIN(int argc, char *argv[])
|
||||
int no_tmp_rsa=0,no_dhe=0,no_ecdhe=0,nocert=0;
|
||||
int state=0;
|
||||
SSL_METHOD *meth=NULL;
|
||||
#ifdef sock_type
|
||||
#undef sock_type
|
||||
#endif
|
||||
int sock_type=SOCK_STREAM;
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
ENGINE *e=NULL;
|
||||
|
||||
@@ -87,8 +87,12 @@ typedef unsigned int u_int;
|
||||
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
|
||||
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
|
||||
#include "netdb.h"
|
||||
#endif
|
||||
|
||||
static struct hostent *GetHostByName(char *name);
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||
static void ssl_sock_cleanup(void);
|
||||
#endif
|
||||
static int ssl_sock_init(void);
|
||||
@@ -104,7 +108,7 @@ static int host_ip(char *str, unsigned char ip[4]);
|
||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL_SYS_NETWARE
|
||||
#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
static int wsa_init_done=0;
|
||||
#endif
|
||||
|
||||
@@ -156,7 +160,7 @@ static void ssl_sock_cleanup(void)
|
||||
WSACleanup();
|
||||
}
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
static void sock_cleanup(void)
|
||||
{
|
||||
if (wsa_init_done)
|
||||
@@ -199,7 +203,7 @@ static int ssl_sock_init(void)
|
||||
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
|
||||
#endif /* OPENSSL_SYS_WIN16 */
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
WORD wVerReq;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
@@ -398,7 +402,7 @@ redoit:
|
||||
ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
|
||||
if (ret == INVALID_SOCKET)
|
||||
{
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||
i=WSAGetLastError();
|
||||
BIO_printf(bio_err,"accept error %d\n",i);
|
||||
#else
|
||||
|
||||
18
apps/speed.c
18
apps/speed.c
@@ -496,9 +496,13 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA
|
||||
unsigned char sha[SHA_DIGEST_LENGTH];
|
||||
#ifndef OPENSSL_NO_SHA256
|
||||
unsigned char sha256[SHA256_DIGEST_LENGTH];
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA512
|
||||
unsigned char sha512[SHA512_DIGEST_LENGTH];
|
||||
#endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RIPEMD
|
||||
unsigned char rmd160[RIPEMD160_DIGEST_LENGTH];
|
||||
#endif
|
||||
@@ -523,6 +527,7 @@ int MAIN(int argc, char **argv)
|
||||
static const unsigned char key16[16]=
|
||||
{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
|
||||
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
|
||||
#ifndef OPENSSL_NO_AES
|
||||
static const unsigned char key24[24]=
|
||||
{0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
|
||||
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
|
||||
@@ -532,6 +537,7 @@ int MAIN(int argc, char **argv)
|
||||
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
|
||||
0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,
|
||||
0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,0x56};
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_AES
|
||||
#define MAX_BLOCK_SIZE 128
|
||||
#else
|
||||
@@ -878,11 +884,15 @@ int MAIN(int argc, char **argv)
|
||||
doit[D_SHA256]=1,
|
||||
doit[D_SHA512]=1;
|
||||
else
|
||||
#ifndef OPENSSL_NO_SHA256
|
||||
if (strcmp(*argv,"sha256") == 0) doit[D_SHA256]=1;
|
||||
else
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA512
|
||||
if (strcmp(*argv,"sha512") == 0) doit[D_SHA512]=1;
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RIPEMD
|
||||
if (strcmp(*argv,"ripemd") == 0) doit[D_RMD160]=1;
|
||||
else
|
||||
@@ -1064,8 +1074,12 @@ int MAIN(int argc, char **argv)
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA1
|
||||
BIO_printf(bio_err,"sha1 ");
|
||||
BIO_printf(bio_err,"sha256 ");
|
||||
BIO_printf(bio_err,"sha512 ");
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA256
|
||||
BIO_printf(bio_err,"sha256 ");
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SHA512
|
||||
BIO_printf(bio_err,"sha512 ");
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_RIPEMD160
|
||||
BIO_printf(bio_err,"rmd160");
|
||||
|
||||
22
config
22
config
@@ -647,19 +647,29 @@ case "$GUESSOS" in
|
||||
OUT="solaris64-x86_64-$CC"
|
||||
else
|
||||
OUT="solaris-x86-$CC"
|
||||
if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then
|
||||
options="$options no-sse2"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*-*-sunos4) OUT="sunos-$CC" ;;
|
||||
|
||||
*86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
|
||||
*86*-*-bsdi4) OUT="bsdi-elf-gcc"; options="$options no-sse2" ;;
|
||||
alpha*-*-*bsd*) OUT="BSD-generic64; options="$options -DL_ENDIAN" ;;
|
||||
powerpc64-*-*bsd*) OUT="BSD-generic64; options="$options -DB_ENDIAN" ;;
|
||||
sparc64-*-*bsd*) OUT="BSD-sparc64" ;;
|
||||
ia64-*-*bsd*) OUT="BSD-ia64" ;;
|
||||
amd64-*-*bsd*) OUT="BSD-x86_64" ;;
|
||||
*86*-*-*bsd*) case "`(file -L /usr/lib/libc.so.*) 2>/dev/null`" in
|
||||
*86*-*-*bsd*) # mimic ld behaviour when it's looking for libc...
|
||||
if [ -L /usr/lib/libc.so ]; then # [Free|Net]BSD
|
||||
libc=/usr/lib/libc.so
|
||||
else # OpenBSD
|
||||
# ld searches for highest libc.so.* and so do we
|
||||
libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null`
|
||||
fi
|
||||
case "`(file -L $libc) 2>/dev/null`" in
|
||||
*ELF*) OUT="BSD-x86-elf" ;;
|
||||
*) OUT="BSD-x86" ;;
|
||||
*) OUT="BSD-x86"; options="$options no-sse2" ;;
|
||||
esac ;;
|
||||
*-*-*bsd*) OUT="BSD-generic32" ;;
|
||||
|
||||
@@ -672,9 +682,9 @@ case "$GUESSOS" in
|
||||
OUT="OpenUNIX-8"
|
||||
fi
|
||||
;;
|
||||
*-*-[Uu]nix[Ww]are7) OUT="unixware-7" ;;
|
||||
*-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0" ;;
|
||||
*-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1" ;;
|
||||
*-*-[Uu]nix[Ww]are7) OUT="unixware-7"; options="$options no-sse2" ;;
|
||||
*-*-[Uu]nix[Ww]are20*) OUT="unixware-2.0"; options="$options no-sse2 no-sha512" ;;
|
||||
*-*-[Uu]nix[Ww]are21*) OUT="unixware-2.1"; options="$options no-sse2 no-sha512" ;;
|
||||
*-*-vos)
|
||||
options="$options no-threads no-shared no-asm no-dso"
|
||||
EXE=".pm"
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
#define USE_SOCKETS
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/bio.h>
|
||||
#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
|
||||
#include "netdb.h"
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SOCK
|
||||
|
||||
@@ -79,7 +82,7 @@
|
||||
#define MAX_LISTEN 32
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK))
|
||||
static int wsa_init_done=0;
|
||||
#endif
|
||||
|
||||
@@ -474,7 +477,7 @@ int BIO_sock_init(void)
|
||||
return (-1);
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
WORD wVerReq;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
@@ -512,7 +515,7 @@ void BIO_sock_cleanup(void)
|
||||
#endif
|
||||
WSACleanup();
|
||||
}
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
|
||||
if (wsa_init_done)
|
||||
{
|
||||
wsa_init_done=0;
|
||||
|
||||
@@ -65,6 +65,24 @@
|
||||
#ifndef HEADER_BSS_FILE_C
|
||||
#define HEADER_BSS_FILE_C
|
||||
|
||||
#if defined(__linux) || defined(__sun) || defined(__hpux)
|
||||
/* Following definition aliases fopen to fopen64 on above mentioned
|
||||
* platforms. This makes it possible to open and sequentially access
|
||||
* files larger than 2GB from 32-bit application. It does not allow to
|
||||
* traverse them beyond 2GB with fseek/ftell, but on the other hand *no*
|
||||
* 32-bit platform permits that, not with fseek/ftell. Not to mention
|
||||
* that breaking 2GB limit for seeking would require surgery to *our*
|
||||
* API. But sequential access suffices for practical cases when you
|
||||
* can run into large files, such as fingerprinting, so we can let API
|
||||
* alone. For reference, the list of 32-bit platforms which allow for
|
||||
* sequential access of large files without extra "magic" comprise *BSD,
|
||||
* Darwin, IRIX...
|
||||
*/
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "cryptlib.h"
|
||||
|
||||
@@ -79,7 +79,7 @@ co86-out.s: asm/co-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) co-586.pl a.out $(CFLAGS) > ../$@)
|
||||
|
||||
sparcv8.o: asm/sparcv8.S
|
||||
|
||||
$(CC) $(CFLAGS) -c asm/sparcv8.S
|
||||
sparcv8plus.o: asm/sparcv8plus.S
|
||||
$(CC) $(CFLAGS) -c asm/sparcv8plus.S
|
||||
|
||||
|
||||
@@ -253,6 +253,8 @@ extern "C" {
|
||||
#define BN_set_flags(b,n) ((b)->flags|=(n))
|
||||
#define BN_get_flags(b,n) ((b)->flags&(n))
|
||||
|
||||
/* get a clone of a BIGNUM with changed flags, for *temporary* use only
|
||||
* (the two BIGNUMs cannot not be used in parallel!) */
|
||||
#define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \
|
||||
(dest)->top=(b)->top, \
|
||||
(dest)->dmax=(b)->dmax, \
|
||||
|
||||
@@ -237,7 +237,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
|
||||
if (d == 0) return(BN_MASK2);
|
||||
|
||||
i=BN_num_bits_word(d);
|
||||
assert((i == BN_BITS2) || (h > (BN_ULONG)1<<i));
|
||||
assert((i == BN_BITS2) || (h <= (BN_ULONG)1<<i));
|
||||
|
||||
i=BN_BITS2-i;
|
||||
if (h >= d) h-=d;
|
||||
|
||||
@@ -207,6 +207,8 @@ int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx)
|
||||
|
||||
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *ctx)
|
||||
{
|
||||
int ret = 1;
|
||||
|
||||
bn_check_top(n);
|
||||
|
||||
if ((b->A == NULL) || (b->Ai == NULL))
|
||||
@@ -216,9 +218,13 @@ int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *ctx)
|
||||
}
|
||||
|
||||
if (r != NULL)
|
||||
BN_copy(r, b->Ai);
|
||||
{
|
||||
if (!BN_copy(r, b->Ai)) ret=0;
|
||||
}
|
||||
|
||||
return BN_mod_mul(n,n,b->A,b->mod,ctx);
|
||||
if (!BN_mod_mul(n,n,b->A,b->mod,ctx)) ret=0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx)
|
||||
@@ -351,4 +357,3 @@ err:
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -282,6 +282,11 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
|
||||
nist_cp_bn_0(buf, a_d + BN_NIST_192_TOP, top - BN_NIST_192_TOP, BN_NIST_192_TOP);
|
||||
|
||||
#if defined(OPENSSL_SYS_VMS) && defined(__DECC)
|
||||
# pragma message save
|
||||
# pragma message disable BADSUBSCRIPT
|
||||
#endif
|
||||
|
||||
nist_set_192(t_d, buf, 0, 3, 3);
|
||||
if (bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP))
|
||||
++carry;
|
||||
@@ -290,6 +295,10 @@ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
|
||||
if (bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP))
|
||||
++carry;
|
||||
|
||||
#if defined(OPENSSL_SYS_VMS) && defined(__DECC)
|
||||
# pragma message restore
|
||||
#endif
|
||||
|
||||
nist_set_192(t_d, buf, 5, 5, 5)
|
||||
if (bn_add_words(r_d, r_d, t_d, BN_NIST_192_TOP))
|
||||
++carry;
|
||||
|
||||
@@ -73,7 +73,9 @@ static COMP_METHOD zlib_stateful_method={
|
||||
# include <windows.h>
|
||||
|
||||
# define Z_CALLCONV _stdcall
|
||||
# define ZLIB_SHARED
|
||||
# ifndef ZLIB_SHARED
|
||||
# define ZLIB_SHARED
|
||||
# endif
|
||||
#else
|
||||
# define Z_CALLCONV
|
||||
#endif /* !(OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32) */
|
||||
|
||||
@@ -624,7 +624,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
#include <tchar.h>
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
|
||||
static int IsService(void)
|
||||
int OPENSSL_isservice(void)
|
||||
{ HWINSTA h;
|
||||
DWORD len;
|
||||
WCHAR *name;
|
||||
@@ -722,7 +722,7 @@ void OPENSSL_showfatal (const char *fmta,...)
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
|
||||
/* this -------------v--- guards NT-specific calls */
|
||||
if (GetVersion() < 0x80000000 && IsService())
|
||||
if (GetVersion() < 0x80000000 && OPENSSL_isservice())
|
||||
{ HANDLE h = RegisterEventSource(0,_T("OPENSSL"));
|
||||
const TCHAR *pmsg=buf;
|
||||
ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0);
|
||||
@@ -754,6 +754,7 @@ void OPENSSL_showfatal (const char *fmta,...)
|
||||
vfprintf (stderr,fmta,ap);
|
||||
va_end (ap);
|
||||
}
|
||||
int OPENSSL_isservice (void) { return 0; }
|
||||
#endif
|
||||
|
||||
void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||
|
||||
@@ -103,6 +103,7 @@ extern unsigned long OPENSSL_ia32cap_P;
|
||||
void OPENSSL_showfatal(const char *,...);
|
||||
void *OPENSSL_stderr(void);
|
||||
extern int OPENSSL_NONPIC_relocated;
|
||||
int OPENSSL_isservice(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ -
|
||||
"ec2_smpl,ec2_mult"
|
||||
$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
|
||||
"rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
|
||||
"rsa_asn1,rsa_depr"
|
||||
"rsa_pss,rsa_x931,rsa_asn1,rsa_depr"
|
||||
$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ -
|
||||
"dsa_err,dsa_ossl,dsa_depr"
|
||||
$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err"
|
||||
@@ -214,6 +214,7 @@ $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
|
||||
"bss_file,bss_sock,bss_conn,"+ -
|
||||
"bf_null,bf_buff,b_print,b_dump,"+ -
|
||||
"b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log,"+ -
|
||||
"bss_dgram,"+ -
|
||||
"bf_lbuf"
|
||||
$ LIB_STACK = "stack"
|
||||
$ LIB_LHASH = "lhash,lh_stats"
|
||||
@@ -970,7 +971,7 @@ $ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS"
|
||||
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
|
||||
$ CCEXTRAFLAGS = ""
|
||||
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
|
||||
$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
|
||||
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
|
||||
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
|
||||
$!
|
||||
|
||||
@@ -148,6 +148,7 @@ static int generate_key(DH *dh)
|
||||
|
||||
if ((dh->flags & DH_FLAG_NO_EXP_CONSTTIME) == 0)
|
||||
{
|
||||
BN_init(&local_prk);
|
||||
prk = &local_prk;
|
||||
BN_with_flags(prk, priv_key, BN_FLG_EXP_CONSTTIME);
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ static int dsa_builtin_keygen(DSA *dsa)
|
||||
|
||||
if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0)
|
||||
{
|
||||
BN_init(&local_prk);
|
||||
prk = &local_prk;
|
||||
BN_with_flags(prk, priv_key, BN_FLG_EXP_CONSTTIME);
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ err:
|
||||
static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
{
|
||||
BN_CTX *ctx;
|
||||
BIGNUM k,*kinv=NULL,*r=NULL;
|
||||
BIGNUM k,kq,*K,*kinv=NULL,*r=NULL;
|
||||
int ret=0;
|
||||
|
||||
if (!dsa->p || !dsa->q || !dsa->g)
|
||||
@@ -212,6 +212,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
}
|
||||
|
||||
BN_init(&k);
|
||||
BN_init(&kq);
|
||||
|
||||
if (ctx_in == NULL)
|
||||
{
|
||||
@@ -221,7 +222,6 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
ctx=ctx_in;
|
||||
|
||||
if ((r=BN_new()) == NULL) goto err;
|
||||
kinv=NULL;
|
||||
|
||||
/* Get random k */
|
||||
do
|
||||
@@ -241,7 +241,30 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
}
|
||||
|
||||
/* Compute r = (g^k mod p) mod q */
|
||||
DSA_BN_MOD_EXP(goto err, dsa, r, dsa->g, &k, dsa->p, ctx,
|
||||
|
||||
if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0)
|
||||
{
|
||||
if (!BN_copy(&kq, &k)) goto err;
|
||||
|
||||
/* We do not want timing information to leak the length of k,
|
||||
* so we compute g^k using an equivalent exponent of fixed length.
|
||||
*
|
||||
* (This is a kludge that we need because the BN_mod_exp_mont()
|
||||
* does not let us specify the desired timing behaviour.) */
|
||||
|
||||
if (!BN_add(&kq, &kq, dsa->q)) goto err;
|
||||
if (BN_num_bits(&kq) <= BN_num_bits(dsa->q))
|
||||
{
|
||||
if (!BN_add(&kq, &kq, dsa->q)) goto err;
|
||||
}
|
||||
|
||||
K = &kq;
|
||||
}
|
||||
else
|
||||
{
|
||||
K = &k;
|
||||
}
|
||||
DSA_BN_MOD_EXP(goto err, dsa, r, dsa->g, K, dsa->p, ctx,
|
||||
dsa->method_mont_p);
|
||||
if (!BN_mod(r,r,dsa->q,ctx)) goto err;
|
||||
|
||||
@@ -264,6 +287,7 @@ err:
|
||||
if (ctx_in == NULL) BN_CTX_free(ctx);
|
||||
if (kinv != NULL) BN_clear_free(kinv);
|
||||
BN_clear_free(&k);
|
||||
BN_clear_free(&kq);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,8 @@ static int dl_load(DSO *dso)
|
||||
DSOerr(DSO_F_DL_LOAD,DSO_R_NO_FILENAME);
|
||||
goto err;
|
||||
}
|
||||
ptr = shl_load(filename, BIND_IMMEDIATE|DYNAMIC_PATH, 0L);
|
||||
ptr = shl_load(filename, BIND_IMMEDIATE |
|
||||
(dso->flags&DSO_FLAG_NO_NAME_TRANSLATION?0:DYNAMIC_PATH), 0L);
|
||||
if(ptr == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED);
|
||||
|
||||
@@ -622,7 +622,7 @@ void EC_EX_DATA_free_data(EC_EXTRA_DATA **ex_data,
|
||||
}
|
||||
|
||||
/* this has 'package' visibility */
|
||||
void EC_EX_DATA_clear_free_extra_data(EC_EXTRA_DATA **ex_data,
|
||||
void EC_EX_DATA_clear_free_data(EC_EXTRA_DATA **ex_data,
|
||||
void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *))
|
||||
{
|
||||
EC_EXTRA_DATA **p;
|
||||
|
||||
@@ -78,6 +78,7 @@ const char *ECDH_version="ECDH" OPENSSL_VERSION_PTEXT;
|
||||
|
||||
static const ECDH_METHOD *default_ECDH_method = NULL;
|
||||
|
||||
static void *ecdh_data_new(void);
|
||||
static void *ecdh_data_dup(void *);
|
||||
static void ecdh_data_free(void *);
|
||||
|
||||
@@ -167,7 +168,7 @@ static ECDH_DATA *ECDH_DATA_new_method(ENGINE *engine)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void *ecdh_data_new(void)
|
||||
static void *ecdh_data_new(void)
|
||||
{
|
||||
return (void *)ECDH_DATA_new_method(NULL);
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ const char *ECDSA_version="ECDSA" OPENSSL_VERSION_PTEXT;
|
||||
|
||||
static const ECDSA_METHOD *default_ECDSA_method = NULL;
|
||||
|
||||
static void *ecdsa_data_new(void);
|
||||
static void *ecdsa_data_dup(void *);
|
||||
static void ecdsa_data_free(void *);
|
||||
|
||||
@@ -147,7 +148,7 @@ static ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *engine)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void *ecdsa_data_new(void)
|
||||
static void *ecdsa_data_new(void)
|
||||
{
|
||||
return (void *)ECDSA_DATA_new_method(NULL);
|
||||
}
|
||||
|
||||
@@ -66,11 +66,14 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/dso.h>
|
||||
#include <openssl/engine.h>
|
||||
#include <openssl/evp.h>
|
||||
#ifndef OPENSSL_NO_AES
|
||||
#include <openssl/aes.h>
|
||||
#endif
|
||||
#include <openssl/rand.h>
|
||||
|
||||
#ifndef OPENSSL_NO_HW
|
||||
@@ -134,7 +137,9 @@ static int padlock_init(ENGINE *e);
|
||||
static RAND_METHOD padlock_rand;
|
||||
|
||||
/* Cipher Stuff */
|
||||
#ifndef OPENSSL_NO_AES
|
||||
static int padlock_ciphers(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid);
|
||||
#endif
|
||||
|
||||
/* Engine names */
|
||||
static const char *padlock_id = "padlock";
|
||||
@@ -143,7 +148,9 @@ static char padlock_name[100];
|
||||
/* Available features */
|
||||
static int padlock_use_ace = 0; /* Advanced Cryptography Engine */
|
||||
static int padlock_use_rng = 0; /* Random Number Generator */
|
||||
#ifndef OPENSSL_NO_AES
|
||||
static int padlock_aes_align_required = 1;
|
||||
#endif
|
||||
|
||||
/* ===== Engine "management" functions ===== */
|
||||
|
||||
@@ -169,8 +176,9 @@ padlock_bind_helper(ENGINE *e)
|
||||
!ENGINE_set_name(e, padlock_name) ||
|
||||
|
||||
!ENGINE_set_init_function(e, padlock_init) ||
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
(padlock_use_ace && !ENGINE_set_ciphers (e, padlock_ciphers)) ||
|
||||
#endif
|
||||
(padlock_use_rng && !ENGINE_set_RAND (e, &padlock_rand))) {
|
||||
return 0;
|
||||
}
|
||||
@@ -228,6 +236,7 @@ IMPLEMENT_DYNAMIC_BIND_FN (padlock_bind_fn);
|
||||
|
||||
/* ===== Here comes the "real" engine ===== */
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
/* Some AES-related constants */
|
||||
#define AES_BLOCK_SIZE 16
|
||||
#define AES_KEY_SIZE_128 16
|
||||
@@ -264,6 +273,7 @@ struct padlock_cipher_data
|
||||
* so we accept the penatly...
|
||||
*/
|
||||
static volatile struct padlock_cipher_data *padlock_saved_context;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* =======================================================
|
||||
@@ -355,6 +365,7 @@ padlock_available(void)
|
||||
return padlock_use_ace + padlock_use_rng;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
/* Our own htonl()/ntohl() */
|
||||
static inline void
|
||||
padlock_bswapl(AES_KEY *ks)
|
||||
@@ -367,6 +378,7 @@ padlock_bswapl(AES_KEY *ks)
|
||||
key++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Force key reload from memory to the CPU microcode.
|
||||
Loading EFLAGS from the stack clears EFLAGS[30]
|
||||
@@ -377,6 +389,7 @@ padlock_reload_key(void)
|
||||
asm volatile ("pushfl; popfl");
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_AES
|
||||
/*
|
||||
* This is heuristic key context tracing. At first one
|
||||
* believes that one should use atomic swap instructions,
|
||||
@@ -430,6 +443,7 @@ PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, ".byte 0xf3,0x0f,0xa7,0xc8") /* rep xcryp
|
||||
PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, ".byte 0xf3,0x0f,0xa7,0xd0") /* rep xcryptcbc */
|
||||
PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, ".byte 0xf3,0x0f,0xa7,0xe0") /* rep xcryptcfb */
|
||||
PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, ".byte 0xf3,0x0f,0xa7,0xe8") /* rep xcryptofb */
|
||||
#endif
|
||||
|
||||
/* The RNG call itself */
|
||||
static inline unsigned int
|
||||
@@ -600,6 +614,7 @@ padlock_bswapl(void *key)
|
||||
#endif
|
||||
|
||||
/* ===== AES encryption/decryption ===== */
|
||||
#ifndef OPENSSL_NO_AES
|
||||
|
||||
#if defined(NID_aes_128_cfb128) && ! defined (NID_aes_128_cfb)
|
||||
#define NID_aes_128_cfb NID_aes_128_cfb128
|
||||
@@ -1030,6 +1045,8 @@ padlock_aes_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out_arg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* OPENSSL_NO_AES */
|
||||
|
||||
/* ===== Random Number Generator ===== */
|
||||
/*
|
||||
* This code is not engaged. The reason is that it does not comply
|
||||
|
||||
@@ -313,7 +313,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
||||
/* There will never be more than two '=' */
|
||||
}
|
||||
|
||||
if ((v == B64_EOF) || (n >= 64))
|
||||
if ((v == B64_EOF && (n&3) == 0) || (n >= 64))
|
||||
{
|
||||
/* This is needed to work correctly on 64 byte input
|
||||
* lines. We process the line and then need to
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
#include "../e_os.h"
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/evp.h>
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
#include <openssl/engine.h>
|
||||
@@ -395,6 +396,27 @@ int main(int argc,char **argv)
|
||||
if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec)
|
||||
&& !test_digest(cipher,plaintext,pn,ciphertext,cn))
|
||||
{
|
||||
#ifdef OPENSSL_NO_AES
|
||||
if (strstr(cipher, "AES") == cipher)
|
||||
{
|
||||
fprintf(stdout, "Cipher disabled, skipping %s\n", cipher);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef OPENSSL_NO_DES
|
||||
if (strstr(cipher, "DES") == cipher)
|
||||
{
|
||||
fprintf(stdout, "Cipher disabled, skipping %s\n", cipher);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#ifdef OPENSSL_NO_RC4
|
||||
if (strstr(cipher, "RC4") == cipher)
|
||||
{
|
||||
fprintf(stdout, "Cipher disabled, skipping %s\n", cipher);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
fprintf(stderr,"Can't find %s\n",cipher);
|
||||
EXIT(3);
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x00908001L
|
||||
#define OPENSSL_VERSION_NUMBER 0x00908006L
|
||||
#ifdef OPENSSL_FIPS
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-fips-beta1 19 May 2005"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-fips-beta6 21 Jun 2005"
|
||||
#else
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-beta1 19 May 2005"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.8-beta6 21 Jun 2005"
|
||||
#endif
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
@@ -168,6 +168,10 @@ my $current_function;
|
||||
# on pros side, this results in more compact code:-)
|
||||
$self->{index} =~ s/^[er](.?[0-9xp])[d]?$/r\1/;
|
||||
$self->{base} =~ s/^[er](.?[0-9xp])[d]?$/r\1/;
|
||||
# Solaris /usr/ccs/bin/as can't handle multiplications
|
||||
# in $self->{label}
|
||||
$self->{label} =~ s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/eg;
|
||||
$self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg;
|
||||
|
||||
if (defined($self->{index})) {
|
||||
sprintf "%s(%%%s,%%%s,%d)",
|
||||
|
||||
@@ -537,7 +537,8 @@ sub main'file_end
|
||||
if ($main'elf && grep {/%[x]*mm[0-7]/i} @out) {
|
||||
local($tmp);
|
||||
|
||||
push (@out,"\n.comm\t${under}OPENSSL_ia32cap_P,4,4\n");
|
||||
push (@out,"\n.section\t.bss\n");
|
||||
push (@out,".comm\t${under}OPENSSL_ia32cap_P,4,4\n");
|
||||
|
||||
push (@out,".section\t.init\n");
|
||||
# One can argue that it's wasteful to craft every
|
||||
@@ -572,6 +573,8 @@ sub main'file_end
|
||||
movl %edx,0(%edi)
|
||||
popl %ebx
|
||||
popl %edi
|
||||
jmp 1f
|
||||
.align $align
|
||||
1:
|
||||
___
|
||||
push (@out,$tmp);
|
||||
@@ -716,6 +719,9 @@ sub main'initseg
|
||||
$tmp=<<___;
|
||||
.section .init
|
||||
call $under$f
|
||||
jmp .Linitalign
|
||||
.align $align
|
||||
.Linitalign:
|
||||
___
|
||||
}
|
||||
elsif ($main'coff)
|
||||
|
||||
@@ -88,6 +88,7 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
|
||||
if (!(si = PKCS7_add_signature(p7,signcert,pkey,EVP_sha1()))) {
|
||||
PKCS7err(PKCS7_F_PKCS7_SIGN,PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR);
|
||||
PKCS7_free(p7);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -105,6 +106,7 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
{
|
||||
if(!(smcap = sk_X509_ALGOR_new_null())) {
|
||||
PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE);
|
||||
PKCS7_free(p7);
|
||||
return NULL;
|
||||
}
|
||||
#ifndef OPENSSL_NO_DES
|
||||
@@ -130,6 +132,7 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
|
||||
if (!(p7bio = PKCS7_dataInit(p7, NULL))) {
|
||||
PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE);
|
||||
PKCS7_free(p7);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -139,10 +142,12 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
|
||||
if (!PKCS7_dataFinal(p7,p7bio)) {
|
||||
PKCS7err(PKCS7_F_PKCS7_SIGN,PKCS7_R_PKCS7_DATASIGN);
|
||||
PKCS7_free(p7);
|
||||
BIO_free_all(p7bio);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BIO_free_all(p7bio);
|
||||
BIO_free_all(p7bio);
|
||||
return p7;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ LIBOBJ=pqueue.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= pqueue.h
|
||||
EXHEADER= pqueue.h pq_compat.h
|
||||
HEADER= $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
@@ -79,5 +79,6 @@ pqueue.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
pqueue.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
pqueue.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
|
||||
pqueue.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
pqueue.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
pqueue.o: ../../include/openssl/symhacks.h ../cryptlib.h pqueue.c pqueue.h
|
||||
pqueue.o: ../../include/openssl/pq_compat.h ../../include/openssl/safestack.h
|
||||
pqueue.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
pqueue.o: ../cryptlib.h pqueue.c pqueue.h
|
||||
|
||||
142
crypto/pqueue/pq_compat.h
Normal file
142
crypto/pqueue/pq_compat.h
Normal file
@@ -0,0 +1,142 @@
|
||||
/* crypto/pqueue/pqueue_compat.h */
|
||||
/*
|
||||
* DTLS implementation written by Nagendra Modadugu
|
||||
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opensslconf.h"
|
||||
#include <openssl/bn.h>
|
||||
|
||||
/*
|
||||
* The purpose of this header file is for supporting 64-bit integer
|
||||
* manipulation on 32-bit (and lower) machines. Currently the only
|
||||
* such environment is VMS, Utrix and those with smaller default integer
|
||||
* sizes than 32 bits. For all such environment, we fall back to using
|
||||
* BIGNUM. We may need to fine tune the conditions for systems that
|
||||
* are incorrectly configured.
|
||||
*
|
||||
* The only clients of this code are (1) pqueue for priority, and
|
||||
* (2) DTLS, for sequence number manipulation.
|
||||
*/
|
||||
|
||||
#if (defined(THIRTY_TWO_BIT) && !defined(BN_LLONG)) || defined(SIXTEEN_BIT) || defined(EIGHT_BIT)
|
||||
|
||||
#define PQ_64BIT_IS_INTEGER 0
|
||||
#define PQ_64BIT_IS_BIGNUM 1
|
||||
|
||||
#define PQ_64BIT BIGNUM
|
||||
#define PQ_64BIT_CTX BN_CTX
|
||||
|
||||
#define pq_64bit_init(x) BN_init(x)
|
||||
#define pq_64bit_free(x) BN_free(x)
|
||||
|
||||
#define pq_64bit_ctx_new(ctx) BN_CTX_new()
|
||||
#define pq_64bit_ctx_free(x) BN_CTX_free(x)
|
||||
|
||||
#define pq_64bit_assign(x, y) BN_copy(x, y)
|
||||
#define pq_64bit_assign_word(x, y) BN_set_word(x, y)
|
||||
#define pq_64bit_gt(x, y) BN_ucmp(x, y) >= 1 ? 1 : 0
|
||||
#define pq_64bit_eq(x, y) BN_ucmp(x, y) == 0 ? 1 : 0
|
||||
#define pq_64bit_add_word(x, w) BN_add_word(x, w)
|
||||
#define pq_64bit_sub(r, x, y) BN_sub(r, x, y)
|
||||
#define pq_64bit_sub_word(x, w) BN_sub_word(x, w)
|
||||
#define pq_64bit_mod(r, x, n, ctx) BN_mod(r, x, n, ctx)
|
||||
|
||||
#define pq_64bit_bin2num(bn, bytes, len) BN_bin2bn(bytes, len, bn)
|
||||
#define pq_64bit_num2bin(bn, bytes) BN_bn2bin(bn, bytes)
|
||||
#define pq_64bit_get_word(x) BN_get_word(x)
|
||||
#define pq_64bit_is_bit_set(x, offset) BN_is_bit_set(x, offset)
|
||||
#define pq_64bit_lshift(r, x, shift) BN_lshift(r, x, shift)
|
||||
#define pq_64bit_set_bit(x, num) BN_set_bit(x, num)
|
||||
#define pq_64bit_get_length(x) BN_num_bits((x))
|
||||
|
||||
#else
|
||||
|
||||
#define PQ_64BIT_IS_INTEGER 1
|
||||
#define PQ_64BIT_IS_BIGNUM 0
|
||||
|
||||
#if defined(SIXTY_FOUR_BIT) || defined(SIXTY_FOUR_BIT_LONG)
|
||||
#define PQ_64BIT BN_ULONG
|
||||
#elif defined(THIRTY_TWO_BIT)
|
||||
#define PQ_64BIT BN_ULLONG
|
||||
#endif
|
||||
|
||||
#define PQ_64BIT_CTX void
|
||||
|
||||
#define pq_64bit_init(x)
|
||||
#define pq_64bit_free(x)
|
||||
#define pq_64bit_ctx_new(ctx) (ctx)
|
||||
#define pq_64bit_ctx_free(x)
|
||||
|
||||
#define pq_64bit_assign(x, y) (*(x) = *(y))
|
||||
#define pq_64bit_assign_word(x, y) (*(x) = y)
|
||||
#define pq_64bit_gt(x, y) (*(x) > *(y))
|
||||
#define pq_64bit_eq(x, y) (*(x) == *(y))
|
||||
#define pq_64bit_add_word(x, w) (*(x) = (*(x) + (w)))
|
||||
#define pq_64bit_sub(r, x, y) (*(r) = (*(x) - *(y)))
|
||||
#define pq_64bit_sub_word(x, w) (*(x) = (*(x) - (w)))
|
||||
#define pq_64bit_mod(r, x, n, ctx)
|
||||
|
||||
#define pq_64bit_bin2num(num, bytes, len) bytes_to_long_long(bytes, num)
|
||||
#define pq_64bit_num2bin(num, bytes) long_long_to_bytes(num, bytes)
|
||||
#define pq_64bit_get_word(x) *(x)
|
||||
#define pq_64bit_lshift(r, x, shift) (*(r) = (*(x) << (shift)))
|
||||
#define pq_64bit_set_bit(x, num) do { \
|
||||
PQ_64BIT mask = 1; \
|
||||
mask = mask << (num); \
|
||||
*(x) |= mask; \
|
||||
} while(0)
|
||||
#endif /* OPENSSL_SYS_VMS */
|
||||
@@ -68,12 +68,14 @@ typedef struct _pqueue
|
||||
} pqueue_s;
|
||||
|
||||
pitem *
|
||||
pitem_new(BN_ULLONG priority, void *data)
|
||||
pitem_new(PQ_64BIT priority, void *data)
|
||||
{
|
||||
pitem *item = (pitem *) OPENSSL_malloc(sizeof(pitem));
|
||||
if (item == NULL) return NULL;
|
||||
|
||||
item->priority = priority;
|
||||
pq_64bit_init(&(item->priority));
|
||||
pq_64bit_assign(&item->priority, &priority);
|
||||
|
||||
item->data = data;
|
||||
item->next = NULL;
|
||||
|
||||
@@ -84,7 +86,8 @@ void
|
||||
pitem_free(pitem *item)
|
||||
{
|
||||
if (item == NULL) return;
|
||||
|
||||
|
||||
pq_64bit_free(&(item->priority));
|
||||
OPENSSL_free(item);
|
||||
}
|
||||
|
||||
@@ -121,7 +124,7 @@ pqueue_insert(pqueue_s *pq, pitem *item)
|
||||
next != NULL;
|
||||
curr = next, next = next->next)
|
||||
{
|
||||
if (item->priority < next->priority)
|
||||
if (pq_64bit_gt(&(next->priority), &(item->priority)))
|
||||
{
|
||||
item->next = next;
|
||||
|
||||
@@ -133,7 +136,7 @@ pqueue_insert(pqueue_s *pq, pitem *item)
|
||||
return item;
|
||||
}
|
||||
/* duplicates not allowed */
|
||||
if (item->priority == next->priority)
|
||||
if (pq_64bit_eq(&(item->priority), &(next->priority)))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -161,7 +164,7 @@ pqueue_pop(pqueue_s *pq)
|
||||
}
|
||||
|
||||
pitem *
|
||||
pqueue_find(pqueue_s *pq, BN_ULLONG priority)
|
||||
pqueue_find(pqueue_s *pq, PQ_64BIT priority)
|
||||
{
|
||||
pitem *next, *prev = NULL;
|
||||
pitem *found = NULL;
|
||||
@@ -172,7 +175,7 @@ pqueue_find(pqueue_s *pq, BN_ULLONG priority)
|
||||
for ( next = pq->items; next->next != NULL;
|
||||
prev = next, next = next->next)
|
||||
{
|
||||
if ( next->priority == priority)
|
||||
if ( pq_64bit_eq(&(next->priority), &priority))
|
||||
{
|
||||
found = next;
|
||||
break;
|
||||
@@ -180,7 +183,7 @@ pqueue_find(pqueue_s *pq, BN_ULLONG priority)
|
||||
}
|
||||
|
||||
/* check the one last node */
|
||||
if ( next->priority == priority)
|
||||
if ( pq_64bit_eq(&(next->priority), &priority))
|
||||
found = next;
|
||||
|
||||
if ( ! found)
|
||||
@@ -196,6 +199,7 @@ pqueue_find(pqueue_s *pq, BN_ULLONG priority)
|
||||
return found;
|
||||
}
|
||||
|
||||
#if PQ_64BIT_IS_INTEGER
|
||||
void
|
||||
pqueue_print(pqueue_s *pq)
|
||||
{
|
||||
@@ -207,6 +211,7 @@ pqueue_print(pqueue_s *pq)
|
||||
item = item->next;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
pitem *
|
||||
pqueue_iterator(pqueue_s *pq)
|
||||
|
||||
@@ -64,18 +64,20 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/pq_compat.h>
|
||||
|
||||
typedef struct _pqueue *pqueue;
|
||||
|
||||
typedef struct _pitem
|
||||
{
|
||||
BN_ULLONG priority;
|
||||
PQ_64BIT priority;
|
||||
void *data;
|
||||
struct _pitem *next;
|
||||
} pitem;
|
||||
|
||||
typedef struct _pitem *piterator;
|
||||
|
||||
pitem *pitem_new(BN_ULLONG priority, void *data);
|
||||
pitem *pitem_new(PQ_64BIT priority, void *data);
|
||||
void pitem_free(pitem *item);
|
||||
|
||||
pqueue pqueue_new(void);
|
||||
@@ -84,7 +86,7 @@ void pqueue_free(pqueue pq);
|
||||
pitem *pqueue_insert(pqueue pq, pitem *item);
|
||||
pitem *pqueue_peek(pqueue pq);
|
||||
pitem *pqueue_pop(pqueue pq);
|
||||
pitem *pqueue_find(pqueue pq, BN_ULLONG priority);
|
||||
pitem *pqueue_find(pqueue pq, PQ_64BIT priority);
|
||||
pitem *pqueue_iterator(pqueue pq);
|
||||
pitem *pqueue_next(piterator *iter);
|
||||
|
||||
|
||||
@@ -632,7 +632,8 @@ int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||
void RAND_screen(void) /* function available for backward compatibility */
|
||||
{
|
||||
RAND_poll();
|
||||
readscreen();
|
||||
if (GetVersion() >= 0x80000000 || !OPENSSL_isservice())
|
||||
readscreen();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
*/
|
||||
|
||||
/* We need to define this to get macros like S_IFBLK and S_IFCHR */
|
||||
#define _XOPEN_SOURCE 1
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -19,10 +19,10 @@ APPS=
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \
|
||||
rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \
|
||||
rsa_asn1.c rsa_depr.c
|
||||
rsa_pss.c rsa_x931.c rsa_asn1.c rsa_depr.c
|
||||
LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \
|
||||
rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \
|
||||
rsa_asn1.o rsa_depr.o
|
||||
rsa_pss.o rsa_x931.o rsa_asn1.o rsa_depr.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -179,6 +179,17 @@ rsa_pk1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c
|
||||
rsa_pss.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
rsa_pss.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
rsa_pss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
rsa_pss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
rsa_pss.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
|
||||
rsa_pss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
rsa_pss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
rsa_pss.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h
|
||||
rsa_pss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
rsa_pss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
rsa_pss.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pss.c
|
||||
rsa_saos.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
@@ -216,3 +227,13 @@ rsa_ssl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
rsa_ssl.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
rsa_ssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
rsa_ssl.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_ssl.c
|
||||
rsa_x931.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
rsa_x931.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
|
||||
rsa_x931.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
|
||||
rsa_x931.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
rsa_x931.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
|
||||
rsa_x931.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
rsa_x931.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
|
||||
rsa_x931.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
|
||||
rsa_x931.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
rsa_x931.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_x931.c
|
||||
|
||||
@@ -196,6 +196,7 @@ struct rsa_st
|
||||
#define RSA_SSLV23_PADDING 2
|
||||
#define RSA_NO_PADDING 3
|
||||
#define RSA_PKCS1_OAEP_PADDING 4
|
||||
#define RSA_X931_PADDING 5
|
||||
|
||||
#define RSA_PKCS1_PADDING_SIZE 11
|
||||
|
||||
@@ -297,6 +298,8 @@ int RSA_padding_add_PKCS1_type_2(unsigned char *to,int tlen,
|
||||
const unsigned char *f,int fl);
|
||||
int RSA_padding_check_PKCS1_type_2(unsigned char *to,int tlen,
|
||||
const unsigned char *f,int fl,int rsa_len);
|
||||
int PKCS1_MGF1(unsigned char *mask, long len,
|
||||
const unsigned char *seed, long seedlen, const EVP_MD *dgst);
|
||||
int RSA_padding_add_PKCS1_OAEP(unsigned char *to,int tlen,
|
||||
const unsigned char *f,int fl,
|
||||
const unsigned char *p,int pl);
|
||||
@@ -311,6 +314,17 @@ int RSA_padding_add_none(unsigned char *to,int tlen,
|
||||
const unsigned char *f,int fl);
|
||||
int RSA_padding_check_none(unsigned char *to,int tlen,
|
||||
const unsigned char *f,int fl,int rsa_len);
|
||||
int RSA_padding_add_X931(unsigned char *to,int tlen,
|
||||
const unsigned char *f,int fl);
|
||||
int RSA_padding_check_X931(unsigned char *to,int tlen,
|
||||
const unsigned char *f,int fl,int rsa_len);
|
||||
int RSA_X931_hash_id(int nid);
|
||||
|
||||
int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
|
||||
const EVP_MD *Hash, const unsigned char *EM, int sLen);
|
||||
int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
|
||||
const unsigned char *mHash,
|
||||
const EVP_MD *Hash, int sLen);
|
||||
|
||||
int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
|
||||
@@ -329,37 +343,43 @@ void ERR_load_RSA_strings(void);
|
||||
/* Error codes for the RSA functions. */
|
||||
|
||||
/* Function codes. */
|
||||
#define RSA_F_RSA_BUILTIN_KEYGEN 105
|
||||
#define RSA_F_MEMORY_LOCK 100
|
||||
#define RSA_F_RSA_BUILTIN_KEYGEN 129
|
||||
#define RSA_F_RSA_CHECK_KEY 123
|
||||
#define RSA_F_RSA_EAY_PRIVATE_DECRYPT 101
|
||||
#define RSA_F_RSA_EAY_PRIVATE_ENCRYPT 102
|
||||
#define RSA_F_RSA_EAY_PUBLIC_DECRYPT 103
|
||||
#define RSA_F_RSA_EAY_PUBLIC_ENCRYPT 104
|
||||
#define RSA_F_RSA_MEMORY_LOCK 100
|
||||
#define RSA_F_RSA_GENERATE_KEY 105
|
||||
#define RSA_F_RSA_MEMORY_LOCK 130
|
||||
#define RSA_F_RSA_NEW_METHOD 106
|
||||
#define RSA_F_RSA_NULL 124
|
||||
#define RSA_F_RSA_NULL_MOD_EXP 126
|
||||
#define RSA_F_RSA_NULL_PRIVATE_DECRYPT 127
|
||||
#define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 128
|
||||
#define RSA_F_RSA_NULL_PUBLIC_DECRYPT 129
|
||||
#define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 130
|
||||
#define RSA_F_RSA_NULL_MOD_EXP 131
|
||||
#define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132
|
||||
#define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 133
|
||||
#define RSA_F_RSA_NULL_PUBLIC_DECRYPT 134
|
||||
#define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 135
|
||||
#define RSA_F_RSA_PADDING_ADD_NONE 107
|
||||
#define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 121
|
||||
#define RSA_F_RSA_PADDING_ADD_PKCS1_PSS 125
|
||||
#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 108
|
||||
#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 109
|
||||
#define RSA_F_RSA_PADDING_ADD_SSLV23 110
|
||||
#define RSA_F_RSA_PADDING_ADD_X931 127
|
||||
#define RSA_F_RSA_PADDING_CHECK_NONE 111
|
||||
#define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP 122
|
||||
#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 112
|
||||
#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 113
|
||||
#define RSA_F_RSA_PADDING_CHECK_SSLV23 114
|
||||
#define RSA_F_RSA_PADDING_CHECK_X931 128
|
||||
#define RSA_F_RSA_PRINT 115
|
||||
#define RSA_F_RSA_PRINT_FP 116
|
||||
#define RSA_F_RSA_SETUP_BLINDING 125
|
||||
#define RSA_F_RSA_SETUP_BLINDING 136
|
||||
#define RSA_F_RSA_SIGN 117
|
||||
#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118
|
||||
#define RSA_F_RSA_VERIFY 119
|
||||
#define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120
|
||||
#define RSA_F_RSA_VERIFY_PKCS1_PSS 126
|
||||
|
||||
/* Reason codes. */
|
||||
#define RSA_R_ALGORITHM_MISMATCH 100
|
||||
@@ -379,13 +399,19 @@ void ERR_load_RSA_strings(void);
|
||||
#define RSA_R_DMP1_NOT_CONGRUENT_TO_D 124
|
||||
#define RSA_R_DMQ1_NOT_CONGRUENT_TO_D 125
|
||||
#define RSA_R_D_E_NOT_CONGRUENT_TO_1 123
|
||||
#define RSA_R_FIRST_OCTET_INVALID 133
|
||||
#define RSA_R_INVALID_HEADER 137
|
||||
#define RSA_R_INVALID_MESSAGE_LENGTH 131
|
||||
#define RSA_R_INVALID_PADDING 138
|
||||
#define RSA_R_INVALID_TRAILER 139
|
||||
#define RSA_R_IQMP_NOT_INVERSE_OF_Q 126
|
||||
#define RSA_R_KEY_SIZE_TOO_SMALL 120
|
||||
#define RSA_R_NO_PUBLIC_EXPONENT 133
|
||||
#define RSA_R_LAST_OCTET_INVALID 134
|
||||
#define RSA_R_NO_PUBLIC_EXPONENT 140
|
||||
#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
|
||||
#define RSA_R_N_DOES_NOT_EQUAL_P_Q 127
|
||||
#define RSA_R_OAEP_DECODING_ERROR 121
|
||||
#define RSA_R_SLEN_RECOVERY_FAILED 135
|
||||
#define RSA_R_PADDING_CHECK_FAILED 114
|
||||
#define RSA_R_P_NOT_PRIME 128
|
||||
#define RSA_R_Q_NOT_PRIME 129
|
||||
@@ -395,6 +421,7 @@ void ERR_load_RSA_strings(void);
|
||||
#define RSA_R_UNKNOWN_ALGORITHM_TYPE 117
|
||||
#define RSA_R_UNKNOWN_PADDING_TYPE 118
|
||||
#define RSA_R_WRONG_SIGNATURE_LENGTH 119
|
||||
#define RSA_R_SLEN_CHECK_FAILED 136
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ static int rsa_blinding_invert(BN_BLINDING *b, int local, BIGNUM *f,
|
||||
static int RSA_eay_private_encrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding)
|
||||
{
|
||||
BIGNUM *f, *ret, *br;
|
||||
BIGNUM *f, *ret, *br, *res;
|
||||
int i,j,k,num=0,r= -1;
|
||||
unsigned char *buf=NULL;
|
||||
BN_CTX *ctx=NULL;
|
||||
@@ -334,6 +334,9 @@ static int RSA_eay_private_encrypt(int flen, const unsigned char *from,
|
||||
case RSA_PKCS1_PADDING:
|
||||
i=RSA_padding_add_PKCS1_type_1(buf,num,from,flen);
|
||||
break;
|
||||
case RSA_X931_PADDING:
|
||||
i=RSA_padding_add_X931(buf,num,from,flen);
|
||||
break;
|
||||
case RSA_NO_PADDING:
|
||||
i=RSA_padding_add_none(buf,num,from,flen);
|
||||
break;
|
||||
@@ -383,6 +386,7 @@ static int RSA_eay_private_encrypt(int flen, const unsigned char *from,
|
||||
|
||||
if (!(rsa->flags & RSA_FLAG_NO_EXP_CONSTTIME))
|
||||
{
|
||||
BN_init(&local_d);
|
||||
d = &local_d;
|
||||
BN_with_flags(d, rsa->d, BN_FLG_EXP_CONSTTIME);
|
||||
}
|
||||
@@ -399,10 +403,21 @@ static int RSA_eay_private_encrypt(int flen, const unsigned char *from,
|
||||
if (!rsa_blinding_invert(blinding, local_blinding, ret, br, ctx))
|
||||
goto err;
|
||||
|
||||
if (padding == RSA_X931_PADDING)
|
||||
{
|
||||
BN_sub(f, rsa->n, ret);
|
||||
if (BN_cmp(ret, f))
|
||||
res = f;
|
||||
else
|
||||
res = ret;
|
||||
}
|
||||
else
|
||||
res = ret;
|
||||
|
||||
/* put in leading 0 bytes if the number is less than the
|
||||
* length of the modulus */
|
||||
j=BN_num_bytes(ret);
|
||||
i=BN_bn2bin(ret,&(to[num-j]));
|
||||
j=BN_num_bytes(res);
|
||||
i=BN_bn2bin(res,&(to[num-j]));
|
||||
for (k=0; k<(num-i); k++)
|
||||
to[k]=0;
|
||||
|
||||
@@ -592,6 +607,9 @@ static int RSA_eay_public_decrypt(int flen, const unsigned char *from,
|
||||
if (!rsa->meth->bn_mod_exp(ret,f,rsa->e,rsa->n,ctx,
|
||||
rsa->_method_mod_n)) goto err;
|
||||
|
||||
if ((padding == RSA_X931_PADDING) && ((ret->d[0] & 0xf) != 12))
|
||||
BN_sub(ret, rsa->n, ret);
|
||||
|
||||
p=buf;
|
||||
i=BN_bn2bin(ret,p);
|
||||
|
||||
@@ -600,6 +618,9 @@ static int RSA_eay_public_decrypt(int flen, const unsigned char *from,
|
||||
case RSA_PKCS1_PADDING:
|
||||
r=RSA_padding_check_PKCS1_type_1(to,num,buf,i,num);
|
||||
break;
|
||||
case RSA_X931_PADDING:
|
||||
r=RSA_padding_check_X931(to,num,buf,i,num);
|
||||
break;
|
||||
case RSA_NO_PADDING:
|
||||
r=RSA_padding_check_none(to,num,buf,i,num);
|
||||
break;
|
||||
|
||||
@@ -70,12 +70,14 @@
|
||||
|
||||
static ERR_STRING_DATA RSA_str_functs[]=
|
||||
{
|
||||
{ERR_FUNC(RSA_F_MEMORY_LOCK), "MEMORY_LOCK"},
|
||||
{ERR_FUNC(RSA_F_RSA_BUILTIN_KEYGEN), "RSA_BUILTIN_KEYGEN"},
|
||||
{ERR_FUNC(RSA_F_RSA_CHECK_KEY), "RSA_check_key"},
|
||||
{ERR_FUNC(RSA_F_RSA_EAY_PRIVATE_DECRYPT), "RSA_EAY_PRIVATE_DECRYPT"},
|
||||
{ERR_FUNC(RSA_F_RSA_EAY_PRIVATE_ENCRYPT), "RSA_EAY_PRIVATE_ENCRYPT"},
|
||||
{ERR_FUNC(RSA_F_RSA_EAY_PUBLIC_DECRYPT), "RSA_EAY_PUBLIC_DECRYPT"},
|
||||
{ERR_FUNC(RSA_F_RSA_EAY_PUBLIC_ENCRYPT), "RSA_EAY_PUBLIC_ENCRYPT"},
|
||||
{ERR_FUNC(RSA_F_RSA_GENERATE_KEY), "RSA_generate_key"},
|
||||
{ERR_FUNC(RSA_F_RSA_MEMORY_LOCK), "RSA_memory_lock"},
|
||||
{ERR_FUNC(RSA_F_RSA_NEW_METHOD), "RSA_new_method"},
|
||||
{ERR_FUNC(RSA_F_RSA_NULL), "RSA_NULL"},
|
||||
@@ -86,14 +88,17 @@ static ERR_STRING_DATA RSA_str_functs[]=
|
||||
{ERR_FUNC(RSA_F_RSA_NULL_PUBLIC_ENCRYPT), "RSA_NULL_PUBLIC_ENCRYPT"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_ADD_NONE), "RSA_padding_add_none"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_OAEP), "RSA_padding_add_PKCS1_OAEP"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_PSS), "RSA_PADDING_ADD_PKCS1_PSS"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1), "RSA_padding_add_PKCS1_type_1"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2), "RSA_padding_add_PKCS1_type_2"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_ADD_SSLV23), "RSA_padding_add_SSLv23"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_ADD_X931), "RSA_padding_add_X931"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_NONE), "RSA_padding_check_none"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP), "RSA_padding_check_PKCS1_OAEP"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1), "RSA_padding_check_PKCS1_type_1"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2), "RSA_padding_check_PKCS1_type_2"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_SSLV23), "RSA_padding_check_SSLv23"},
|
||||
{ERR_FUNC(RSA_F_RSA_PADDING_CHECK_X931), "RSA_padding_check_X931"},
|
||||
{ERR_FUNC(RSA_F_RSA_PRINT), "RSA_print"},
|
||||
{ERR_FUNC(RSA_F_RSA_PRINT_FP), "RSA_print_fp"},
|
||||
{ERR_FUNC(RSA_F_RSA_SETUP_BLINDING), "RSA_setup_blinding"},
|
||||
@@ -101,6 +106,7 @@ static ERR_STRING_DATA RSA_str_functs[]=
|
||||
{ERR_FUNC(RSA_F_RSA_SIGN_ASN1_OCTET_STRING), "RSA_sign_ASN1_OCTET_STRING"},
|
||||
{ERR_FUNC(RSA_F_RSA_VERIFY), "RSA_verify"},
|
||||
{ERR_FUNC(RSA_F_RSA_VERIFY_ASN1_OCTET_STRING), "RSA_verify_ASN1_OCTET_STRING"},
|
||||
{ERR_FUNC(RSA_F_RSA_VERIFY_PKCS1_PSS), "RSA_VERIFY_PKCS1_PSS"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
@@ -123,13 +129,19 @@ static ERR_STRING_DATA RSA_str_reasons[]=
|
||||
{ERR_REASON(RSA_R_DMP1_NOT_CONGRUENT_TO_D),"dmp1 not congruent to d"},
|
||||
{ERR_REASON(RSA_R_DMQ1_NOT_CONGRUENT_TO_D),"dmq1 not congruent to d"},
|
||||
{ERR_REASON(RSA_R_D_E_NOT_CONGRUENT_TO_1),"d e not congruent to 1"},
|
||||
{ERR_REASON(RSA_R_FIRST_OCTET_INVALID) ,"first octet invalid"},
|
||||
{ERR_REASON(RSA_R_INVALID_HEADER) ,"invalid header"},
|
||||
{ERR_REASON(RSA_R_INVALID_MESSAGE_LENGTH),"invalid message length"},
|
||||
{ERR_REASON(RSA_R_INVALID_PADDING) ,"invalid padding"},
|
||||
{ERR_REASON(RSA_R_INVALID_TRAILER) ,"invalid trailer"},
|
||||
{ERR_REASON(RSA_R_IQMP_NOT_INVERSE_OF_Q) ,"iqmp not inverse of q"},
|
||||
{ERR_REASON(RSA_R_KEY_SIZE_TOO_SMALL) ,"key size too small"},
|
||||
{ERR_REASON(RSA_R_LAST_OCTET_INVALID) ,"last octet invalid"},
|
||||
{ERR_REASON(RSA_R_NO_PUBLIC_EXPONENT) ,"no public exponent"},
|
||||
{ERR_REASON(RSA_R_NULL_BEFORE_BLOCK_MISSING),"null before block missing"},
|
||||
{ERR_REASON(RSA_R_N_DOES_NOT_EQUAL_P_Q) ,"n does not equal p q"},
|
||||
{ERR_REASON(RSA_R_OAEP_DECODING_ERROR) ,"oaep decoding error"},
|
||||
{ERR_REASON(RSA_R_SLEN_RECOVERY_FAILED) ,"salt length recovery failed"},
|
||||
{ERR_REASON(RSA_R_PADDING_CHECK_FAILED) ,"padding check failed"},
|
||||
{ERR_REASON(RSA_R_P_NOT_PRIME) ,"p not prime"},
|
||||
{ERR_REASON(RSA_R_Q_NOT_PRIME) ,"q not prime"},
|
||||
@@ -139,6 +151,7 @@ static ERR_STRING_DATA RSA_str_reasons[]=
|
||||
{ERR_REASON(RSA_R_UNKNOWN_ALGORITHM_TYPE),"unknown algorithm type"},
|
||||
{ERR_REASON(RSA_R_UNKNOWN_PADDING_TYPE) ,"unknown padding type"},
|
||||
{ERR_REASON(RSA_R_WRONG_SIGNATURE_LENGTH),"wrong signature length"},
|
||||
{ERR_REASON(RSA_R_SLEN_CHECK_FAILED) ,"salt length check failed"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
|
||||
@@ -402,6 +402,11 @@ BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx)
|
||||
|
||||
ret = BN_BLINDING_create_param(NULL, e, rsa->n, ctx,
|
||||
rsa->meth->bn_mod_exp, rsa->_method_mod_n);
|
||||
if (ret == NULL)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_BN_LIB);
|
||||
goto err;
|
||||
}
|
||||
BN_BLINDING_set_thread_id(ret, CRYPTO_thread_id());
|
||||
err:
|
||||
BN_CTX_end(ctx);
|
||||
|
||||
@@ -170,28 +170,30 @@ decoding_err:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int MGF1(unsigned char *mask, long len,
|
||||
const unsigned char *seed, long seedlen)
|
||||
int PKCS1_MGF1(unsigned char *mask, long len,
|
||||
const unsigned char *seed, long seedlen, const EVP_MD *dgst)
|
||||
{
|
||||
long i, outlen = 0;
|
||||
unsigned char cnt[4];
|
||||
EVP_MD_CTX c;
|
||||
unsigned char md[SHA_DIGEST_LENGTH];
|
||||
unsigned char md[EVP_MAX_MD_SIZE];
|
||||
int mdlen;
|
||||
|
||||
EVP_MD_CTX_init(&c);
|
||||
mdlen = EVP_MD_size(dgst);
|
||||
for (i = 0; outlen < len; i++)
|
||||
{
|
||||
cnt[0] = (unsigned char)((i >> 24) & 255);
|
||||
cnt[1] = (unsigned char)((i >> 16) & 255);
|
||||
cnt[2] = (unsigned char)((i >> 8)) & 255;
|
||||
cnt[3] = (unsigned char)(i & 255);
|
||||
EVP_DigestInit_ex(&c,EVP_sha1(), NULL);
|
||||
EVP_DigestInit_ex(&c,dgst, NULL);
|
||||
EVP_DigestUpdate(&c, seed, seedlen);
|
||||
EVP_DigestUpdate(&c, cnt, 4);
|
||||
if (outlen + SHA_DIGEST_LENGTH <= len)
|
||||
if (outlen + mdlen <= len)
|
||||
{
|
||||
EVP_DigestFinal_ex(&c, mask + outlen, NULL);
|
||||
outlen += SHA_DIGEST_LENGTH;
|
||||
outlen += mdlen;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -203,4 +205,9 @@ int MGF1(unsigned char *mask, long len,
|
||||
EVP_MD_CTX_cleanup(&c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MGF1(unsigned char *mask, long len, const unsigned char *seed, long seedlen)
|
||||
{
|
||||
return PKCS1_MGF1(mask, len, seed, seedlen, EVP_sha1());
|
||||
}
|
||||
#endif
|
||||
|
||||
261
crypto/rsa/rsa_pss.c
Normal file
261
crypto/rsa/rsa_pss.c
Normal file
@@ -0,0 +1,261 @@
|
||||
/* rsa_pss.c */
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project 2005.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* licensing@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
const static unsigned char zeroes[] = {0,0,0,0,0,0,0,0};
|
||||
|
||||
int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
|
||||
const EVP_MD *Hash, const unsigned char *EM, int sLen)
|
||||
{
|
||||
int i;
|
||||
int ret = 0;
|
||||
int hLen, maskedDBLen, MSBits, emLen;
|
||||
const unsigned char *H;
|
||||
unsigned char *DB = NULL;
|
||||
EVP_MD_CTX ctx;
|
||||
unsigned char H_[EVP_MAX_MD_SIZE];
|
||||
|
||||
hLen = EVP_MD_size(Hash);
|
||||
/*
|
||||
* Negative sLen has special meanings:
|
||||
* -1 sLen == hLen
|
||||
* -2 salt length is autorecovered from signature
|
||||
* -N reserved
|
||||
*/
|
||||
if (sLen == -1) sLen = hLen;
|
||||
else if (sLen == -2) sLen = -2;
|
||||
else if (sLen < -2)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_SLEN_CHECK_FAILED);
|
||||
goto err;
|
||||
}
|
||||
|
||||
MSBits = (BN_num_bits(rsa->n) - 1) & 0x7;
|
||||
emLen = RSA_size(rsa);
|
||||
if (EM[0] & (0xFF << MSBits))
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_FIRST_OCTET_INVALID);
|
||||
goto err;
|
||||
}
|
||||
if (MSBits == 0)
|
||||
{
|
||||
EM++;
|
||||
emLen--;
|
||||
}
|
||||
if (emLen < (hLen + sLen + 2)) /* sLen can be small negative */
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_DATA_TOO_LARGE);
|
||||
goto err;
|
||||
}
|
||||
if (EM[emLen - 1] != 0xbc)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_LAST_OCTET_INVALID);
|
||||
goto err;
|
||||
}
|
||||
maskedDBLen = emLen - hLen - 1;
|
||||
H = EM + maskedDBLen;
|
||||
DB = OPENSSL_malloc(maskedDBLen);
|
||||
if (!DB)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
PKCS1_MGF1(DB, maskedDBLen, H, hLen, Hash);
|
||||
for (i = 0; i < maskedDBLen; i++)
|
||||
DB[i] ^= EM[i];
|
||||
if (MSBits)
|
||||
DB[0] &= 0xFF >> (8 - MSBits);
|
||||
for (i = 0; DB[i] == 0 && i < (maskedDBLen-1); i++) ;
|
||||
if (DB[i++] != 0x1)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_SLEN_RECOVERY_FAILED);
|
||||
goto err;
|
||||
}
|
||||
if (sLen >= 0 && (maskedDBLen - i) != sLen)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_SLEN_CHECK_FAILED);
|
||||
goto err;
|
||||
}
|
||||
EVP_MD_CTX_init(&ctx);
|
||||
EVP_DigestInit_ex(&ctx, Hash, NULL);
|
||||
EVP_DigestUpdate(&ctx, zeroes, sizeof zeroes);
|
||||
EVP_DigestUpdate(&ctx, mHash, hLen);
|
||||
if (maskedDBLen - i)
|
||||
EVP_DigestUpdate(&ctx, DB + i, maskedDBLen - i);
|
||||
EVP_DigestFinal(&ctx, H_, NULL);
|
||||
EVP_MD_CTX_cleanup(&ctx);
|
||||
if (memcmp(H_, H, hLen))
|
||||
{
|
||||
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, RSA_R_BAD_SIGNATURE);
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
if (DB)
|
||||
OPENSSL_free(DB);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
|
||||
const unsigned char *mHash,
|
||||
const EVP_MD *Hash, int sLen)
|
||||
{
|
||||
int i;
|
||||
int ret = 0;
|
||||
int hLen, maskedDBLen, MSBits, emLen;
|
||||
unsigned char *H, *salt = NULL, *p;
|
||||
EVP_MD_CTX ctx;
|
||||
|
||||
hLen = EVP_MD_size(Hash);
|
||||
/*
|
||||
* Negative sLen has special meanings:
|
||||
* -1 sLen == hLen
|
||||
* -2 salt length is maximized
|
||||
* -N reserved
|
||||
*/
|
||||
if (sLen == -1) sLen = hLen;
|
||||
else if (sLen == -2) sLen = -2;
|
||||
else if (sLen < -2)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS, RSA_R_SLEN_CHECK_FAILED);
|
||||
goto err;
|
||||
}
|
||||
|
||||
MSBits = (BN_num_bits(rsa->n) - 1) & 0x7;
|
||||
emLen = RSA_size(rsa);
|
||||
if (MSBits == 0)
|
||||
{
|
||||
*EM++ = 0;
|
||||
emLen--;
|
||||
}
|
||||
if (sLen == -2)
|
||||
{
|
||||
sLen = emLen - hLen - 2;
|
||||
}
|
||||
else if (emLen < (hLen + sLen + 2))
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS,
|
||||
RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
|
||||
goto err;
|
||||
}
|
||||
if (sLen > 0)
|
||||
{
|
||||
salt = OPENSSL_malloc(sLen);
|
||||
if (!salt)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS,
|
||||
ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
if (!RAND_bytes(salt, sLen))
|
||||
goto err;
|
||||
}
|
||||
maskedDBLen = emLen - hLen - 1;
|
||||
H = EM + maskedDBLen;
|
||||
EVP_MD_CTX_init(&ctx);
|
||||
EVP_DigestInit_ex(&ctx, Hash, NULL);
|
||||
EVP_DigestUpdate(&ctx, zeroes, sizeof zeroes);
|
||||
EVP_DigestUpdate(&ctx, mHash, hLen);
|
||||
if (sLen)
|
||||
EVP_DigestUpdate(&ctx, salt, sLen);
|
||||
EVP_DigestFinal(&ctx, H, NULL);
|
||||
EVP_MD_CTX_cleanup(&ctx);
|
||||
|
||||
/* Generate dbMask in place then perform XOR on it */
|
||||
PKCS1_MGF1(EM, maskedDBLen, H, hLen, Hash);
|
||||
|
||||
p = EM;
|
||||
|
||||
/* Initial PS XORs with all zeroes which is a NOP so just update
|
||||
* pointer. Note from a test above this value is guaranteed to
|
||||
* be non-negative.
|
||||
*/
|
||||
p += emLen - sLen - hLen - 2;
|
||||
*p++ ^= 0x1;
|
||||
if (sLen > 0)
|
||||
{
|
||||
for (i = 0; i < sLen; i++)
|
||||
*p++ ^= salt[i];
|
||||
}
|
||||
if (MSBits)
|
||||
EM[0] &= 0xFF >> (8 - MSBits);
|
||||
|
||||
/* H is already in place so just set final 0xbc */
|
||||
|
||||
EM[emLen - 1] = 0xbc;
|
||||
|
||||
ret = 1;
|
||||
|
||||
err:
|
||||
if (salt)
|
||||
OPENSSL_free(salt);
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
177
crypto/rsa/rsa_x931.c
Normal file
177
crypto/rsa/rsa_x931.c
Normal file
@@ -0,0 +1,177 @@
|
||||
/* rsa_x931.c */
|
||||
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
||||
* project 2005.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* licensing@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/objects.h>
|
||||
|
||||
int RSA_padding_add_X931(unsigned char *to, int tlen,
|
||||
const unsigned char *from, int flen)
|
||||
{
|
||||
int j;
|
||||
unsigned char *p;
|
||||
|
||||
/* Absolute minimum amount of padding is 1 header nibble, 1 padding
|
||||
* nibble and 2 trailer bytes: but 1 hash if is already in 'from'.
|
||||
*/
|
||||
|
||||
j = tlen - flen - 2;
|
||||
|
||||
if (j < 0)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_ADD_X931,RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
p=(unsigned char *)to;
|
||||
|
||||
/* If no padding start and end nibbles are in one byte */
|
||||
if (j == 0)
|
||||
*p++ = 0x6A;
|
||||
else
|
||||
{
|
||||
*p++ = 0x6B;
|
||||
if (j > 1)
|
||||
{
|
||||
memset(p, 0xBB, j - 1);
|
||||
p += j - 1;
|
||||
}
|
||||
*p++ = 0xBA;
|
||||
}
|
||||
memcpy(p,from,(unsigned int)flen);
|
||||
p += flen;
|
||||
*p = 0xCC;
|
||||
return(1);
|
||||
}
|
||||
|
||||
int RSA_padding_check_X931(unsigned char *to, int tlen,
|
||||
const unsigned char *from, int flen, int num)
|
||||
{
|
||||
int i = 0,j;
|
||||
const unsigned char *p;
|
||||
|
||||
p=from;
|
||||
if ((num != flen) || ((*p != 0x6A) && (*p != 0x6B)))
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_CHECK_X931,RSA_R_INVALID_HEADER);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (*p++ == 0x6B)
|
||||
{
|
||||
j=flen-3;
|
||||
for (i = 0; i < j; i++)
|
||||
{
|
||||
unsigned char c = *p++;
|
||||
if (c == 0xBA)
|
||||
break;
|
||||
if (c != 0xBB)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_CHECK_X931,
|
||||
RSA_R_INVALID_PADDING);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
j -= i;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_CHECK_X931, RSA_R_INVALID_PADDING);
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
else j = flen - 2;
|
||||
|
||||
if (p[j] != 0xCC)
|
||||
{
|
||||
RSAerr(RSA_F_RSA_PADDING_CHECK_X931, RSA_R_INVALID_TRAILER);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(to,p,(unsigned int)j);
|
||||
|
||||
return(j);
|
||||
}
|
||||
|
||||
/* Translate between X931 hash ids and NIDs */
|
||||
|
||||
int RSA_X931_hash_id(int nid)
|
||||
{
|
||||
switch (nid)
|
||||
{
|
||||
case NID_sha1:
|
||||
return 0x33;
|
||||
|
||||
case NID_sha256:
|
||||
return 0x34;
|
||||
|
||||
case NID_sha384:
|
||||
return 0x36;
|
||||
|
||||
case NID_sha512:
|
||||
return 0x35;
|
||||
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
|
||||
#define SHA384_DIGEST_LENGTH 48
|
||||
#define SHA512_DIGEST_LENGTH 64
|
||||
|
||||
#ifndef OPENSSL_NO_SHA512
|
||||
/*
|
||||
* Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
|
||||
* being exactly 64-bit wide. See Implementation Notes in sha512.c
|
||||
@@ -177,6 +178,7 @@ typedef struct SHA512state_st
|
||||
} u;
|
||||
unsigned int num,md_len;
|
||||
} SHA512_CTX;
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SHA512
|
||||
int SHA384_Init(SHA512_CTX *c);
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA1) && !defined(OPENSSL_NO_SHA)
|
||||
|
||||
#undef SHA_0
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
* according to the OpenSSL license [found in ../../LICENSE].
|
||||
* ====================================================================
|
||||
*/
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256)
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA256)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("No SHA256 support\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
|
||||
unsigned char app_b1[SHA256_DIGEST_LENGTH] = {
|
||||
0xba,0x78,0x16,0xbf,0x8f,0x01,0xcf,0xea,
|
||||
0x41,0x41,0x40,0xde,0x5d,0xae,0x22,0x23,
|
||||
@@ -136,3 +144,4 @@ int main ()
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* according to the OpenSSL license [found in ../../LICENSE].
|
||||
* ====================================================================
|
||||
*/
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA512)
|
||||
/*
|
||||
* IMPLEMENTATION NOTES.
|
||||
@@ -43,7 +44,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA512)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("No SHA512 support\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
|
||||
unsigned char app_c1[SHA512_DIGEST_LENGTH] = {
|
||||
0xdd,0xaf,0x35,0xa1,0x93,0x61,0x7a,0xba,
|
||||
0xcc,0x41,0x73,0x49,0xae,0x20,0x41,0x31,
|
||||
@@ -173,3 +181,4 @@ int main ()
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
|
||||
|
||||
#undef SHA_1
|
||||
|
||||
@@ -776,7 +776,8 @@ static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl)
|
||||
}
|
||||
}
|
||||
|
||||
if (!check_crl_time(ctx, crl, 1))
|
||||
ok = check_crl_time(ctx, crl, 1);
|
||||
if (!ok)
|
||||
goto err;
|
||||
|
||||
ok = 1;
|
||||
@@ -1006,7 +1007,8 @@ static int internal_verify(X509_STORE_CTX *ctx)
|
||||
|
||||
xs->valid = 1;
|
||||
|
||||
if (!check_cert_time(ctx, xs))
|
||||
ok = check_cert_time(ctx, xs);
|
||||
if (!ok)
|
||||
goto end;
|
||||
|
||||
/* The last error (if any) is still in the error value */
|
||||
@@ -1079,7 +1081,7 @@ int X509_cmp_time(ASN1_TIME *ctm, time_t *cmp_time)
|
||||
offset=0;
|
||||
else
|
||||
{
|
||||
if ((*str != '+') && (str[5] != '-'))
|
||||
if ((*str != '+') && (*str != '-'))
|
||||
return 0;
|
||||
offset=((str[1]-'0')*10+(str[2]-'0'))*60;
|
||||
offset+=(str[3]-'0')*10+(str[4]-'0');
|
||||
|
||||
@@ -70,8 +70,8 @@ print<<___ if(!defined($win64a));
|
||||
.align 16
|
||||
OPENSSL_rdtsc:
|
||||
rdtsc
|
||||
shl \$32,%rdx
|
||||
or %rdx,%rax
|
||||
shlq \$32,%rdx
|
||||
orq %rdx,%rax
|
||||
ret
|
||||
.size OPENSSL_rdtsc,.-OPENSSL_rdtsc
|
||||
|
||||
@@ -80,11 +80,11 @@ OPENSSL_rdtsc:
|
||||
.align 16
|
||||
OPENSSL_atomic_add:
|
||||
movl (%rdi),%eax
|
||||
.Lspin: lea (%rsi,%rax),%r8
|
||||
lock; cmpxchg %r8d,(%rdi)
|
||||
.Lspin: leaq (%rsi,%rax),%r8
|
||||
lock; cmpxchgl %r8d,(%rdi)
|
||||
jne .Lspin
|
||||
mov %r8d,%eax
|
||||
cdqe
|
||||
movl %r8d,%eax
|
||||
.byte 0x48,0x98
|
||||
ret
|
||||
.size OPENSSL_atomic_add,.-OPENSSL_atomic_add
|
||||
|
||||
@@ -108,28 +108,28 @@ OPENSSL_wipe_cpu:
|
||||
pxor %xmm13,%xmm13
|
||||
pxor %xmm14,%xmm14
|
||||
pxor %xmm15,%xmm15
|
||||
xor %rcx,%rcx
|
||||
xor %rdx,%rdx
|
||||
xor %rsi,%rsi
|
||||
xor %rdi,%rdi
|
||||
xor %r8,%r8
|
||||
xor %r9,%r9
|
||||
xor %r10,%r10
|
||||
xor %r11,%r11
|
||||
lea 8(%rsp),%rax
|
||||
xorq %rcx,%rcx
|
||||
xorq %rdx,%rdx
|
||||
xorq %rsi,%rsi
|
||||
xorq %rdi,%rdi
|
||||
xorq %r8,%r8
|
||||
xorq %r9,%r9
|
||||
xorq %r10,%r10
|
||||
xorq %r11,%r11
|
||||
leaq 8(%rsp),%rax
|
||||
ret
|
||||
.size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
|
||||
|
||||
.globl OPENSSL_ia32_cpuid
|
||||
.align 16
|
||||
OPENSSL_ia32_cpuid:
|
||||
mov %rbx,%r8
|
||||
mov \$1,%eax
|
||||
movq %rbx,%r8
|
||||
movl \$1,%eax
|
||||
cpuid
|
||||
shl \$32,%rcx
|
||||
mov %edx,%eax
|
||||
mov %r8,%rbx
|
||||
or %rcx,%rax
|
||||
shlq \$32,%rcx
|
||||
movl %edx,%eax
|
||||
movq %r8,%rbx
|
||||
orq %rcx,%rax
|
||||
ret
|
||||
.size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ the same as B<-msie_hack>
|
||||
the same as B<-policy>. Mandatory. See the B<POLICY FORMAT> section
|
||||
for more information.
|
||||
|
||||
=item B<nameopt>, B<certopt>
|
||||
=item B<name_opt>, B<cert_opt>
|
||||
|
||||
these options allow the format used to display the certificate details
|
||||
when asking the user to confirm signing. All the options supported by
|
||||
@@ -544,8 +544,8 @@ A sample configuration file with the relevant sections for B<ca>:
|
||||
policy = policy_any # default policy
|
||||
email_in_dn = no # Don't add the email into cert DN
|
||||
|
||||
nameopt = ca_default # Subject name display option
|
||||
certopt = ca_default # Certificate display option
|
||||
name_opt = ca_default # Subject name display option
|
||||
cert_opt = ca_default # Certificate display option
|
||||
copy_extensions = none # Don't copy extensions from request
|
||||
|
||||
[ policy_any ]
|
||||
|
||||
@@ -35,7 +35,7 @@ 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
|
||||
The environment variable B<OPENSSL_CONF> can be set to specify the location
|
||||
of the configuration file.
|
||||
|
||||
Currently ASN1 OBJECTs and ENGINE configuration can be performed future
|
||||
|
||||
@@ -14,13 +14,11 @@ ecdsa - Elliptic Curve Digital Signature Algorithm
|
||||
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);
|
||||
ECDSA_SIG* ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
|
||||
const BIGNUM *kinv, const BIGNUM *rp,
|
||||
EC_KEY *eckey);
|
||||
int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
|
||||
const ECDSA_SIG *sig, EC_KEY* eckey);
|
||||
int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx,
|
||||
@@ -28,6 +26,10 @@ ecdsa - Elliptic Curve Digital Signature Algorithm
|
||||
int ECDSA_sign(int type, const unsigned char *dgst,
|
||||
int dgstlen, unsigned char *sig,
|
||||
unsigned int *siglen, EC_KEY *eckey);
|
||||
int ECDSA_sign_ex(int type, const unsigned char *dgst,
|
||||
int dgstlen, unsigned char *sig,
|
||||
unsigned int *siglen, const BIGNUM *kinv,
|
||||
const BIGNUM *rp, EC_KEY *eckey);
|
||||
int ECDSA_verify(int type, const unsigned char *dgst,
|
||||
int dgstlen, const unsigned char *sig,
|
||||
int siglen, EC_KEY *eckey);
|
||||
@@ -72,35 +74,6 @@ 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>.
|
||||
|
||||
@@ -108,13 +81,15 @@ 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>.
|
||||
later call to B<ECDSA_sign_ex> or B<ECDSA_do_sign_ex>.
|
||||
|
||||
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>
|
||||
ECDSA_sign() is wrapper function for ECDSA_sign_ex with B<kinv>
|
||||
and B<rp> set to NULL.
|
||||
|
||||
ECDSA_sign_ex() computes a digital signature of the B<dgstlen> bytes
|
||||
hash value B<dgst> using the private EC key B<eckey> and the optional
|
||||
pre-computed values B<kinv> and B<rp>. The DER encoded signatures is
|
||||
stored in B<sig> and it's length is returned in B<sig_len>. Note: B<sig>
|
||||
must point to B<ECDSA_size> bytes of memory. The parameter B<type>
|
||||
is ignored.
|
||||
|
||||
@@ -123,10 +98,13 @@ 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_sign() is wrapper function for ECDSA_do_sign_ex with B<kinv>
|
||||
and B<rp> set to NULL.
|
||||
|
||||
ECDSA_do_sign_ex() computes a digital signature of the B<dgst_len>
|
||||
bytes hash value B<dgst> using the private key B<eckey> and the
|
||||
optional pre-computed values B<kinv> and B<rp>. The signature is
|
||||
returned 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>
|
||||
|
||||
@@ -65,9 +65,10 @@ B<CRYPTO_LOCK>, and releases it otherwise.
|
||||
B<file> and B<line> are the file number of the function setting the
|
||||
lock. They can be useful for debugging.
|
||||
|
||||
id_function(void) is a function that returns a thread ID. It is not
|
||||
id_function(void) is a function that returns a thread ID, for example
|
||||
pthread_self() if it returns an integer (see NOTES below). It isn't
|
||||
needed on Windows nor on platforms where getpid() returns a different
|
||||
ID for each thread (most notably Linux).
|
||||
ID for each thread (see NOTES below).
|
||||
|
||||
Additionally, OpenSSL supports dynamic locks, and sometimes, some parts
|
||||
of OpenSSL need it for better performance. To enable this, the following
|
||||
@@ -124,13 +125,13 @@ CRYPTO_get_new_dynlockid() returns the index to the newly created lock.
|
||||
|
||||
The other functions return no values.
|
||||
|
||||
=head1 NOTE
|
||||
=head1 NOTES
|
||||
|
||||
You can find out if OpenSSL was configured with thread support:
|
||||
|
||||
#define OPENSSL_THREAD_DEFINES
|
||||
#include <openssl/opensslconf.h>
|
||||
#if defined(THREADS)
|
||||
#if defined(OPENSSL_THREADS)
|
||||
// thread support enabled
|
||||
#else
|
||||
// no thread support
|
||||
@@ -139,6 +140,22 @@ You can find out if OpenSSL was configured with thread support:
|
||||
Also, dynamic locks are currently not used internally by OpenSSL, but
|
||||
may do so in the future.
|
||||
|
||||
Defining id_function(void) has it's own issues. Generally speaking,
|
||||
pthread_self() should be used, even on platforms where getpid() gives
|
||||
different answers in each thread, since that may depend on the machine
|
||||
the program is run on, not the machine where the program is being
|
||||
compiled. For instance, Red Hat 8 Linux and earlier used
|
||||
LinuxThreads, whose getpid() returns a different value for each
|
||||
thread. Red Hat 9 Linux and later use NPTL, which is
|
||||
Posix-conformant, and has a getpid() that returns the same value for
|
||||
all threads in a process. A program compiled on Red Hat 8 and run on
|
||||
Red Hat 9 will therefore see getpid() returning the same value for
|
||||
all threads.
|
||||
|
||||
There is still the issue of platforms where pthread_self() returns
|
||||
something other than an integer. This is a bit unusual, and this
|
||||
manual has no cookbook solution for that case.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
B<crypto/threads/mttest.c> shows examples of the callback functions on
|
||||
|
||||
39
e_os.h
39
e_os.h
@@ -182,10 +182,18 @@ extern "C" {
|
||||
#define readsocket(s,b,n) read((s),(b),(n))
|
||||
#define writesocket(s,b,n) write((s),(char *)(b),(n))
|
||||
#elif defined(OPENSSL_SYS_NETWARE)
|
||||
#if defined(NETWARE_BSDSOCK)
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
#define closesocket(s) close(s)
|
||||
#define readsocket(s,b,n) recv((s),(b),(n),0)
|
||||
#define writesocket(s,b,n) send((s),(b),(n),0)
|
||||
#else
|
||||
#define get_last_socket_error() WSAGetLastError()
|
||||
#define clear_socket_error() WSASetLastError(0)
|
||||
#define readsocket(s,b,n) recv((s),(b),(n),0)
|
||||
#define writesocket(s,b,n) send((s),(b),(n),0)
|
||||
#endif
|
||||
#else
|
||||
#define get_last_socket_error() errno
|
||||
#define clear_socket_error() errno=0
|
||||
@@ -219,6 +227,8 @@ extern "C" {
|
||||
# define _setmode setmode
|
||||
# define _O_TEXT O_TEXT
|
||||
# define _O_BINARY O_BINARY
|
||||
# undef DEVRANDOM
|
||||
# define DEVRANDOM "/dev/urandom\x24"
|
||||
# endif /* __DJGPP__ */
|
||||
|
||||
# ifndef S_IFDIR
|
||||
@@ -235,6 +245,23 @@ extern "C" {
|
||||
# define NO_DIRENT
|
||||
|
||||
# ifdef WINDOWS
|
||||
# ifndef _WIN32_WINNT
|
||||
/*
|
||||
* Defining _WIN32_WINNT here in e_os.h implies certain "discipline."
|
||||
* Most notably we ought to check for availability of each specific
|
||||
* routine with GetProcAddress() and/or quard NT-specific calls with
|
||||
* GetVersion() < 0x80000000. One can argue that in latter "or" case
|
||||
* we ought to /DELAYLOAD some .DLLs in order to protect ourselves
|
||||
* against run-time link errors. This doesn't seem to be necessary,
|
||||
* because it turned out that already Windows 95, first non-NT Win32
|
||||
* implementation, is equipped with at least NT 3.51 stubs, dummy
|
||||
* routines with same name, but which do nothing. Meaning that it's
|
||||
* apparently appropriate to guard generic NT calls with GetVersion
|
||||
* alone, while NT 4.0 and above calls ought to be additionally
|
||||
* checked upon with GetProcAddress.
|
||||
*/
|
||||
# define _WIN32_WINNT 0x0400
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <stddef.h>
|
||||
# include <errno.h>
|
||||
@@ -419,11 +446,15 @@ extern HINSTANCE _hInstance;
|
||||
# define SHUTDOWN2(fd) MacSocket_close(fd)
|
||||
|
||||
# elif defined(OPENSSL_SYS_NETWARE)
|
||||
/* NetWare uses the WinSock2 interfaces
|
||||
/* NetWare uses the WinSock2 interfaces by default, but can be configured for BSD
|
||||
*/
|
||||
# if defined(NETWARE_CLIB)
|
||||
# include <ws2nlm.h>
|
||||
# elif defined(NETWARE_LIBC)
|
||||
# if defined(NETWARE_BSDSOCK)
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/select.h>
|
||||
# define INVALID_SOCKET (int)(~0)
|
||||
# else
|
||||
# include <novsock2.h>
|
||||
# endif
|
||||
# define SSLeay_Write(a,b,c) send((a),(b),(c),0)
|
||||
|
||||
@@ -20,23 +20,23 @@ TEST=
|
||||
APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBNAMES= 4758_cca aep atalla cswift gmp ncipher nuron sureware ubsec
|
||||
LIBNAMES= 4758cca aep atalla cswift gmp chil nuron sureware ubsec
|
||||
|
||||
LIBSRC= e_4758_cca.c \
|
||||
LIBSRC= e_4758cca.c \
|
||||
e_aep.c \
|
||||
e_atalla.c \
|
||||
e_cswift.c \
|
||||
e_gmp.c \
|
||||
e_ncipher.c \
|
||||
e_chil.c \
|
||||
e_nuron.c \
|
||||
e_sureware.c \
|
||||
e_ubsec.c
|
||||
LIBOBJ= e_4758_cca.o \
|
||||
LIBOBJ= e_4758cca.o \
|
||||
e_aep.o \
|
||||
e_atalla.o \
|
||||
e_cswift.o \
|
||||
e_gmp.o \
|
||||
e_ncipher.o \
|
||||
e_chil.o \
|
||||
e_nuron.o \
|
||||
e_sureware.o \
|
||||
e_ubsec.o
|
||||
@@ -44,12 +44,12 @@ LIBOBJ= e_4758_cca.o \
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER=
|
||||
HEADER= e_4758_cca_err.c e_4758_cca_err.h \
|
||||
HEADER= e_4758cca_err.c e_4758cca_err.h \
|
||||
e_aep_err.c e_aep_err.h \
|
||||
e_atalla_err.c e_atalla_err.h \
|
||||
e_cswift_err.c e_cswift_err.h \
|
||||
e_gmp_err.c e_gmp_err.h \
|
||||
e_ncipher_err.c e_ncipher_err.h \
|
||||
e_chil_err.c e_chil_err.h \
|
||||
e_nuron_err.c e_nuron_err.h \
|
||||
e_sureware_err.c e_sureware_err.h \
|
||||
e_ubsec_err.c e_ubsec_err.h
|
||||
@@ -82,14 +82,19 @@ files:
|
||||
links:
|
||||
|
||||
# XXXXX This currently only works on systems that use .so as suffix
|
||||
# for shared libraries.
|
||||
# for shared libraries as well as for Cygwin which uses the
|
||||
# dlfcn_name_converter and therefore stores the engines with .so suffix, too.
|
||||
install:
|
||||
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
set -e; \
|
||||
for l in $(LIBNAMES); do \
|
||||
( echo installing $$l; \
|
||||
cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
|
||||
else \
|
||||
cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
|
||||
fi; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \
|
||||
done; \
|
||||
@@ -125,22 +130,22 @@ clean:
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
e_4758_cca.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
e_4758_cca.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
e_4758_cca.o: ../include/openssl/crypto.h ../include/openssl/dso.h
|
||||
e_4758_cca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
e_4758_cca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
e_4758_cca.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
e_4758_cca.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
e_4758_cca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
e_4758_cca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
e_4758_cca.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
|
||||
e_4758_cca.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
e_4758_cca.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
e_4758_cca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
e_4758_cca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
e_4758_cca.o: e_4758_cca.c e_4758_cca_err.c e_4758_cca_err.h
|
||||
e_4758_cca.o: vendor_defns/hw_4758_cca.h
|
||||
e_4758cca.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
e_4758cca.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
e_4758cca.o: ../include/openssl/crypto.h ../include/openssl/dso.h
|
||||
e_4758cca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
|
||||
e_4758cca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
|
||||
e_4758cca.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
e_4758cca.o: ../include/openssl/evp.h ../include/openssl/lhash.h
|
||||
e_4758cca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
e_4758cca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
e_4758cca.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
|
||||
e_4758cca.o: ../include/openssl/rand.h ../include/openssl/rsa.h
|
||||
e_4758cca.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
e_4758cca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
e_4758cca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
e_4758cca.o: e_4758cca.c e_4758cca_err.c e_4758cca_err.h
|
||||
e_4758cca.o: vendor_defns/hw_4758_cca.h
|
||||
e_aep.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
e_aep.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
e_aep.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
@@ -163,6 +168,23 @@ e_atalla.o: ../include/openssl/ossl_typ.h ../include/openssl/rsa.h
|
||||
e_atalla.o: ../include/openssl/safestack.h ../include/openssl/stack.h
|
||||
e_atalla.o: ../include/openssl/symhacks.h e_atalla.c e_atalla_err.c
|
||||
e_atalla.o: e_atalla_err.h vendor_defns/atalla.h
|
||||
e_chil.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
e_chil.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
e_chil.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
e_chil.o: ../include/openssl/dso.h ../include/openssl/e_os2.h
|
||||
e_chil.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
e_chil.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
e_chil.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
e_chil.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
e_chil.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
e_chil.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
e_chil.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
e_chil.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
e_chil.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
e_chil.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
e_chil.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
|
||||
e_chil.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h e_chil.c
|
||||
e_chil.o: e_chil_err.c e_chil_err.h vendor_defns/hwcryptohook.h
|
||||
e_cswift.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
e_cswift.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
e_cswift.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
@@ -179,24 +201,6 @@ e_gmp.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
||||
e_gmp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
e_gmp.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
|
||||
e_gmp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h e_gmp.c
|
||||
e_ncipher.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
e_ncipher.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
e_ncipher.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
e_ncipher.o: ../include/openssl/dso.h ../include/openssl/e_os2.h
|
||||
e_ncipher.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
|
||||
e_ncipher.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
|
||||
e_ncipher.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
e_ncipher.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
|
||||
e_ncipher.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
e_ncipher.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
|
||||
e_ncipher.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
e_ncipher.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
e_ncipher.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
e_ncipher.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
e_ncipher.o: ../include/openssl/symhacks.h ../include/openssl/ui.h
|
||||
e_ncipher.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
|
||||
e_ncipher.o: e_ncipher.c e_ncipher_err.c e_ncipher_err.h
|
||||
e_ncipher.o: vendor_defns/hwcryptohook.h
|
||||
e_nuron.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
e_nuron.o: ../include/openssl/bn.h ../include/openssl/buffer.h
|
||||
e_nuron.o: ../include/openssl/crypto.h ../include/openssl/dh.h
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
L CCA4758 e_4758_cca_err.h e_4758_cca_err.c
|
||||
@@ -73,7 +73,7 @@
|
||||
#include "vendor_defns/hw_4758_cca.h"
|
||||
#endif
|
||||
|
||||
#include "e_4758_cca_err.c"
|
||||
#include "e_4758cca_err.c"
|
||||
|
||||
static int ibm_4758_cca_destroy(ENGINE *e);
|
||||
static int ibm_4758_cca_init(ENGINE *e);
|
||||
@@ -202,6 +202,10 @@ static RAND_METHOD ibm_4758_cca_rand =
|
||||
|
||||
static const char *engine_4758_cca_id = "4758cca";
|
||||
static const char *engine_4758_cca_name = "IBM 4758 CCA hardware engine support";
|
||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
/* Compatibility hack, the dynamic library uses this form in the path */
|
||||
static const char *engine_4758_cca_id_alt = "4758_cca";
|
||||
#endif
|
||||
|
||||
/* engine implementation */
|
||||
/*-----------------------*/
|
||||
@@ -958,7 +962,8 @@ static void cca_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, int idx,
|
||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
static int bind_fn(ENGINE *e, const char *id)
|
||||
{
|
||||
if(id && (strcmp(id, engine_4758_cca_id) != 0))
|
||||
if(id && (strcmp(id, engine_4758_cca_id) != 0) &&
|
||||
(strcmp(id, engine_4758_cca_id_alt) != 0))
|
||||
return 0;
|
||||
if(!bind_helper(e))
|
||||
return 0;
|
||||
1
engines/e_4758cca.ec
Normal file
1
engines/e_4758cca.ec
Normal file
@@ -0,0 +1 @@
|
||||
L CCA4758 e_4758cca_err.h e_4758cca_err.c
|
||||
@@ -1,4 +1,4 @@
|
||||
/* e_4758_cca_err.c */
|
||||
/* e_4758cca_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <openssl/err.h>
|
||||
#include "e_4758_cca_err.h"
|
||||
#include "e_4758cca_err.h"
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
@@ -479,6 +479,7 @@ static int aep_init(ENGINE *e)
|
||||
|
||||
if(aep_dso)
|
||||
DSO_free(aep_dso);
|
||||
aep_dso = NULL;
|
||||
|
||||
p_AEP_OpenConnection = NULL;
|
||||
p_AEP_ModExp = NULL;
|
||||
|
||||
@@ -384,6 +384,7 @@ static int atalla_init(ENGINE *e)
|
||||
err:
|
||||
if(atalla_dso)
|
||||
DSO_free(atalla_dso);
|
||||
atalla_dso = NULL;
|
||||
p_Atalla_GetHardwareConfig = NULL;
|
||||
p_Atalla_RSAPrivateKeyOpFn = NULL;
|
||||
p_Atalla_GetPerformanceStatistics = NULL;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* crypto/engine/hw_ncipher.c -*- mode: C; c-file-style: "eay" -*- */
|
||||
/* crypto/engine/e_chil.c -*- mode: C; c-file-style: "eay" -*- */
|
||||
/* Written by Richard Levitte (richard@levitte.org), Geoff Thorpe
|
||||
* (geoff@geoffthorpe.net) and Dr Stephen N Henson (shenson@bigfoot.com)
|
||||
* for the OpenSSL project 2000.
|
||||
@@ -70,7 +70,7 @@
|
||||
#include <openssl/bn.h>
|
||||
|
||||
#ifndef OPENSSL_NO_HW
|
||||
#ifndef OPENSSL_NO_HW_NCIPHER
|
||||
#ifndef OPENSSL_NO_HW_CHIL
|
||||
|
||||
/* Attribution notice: nCipher have said several times that it's OK for
|
||||
* us to implement a general interface to their boxes, and recently declared
|
||||
@@ -86,8 +86,8 @@
|
||||
#include "vendor_defns/hwcryptohook.h"
|
||||
#endif
|
||||
|
||||
#define HWCRHK_LIB_NAME "hwcrhk engine"
|
||||
#include "e_ncipher_err.c"
|
||||
#define HWCRHK_LIB_NAME "CHIL engine"
|
||||
#include "e_chil_err.c"
|
||||
|
||||
static int hwcrhk_destroy(ENGINE *e);
|
||||
static int hwcrhk_init(ENGINE *e);
|
||||
@@ -177,7 +177,7 @@ static const ENGINE_CMD_DEFN hwcrhk_cmd_defns[] = {
|
||||
/* Our internal RSA_METHOD that we provide pointers to */
|
||||
static RSA_METHOD hwcrhk_rsa =
|
||||
{
|
||||
"nCipher RSA method",
|
||||
"CHIL RSA method",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -198,7 +198,7 @@ static RSA_METHOD hwcrhk_rsa =
|
||||
/* Our internal DH_METHOD that we provide pointers to */
|
||||
static DH_METHOD hwcrhk_dh =
|
||||
{
|
||||
"nCipher DH method",
|
||||
"CHIL DH method",
|
||||
NULL,
|
||||
NULL,
|
||||
hwcrhk_mod_exp_dh,
|
||||
@@ -212,7 +212,7 @@ static DH_METHOD hwcrhk_dh =
|
||||
|
||||
static RAND_METHOD hwcrhk_rand =
|
||||
{
|
||||
/* "nCipher RAND method", */
|
||||
/* "CHIL RAND method", */
|
||||
NULL,
|
||||
hwcrhk_rand_bytes,
|
||||
NULL,
|
||||
@@ -223,7 +223,12 @@ static RAND_METHOD hwcrhk_rand =
|
||||
|
||||
/* Constants used when creating the ENGINE */
|
||||
static const char *engine_hwcrhk_id = "chil";
|
||||
static const char *engine_hwcrhk_name = "nCipher hardware engine support";
|
||||
static const char *engine_hwcrhk_name = "CHIL hardware engine support";
|
||||
|
||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
/* Compatibility hack, the dynamic library uses this form in the path */
|
||||
static const char *engine_hwcrhk_id_alt = "ncipher";
|
||||
#endif
|
||||
|
||||
/* Internal stuff for HWCryptoHook */
|
||||
|
||||
@@ -323,7 +328,7 @@ static HWCryptoHook_InitInfo hwcrhk_globals = {
|
||||
|
||||
/* Now, to our own code */
|
||||
|
||||
/* This internal function is used by ENGINE_ncipher() and possibly by the
|
||||
/* This internal function is used by ENGINE_chil() and possibly by the
|
||||
* "dynamic" ENGINE support too */
|
||||
static int bind_helper(ENGINE *e)
|
||||
{
|
||||
@@ -379,7 +384,7 @@ static int bind_helper(ENGINE *e)
|
||||
}
|
||||
|
||||
#ifdef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
static ENGINE *engine_ncipher(void)
|
||||
static ENGINE *engine_chil(void)
|
||||
{
|
||||
ENGINE *ret = ENGINE_new();
|
||||
if(!ret)
|
||||
@@ -395,7 +400,7 @@ static ENGINE *engine_ncipher(void)
|
||||
void ENGINE_load_chil(void)
|
||||
{
|
||||
/* Copied from eng_[openssl|dyn].c */
|
||||
ENGINE *toadd = engine_ncipher();
|
||||
ENGINE *toadd = engine_chil();
|
||||
if(!toadd) return;
|
||||
ENGINE_add(toadd);
|
||||
ENGINE_free(toadd);
|
||||
@@ -491,7 +496,7 @@ static void release_context(HWCryptoHook_ContextHandle hac)
|
||||
p_hwcrhk_Finish(hac);
|
||||
}
|
||||
|
||||
/* Destructor (complements the "ENGINE_ncipher()" constructor) */
|
||||
/* Destructor (complements the "ENGINE_chil()" constructor) */
|
||||
static int hwcrhk_destroy(ENGINE *e)
|
||||
{
|
||||
free_HWCRHK_LIBNAME();
|
||||
@@ -1343,7 +1348,8 @@ static void hwcrhk_log_message(void *logstr, const char *message)
|
||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||
static int bind_fn(ENGINE *e, const char *id)
|
||||
{
|
||||
if(id && (strcmp(id, engine_hwcrhk_id) != 0))
|
||||
if(id && (strcmp(id, engine_hwcrhk_id) != 0) &&
|
||||
(strcmp(id, engine_hwcrhk_id_alt) != 0))
|
||||
return 0;
|
||||
if(!bind_helper(e))
|
||||
return 0;
|
||||
@@ -1353,5 +1359,5 @@ IMPLEMENT_DYNAMIC_CHECK_FN()
|
||||
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
|
||||
#endif /* OPENSSL_NO_DYNAMIC_ENGINE */
|
||||
|
||||
#endif /* !OPENSSL_NO_HW_NCIPHER */
|
||||
#endif /* !OPENSSL_NO_HW_CHIL */
|
||||
#endif /* !OPENSSL_NO_HW */
|
||||
1
engines/e_chil.ec
Normal file
1
engines/e_chil.ec
Normal file
@@ -0,0 +1 @@
|
||||
L HWCRHK e_chil_err.h e_chil_err.c
|
||||
@@ -1,4 +1,4 @@
|
||||
/* e_ncipher_err.c */
|
||||
/* e_chil_err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <openssl/err.h>
|
||||
#include "e_ncipher_err.h"
|
||||
#include "e_chil_err.h"
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
#ifndef OPENSSL_NO_ERR
|
||||
@@ -98,6 +98,7 @@ static int cswift_destroy(ENGINE *e);
|
||||
static int cswift_init(ENGINE *e);
|
||||
static int cswift_finish(ENGINE *e);
|
||||
static int cswift_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void));
|
||||
static int cswift_bn_32copy(SW_LARGENUMBER * out, const BIGNUM * in);
|
||||
|
||||
/* BIGNUM stuff */
|
||||
static int cswift_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
@@ -415,7 +416,10 @@ static int cswift_init(ENGINE *e)
|
||||
return 1;
|
||||
err:
|
||||
if(cswift_dso)
|
||||
{
|
||||
DSO_free(cswift_dso);
|
||||
cswift_dso = NULL;
|
||||
}
|
||||
p_CSwift_AcquireAccContext = NULL;
|
||||
p_CSwift_AttachKeyParam = NULL;
|
||||
p_CSwift_SimpleRequest = NULL;
|
||||
@@ -565,6 +569,29 @@ err:
|
||||
return to_return;
|
||||
}
|
||||
|
||||
|
||||
int cswift_bn_32copy(SW_LARGENUMBER * out, const BIGNUM * in)
|
||||
{
|
||||
int mod;
|
||||
int numbytes = BN_num_bytes(in);
|
||||
|
||||
mod = 0;
|
||||
while( ((out->nbytes = (numbytes+mod)) % 32) )
|
||||
{
|
||||
mod++;
|
||||
}
|
||||
out->value = (unsigned char*)OPENSSL_malloc(out->nbytes);
|
||||
if(!out->value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
BN_bn2bin(in, &out->value[mod]);
|
||||
if(mod)
|
||||
memset(out->value, 0, mod);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Un petit mod_exp chinois */
|
||||
static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *q, const BIGNUM *dmp1,
|
||||
@@ -574,15 +601,16 @@ static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
SW_LARGENUMBER arg, res;
|
||||
SW_PARAM sw_param;
|
||||
SW_CONTEXT_HANDLE hac;
|
||||
BIGNUM *rsa_p = NULL;
|
||||
BIGNUM *rsa_q = NULL;
|
||||
BIGNUM *rsa_dmp1 = NULL;
|
||||
BIGNUM *rsa_dmq1 = NULL;
|
||||
BIGNUM *rsa_iqmp = NULL;
|
||||
BIGNUM *argument = NULL;
|
||||
BIGNUM *result = NULL;
|
||||
BIGNUM *argument = NULL;
|
||||
int to_return = 0; /* expect failure */
|
||||
int acquired = 0;
|
||||
|
||||
sw_param.up.crt.p.value = NULL;
|
||||
sw_param.up.crt.q.value = NULL;
|
||||
sw_param.up.crt.dmp1.value = NULL;
|
||||
sw_param.up.crt.dmq1.value = NULL;
|
||||
sw_param.up.crt.iqmp.value = NULL;
|
||||
|
||||
if(!get_context(&hac))
|
||||
{
|
||||
@@ -590,44 +618,55 @@ static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
goto err;
|
||||
}
|
||||
acquired = 1;
|
||||
|
||||
/* Prepare the params */
|
||||
BN_CTX_start(ctx);
|
||||
rsa_p = BN_CTX_get(ctx);
|
||||
rsa_q = BN_CTX_get(ctx);
|
||||
rsa_dmp1 = BN_CTX_get(ctx);
|
||||
rsa_dmq1 = BN_CTX_get(ctx);
|
||||
rsa_iqmp = BN_CTX_get(ctx);
|
||||
argument = BN_CTX_get(ctx);
|
||||
result = BN_CTX_get(ctx);
|
||||
if(!result)
|
||||
argument = BN_new();
|
||||
result = BN_new();
|
||||
if(!result || !argument)
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_CTX_FULL);
|
||||
goto err;
|
||||
}
|
||||
if(!bn_wexpand(rsa_p, p->top) || !bn_wexpand(rsa_q, q->top) ||
|
||||
!bn_wexpand(rsa_dmp1, dmp1->top) ||
|
||||
!bn_wexpand(rsa_dmq1, dmq1->top) ||
|
||||
!bn_wexpand(rsa_iqmp, iqmp->top) ||
|
||||
!bn_wexpand(argument, a->top) ||
|
||||
|
||||
|
||||
sw_param.type = SW_ALG_CRT;
|
||||
/************************************************************************/
|
||||
/* 04/02/2003 */
|
||||
/* Modified by Frederic Giudicelli (deny-all.com) to overcome the */
|
||||
/* limitation of cswift with values not a multiple of 32 */
|
||||
/************************************************************************/
|
||||
if(!cswift_bn_32copy(&sw_param.up.crt.p, p))
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_EXPAND_FAIL);
|
||||
goto err;
|
||||
}
|
||||
if(!cswift_bn_32copy(&sw_param.up.crt.q, q))
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_EXPAND_FAIL);
|
||||
goto err;
|
||||
}
|
||||
if(!cswift_bn_32copy(&sw_param.up.crt.dmp1, dmp1))
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_EXPAND_FAIL);
|
||||
goto err;
|
||||
}
|
||||
if(!cswift_bn_32copy(&sw_param.up.crt.dmq1, dmq1))
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_EXPAND_FAIL);
|
||||
goto err;
|
||||
}
|
||||
if(!cswift_bn_32copy(&sw_param.up.crt.iqmp, iqmp))
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_EXPAND_FAIL);
|
||||
goto err;
|
||||
}
|
||||
if( !bn_wexpand(argument, a->top) ||
|
||||
!bn_wexpand(result, p->top + q->top))
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_EXPAND_FAIL);
|
||||
goto err;
|
||||
}
|
||||
sw_param.type = SW_ALG_CRT;
|
||||
sw_param.up.crt.p.nbytes = BN_bn2bin(p, (unsigned char *)rsa_p->d);
|
||||
sw_param.up.crt.p.value = (unsigned char *)rsa_p->d;
|
||||
sw_param.up.crt.q.nbytes = BN_bn2bin(q, (unsigned char *)rsa_q->d);
|
||||
sw_param.up.crt.q.value = (unsigned char *)rsa_q->d;
|
||||
sw_param.up.crt.dmp1.nbytes = BN_bn2bin(dmp1,
|
||||
(unsigned char *)rsa_dmp1->d);
|
||||
sw_param.up.crt.dmp1.value = (unsigned char *)rsa_dmp1->d;
|
||||
sw_param.up.crt.dmq1.nbytes = BN_bn2bin(dmq1,
|
||||
(unsigned char *)rsa_dmq1->d);
|
||||
sw_param.up.crt.dmq1.value = (unsigned char *)rsa_dmq1->d;
|
||||
sw_param.up.crt.iqmp.nbytes = BN_bn2bin(iqmp,
|
||||
(unsigned char *)rsa_iqmp->d);
|
||||
sw_param.up.crt.iqmp.value = (unsigned char *)rsa_iqmp->d;
|
||||
|
||||
/* Attach the key params */
|
||||
sw_status = p_CSwift_AttachKeyParam(hac, &sw_param);
|
||||
switch(sw_status)
|
||||
@@ -666,9 +705,22 @@ static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
BN_bin2bn((unsigned char *)result->d, res.nbytes, r);
|
||||
to_return = 1;
|
||||
err:
|
||||
if(sw_param.up.crt.p.value)
|
||||
OPENSSL_free(sw_param.up.crt.p.value);
|
||||
if(sw_param.up.crt.q.value)
|
||||
OPENSSL_free(sw_param.up.crt.q.value);
|
||||
if(sw_param.up.crt.dmp1.value)
|
||||
OPENSSL_free(sw_param.up.crt.dmp1.value);
|
||||
if(sw_param.up.crt.dmq1.value)
|
||||
OPENSSL_free(sw_param.up.crt.dmq1.value);
|
||||
if(sw_param.up.crt.iqmp.value)
|
||||
OPENSSL_free(sw_param.up.crt.iqmp.value);
|
||||
if(result)
|
||||
BN_free(result);
|
||||
if(argument)
|
||||
BN_free(argument);
|
||||
if(acquired)
|
||||
release_context(hac);
|
||||
BN_CTX_end(ctx);
|
||||
return to_return;
|
||||
}
|
||||
|
||||
@@ -676,6 +728,27 @@ err:
|
||||
static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
|
||||
{
|
||||
int to_return = 0;
|
||||
const RSA_METHOD * def_rsa_method;
|
||||
|
||||
/* Try the limits of RSA (2048 bits) */
|
||||
if(BN_num_bytes(rsa->p) > 128 ||
|
||||
BN_num_bytes(rsa->q) > 128 ||
|
||||
BN_num_bytes(rsa->dmp1) > 128 ||
|
||||
BN_num_bytes(rsa->dmq1) > 128 ||
|
||||
BN_num_bytes(rsa->iqmp) > 128)
|
||||
{
|
||||
#ifdef RSA_NULL
|
||||
def_rsa_method=RSA_null_method();
|
||||
#else
|
||||
#if 0
|
||||
def_rsa_method=RSA_PKCS1_RSAref();
|
||||
#else
|
||||
def_rsa_method=RSA_PKCS1_SSLeay();
|
||||
#endif
|
||||
#endif
|
||||
if(def_rsa_method)
|
||||
return def_rsa_method->rsa_mod_exp(r0, I, rsa, ctx);
|
||||
}
|
||||
|
||||
if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
|
||||
{
|
||||
@@ -693,6 +766,26 @@ err:
|
||||
static int cswift_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
||||
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
|
||||
{
|
||||
const RSA_METHOD * def_rsa_method;
|
||||
|
||||
/* Try the limits of RSA (2048 bits) */
|
||||
if(BN_num_bytes(r) > 256 ||
|
||||
BN_num_bytes(a) > 256 ||
|
||||
BN_num_bytes(m) > 256)
|
||||
{
|
||||
#ifdef RSA_NULL
|
||||
def_rsa_method=RSA_null_method();
|
||||
#else
|
||||
#if 0
|
||||
def_rsa_method=RSA_PKCS1_RSAref();
|
||||
#else
|
||||
def_rsa_method=RSA_PKCS1_SSLeay();
|
||||
#endif
|
||||
#endif
|
||||
if(def_rsa_method)
|
||||
return def_rsa_method->bn_mod_exp(r, a, p, m, ctx, m_ctx);
|
||||
}
|
||||
|
||||
return cswift_mod_exp(r, a, p, m, ctx);
|
||||
}
|
||||
|
||||
@@ -937,9 +1030,10 @@ static int cswift_rand_bytes(unsigned char *buf, int num)
|
||||
SW_CONTEXT_HANDLE hac;
|
||||
SW_STATUS swrc;
|
||||
SW_LARGENUMBER largenum;
|
||||
size_t nbytes = 0;
|
||||
int acquired = 0;
|
||||
int to_return = 0; /* assume failure */
|
||||
unsigned char buf32[1024];
|
||||
|
||||
|
||||
if (!get_context(&hac))
|
||||
{
|
||||
@@ -948,17 +1042,19 @@ static int cswift_rand_bytes(unsigned char *buf, int num)
|
||||
}
|
||||
acquired = 1;
|
||||
|
||||
while (nbytes < (size_t)num)
|
||||
/************************************************************************/
|
||||
/* 04/02/2003 */
|
||||
/* Modified by Frederic Giudicelli (deny-all.com) to overcome the */
|
||||
/* limitation of cswift with values not a multiple of 32 */
|
||||
/************************************************************************/
|
||||
|
||||
while(num >= sizeof(buf32))
|
||||
{
|
||||
largenum.value = buf;
|
||||
largenum.nbytes = sizeof(buf32);
|
||||
/* tell CryptoSwift how many bytes we want and where we want it.
|
||||
* Note: - CryptoSwift cannot do more than 4096 bytes at a time.
|
||||
* - CryptoSwift can only do multiple of 32-bits. */
|
||||
largenum.value = (SW_BYTE *) buf + nbytes;
|
||||
if (4096 > num - nbytes)
|
||||
largenum.nbytes = num - nbytes;
|
||||
else
|
||||
largenum.nbytes = 4096;
|
||||
|
||||
swrc = p_CSwift_SimpleRequest(hac, SW_CMD_RAND, NULL, 0, &largenum, 1);
|
||||
if (swrc != SW_OK)
|
||||
{
|
||||
@@ -968,14 +1064,30 @@ static int cswift_rand_bytes(unsigned char *buf, int num)
|
||||
ERR_add_error_data(2, "CryptoSwift error number is ", tmpbuf);
|
||||
goto err;
|
||||
}
|
||||
|
||||
nbytes += largenum.nbytes;
|
||||
buf += sizeof(buf32);
|
||||
num -= sizeof(buf32);
|
||||
}
|
||||
if(num)
|
||||
{
|
||||
largenum.nbytes = sizeof(buf32);
|
||||
largenum.value = buf32;
|
||||
swrc = p_CSwift_SimpleRequest(hac, SW_CMD_RAND, NULL, 0, &largenum, 1);
|
||||
if (swrc != SW_OK)
|
||||
{
|
||||
char tmpbuf[20];
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_CTRL, CSWIFT_R_REQUEST_FAILED);
|
||||
sprintf(tmpbuf, "%ld", swrc);
|
||||
ERR_add_error_data(2, "CryptoSwift error number is ", tmpbuf);
|
||||
goto err;
|
||||
}
|
||||
memcpy(buf, largenum.value, num);
|
||||
}
|
||||
to_return = 1; /* success */
|
||||
|
||||
to_return = 1; /* success */
|
||||
err:
|
||||
if (acquired)
|
||||
release_context(hac);
|
||||
|
||||
return to_return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
L HWCRHK e_ncipher_err.h e_ncipher_err.c
|
||||
@@ -463,6 +463,7 @@ static int ubsec_init(ENGINE *e)
|
||||
err:
|
||||
if(ubsec_dso)
|
||||
DSO_free(ubsec_dso);
|
||||
ubsec_dso = NULL;
|
||||
p_UBSEC_ubsec_bytes_to_bits = NULL;
|
||||
p_UBSEC_ubsec_bits_to_bytes = NULL;
|
||||
p_UBSEC_ubsec_open = NULL;
|
||||
|
||||
@@ -34,7 +34,7 @@ $! Set the names of the engines we want to build
|
||||
$!
|
||||
$ ENGINES = "," + P6
|
||||
$ IF ENGINES .EQS. "," THEN -
|
||||
ENGINES = ",4758_cca,aep,atalla,cswift,ncipher,nuron,sureware,ubsec"
|
||||
ENGINES = ",4758cca,aep,atalla,cswift,chil,nuron,sureware,ubsec"
|
||||
$!
|
||||
$! Set the default TCP/IP library to link against if needed
|
||||
$!
|
||||
@@ -79,11 +79,11 @@ $ THEN
|
||||
$ ENGINE_ = "engine_vector.mar"
|
||||
$ EXTRA_OBJ := ,'OBJ_DIR'ENGINE_VECTOR.OBJ
|
||||
$ ENDIF
|
||||
$ ENGINE_4758_CCA = "e_4758_cca"
|
||||
$ ENGINE_4758CCA = "e_4758cca"
|
||||
$ ENGINE_aep = "e_aep"
|
||||
$ ENGINE_atalla = "e_atalla"
|
||||
$ ENGINE_cswift = "e_cswift"
|
||||
$ ENGINE_ncipher = "e_ncipher"
|
||||
$ ENGINE_chil = "e_chil"
|
||||
$ ENGINE_nuron = "e_nuron"
|
||||
$ ENGINE_sureware = "e_sureware"
|
||||
$ ENGINE_ubsec = "e_ubsec"
|
||||
|
||||
@@ -428,7 +428,7 @@ $ SDIRS := ,-
|
||||
BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,-
|
||||
BUFFER,BIO,STACK,LHASH,RAND,ERR,-
|
||||
EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,-
|
||||
STORE
|
||||
STORE,PQUEUE
|
||||
$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,-
|
||||
ossl_typ.h
|
||||
$ EXHEADER_OBJECTS := objects.h,obj_mac.h
|
||||
@@ -477,6 +477,7 @@ $ EXHEADER_UI := ui.h,ui_compat.h
|
||||
$ EXHEADER_KRB5 := krb5_asn.h
|
||||
$!EXHEADER_STORE := store.h,str_compat.h
|
||||
$ EXHEADER_STORE := store.h
|
||||
$ EXHEADER_PQUEUE := pqueue.h,pq_compat.h
|
||||
$
|
||||
$ I = 0
|
||||
$ LOOP_SDIRS:
|
||||
@@ -495,7 +496,7 @@ $ LOOP_SDIRS_END:
|
||||
$!
|
||||
$! Copy All The ".H" Files From The [.SSL] Directory.
|
||||
$!
|
||||
$ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,kssl.h
|
||||
$ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
|
||||
$ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
|
||||
$!
|
||||
$! Purge all doubles
|
||||
|
||||
12
ms/uplink.pl
12
ms/uplink.pl
@@ -168,23 +168,23 @@ _DATA SEGMENT
|
||||
PUBLIC OPENSSL_UplinkTable
|
||||
OPENSSL_UplinkTable DQ $N
|
||||
___
|
||||
for ($i=1;$i<=$N;$i++) { print " DQ FLAT:\$lazy$i\n"; }
|
||||
for ($i=1;$i<=$N;$i++) { print " DQ \$lazy$i\n"; }
|
||||
print <<___;
|
||||
_DATA ENDS
|
||||
|
||||
TEXT SEGMENT
|
||||
EXTERN OPENSSL_Uplink:NEAR
|
||||
_TEXT SEGMENT
|
||||
EXTERN OPENSSL_Uplink:PROC
|
||||
___
|
||||
for ($i=1;$i<=$N;$i++) {
|
||||
print <<___;
|
||||
ALIGN 4
|
||||
\$lazy$i PROC NEAR
|
||||
\$lazy$i PROC
|
||||
push r9
|
||||
push r8
|
||||
push rdx
|
||||
push rcx
|
||||
sub rsp,40
|
||||
mov rcx,OFFSET FLAT:OPENSSL_UplinkTable
|
||||
lea rcx,OFFSET OPENSSL_UplinkTable
|
||||
mov rdx,$i
|
||||
call OPENSSL_Uplink
|
||||
add rsp,40
|
||||
@@ -197,7 +197,7 @@ ALIGN 4
|
||||
___
|
||||
}
|
||||
print <<___;
|
||||
TEXT ENDS
|
||||
_TEXT ENDS
|
||||
END
|
||||
___
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
%define libmin 9
|
||||
%define librel 8
|
||||
#%define librev a
|
||||
Release: 1
|
||||
Release: 2
|
||||
|
||||
%define openssldir /var/ssl
|
||||
|
||||
@@ -121,7 +121,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%config %attr(0644,root,root) %{openssldir}/openssl.cnf
|
||||
%dir %attr(0755,root,root) %{openssldir}/certs
|
||||
%dir %attr(0755,root,root) %{openssldir}/lib
|
||||
%dir %attr(0755,root,root) %{openssldir}/misc
|
||||
%dir %attr(0750,root,root) %{openssldir}/private
|
||||
|
||||
@@ -146,6 +145,8 @@ ldconfig
|
||||
ldconfig
|
||||
|
||||
%changelog
|
||||
* Sun Jun 6 2005 Richard Levitte <richard@levitte.org>
|
||||
- Remove the incorrect installation of '%{openssldir}/lib'.
|
||||
* Wed May 7 2003 Richard Levitte <richard@levitte.org>
|
||||
- Add /usr/lib/pkgconfig/openssl.pc to the development section.
|
||||
* Thu Mar 22 2001 Richard Levitte <richard@levitte.org>
|
||||
|
||||
972
ssl/Makefile
972
ssl/Makefile
File diff suppressed because it is too large
Load Diff
@@ -442,6 +442,7 @@ dtls1_buffer_handshake_fragment(SSL *s, struct hm_header_st* msg_hdr)
|
||||
{
|
||||
hm_fragment *frag = NULL;
|
||||
pitem *item = NULL;
|
||||
PQ_64BIT seq64;
|
||||
|
||||
frag = dtls1_hm_fragment_new(msg_hdr->frag_len);
|
||||
if ( frag == NULL)
|
||||
@@ -452,10 +453,15 @@ dtls1_buffer_handshake_fragment(SSL *s, struct hm_header_st* msg_hdr)
|
||||
|
||||
memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr));
|
||||
|
||||
item = pitem_new(msg_hdr->seq, frag);
|
||||
pq_64bit_init(&seq64);
|
||||
pq_64bit_assign_word(&seq64, msg_hdr->seq);
|
||||
|
||||
item = pitem_new(seq64, frag);
|
||||
if ( item == NULL)
|
||||
goto err;
|
||||
|
||||
pq_64bit_free(&seq64);
|
||||
|
||||
pqueue_insert(s->d1->buffered_messages, item);
|
||||
return 1;
|
||||
|
||||
@@ -1037,6 +1043,7 @@ dtls1_buffer_message(SSL *s, int is_ccs)
|
||||
{
|
||||
pitem *item;
|
||||
hm_fragment *frag;
|
||||
PQ_64BIT seq64;
|
||||
|
||||
/* this function is called immediately after a message has
|
||||
* been serialized */
|
||||
@@ -1064,7 +1071,11 @@ dtls1_buffer_message(SSL *s, int is_ccs)
|
||||
frag->msg_header.frag_len = s->d1->w_msg_hdr.msg_len;
|
||||
frag->msg_header.is_ccs = is_ccs;
|
||||
|
||||
item = pitem_new(frag->msg_header.seq, frag);
|
||||
pq_64bit_init(&seq64);
|
||||
pq_64bit_assign_word(&seq64, frag->msg_header.seq);
|
||||
|
||||
item = pitem_new(seq64, frag);
|
||||
pq_64bit_free(&seq64);
|
||||
if ( item == NULL)
|
||||
{
|
||||
dtls1_hm_fragment_free(frag);
|
||||
@@ -1090,6 +1101,7 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off,
|
||||
pitem *item;
|
||||
hm_fragment *frag ;
|
||||
unsigned long header_length;
|
||||
PQ_64BIT seq64;
|
||||
|
||||
/*
|
||||
OPENSSL_assert(s->init_num == 0);
|
||||
@@ -1097,7 +1109,11 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off,
|
||||
*/
|
||||
|
||||
/* XDTLS: the requested message ought to be found, otherwise error */
|
||||
item = pqueue_find(s->d1->sent_messages, seq);
|
||||
pq_64bit_init(&seq64);
|
||||
pq_64bit_assign_word(&seq64, seq);
|
||||
|
||||
item = pqueue_find(s->d1->sent_messages, seq64);
|
||||
pq_64bit_free(&seq64);
|
||||
if ( item == NULL)
|
||||
{
|
||||
fprintf(stderr, "retransmit: message %d non-existant\n", seq);
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ssl_locl.h"
|
||||
#include "kssl_lcl.h"
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/objects.h>
|
||||
|
||||
20
ssl/d1_lib.c
20
ssl/d1_lib.c
@@ -132,10 +132,20 @@ int dtls1_new(SSL *s)
|
||||
memset(d1,0, sizeof *d1);
|
||||
|
||||
/* d1->handshake_epoch=0; */
|
||||
#if defined(OPENSSL_SYS_VMS) || defined(VMS_TEST)
|
||||
d1->bitmap.length=64;
|
||||
#else
|
||||
d1->bitmap.length=sizeof(d1->bitmap.map) * 8;
|
||||
#endif
|
||||
pq_64bit_init(&(d1->bitmap.map));
|
||||
pq_64bit_init(&(d1->bitmap.max_seq_num));
|
||||
|
||||
pq_64bit_init(&(d1->next_bitmap.map));
|
||||
pq_64bit_init(&(d1->next_bitmap.max_seq_num));
|
||||
|
||||
d1->unprocessed_rcds.q=pqueue_new();
|
||||
d1->processed_rcds.q=pqueue_new();
|
||||
d1->buffered_messages = pqueue_new();
|
||||
d1->processed_rcds.q=pqueue_new();
|
||||
d1->buffered_messages = pqueue_new();
|
||||
d1->sent_messages=pqueue_new();
|
||||
|
||||
if ( s->server)
|
||||
@@ -198,6 +208,12 @@ void dtls1_free(SSL *s)
|
||||
}
|
||||
pqueue_free(s->d1->sent_messages);
|
||||
|
||||
pq_64bit_free(&(s->d1->bitmap.map));
|
||||
pq_64bit_free(&(s->d1->bitmap.max_seq_num));
|
||||
|
||||
pq_64bit_free(&(s->d1->next_bitmap.map));
|
||||
pq_64bit_free(&(s->d1->next_bitmap.max_seq_num));
|
||||
|
||||
OPENSSL_free(s->d1);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user