Compare commits
108 Commits
OpenSSL-en
...
OpenSSL-en
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce6990739e | ||
|
|
42cc160301 | ||
|
|
0e61cfff53 | ||
|
|
d0c2ebf414 | ||
|
|
e17b712894 | ||
|
|
1d95fb659d | ||
|
|
62324627aa | ||
|
|
f77600524f | ||
|
|
623eea376a | ||
|
|
ebcdd0c43e | ||
|
|
5ef8093732 | ||
|
|
6d50071e84 | ||
|
|
60dae9985d | ||
|
|
df320c4473 | ||
|
|
3aa477f6ec | ||
|
|
282f92f7dd | ||
|
|
8e913bff55 | ||
|
|
07fcf422a1 | ||
|
|
8de7587e02 | ||
|
|
da542e1bf7 | ||
|
|
93fe6e13a3 | ||
|
|
90ac586317 | ||
|
|
2c281ebb6c | ||
|
|
37b08e8365 | ||
|
|
318f962928 | ||
|
|
acb5b34328 | ||
|
|
c1629c9ea2 | ||
|
|
1e4e549296 | ||
|
|
439fb8e1e0 | ||
|
|
53e44d90c7 | ||
|
|
32751b8ab1 | ||
|
|
15c0fb18a2 | ||
|
|
f30839ecaa | ||
|
|
5ce0e07da7 | ||
|
|
1c86d93ca5 | ||
|
|
eb31944f81 | ||
|
|
ea4e4149af | ||
|
|
0e05f54516 | ||
|
|
095aadc43f | ||
|
|
68a1c6b0d9 | ||
|
|
bda702ef83 | ||
|
|
a4129c6e33 | ||
|
|
848f3d40c8 | ||
|
|
1949e78336 | ||
|
|
2273d6b657 | ||
|
|
e39c194387 | ||
|
|
e1b78bc64d | ||
|
|
e65c84abb0 | ||
|
|
8eec1389fb | ||
|
|
e38dabbc0c | ||
|
|
54731d75d7 | ||
|
|
18f2259499 | ||
|
|
1d84fd64fc | ||
|
|
03ed26afdd | ||
|
|
775bcebde5 | ||
|
|
7fcc8326e3 | ||
|
|
cc99526db1 | ||
|
|
72660f5f15 | ||
|
|
bace212474 | ||
|
|
e117a890ca | ||
|
|
5614bb91f5 | ||
|
|
7abee0cedf | ||
|
|
6dcbaf5857 | ||
|
|
baa080d46a | ||
|
|
0dcf7fd543 | ||
|
|
02539402af | ||
|
|
02ef611ef3 | ||
|
|
24b8bf2163 | ||
|
|
e37c27d239 | ||
|
|
270f4f6d63 | ||
|
|
e147c6fef8 | ||
|
|
cea81a62ff | ||
|
|
c0366d89f6 | ||
|
|
523d778aef | ||
|
|
5b7417dbe1 | ||
|
|
5401c4c2bf | ||
|
|
c11dead17c | ||
|
|
4041156461 | ||
|
|
279fff0d7f | ||
|
|
54f10e6adc | ||
|
|
fb1cba063d | ||
|
|
e4daf9dfce | ||
|
|
8a26980b07 | ||
|
|
1e27f4b68c | ||
|
|
2be9694116 | ||
|
|
03ea28c985 | ||
|
|
0f92cae9bc | ||
|
|
a9740b7da6 | ||
|
|
b46ba9b1bc | ||
|
|
d572cb6c1c | ||
|
|
05c2b37176 | ||
|
|
8e1ec9fb37 | ||
|
|
dc005a7367 | ||
|
|
8c0514f741 | ||
|
|
2aff74dd68 | ||
|
|
b924f04784 | ||
|
|
d63b8db852 | ||
|
|
2959f292db | ||
|
|
965c17756a | ||
|
|
0c415ddd67 | ||
|
|
16e91fe8ab | ||
|
|
74d2b0f112 | ||
|
|
d40a9e8257 | ||
|
|
ec6a40e278 | ||
|
|
4a6367ae66 | ||
|
|
bed1847b6a | ||
|
|
4d0c6b2936 | ||
|
|
25a73f2690 |
41
CHANGES
41
CHANGES
@@ -4,6 +4,47 @@
|
||||
|
||||
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
|
||||
|
||||
*) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR
|
||||
BIO_ctrl (for BIO pairs).
|
||||
|
||||
*) Add DSO method for VMS.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Bug fix: Montgomery multiplication could produce results with the
|
||||
wrong sign.
|
||||
[Ulf M<>ller]
|
||||
|
||||
*) Add RPM specification openssl.spec and modify it to build three
|
||||
packages. The default package contains applications, application
|
||||
documentation and run-time libraries. The devel package contains
|
||||
include files, static libraries and function documentation. The
|
||||
doc package contains the contents of the doc directory. The original
|
||||
openssl.spec was provided by Damien Miller <djm@mindrot.org>.
|
||||
[Richard Levitte]
|
||||
|
||||
*) Add a large number of documentation files for many SSL routines.
|
||||
[Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>]
|
||||
|
||||
*) Add a configuration entry for Sony News 4.
|
||||
[NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp>]
|
||||
|
||||
*) Don't set the two most significant bits to one when generating a
|
||||
random number < q in the DSA library.
|
||||
[Ulf M<>ller]
|
||||
|
||||
*) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default
|
||||
behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if
|
||||
the underlying transport is blocking) if a handshake took place.
|
||||
(The default behaviour is needed by applications such as s_client
|
||||
and s_server that use select() to determine when to use SSL_read;
|
||||
but for applications that know in advance when to expect data, it
|
||||
just makes things more complicated.)
|
||||
[Bodo Moeller]
|
||||
|
||||
*) Add RAND_egd_bytes(), which gives control over the number of bytes read
|
||||
from EGD.
|
||||
[Ben Laurie]
|
||||
|
||||
*) Add a few more EBCDIC conditionals that make `req' and `x509'
|
||||
work better on such systems.
|
||||
[Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>]
|
||||
|
||||
32
Configure
32
Configure
@@ -33,6 +33,10 @@ my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-
|
||||
# multithreaded applications (default is "threads" if we
|
||||
# know how to do it)
|
||||
# [no-]shared [don't] try to create shared libraries when supported.
|
||||
# IT IS NOT RECOMMENDED TO USE "shared"! Since this is a
|
||||
# development branch, the positions of the ENGINE symbols
|
||||
# in the transfer vector are constantly moving, so binary
|
||||
# backward compatibility can't be guaranteed in any way.
|
||||
# no-asm do not use assembler
|
||||
# no-dso do not compile in any native shared-library methods. This
|
||||
# will ensure that all methods just return NULL.
|
||||
@@ -217,12 +221,21 @@ my %table=(
|
||||
# crypto/sha/sha_lcl.h.
|
||||
# <appro@fy.chalmers.se>
|
||||
#
|
||||
"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
||||
#!#"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
||||
# Since there is mention of this in shlib/hpux10-cc.sh
|
||||
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
|
||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
|
||||
|
||||
# More attempts at unified 10.X and 11.X targets for HP C compiler.
|
||||
#
|
||||
# Chris Ruemmler <ruemmler@cup.hp.com>
|
||||
# Kevin Steves <ks@hp.se>
|
||||
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT:-ldl:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
|
||||
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl",
|
||||
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dl",
|
||||
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
|
||||
|
||||
# HPUX 9.X config.
|
||||
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
|
||||
# egcs. gcc 2.8.1 is also broken.
|
||||
@@ -284,8 +297,8 @@ my %table=(
|
||||
# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the
|
||||
# bn86-elf.o file file since it is hand tweaked assembler.
|
||||
"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
|
||||
"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-mips", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
|
||||
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
|
||||
@@ -364,24 +377,24 @@ my %table=(
|
||||
|
||||
# Windows NT, Microsoft Visual C++ 4.0
|
||||
|
||||
"VC-NT","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::",
|
||||
"VC-WIN32","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::",
|
||||
"VC-NT","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32",
|
||||
"VC-WIN32","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32",
|
||||
"VC-WIN16","cl:::(unknown)::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
|
||||
"VC-W31-16","cl:::(unknown)::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
"VC-W31-32","cl:::::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
|
||||
"VC-MSDOS","cl:::(unknown)::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
|
||||
# Borland C++ 4.5
|
||||
"BC-32","bcc32:::::BN_LLONG DES_PTR RC4_INDEX:::",
|
||||
"BC-32","bcc32:::::BN_LLONG DES_PTR RC4_INDEX::::::::::win32",
|
||||
"BC-16","bcc:::(unknown)::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
|
||||
# Mingw32
|
||||
# (Note: the real CFLAGS for Windows builds are defined by util/mk1mf.pl
|
||||
# and its library files in util/pl/*)
|
||||
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:",
|
||||
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
|
||||
# CygWin32
|
||||
"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:",
|
||||
"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
|
||||
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
|
||||
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::",
|
||||
@@ -398,6 +411,9 @@ my %table=(
|
||||
##### MacOS X (a.k.a. Rhapsody) setup
|
||||
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
|
||||
##### Sony NEWS-OS 4.x
|
||||
"newsos4-gcc","gcc:-O -DB_ENDIAN -DNEWS4::(unknown):-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||
|
||||
);
|
||||
|
||||
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
|
||||
|
||||
5
INSTALL
5
INSTALL
@@ -57,7 +57,10 @@
|
||||
|
||||
shared In addition to the usual static libraries, create shared
|
||||
libraries on platforms where it's supported. See "Note on
|
||||
shared libraries" below.
|
||||
shared libraries" below. THIS IS NOT RECOMMENDED! Since
|
||||
this is a development branch, the positions of the ENGINE
|
||||
symbols in the transfer vector are constantly moving, so
|
||||
binary backward compatibility can't be guaranteed in any way.
|
||||
|
||||
no-asm Do not use assembler code.
|
||||
|
||||
|
||||
19
INSTALL.VMS
19
INSTALL.VMS
@@ -82,12 +82,17 @@ directory. The syntax is trhe following:
|
||||
RSAREF compile using the RSAREF Library
|
||||
NORSAREF compile without using RSAREF
|
||||
|
||||
Note 1: The RSAREF libraries are NOT INCLUDED and you have to
|
||||
download it from "ftp://ftp.rsa.com/rsaref". You have to
|
||||
get the ".tar-Z" file as the ".zip" file doesn't have the
|
||||
directory structure stored. You have to extract the file
|
||||
into the [.RSAREF] directory as that is where the scripts
|
||||
will look for the files.
|
||||
Note 0: The RASREF library IS NO LONGER NEEDED. The RSA patent
|
||||
expires September 20, 2000, and RSA Security chose to make
|
||||
the algorithm public domain two weeks before that.
|
||||
|
||||
Note 1: If you still want to use RSAREF, the library is NOT INCLUDED
|
||||
and you have to download it. RSA Security doesn't carry it
|
||||
any more, but there are a number of places where you can find
|
||||
it. You have to get the ".tar-Z" file as the ".zip" file
|
||||
doesn't have the directory structure stored. You have to
|
||||
extract the file into the [.RSAREF] directory as that is where
|
||||
the scripts will look for the files.
|
||||
|
||||
Note 2: I have never done this, so I've no idea if it works or not.
|
||||
|
||||
@@ -129,7 +134,7 @@ Currently, the logical names supported are:
|
||||
used. This is good to try if something doesn't work.
|
||||
OPENSSL_NO_'alg' with value YES, the corresponding crypto algorithm
|
||||
will not be implemented. Supported algorithms to
|
||||
do this with are: RSA, DSA, DH, MD2, MD5, RIPEMD,
|
||||
do this with are: RSA, DSA, DH, MD2, MD4, MD5, RIPEMD,
|
||||
SHA, DES, MDC2, CR2, RC4, RC5, IDEA, BF, CAST, HMAC,
|
||||
SSL2. So, for example, having the logical name
|
||||
OPENSSL_NO_RSA with the value YES means that the
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.6-beta1 [engine] 11 Sep 2000
|
||||
OpenSSL 0.9.6-beta2 [engine] 17 Sep 2000
|
||||
|
||||
Copyright (c) 1998-2000 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
33
STATUS
33
STATUS
@@ -1,11 +1,42 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2000/09/11 13:28:30 $
|
||||
______________ $Date: 2000/09/17 15:56:27 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.6: Under development (in release cycle)...
|
||||
Proposed release date September 24, 2000
|
||||
0.9.6-beta1 is available:
|
||||
OpenBSD-x86 2.7 - failed
|
||||
ftime not supported [FIXED]
|
||||
hpux-parisc-cc 10.20 - passed
|
||||
hpux-parisc-gcc 10.20 - passed
|
||||
hpux-parisc-gcc 11.00 - passed
|
||||
hpux-gcc - passed
|
||||
hpux-brokengcc - failed
|
||||
BN_sqr fails in test
|
||||
linux-elf - passed
|
||||
linux-sparcv7 - passed
|
||||
linux-ppc - passed
|
||||
Solaris [engine] - failed
|
||||
speed cswift gives odd errors [FIXED]
|
||||
solaris-sparcv8-gcc - passed
|
||||
solaris-sparcv9-gcc - passed
|
||||
solaris-sparcv9-cc - passed
|
||||
solaris64-sparcv9-cc - passed
|
||||
sco5-gcc - passed
|
||||
sco5-cc - passed
|
||||
FreeBSD - passed
|
||||
Win32 VC++ - failed
|
||||
PCURSORINFO not defined unless Win2000 [FIXED]
|
||||
RAND_poll() problem on Win2000 [FIXED]
|
||||
DSO method always DSO_METHOD_null [FIXED]
|
||||
CygWin32 - test failed
|
||||
MingW32 - failed
|
||||
thelp32.h
|
||||
aix-gcc (AIX 4.3.2) - passed
|
||||
VMS/Alpha - failed
|
||||
Some things were missing [FIXED]
|
||||
o OpenSSL 0.9.5a: Released on April 1st, 2000
|
||||
o OpenSSL 0.9.5: Released on February 28th, 2000
|
||||
o OpenSSL 0.9.4: Released on August 09th, 1999
|
||||
|
||||
102
TABLE
102
TABLE
@@ -36,7 +36,7 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
@@ -76,7 +76,7 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
@@ -156,7 +156,7 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
@@ -396,7 +396,7 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
@@ -476,7 +476,7 @@ $cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$dso_scheme = win32
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
@@ -805,7 +805,7 @@ $cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -lefence
|
||||
$lflags = -lefence -ldl
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
@@ -825,7 +825,7 @@ $cc = gcc
|
||||
$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags =
|
||||
$lflags = -ldl
|
||||
$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
|
||||
$bn_obj = asm/bn86-elf.o asm/co86-elf.o
|
||||
$des_obj = asm/dx86-elf.o asm/yx86-elf.o
|
||||
@@ -1162,11 +1162,11 @@ $shared_cflag =
|
||||
|
||||
*** hpux-parisc-cc
|
||||
$cc = cc
|
||||
$cflags = -Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
|
||||
$cflags = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$lflags = -ldld
|
||||
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -ldl
|
||||
$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
@@ -1220,6 +1220,46 @@ $dso_scheme = dl
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
*** hpux-parisc1_1-cc
|
||||
$cc = cc
|
||||
$cflags = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -ldl
|
||||
$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
*** hpux-parisc2-cc
|
||||
$cc = cc
|
||||
$cflags = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/pa-risc2.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
*** hpux10-brokencc
|
||||
$cc = cc
|
||||
$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
|
||||
@@ -1320,6 +1360,26 @@ $dso_scheme = dl
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
*** hpux64-parisc2-cc
|
||||
$cc = cc
|
||||
$cflags = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$lflags = -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
|
||||
$bn_obj = asm/pa-risc2W.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dl
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
*** irix-cc
|
||||
$cc = cc
|
||||
$cflags = -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
|
||||
@@ -1740,6 +1800,26 @@ $dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
*** newsos4-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O -DB_ENDIAN -DNEWS4
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$lflags = -lmld -liberty
|
||||
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme =
|
||||
$shared_target=
|
||||
$shared_cflag =
|
||||
|
||||
*** nextstep
|
||||
$cc = cc
|
||||
$cflags = -O -Wall
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
# default openssl.cnf file has setup as per the following
|
||||
# demoCA ... where everything is stored
|
||||
|
||||
$SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"};
|
||||
$DAYS="-days 365";
|
||||
$REQ="openssl req $SSLEAY_CONFIG";
|
||||
$CA="openssl ca $SSLEAY_CONFIG";
|
||||
|
||||
@@ -146,8 +146,9 @@ progs.h: progs.pl
|
||||
app_rand.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
app_rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
app_rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
app_rand.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
app_rand.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
app_rand.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
app_rand.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
app_rand.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
app_rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
app_rand.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
app_rand.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
@@ -164,8 +165,9 @@ app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
apps.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
apps.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
apps.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
apps.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
apps.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
apps.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
apps.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
apps.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
apps.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
apps.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
@@ -184,8 +186,9 @@ apps.o: ../include/openssl/x509_vfy.h apps.h
|
||||
asn1pars.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
asn1pars.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
asn1pars.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
asn1pars.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
asn1pars.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
asn1pars.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
asn1pars.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
asn1pars.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
asn1pars.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
asn1pars.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
@@ -225,9 +228,10 @@ ca.o: ../include/openssl/x509v3.h apps.h
|
||||
ciphers.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
ciphers.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
ciphers.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
ciphers.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
ciphers.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
ciphers.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
ciphers.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
ciphers.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
ciphers.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
ciphers.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
ciphers.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
ciphers.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
@@ -268,8 +272,9 @@ crl.o: ../include/openssl/x509v3.h apps.h
|
||||
crl2p7.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
crl2p7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
crl2p7.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
crl2p7.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
crl2p7.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
crl2p7.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
crl2p7.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
crl2p7.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
crl2p7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
crl2p7.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
@@ -287,8 +292,9 @@ crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
dgst.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dgst.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
dgst.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
dgst.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
dgst.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
dgst.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
dgst.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
dgst.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
dgst.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
dgst.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
dgst.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -307,28 +313,30 @@ dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
dh.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
dh.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
dh.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
dh.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
dh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
dh.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
dh.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
dh.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
dh.o: ../include/openssl/md4.h ../include/openssl/md5.h
|
||||
dh.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
|
||||
dh.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
|
||||
dh.o: ../include/openssl/opensslv.h ../include/openssl/pem.h
|
||||
dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
|
||||
dh.o: ../include/openssl/rand.h ../include/openssl/rc2.h
|
||||
dh.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
|
||||
dh.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
|
||||
dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h
|
||||
dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
|
||||
dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
dh.o: ../include/openssl/des.h ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
dh.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
dh.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
||||
dh.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
dh.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
dh.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||
dh.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
|
||||
dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
|
||||
dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
|
||||
dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h
|
||||
dh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
|
||||
dh.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
|
||||
dh.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
|
||||
dh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
|
||||
dh.o: ../include/openssl/sha.h ../include/openssl/stack.h
|
||||
dh.o: ../include/openssl/symhacks.h ../include/openssl/x509.h
|
||||
dh.o: ../include/openssl/x509_vfy.h apps.h
|
||||
dsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
dsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
dsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
dsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
dsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
dsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
dsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
dsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -347,8 +355,9 @@ dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
dsaparam.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
dsaparam.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
dsaparam.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
dsaparam.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
dsaparam.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
dsaparam.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
dsaparam.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
dsaparam.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -367,8 +376,9 @@ dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
enc.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
enc.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
enc.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
enc.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
enc.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
enc.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
enc.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
enc.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
enc.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
enc.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -387,9 +397,10 @@ enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
errstr.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
errstr.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
errstr.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
errstr.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
errstr.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
errstr.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
errstr.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
errstr.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
errstr.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
errstr.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
errstr.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
errstr.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
@@ -409,8 +420,9 @@ errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
gendh.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
gendh.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
gendh.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
gendh.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
gendh.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
gendh.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
gendh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
gendh.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
gendh.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -429,8 +441,9 @@ gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
gendsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
gendsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
gendsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
gendsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
gendsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
gendsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
gendsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
gendsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -449,8 +462,9 @@ gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
genrsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
genrsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
genrsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
genrsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
genrsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
genrsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
genrsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
genrsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -469,8 +483,9 @@ genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
nseq.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
nseq.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
nseq.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
nseq.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
nseq.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
nseq.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
nseq.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
nseq.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
nseq.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
nseq.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
nseq.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
@@ -512,8 +527,9 @@ openssl.o: progs.h s_apps.h
|
||||
passwd.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
passwd.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
passwd.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
passwd.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
passwd.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
passwd.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
passwd.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
passwd.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
passwd.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
passwd.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
@@ -531,8 +547,9 @@ passwd.o: ../include/openssl/x509_vfy.h apps.h
|
||||
pkcs12.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
pkcs12.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
pkcs12.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
pkcs12.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
pkcs12.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
pkcs12.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
pkcs12.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
pkcs12.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
pkcs12.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
pkcs12.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
pkcs12.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -552,8 +569,9 @@ pkcs12.o: ../include/openssl/x509_vfy.h apps.h
|
||||
pkcs7.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
pkcs7.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
pkcs7.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
pkcs7.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
pkcs7.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
pkcs7.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
pkcs7.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
pkcs7.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
pkcs7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
pkcs7.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
pkcs7.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -572,8 +590,9 @@ pkcs7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
pkcs8.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
pkcs8.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
pkcs8.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
pkcs8.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
pkcs8.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
pkcs8.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
pkcs8.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
pkcs8.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
pkcs8.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
pkcs8.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
pkcs8.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -593,8 +612,9 @@ pkcs8.o: ../include/openssl/x509_vfy.h apps.h
|
||||
rand.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
rand.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
rand.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
rand.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
rand.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
rand.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
rand.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
rand.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
rand.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
rand.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -634,8 +654,9 @@ req.o: ../include/openssl/x509v3.h apps.h
|
||||
rsa.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
rsa.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
rsa.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
rsa.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
rsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
rsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
rsa.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
rsa.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
rsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
rsa.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
rsa.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -654,8 +675,9 @@ rsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
rsautl.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
rsautl.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
rsautl.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
rsautl.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
rsautl.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
rsautl.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
rsautl.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
rsautl.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
rsautl.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
rsautl.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
rsautl.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -674,9 +696,10 @@ rsautl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
s_cb.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_cb.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
s_cb.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
s_cb.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s_cb.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
s_cb.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
s_cb.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_cb.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
s_cb.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s_cb.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
s_cb.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
s_cb.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
s_cb.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
@@ -696,9 +719,10 @@ s_cb.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h s_apps.h
|
||||
s_client.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_client.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
s_client.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
s_client.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s_client.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
s_client.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
s_client.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_client.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
s_client.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s_client.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
s_client.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
||||
s_client.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s_client.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
@@ -720,9 +744,10 @@ s_client.o: s_apps.h
|
||||
s_server.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_server.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
s_server.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
s_server.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s_server.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
s_server.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
s_server.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_server.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
s_server.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s_server.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
s_server.o: ../include/openssl/e_os2.h ../include/openssl/engine.h
|
||||
s_server.o: ../include/openssl/err.h ../include/openssl/evp.h
|
||||
s_server.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
@@ -744,9 +769,10 @@ s_server.o: s_apps.h
|
||||
s_socket.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_socket.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
s_socket.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
s_socket.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s_socket.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
s_socket.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
s_socket.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_socket.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
s_socket.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s_socket.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
s_socket.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
|
||||
s_socket.o: ../include/openssl/idea.h ../include/openssl/lhash.h
|
||||
s_socket.o: ../include/openssl/md2.h ../include/openssl/md4.h
|
||||
@@ -766,9 +792,10 @@ s_socket.o: ../include/openssl/x509_vfy.h apps.h s_apps.h
|
||||
s_time.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
s_time.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
s_time.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
s_time.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
s_time.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
s_time.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
s_time.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
s_time.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
s_time.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
s_time.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
s_time.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
s_time.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
s_time.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
@@ -789,9 +816,10 @@ s_time.o: s_apps.h
|
||||
sess_id.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
sess_id.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
sess_id.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
sess_id.o: ../include/openssl/comp.h ../include/openssl/crypto.h
|
||||
sess_id.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
sess_id.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
sess_id.o: ../include/openssl/comp.h ../include/openssl/conf.h
|
||||
sess_id.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
sess_id.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
sess_id.o: ../include/openssl/e_os.h ../include/openssl/e_os.h
|
||||
sess_id.o: ../include/openssl/e_os2.h ../include/openssl/err.h
|
||||
sess_id.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
sess_id.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
@@ -811,8 +839,9 @@ sess_id.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
smime.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
smime.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
smime.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
smime.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
smime.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
smime.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
smime.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
smime.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
smime.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
smime.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
smime.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
@@ -831,8 +860,9 @@ smime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
|
||||
speed.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
speed.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
speed.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
speed.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
speed.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
speed.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
speed.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
speed.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
speed.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
speed.o: ../include/openssl/engine.h ../include/openssl/err.h
|
||||
speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h
|
||||
@@ -894,8 +924,9 @@ verify.o: ../include/openssl/x509v3.h apps.h
|
||||
version.o: ../include/openssl/asn1.h ../include/openssl/bio.h
|
||||
version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
|
||||
version.o: ../include/openssl/buffer.h ../include/openssl/cast.h
|
||||
version.o: ../include/openssl/crypto.h ../include/openssl/des.h
|
||||
version.o: ../include/openssl/dh.h ../include/openssl/dsa.h
|
||||
version.o: ../include/openssl/conf.h ../include/openssl/crypto.h
|
||||
version.o: ../include/openssl/des.h ../include/openssl/dh.h
|
||||
version.o: ../include/openssl/dsa.h ../include/openssl/e_os.h
|
||||
version.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
|
||||
version.o: ../include/openssl/evp.h ../include/openssl/idea.h
|
||||
version.o: ../include/openssl/lhash.h ../include/openssl/md2.h
|
||||
|
||||
@@ -662,7 +662,7 @@ STACK_OF(X509) *load_certs(BIO *err, char *file, int format)
|
||||
|
||||
if (format == FORMAT_PEM)
|
||||
{
|
||||
othercerts = sk_X509_new(NULL);
|
||||
othercerts = sk_X509_new_null();
|
||||
if(!othercerts)
|
||||
{
|
||||
sk_X509_free(othercerts);
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/conf.h>
|
||||
|
||||
int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
|
||||
int app_RAND_write_file(const char *file, BIO *bio_e);
|
||||
@@ -99,7 +100,6 @@ extern BIO *bio_err;
|
||||
#else
|
||||
|
||||
#define MAIN(a,v) PROG(a,v)
|
||||
#include <openssl/conf.h>
|
||||
extern LHASH *config;
|
||||
extern char *default_config_file;
|
||||
extern BIO *bio_err;
|
||||
|
||||
@@ -141,7 +141,7 @@ int MAIN(int argc, char **argv)
|
||||
else if (strcmp(*argv,"-certfile") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
if(!certflst) certflst = sk_new(NULL);
|
||||
if(!certflst) certflst = sk_new_null();
|
||||
sk_push(certflst,*(++argv));
|
||||
}
|
||||
else
|
||||
@@ -215,7 +215,7 @@ bad:
|
||||
p7s->contents->type=OBJ_nid2obj(NID_pkcs7_data);
|
||||
|
||||
if (!ASN1_INTEGER_set(p7s->version,1)) goto end;
|
||||
if ((crl_stack=sk_X509_CRL_new(NULL)) == NULL) goto end;
|
||||
if ((crl_stack=sk_X509_CRL_new_null()) == NULL) goto end;
|
||||
p7s->crl=crl_stack;
|
||||
if (crl != NULL)
|
||||
{
|
||||
@@ -223,7 +223,7 @@ bad:
|
||||
crl=NULL; /* now part of p7 for OPENSSL_freeing */
|
||||
}
|
||||
|
||||
if ((cert_stack=sk_X509_new(NULL)) == NULL) goto end;
|
||||
if ((cert_stack=sk_X509_new_null()) == NULL) goto end;
|
||||
p7s->cert=cert_stack;
|
||||
|
||||
if(certflst) for(i = 0; i < sk_num(certflst); i++) {
|
||||
|
||||
@@ -307,7 +307,7 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
siglen = BIO_read(sigbio, sigbuf, siglen);
|
||||
BIO_free(sigbio);
|
||||
if(siglen <= 0) {
|
||||
if(siglen == 0) {
|
||||
BIO_printf(bio_err, "Error reading signature file %s\n",
|
||||
sigfile);
|
||||
ERR_print_errors(bio_err);
|
||||
|
||||
@@ -123,7 +123,7 @@ int MAIN(int argc, char **argv)
|
||||
|
||||
if (toseq) {
|
||||
seq = NETSCAPE_CERT_SEQUENCE_new();
|
||||
seq->certs = sk_X509_new(NULL);
|
||||
seq->certs = sk_X509_new_null();
|
||||
while((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL)))
|
||||
sk_X509_push(seq->certs,x509);
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ int MAIN(int argc, char **argv)
|
||||
} else if (!strcmp (*args, "-caname")) {
|
||||
if (args[1]) {
|
||||
args++;
|
||||
if (!canames) canames = sk_new(NULL);
|
||||
if (!canames) canames = sk_new_null();
|
||||
sk_push(canames, *args);
|
||||
} else badarg = 1;
|
||||
} else if (!strcmp (*args, "-in")) {
|
||||
@@ -427,7 +427,7 @@ int MAIN(int argc, char **argv)
|
||||
CRYPTO_push_info("reading certs from input");
|
||||
#endif
|
||||
|
||||
certs = sk_X509_new(NULL);
|
||||
certs = sk_X509_new_null();
|
||||
|
||||
/* Load in all certs in input file */
|
||||
if(!cert_load(in, certs)) {
|
||||
@@ -459,7 +459,7 @@ int MAIN(int argc, char **argv)
|
||||
CRYPTO_push_info("reading certs from certfile");
|
||||
#endif
|
||||
|
||||
bags = sk_PKCS12_SAFEBAG_new (NULL);
|
||||
bags = sk_PKCS12_SAFEBAG_new_null ();
|
||||
|
||||
/* Add any more certificates asked for */
|
||||
if (certsin) {
|
||||
@@ -550,7 +550,7 @@ int MAIN(int argc, char **argv)
|
||||
goto export_end;
|
||||
}
|
||||
|
||||
safes = sk_PKCS7_new (NULL);
|
||||
safes = sk_PKCS7_new_null ();
|
||||
sk_PKCS7_push (safes, authsafe);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
@@ -566,7 +566,7 @@ int MAIN(int argc, char **argv)
|
||||
p8 = NULL;
|
||||
if (name) PKCS12_add_friendlyname (bag, name, -1);
|
||||
PKCS12_add_localkeyid (bag, keyid, keyidlen);
|
||||
bags = sk_PKCS12_SAFEBAG_new(NULL);
|
||||
bags = sk_PKCS12_SAFEBAG_new_null();
|
||||
sk_PKCS12_SAFEBAG_push (bags, bag);
|
||||
|
||||
#ifdef CRYPTO_MDEBUG
|
||||
|
||||
95
apps/speed.c
95
apps/speed.c
@@ -88,7 +88,7 @@
|
||||
#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
|
||||
# define TIMES
|
||||
#endif
|
||||
#if !defined(_UNICOS)
|
||||
#if !defined(_UNICOS) && !defined(__OpenBSD__)
|
||||
# define TIMEB
|
||||
#endif
|
||||
|
||||
@@ -320,7 +320,7 @@ int MAIN(int argc, char **argv)
|
||||
#define DSA_NUM 3
|
||||
long count,rsa_count;
|
||||
int i,j,k;
|
||||
unsigned rsa_num,rsa_num2;
|
||||
unsigned rsa_num;
|
||||
#ifndef NO_MD2
|
||||
unsigned char md2[MD2_DIGEST_LENGTH];
|
||||
#endif
|
||||
@@ -1167,49 +1167,73 @@ int MAIN(int argc, char **argv)
|
||||
int ret;
|
||||
if (!rsa_doit[j]) continue;
|
||||
ret=RSA_sign(NID_md5_sha1, buf,36, buf2, &rsa_num, rsa_key[j]);
|
||||
pkey_print_message("private","rsa",rsa_c[j][0],rsa_bits[j],
|
||||
if (ret == 0)
|
||||
{
|
||||
BIO_printf(bio_err,"RSA sign failure. No RSA sign will be done.\n");
|
||||
ERR_print_errors(bio_err);
|
||||
rsa_count=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pkey_print_message("private","rsa",
|
||||
rsa_c[j][0],rsa_bits[j],
|
||||
RSA_SECONDS);
|
||||
/* RSA_blinding_on(rsa_key[j],NULL); */
|
||||
Time_F(START,usertime);
|
||||
for (count=0,run=1; COND(rsa_c[j][0]); count++)
|
||||
{
|
||||
ret=RSA_sign(NID_md5_sha1, buf,36, buf2, &rsa_num,
|
||||
rsa_key[j]);
|
||||
if (ret <= 0)
|
||||
ret=RSA_sign(NID_md5_sha1, buf,36, buf2,
|
||||
&rsa_num, rsa_key[j]);
|
||||
if (ret == 0)
|
||||
{
|
||||
BIO_printf(bio_err,"RSA private encrypt failure\n");
|
||||
BIO_printf(bio_err,
|
||||
"RSA sign failure\n");
|
||||
ERR_print_errors(bio_err);
|
||||
count=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
d=Time_F(STOP,usertime);
|
||||
BIO_printf(bio_err,"%ld %d bit private RSA's in %.2fs\n",
|
||||
BIO_printf(bio_err,
|
||||
"%ld %d bit private RSA's in %.2fs\n",
|
||||
count,rsa_bits[j],d);
|
||||
rsa_results[j][0]=d/(double)count;
|
||||
rsa_count=count;
|
||||
}
|
||||
|
||||
#if 1
|
||||
ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]);
|
||||
pkey_print_message("public","rsa",rsa_c[j][1],rsa_bits[j],
|
||||
if (ret <= 0)
|
||||
{
|
||||
BIO_printf(bio_err,"RSA verify failure. No RSA verify will be done.\n");
|
||||
ERR_print_errors(bio_err);
|
||||
dsa_doit[j] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pkey_print_message("public","rsa",
|
||||
rsa_c[j][1],rsa_bits[j],
|
||||
RSA_SECONDS);
|
||||
Time_F(START,usertime);
|
||||
for (count=0,run=1; COND(rsa_c[j][1]); count++)
|
||||
{
|
||||
ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num,
|
||||
rsa_key[j]);
|
||||
if (ret <= 0)
|
||||
ret=RSA_verify(NID_md5_sha1, buf,36, buf2,
|
||||
rsa_num, rsa_key[j]);
|
||||
if (ret == 0)
|
||||
{
|
||||
BIO_printf(bio_err,"RSA verify failure\n");
|
||||
BIO_printf(bio_err,
|
||||
"RSA verify failure\n");
|
||||
ERR_print_errors(bio_err);
|
||||
count=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
d=Time_F(STOP,usertime);
|
||||
BIO_printf(bio_err,"%ld %d bit public RSA's in %.2fs\n",
|
||||
BIO_printf(bio_err,
|
||||
"%ld %d bit public RSA's in %.2fs\n",
|
||||
count,rsa_bits[j],d);
|
||||
rsa_results[j][1]=d/(double)count;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (rsa_count <= 1)
|
||||
@@ -1231,22 +1255,33 @@ int MAIN(int argc, char **argv)
|
||||
for (j=0; j<DSA_NUM; j++)
|
||||
{
|
||||
unsigned int kk;
|
||||
int ret;
|
||||
|
||||
if (!dsa_doit[j]) continue;
|
||||
DSA_generate_key(dsa_key[j]);
|
||||
/* DSA_sign_setup(dsa_key[j],NULL); */
|
||||
rsa_num=DSA_sign(EVP_PKEY_DSA,buf,20,buf2,
|
||||
ret=DSA_sign(EVP_PKEY_DSA,buf,20,buf2,
|
||||
&kk,dsa_key[j]);
|
||||
pkey_print_message("sign","dsa",dsa_c[j][0],dsa_bits[j],
|
||||
if (ret == 0)
|
||||
{
|
||||
BIO_printf(bio_err,"DSA sign failure. No DSA sign will be done.\n");
|
||||
ERR_print_errors(bio_err);
|
||||
rsa_count=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pkey_print_message("sign","dsa",
|
||||
dsa_c[j][0],dsa_bits[j],
|
||||
DSA_SECONDS);
|
||||
Time_F(START,usertime);
|
||||
for (count=0,run=1; COND(dsa_c[j][0]); count++)
|
||||
{
|
||||
rsa_num=DSA_sign(EVP_PKEY_DSA,buf,20,buf2,
|
||||
ret=DSA_sign(EVP_PKEY_DSA,buf,20,buf2,
|
||||
&kk,dsa_key[j]);
|
||||
if (rsa_num == 0)
|
||||
if (ret == 0)
|
||||
{
|
||||
BIO_printf(bio_err,"DSA sign failure\n");
|
||||
BIO_printf(bio_err,
|
||||
"DSA sign failure\n");
|
||||
ERR_print_errors(bio_err);
|
||||
count=1;
|
||||
break;
|
||||
@@ -1257,19 +1292,30 @@ int MAIN(int argc, char **argv)
|
||||
count,dsa_bits[j],d);
|
||||
dsa_results[j][0]=d/(double)count;
|
||||
rsa_count=count;
|
||||
}
|
||||
|
||||
rsa_num2=DSA_verify(EVP_PKEY_DSA,buf,20,buf2,
|
||||
ret=DSA_verify(EVP_PKEY_DSA,buf,20,buf2,
|
||||
kk,dsa_key[j]);
|
||||
pkey_print_message("verify","dsa",dsa_c[j][1],dsa_bits[j],
|
||||
if (ret <= 0)
|
||||
{
|
||||
BIO_printf(bio_err,"DSA verify failure. No DSA verify will be done.\n");
|
||||
ERR_print_errors(bio_err);
|
||||
dsa_doit[j] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pkey_print_message("verify","dsa",
|
||||
dsa_c[j][1],dsa_bits[j],
|
||||
DSA_SECONDS);
|
||||
Time_F(START,usertime);
|
||||
for (count=0,run=1; COND(dsa_c[j][1]); count++)
|
||||
{
|
||||
rsa_num2=DSA_verify(EVP_PKEY_DSA,buf,20,buf2,
|
||||
ret=DSA_verify(EVP_PKEY_DSA,buf,20,buf2,
|
||||
kk,dsa_key[j]);
|
||||
if (rsa_num2 == 0)
|
||||
if (ret <= 0)
|
||||
{
|
||||
BIO_printf(bio_err,"DSA verify failure\n");
|
||||
BIO_printf(bio_err,
|
||||
"DSA verify failure\n");
|
||||
ERR_print_errors(bio_err);
|
||||
count=1;
|
||||
break;
|
||||
@@ -1279,6 +1325,7 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err,"%ld %d bit DSA verify in %.2fs\n",
|
||||
count,dsa_bits[j],d);
|
||||
dsa_results[j][1]=d/(double)count;
|
||||
}
|
||||
|
||||
if (rsa_count <= 1)
|
||||
{
|
||||
|
||||
5
config
5
config
@@ -247,6 +247,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
|
||||
;;
|
||||
|
||||
NEWS-OS:4.*)
|
||||
echo "mips-sony-newsos4"; exit 0;
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
#
|
||||
@@ -470,6 +474,7 @@ case "$GUESSOS" in
|
||||
# these are all covered by the catchall below
|
||||
# *-aix) OUT="aix-$CC" ;;
|
||||
# *-dgux) OUT="dgux" ;;
|
||||
mips-sony-newsos4) OUT="newsos4-gcc" ;;
|
||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
|
||||
STACK *ret=NULL;
|
||||
|
||||
if ((a == NULL) || ((*a) == NULL))
|
||||
{ if ((ret=sk_new(NULL)) == NULL) goto err; }
|
||||
{ if ((ret=sk_new_null()) == NULL) goto err; }
|
||||
else
|
||||
ret=(*a);
|
||||
|
||||
|
||||
@@ -474,6 +474,7 @@ size_t BIO_ctrl_wpending(BIO *b);
|
||||
#define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
|
||||
#define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
|
||||
#define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
|
||||
#define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
||||
/* macros with inappropriate type -- but ...pending macros use int too: */
|
||||
#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
|
||||
#define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
|
||||
|
||||
@@ -15,9 +15,9 @@ On the 2 alpha C compilers I had access to, it was not possible to do
|
||||
were 64 bits). So the hand assember gives access to the 128 bit result and
|
||||
a 2 times speedup :-).
|
||||
|
||||
There are 2 versions of assember for the HP PA-RISC.
|
||||
pa-risc.s is the origional one which works fine.
|
||||
pa-risc2.s is a new version that often generates warnings but if the
|
||||
tests pass, it gives performance that is over 2 times faster than
|
||||
pa-risc.s.
|
||||
Both were generated using gcc :-)
|
||||
There are 3 versions of assember for the HP PA-RISC.
|
||||
|
||||
pa-risc.s is the origional one which works fine and generated using gcc :-)
|
||||
|
||||
pa-risc2W.s and pa-risc2.s are 64 and 32-bit PA-RISC 2.0 implementations
|
||||
by Chris Ruemmler from HP (with some help from the HP C compiler).
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
416
crypto/bn/asm/pa-risc2.s.old
Normal file
416
crypto/bn/asm/pa-risc2.s.old
Normal file
@@ -0,0 +1,416 @@
|
||||
.SPACE $PRIVATE$
|
||||
.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
|
||||
.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
|
||||
.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
|
||||
.IMPORT $global$,DATA
|
||||
.IMPORT $$dyncall,MILLICODE
|
||||
; gcc_compiled.:
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
|
||||
.align 4
|
||||
.EXPORT bn_mul_add_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
|
||||
bn_mul_add_words
|
||||
.PROC
|
||||
.CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=4
|
||||
.ENTRY
|
||||
stw %r2,-20(0,%r30)
|
||||
stwm %r4,64(0,%r30)
|
||||
copy %r24,%r31
|
||||
stw %r3,-60(0,%r30)
|
||||
ldi 0,%r20
|
||||
ldo 12(%r26),%r2
|
||||
stw %r23,-16(0,%r30)
|
||||
copy %r25,%r3
|
||||
ldo 12(%r3),%r1
|
||||
fldws -16(0,%r30),%fr8L
|
||||
L$0010
|
||||
copy %r20,%r25
|
||||
ldi 0,%r24
|
||||
fldws 0(0,%r3),%fr9L
|
||||
ldw 0(0,%r26),%r19
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r19,%r23
|
||||
ldw -16(0,%r30),%r28
|
||||
ldw -12(0,%r30),%r29
|
||||
ldi 0,%r22
|
||||
add %r23,%r29,%r29
|
||||
addc %r22,%r28,%r28
|
||||
add %r25,%r29,%r29
|
||||
addc %r24,%r28,%r28
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
copy %r21,%r20
|
||||
addib,= -1,%r31,L$0011
|
||||
stw %r29,0(0,%r26)
|
||||
copy %r20,%r25
|
||||
ldi 0,%r24
|
||||
fldws -8(0,%r1),%fr9L
|
||||
ldw -8(0,%r2),%r19
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r19,%r23
|
||||
ldw -16(0,%r30),%r28
|
||||
ldw -12(0,%r30),%r29
|
||||
ldi 0,%r22
|
||||
add %r23,%r29,%r29
|
||||
addc %r22,%r28,%r28
|
||||
add %r25,%r29,%r29
|
||||
addc %r24,%r28,%r28
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
copy %r21,%r20
|
||||
addib,= -1,%r31,L$0011
|
||||
stw %r29,-8(0,%r2)
|
||||
copy %r20,%r25
|
||||
ldi 0,%r24
|
||||
fldws -4(0,%r1),%fr9L
|
||||
ldw -4(0,%r2),%r19
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r19,%r23
|
||||
ldw -16(0,%r30),%r28
|
||||
ldw -12(0,%r30),%r29
|
||||
ldi 0,%r22
|
||||
add %r23,%r29,%r29
|
||||
addc %r22,%r28,%r28
|
||||
add %r25,%r29,%r29
|
||||
addc %r24,%r28,%r28
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
copy %r21,%r20
|
||||
addib,= -1,%r31,L$0011
|
||||
stw %r29,-4(0,%r2)
|
||||
copy %r20,%r25
|
||||
ldi 0,%r24
|
||||
fldws 0(0,%r1),%fr9L
|
||||
ldw 0(0,%r2),%r19
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r19,%r23
|
||||
ldw -16(0,%r30),%r28
|
||||
ldw -12(0,%r30),%r29
|
||||
ldi 0,%r22
|
||||
add %r23,%r29,%r29
|
||||
addc %r22,%r28,%r28
|
||||
add %r25,%r29,%r29
|
||||
addc %r24,%r28,%r28
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
copy %r21,%r20
|
||||
addib,= -1,%r31,L$0011
|
||||
stw %r29,0(0,%r2)
|
||||
ldo 16(%r1),%r1
|
||||
ldo 16(%r3),%r3
|
||||
ldo 16(%r2),%r2
|
||||
bl L$0010,0
|
||||
ldo 16(%r26),%r26
|
||||
L$0011
|
||||
copy %r20,%r28
|
||||
ldw -84(0,%r30),%r2
|
||||
ldw -60(0,%r30),%r3
|
||||
bv 0(%r2)
|
||||
ldwm -64(0,%r30),%r4
|
||||
.EXIT
|
||||
.PROCEND
|
||||
.align 4
|
||||
.EXPORT bn_mul_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR
|
||||
bn_mul_words
|
||||
.PROC
|
||||
.CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3
|
||||
.ENTRY
|
||||
stw %r2,-20(0,%r30)
|
||||
copy %r25,%r2
|
||||
stwm %r4,64(0,%r30)
|
||||
copy %r24,%r19
|
||||
ldi 0,%r28
|
||||
stw %r23,-16(0,%r30)
|
||||
ldo 12(%r26),%r31
|
||||
ldo 12(%r2),%r29
|
||||
fldws -16(0,%r30),%fr8L
|
||||
L$0026
|
||||
fldws 0(0,%r2),%fr9L
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
ldw -16(0,%r30),%r24
|
||||
ldw -12(0,%r30),%r25
|
||||
add %r21,%r25,%r25
|
||||
addc %r20,%r24,%r24
|
||||
copy %r24,%r23
|
||||
ldi 0,%r22
|
||||
copy %r23,%r28
|
||||
addib,= -1,%r19,L$0027
|
||||
stw %r25,0(0,%r26)
|
||||
fldws -8(0,%r29),%fr9L
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
ldw -16(0,%r30),%r24
|
||||
ldw -12(0,%r30),%r25
|
||||
add %r21,%r25,%r25
|
||||
addc %r20,%r24,%r24
|
||||
copy %r24,%r23
|
||||
ldi 0,%r22
|
||||
copy %r23,%r28
|
||||
addib,= -1,%r19,L$0027
|
||||
stw %r25,-8(0,%r31)
|
||||
fldws -4(0,%r29),%fr9L
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
ldw -16(0,%r30),%r24
|
||||
ldw -12(0,%r30),%r25
|
||||
add %r21,%r25,%r25
|
||||
addc %r20,%r24,%r24
|
||||
copy %r24,%r23
|
||||
ldi 0,%r22
|
||||
copy %r23,%r28
|
||||
addib,= -1,%r19,L$0027
|
||||
stw %r25,-4(0,%r31)
|
||||
fldws 0(0,%r29),%fr9L
|
||||
xmpyu %fr8L,%fr9L,%fr9
|
||||
fstds %fr9,-16(0,%r30)
|
||||
copy %r28,%r21
|
||||
ldi 0,%r20
|
||||
ldw -16(0,%r30),%r24
|
||||
ldw -12(0,%r30),%r25
|
||||
add %r21,%r25,%r25
|
||||
addc %r20,%r24,%r24
|
||||
copy %r24,%r23
|
||||
ldi 0,%r22
|
||||
copy %r23,%r28
|
||||
addib,= -1,%r19,L$0027
|
||||
stw %r25,0(0,%r31)
|
||||
ldo 16(%r29),%r29
|
||||
ldo 16(%r2),%r2
|
||||
ldo 16(%r31),%r31
|
||||
bl L$0026,0
|
||||
ldo 16(%r26),%r26
|
||||
L$0027
|
||||
ldw -84(0,%r30),%r2
|
||||
bv 0(%r2)
|
||||
ldwm -64(0,%r30),%r4
|
||||
.EXIT
|
||||
.PROCEND
|
||||
.align 4
|
||||
.EXPORT bn_sqr_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR
|
||||
bn_sqr_words
|
||||
.PROC
|
||||
.CALLINFO FRAME=0,NO_CALLS
|
||||
.ENTRY
|
||||
ldo 28(%r26),%r19
|
||||
ldo 12(%r25),%r28
|
||||
L$0042
|
||||
fldws 0(0,%r25),%fr8L
|
||||
fldws 0(0,%r25),%fr8R
|
||||
xmpyu %fr8L,%fr8R,%fr8
|
||||
fstds %fr8,-16(0,%r30)
|
||||
ldw -16(0,%r30),%r22
|
||||
ldw -12(0,%r30),%r23
|
||||
stw %r23,0(0,%r26)
|
||||
copy %r22,%r21
|
||||
ldi 0,%r20
|
||||
addib,= -1,%r24,L$0049
|
||||
stw %r21,-24(0,%r19)
|
||||
fldws -8(0,%r28),%fr8L
|
||||
fldws -8(0,%r28),%fr8R
|
||||
xmpyu %fr8L,%fr8R,%fr8
|
||||
fstds %fr8,-16(0,%r30)
|
||||
ldw -16(0,%r30),%r22
|
||||
ldw -12(0,%r30),%r23
|
||||
stw %r23,-20(0,%r19)
|
||||
copy %r22,%r21
|
||||
ldi 0,%r20
|
||||
addib,= -1,%r24,L$0049
|
||||
stw %r21,-16(0,%r19)
|
||||
fldws -4(0,%r28),%fr8L
|
||||
fldws -4(0,%r28),%fr8R
|
||||
xmpyu %fr8L,%fr8R,%fr8
|
||||
fstds %fr8,-16(0,%r30)
|
||||
ldw -16(0,%r30),%r22
|
||||
ldw -12(0,%r30),%r23
|
||||
stw %r23,-12(0,%r19)
|
||||
copy %r22,%r21
|
||||
ldi 0,%r20
|
||||
addib,= -1,%r24,L$0049
|
||||
stw %r21,-8(0,%r19)
|
||||
fldws 0(0,%r28),%fr8L
|
||||
fldws 0(0,%r28),%fr8R
|
||||
xmpyu %fr8L,%fr8R,%fr8
|
||||
fstds %fr8,-16(0,%r30)
|
||||
ldw -16(0,%r30),%r22
|
||||
ldw -12(0,%r30),%r23
|
||||
stw %r23,-4(0,%r19)
|
||||
copy %r22,%r21
|
||||
ldi 0,%r20
|
||||
addib,= -1,%r24,L$0049
|
||||
stw %r21,0(0,%r19)
|
||||
ldo 16(%r28),%r28
|
||||
ldo 16(%r25),%r25
|
||||
ldo 32(%r19),%r19
|
||||
bl L$0042,0
|
||||
ldo 32(%r26),%r26
|
||||
L$0049
|
||||
bv,n 0(%r2)
|
||||
.EXIT
|
||||
.PROCEND
|
||||
.IMPORT BN_num_bits_word,CODE
|
||||
.IMPORT fprintf,CODE
|
||||
.IMPORT __iob,DATA
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $LIT$
|
||||
|
||||
.align 4
|
||||
L$C0000
|
||||
.STRING "Division would overflow (%d)\x0a\x00"
|
||||
.IMPORT abort,CODE
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
|
||||
.align 4
|
||||
.EXPORT bn_div64,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR
|
||||
bn_div64
|
||||
.PROC
|
||||
.CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=8
|
||||
.ENTRY
|
||||
stw %r2,-20(0,%r30)
|
||||
stwm %r8,128(0,%r30)
|
||||
stw %r7,-124(0,%r30)
|
||||
stw %r4,-112(0,%r30)
|
||||
stw %r3,-108(0,%r30)
|
||||
copy %r26,%r3
|
||||
copy %r25,%r4
|
||||
stw %r6,-120(0,%r30)
|
||||
ldi 0,%r7
|
||||
stw %r5,-116(0,%r30)
|
||||
movb,<> %r24,%r5,L$0051
|
||||
ldi 2,%r6
|
||||
bl L$0068,0
|
||||
ldi -1,%r28
|
||||
L$0051
|
||||
.CALL ARGW0=GR
|
||||
bl BN_num_bits_word,%r2
|
||||
copy %r5,%r26
|
||||
copy %r28,%r24
|
||||
ldi 32,%r19
|
||||
comb,= %r19,%r24,L$0052
|
||||
subi 31,%r24,%r19
|
||||
mtsar %r19
|
||||
zvdepi 1,32,%r19
|
||||
comb,>>= %r19,%r3,L$0052
|
||||
addil LR'__iob-$global$+32,%r27
|
||||
ldo RR'__iob-$global$+32(%r1),%r26
|
||||
ldil LR'L$C0000,%r25
|
||||
.CALL ARGW0=GR,ARGW1=GR,ARGW2=GR
|
||||
bl fprintf,%r2
|
||||
ldo RR'L$C0000(%r25),%r25
|
||||
.CALL
|
||||
bl abort,%r2
|
||||
nop
|
||||
L$0052
|
||||
comb,>> %r5,%r3,L$0053
|
||||
subi 32,%r24,%r24
|
||||
sub %r3,%r5,%r3
|
||||
L$0053
|
||||
comib,= 0,%r24,L$0054
|
||||
subi 31,%r24,%r19
|
||||
mtsar %r19
|
||||
zvdep %r5,32,%r5
|
||||
zvdep %r3,32,%r21
|
||||
subi 32,%r24,%r20
|
||||
mtsar %r20
|
||||
vshd 0,%r4,%r20
|
||||
or %r21,%r20,%r3
|
||||
mtsar %r19
|
||||
zvdep %r4,32,%r4
|
||||
L$0054
|
||||
extru %r5,15,16,%r23
|
||||
extru %r5,31,16,%r28
|
||||
L$0055
|
||||
extru %r3,15,16,%r19
|
||||
comb,<> %r23,%r19,L$0058
|
||||
copy %r3,%r26
|
||||
bl L$0059,0
|
||||
zdepi -1,31,16,%r29
|
||||
L$0058
|
||||
.IMPORT $$divU,MILLICODE
|
||||
bl $$divU,%r31
|
||||
copy %r23,%r25
|
||||
L$0059
|
||||
stw %r29,-16(0,%r30)
|
||||
fldws -16(0,%r30),%fr10L
|
||||
stw %r28,-16(0,%r30)
|
||||
fldws -16(0,%r30),%fr10R
|
||||
stw %r23,-16(0,%r30)
|
||||
xmpyu %fr10L,%fr10R,%fr8
|
||||
fldws -16(0,%r30),%fr10R
|
||||
fstws %fr8R,-16(0,%r30)
|
||||
xmpyu %fr10L,%fr10R,%fr9
|
||||
ldw -16(0,%r30),%r8
|
||||
fstws %fr9R,-16(0,%r30)
|
||||
copy %r8,%r22
|
||||
ldw -16(0,%r30),%r8
|
||||
extru %r4,15,16,%r24
|
||||
copy %r8,%r21
|
||||
L$0060
|
||||
sub %r3,%r21,%r20
|
||||
copy %r20,%r19
|
||||
depi 0,31,16,%r19
|
||||
comib,<> 0,%r19,L$0061
|
||||
zdep %r20,15,16,%r19
|
||||
addl %r19,%r24,%r19
|
||||
comb,>>= %r19,%r22,L$0061
|
||||
sub %r22,%r28,%r22
|
||||
sub %r21,%r23,%r21
|
||||
bl L$0060,0
|
||||
ldo -1(%r29),%r29
|
||||
L$0061
|
||||
stw %r29,-16(0,%r30)
|
||||
fldws -16(0,%r30),%fr10L
|
||||
stw %r28,-16(0,%r30)
|
||||
fldws -16(0,%r30),%fr10R
|
||||
xmpyu %fr10L,%fr10R,%fr8
|
||||
fstws %fr8R,-16(0,%r30)
|
||||
ldw -16(0,%r30),%r8
|
||||
stw %r23,-16(0,%r30)
|
||||
fldws -16(0,%r30),%fr10R
|
||||
copy %r8,%r19
|
||||
xmpyu %fr10L,%fr10R,%fr8
|
||||
fstws %fr8R,-16(0,%r30)
|
||||
extru %r19,15,16,%r20
|
||||
ldw -16(0,%r30),%r8
|
||||
zdep %r19,15,16,%r19
|
||||
addl %r8,%r20,%r20
|
||||
comclr,<<= %r19,%r4,0
|
||||
addi 1,%r20,%r20
|
||||
comb,<<= %r20,%r3,L$0066
|
||||
sub %r4,%r19,%r4
|
||||
addl %r3,%r5,%r3
|
||||
ldo -1(%r29),%r29
|
||||
L$0066
|
||||
addib,= -1,%r6,L$0056
|
||||
sub %r3,%r20,%r3
|
||||
zdep %r29,15,16,%r7
|
||||
shd %r3,%r4,16,%r3
|
||||
bl L$0055,0
|
||||
zdep %r4,15,16,%r4
|
||||
L$0056
|
||||
or %r7,%r29,%r28
|
||||
L$0068
|
||||
ldw -148(0,%r30),%r2
|
||||
ldw -124(0,%r30),%r7
|
||||
ldw -120(0,%r30),%r6
|
||||
ldw -116(0,%r30),%r5
|
||||
ldw -112(0,%r30),%r4
|
||||
ldw -108(0,%r30),%r3
|
||||
bv 0(%r2)
|
||||
ldwm -128(0,%r30),%r8
|
||||
.EXIT
|
||||
.PROCEND
|
||||
1605
crypto/bn/asm/pa-risc2W.s
Normal file
1605
crypto/bn/asm/pa-risc2W.s
Normal file
File diff suppressed because it is too large
Load Diff
@@ -190,6 +190,7 @@ int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont,
|
||||
#if 0
|
||||
BN_rshift(ret,r,mont->ri);
|
||||
#else
|
||||
ret->neg = r->neg;
|
||||
x=ri;
|
||||
rp=ret->d;
|
||||
ap= &(r->d[x]);
|
||||
|
||||
@@ -204,7 +204,8 @@ $ 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"
|
||||
$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl"
|
||||
$ LIB_DH = "dh_gen,dh_key,dh_lib,dh_check,dh_err"
|
||||
$ LIB_DSO = "dso_err,dso_lib,dso_null,dso_openssl" ! + ",dso_vms"
|
||||
$ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
|
||||
"dso_openssl,dso_win32,dso_vms"
|
||||
$ LIB_ENGINE = "engine_err,engine_lib,engine_list,engine_openssl,"+ -
|
||||
"hw_atalla,hw_cswift,hw_ncipher"
|
||||
$ LIB_BUFFER = "buffer,buf_err"
|
||||
@@ -1138,7 +1139,7 @@ $ ENDIF
|
||||
$!
|
||||
$! Set Up Initial CC Definitions, Possibly With User Ones
|
||||
$!
|
||||
$ CCDEFS = "VMS=1,TCPIP_TYPE_''P5'"
|
||||
$ CCDEFS = "VMS=1,TCPIP_TYPE_''P5',DSO_VMS"
|
||||
$ IF F$TRNLNM("OPENSSL_NO_ASM") THEN CCDEFS = CCDEFS + ",NO_ASM"
|
||||
$ IF F$TRNLNM("OPENSSL_NO_RSA") THEN CCDEFS = CCDEFS + ",NO_RSA"
|
||||
$ IF F$TRNLNM("OPENSSL_NO_DSA") THEN CCDEFS = CCDEFS + ",NO_DSA"
|
||||
|
||||
@@ -84,7 +84,7 @@ int DSA_generate_key(DSA *dsa)
|
||||
i=BN_num_bits(dsa->q);
|
||||
for (;;)
|
||||
{
|
||||
if (!BN_rand(priv_key,i,1,0))
|
||||
if (!BN_rand(priv_key,i,0,0))
|
||||
goto err;
|
||||
if (BN_cmp(priv_key,dsa->q) >= 0)
|
||||
BN_sub(priv_key,priv_key,dsa->q);
|
||||
|
||||
@@ -182,7 +182,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
|
||||
/* Get random k */
|
||||
for (;;)
|
||||
{
|
||||
if (!BN_rand(&k, BN_num_bits(dsa->q), 1, 0)) goto err;
|
||||
if (!BN_rand(&k, BN_num_bits(dsa->q), 0, 0)) goto err;
|
||||
if (BN_cmp(&k,dsa->q) >= 0)
|
||||
BN_sub(&k,&k,dsa->q);
|
||||
if (!BN_is_zero(&k)) break;
|
||||
|
||||
@@ -23,9 +23,9 @@ APPS=
|
||||
|
||||
LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= dso_dl.c dso_dlfcn.c dso_err.c dso_lib.c dso_null.c \
|
||||
dso_openssl.c dso_win32.c
|
||||
dso_openssl.c dso_win32.c dso_vms.c
|
||||
LIBOBJ= dso_dl.o dso_dlfcn.o dso_err.o dso_lib.o dso_null.o \
|
||||
dso_openssl.o dso_win32.o
|
||||
dso_openssl.o dso_win32.o dso_vms.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -123,6 +123,13 @@ dso_openssl.o: ../../include/openssl/opensslconf.h
|
||||
dso_openssl.o: ../../include/openssl/opensslv.h
|
||||
dso_openssl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dso_openssl.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||
dso_vms.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
dso_vms.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h
|
||||
dso_vms.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
dso_vms.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
|
||||
dso_vms.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
dso_vms.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
|
||||
dso_vms.o: ../../include/openssl/symhacks.h ../cryptlib.h
|
||||
dso_win32.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
|
||||
dso_win32.o: ../../include/openssl/crypto.h ../../include/openssl/dso.h
|
||||
dso_win32.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
|
||||
|
||||
@@ -80,6 +80,12 @@ extern "C" {
|
||||
*/
|
||||
#define DSO_FLAG_NAME_TRANSLATION 0x01
|
||||
|
||||
/* The following flag controls the translation of symbol names to upper
|
||||
* case. This is currently only being implemented for OpenVMS.
|
||||
*/
|
||||
#define DSO_FLAG_UPCASE_SYMBOL 0x02
|
||||
|
||||
|
||||
typedef void (*DSO_FUNC_TYPE)(void);
|
||||
|
||||
typedef struct dso_st DSO;
|
||||
@@ -185,6 +191,9 @@ DSO_METHOD *DSO_METHOD_dl(void);
|
||||
/* If WIN32 is defined, use DLLs. If not, return NULL. */
|
||||
DSO_METHOD *DSO_METHOD_win32(void);
|
||||
|
||||
/* If VMS is defined, use shared images. If not, return NULL. */
|
||||
DSO_METHOD *DSO_METHOD_vms(void);
|
||||
|
||||
void ERR_load_DSO_strings(void);
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
@@ -212,6 +221,10 @@ void ERR_load_DSO_strings(void);
|
||||
#define DSO_F_DSO_LOAD 114
|
||||
#define DSO_F_DSO_NEW_METHOD 115
|
||||
#define DSO_F_DSO_UP 116
|
||||
#define DSO_F_VMS_BIND_VAR 122
|
||||
#define DSO_F_VMS_CTRL 123
|
||||
#define DSO_F_VMS_LOAD 124
|
||||
#define DSO_F_VMS_UNLOAD 125
|
||||
#define DSO_F_WIN32_BIND_FUNC 117
|
||||
#define DSO_F_WIN32_BIND_VAR 118
|
||||
#define DSO_F_WIN32_CTRL 119
|
||||
@@ -220,6 +233,7 @@ void ERR_load_DSO_strings(void);
|
||||
|
||||
/* Reason codes. */
|
||||
#define DSO_R_CTRL_FAILED 100
|
||||
#define DSO_R_FILENAME_TOO_BIG 109
|
||||
#define DSO_R_FINISH_FAILED 101
|
||||
#define DSO_R_LOAD_FAILED 102
|
||||
#define DSO_R_NULL_HANDLE 103
|
||||
|
||||
@@ -83,6 +83,10 @@ static ERR_STRING_DATA DSO_str_functs[]=
|
||||
{ERR_PACK(0,DSO_F_DSO_LOAD,0), "DSO_load"},
|
||||
{ERR_PACK(0,DSO_F_DSO_NEW_METHOD,0), "DSO_new_method"},
|
||||
{ERR_PACK(0,DSO_F_DSO_UP,0), "DSO_up"},
|
||||
{ERR_PACK(0,DSO_F_VMS_BIND_VAR,0), "VMS_BIND_VAR"},
|
||||
{ERR_PACK(0,DSO_F_VMS_CTRL,0), "VMS_CTRL"},
|
||||
{ERR_PACK(0,DSO_F_VMS_LOAD,0), "VMS_LOAD"},
|
||||
{ERR_PACK(0,DSO_F_VMS_UNLOAD,0), "VMS_UNLOAD"},
|
||||
{ERR_PACK(0,DSO_F_WIN32_BIND_FUNC,0), "WIN32_BIND_FUNC"},
|
||||
{ERR_PACK(0,DSO_F_WIN32_BIND_VAR,0), "WIN32_BIND_VAR"},
|
||||
{ERR_PACK(0,DSO_F_WIN32_CTRL,0), "WIN32_CTRL"},
|
||||
@@ -94,6 +98,7 @@ static ERR_STRING_DATA DSO_str_functs[]=
|
||||
static ERR_STRING_DATA DSO_str_reasons[]=
|
||||
{
|
||||
{DSO_R_CTRL_FAILED ,"control command failed"},
|
||||
{DSO_R_FILENAME_TOO_BIG ,"filename too big"},
|
||||
{DSO_R_FINISH_FAILED ,"cleanup method function failed"},
|
||||
{DSO_R_LOAD_FAILED ,"could not load the shared library"},
|
||||
{DSO_R_NULL_HANDLE ,"a null shared library handle was used"},
|
||||
|
||||
@@ -107,8 +107,8 @@ DSO *DSO_new_method(DSO_METHOD *meth)
|
||||
return(NULL);
|
||||
}
|
||||
memset(ret, 0, sizeof(DSO));
|
||||
ret->meth_data = sk_new(NULL);
|
||||
if((ret->meth_data = sk_new(NULL)) == NULL)
|
||||
ret->meth_data = sk_new_null();
|
||||
if((ret->meth_data = sk_new_null()) == NULL)
|
||||
{
|
||||
/* sk_new doesn't generate any errors so we do */
|
||||
DSOerr(DSO_F_DSO_NEW_METHOD,ERR_R_MALLOC_FAILURE);
|
||||
|
||||
@@ -72,6 +72,8 @@ DSO_METHOD *DSO_METHOD_openssl(void)
|
||||
return(DSO_METHOD_dl());
|
||||
#elif defined(DSO_WIN32)
|
||||
return(DSO_METHOD_win32());
|
||||
#elif defined(DSO_VMS)
|
||||
return(DSO_METHOD_vms());
|
||||
#else
|
||||
return(DSO_METHOD_null());
|
||||
#endif
|
||||
|
||||
371
crypto/dso/dso_vms.c
Normal file
371
crypto/dso/dso_vms.c
Normal file
@@ -0,0 +1,371 @@
|
||||
/* dso_vms.c */
|
||||
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
|
||||
* project 2000.
|
||||
*/
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* licensing@OpenSSL.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#ifdef VMS
|
||||
#pragma message disable DOLLARID
|
||||
#include <lib$routines.h>
|
||||
#include <libfisdef.h>
|
||||
#include <stsdef.h>
|
||||
#include <descrip.h>
|
||||
#include <starlet.h>
|
||||
#endif
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/dso.h>
|
||||
|
||||
#ifndef VMS
|
||||
DSO_METHOD *DSO_METHOD_vms(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
#pragma message disable DOLLARID
|
||||
|
||||
static int vms_load(DSO *dso, const char *filename);
|
||||
static int vms_unload(DSO *dso);
|
||||
static void *vms_bind_var(DSO *dso, const char *symname);
|
||||
static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname);
|
||||
#if 0
|
||||
static int vms_unbind_var(DSO *dso, char *symname, void *symptr);
|
||||
static int vms_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr);
|
||||
static int vms_init(DSO *dso);
|
||||
static int vms_finish(DSO *dso);
|
||||
#endif
|
||||
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg);
|
||||
|
||||
static DSO_METHOD dso_meth_vms = {
|
||||
"OpenSSL 'VMS' shared library method",
|
||||
vms_load,
|
||||
NULL, /* unload */
|
||||
vms_bind_var,
|
||||
vms_bind_func,
|
||||
/* For now, "unbind" doesn't exist */
|
||||
#if 0
|
||||
NULL, /* unbind_var */
|
||||
NULL, /* unbind_func */
|
||||
#endif
|
||||
vms_ctrl,
|
||||
NULL, /* init */
|
||||
NULL /* finish */
|
||||
};
|
||||
|
||||
/* On VMS, the only "handle" is the file name. LIB$FIND_IMAGE_SYMBOL depends
|
||||
* on the reference to the file name being the same for all calls regarding
|
||||
* one shared image, so we'll just store it in an instance of the following
|
||||
* structure and put a pointer to that instance in the meth_data stack.
|
||||
*/
|
||||
typedef struct dso_internal_st
|
||||
{
|
||||
/* This should contain the name only, no directory,
|
||||
* no extension, nothing but a name. */
|
||||
struct dsc$descriptor_s filename_dsc;
|
||||
char filename[FILENAME_MAX+1];
|
||||
/* This contains whatever is not in filename, if needed.
|
||||
* Normally not defined. */
|
||||
struct dsc$descriptor_s imagename_dsc;
|
||||
char imagename[FILENAME_MAX+1];
|
||||
} DSO_VMS_INTERNAL;
|
||||
|
||||
|
||||
DSO_METHOD *DSO_METHOD_vms(void)
|
||||
{
|
||||
return(&dso_meth_vms);
|
||||
}
|
||||
|
||||
static int vms_load(DSO *dso, const char *filename)
|
||||
{
|
||||
DSO_VMS_INTERNAL *p;
|
||||
const char *sp1, *sp2; /* Search result */
|
||||
|
||||
/* A file specification may look like this:
|
||||
*
|
||||
* node::dev:[dir-spec]name.type;ver
|
||||
*
|
||||
* or (for compatibility with TOPS-20):
|
||||
*
|
||||
* node::dev:<dir-spec>name.type;ver
|
||||
*
|
||||
* and the dir-spec uses '.' as separator. Also, a dir-spec
|
||||
* may consist of several parts, with mixed use of [] and <>:
|
||||
*
|
||||
* [dir1.]<dir2>
|
||||
*
|
||||
* We need to split the file specification into the name and
|
||||
* the rest (both before and after the name itself).
|
||||
*/
|
||||
/* Start with trying to find the end of a dir-spec, and save the
|
||||
position of the byte after in sp1 */
|
||||
sp1 = strrchr(filename, ']');
|
||||
sp2 = strrchr(filename, '>');
|
||||
if (sp1 == NULL) sp1 = sp2;
|
||||
if (sp2 != NULL && sp2 > sp1) sp1 = sp2;
|
||||
if (sp1 == NULL) sp1 = strrchr(filename, ':');
|
||||
if (sp1 == NULL)
|
||||
sp1 = filename;
|
||||
else
|
||||
sp1++; /* The byte after the found character */
|
||||
/* Now, let's see if there's a type, and save the position in sp2 */
|
||||
sp2 = strchr(sp1, '.');
|
||||
/* If we found it, that's where we'll cut. Otherwise, look for a
|
||||
version number and save the position in sp2 */
|
||||
if (sp2 == NULL) sp2 = strchr(sp1, ';');
|
||||
/* If there was still nothing to find, set sp2 to point at the end of
|
||||
the string */
|
||||
if (sp2 == NULL) sp2 = sp1 + strlen(sp1);
|
||||
|
||||
/* Check that we won't get buffer overflows */
|
||||
if (sp2 - sp1 > FILENAME_MAX
|
||||
|| (sp1 - filename) + strlen(sp2) > FILENAME_MAX)
|
||||
{
|
||||
DSOerr(DSO_F_VMS_LOAD,DSO_R_FILENAME_TOO_BIG);
|
||||
return(0);
|
||||
}
|
||||
|
||||
p = (DSO_VMS_INTERNAL *)OPENSSL_malloc(sizeof(DSO_VMS_INTERNAL));
|
||||
if(p == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE);
|
||||
return(0);
|
||||
}
|
||||
|
||||
strncpy(p->filename, sp1, sp2-sp1);
|
||||
p->filename[sp2-sp1] = '\0';
|
||||
|
||||
strncpy(p->imagename, filename, sp1-filename);
|
||||
p->imagename[sp1-filename] = '\0';
|
||||
strcat(p->imagename, sp2);
|
||||
|
||||
p->filename_dsc.dsc$w_length = strlen(p->filename);
|
||||
p->filename_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||
p->filename_dsc.dsc$b_class = DSC$K_CLASS_S;
|
||||
p->filename_dsc.dsc$a_pointer = p->filename;
|
||||
p->imagename_dsc.dsc$w_length = strlen(p->imagename);
|
||||
p->imagename_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||
p->imagename_dsc.dsc$b_class = DSC$K_CLASS_S;
|
||||
p->imagename_dsc.dsc$a_pointer = p->imagename;
|
||||
|
||||
if(!sk_push(dso->meth_data, (char *)p))
|
||||
{
|
||||
DSOerr(DSO_F_VMS_LOAD,DSO_R_STACK_ERROR);
|
||||
OPENSSL_free(p);
|
||||
return(0);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
/* Note that this doesn't actually unload the shared image, as there is no
|
||||
* such thing in VMS. Next time it get loaded again, a new copy will
|
||||
* actually be loaded.
|
||||
*/
|
||||
static int vms_unload(DSO *dso)
|
||||
{
|
||||
DSO_VMS_INTERNAL *p;
|
||||
if(dso == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_VMS_UNLOAD,ERR_R_PASSED_NULL_PARAMETER);
|
||||
return(0);
|
||||
}
|
||||
if(sk_num(dso->meth_data) < 1)
|
||||
return(1);
|
||||
p = (DSO_VMS_INTERNAL *)sk_pop(dso->meth_data);
|
||||
if(p == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_VMS_UNLOAD,DSO_R_NULL_HANDLE);
|
||||
return(0);
|
||||
}
|
||||
/* Cleanup */
|
||||
OPENSSL_free(p);
|
||||
return(1);
|
||||
}
|
||||
|
||||
/* We must do this in a separate function because of the way the exception
|
||||
handler works (it makes this function return */
|
||||
static int do_find_symbol(DSO_VMS_INTERNAL *ptr,
|
||||
struct dsc$descriptor_s *symname_dsc, void **sym,
|
||||
unsigned long flags)
|
||||
{
|
||||
/* Make sure that signals are caught and returned instead of
|
||||
aborting the program. The exception handler gets unestablished
|
||||
automatically on return from this function. */
|
||||
lib$establish(lib$sig_to_ret);
|
||||
|
||||
if(ptr->imagename_dsc.dsc$w_length)
|
||||
return lib$find_image_symbol(&ptr->filename_dsc,
|
||||
symname_dsc, sym,
|
||||
&ptr->imagename_dsc, flags);
|
||||
else
|
||||
return lib$find_image_symbol(&ptr->filename_dsc,
|
||||
symname_dsc, sym,
|
||||
0, flags);
|
||||
}
|
||||
|
||||
void vms_bind_sym(DSO *dso, const char *symname, void **sym)
|
||||
{
|
||||
DSO_VMS_INTERNAL *ptr;
|
||||
int status;
|
||||
int flags = LIB$M_FIS_MIXEDCASE;
|
||||
struct dsc$descriptor_s symname_dsc;
|
||||
*sym = NULL;
|
||||
|
||||
symname_dsc.dsc$w_length = strlen(symname);
|
||||
symname_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||
symname_dsc.dsc$b_class = DSC$K_CLASS_S;
|
||||
symname_dsc.dsc$a_pointer = (char *)symname; /* The cast is needed */
|
||||
|
||||
if((dso == NULL) || (symname == NULL))
|
||||
{
|
||||
DSOerr(DSO_F_VMS_BIND_VAR,ERR_R_PASSED_NULL_PARAMETER);
|
||||
return;
|
||||
}
|
||||
if(sk_num(dso->meth_data) < 1)
|
||||
{
|
||||
DSOerr(DSO_F_VMS_BIND_VAR,DSO_R_STACK_ERROR);
|
||||
return;
|
||||
}
|
||||
ptr = (DSO_VMS_INTERNAL *)sk_value(dso->meth_data,
|
||||
sk_num(dso->meth_data) - 1);
|
||||
if(ptr == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_VMS_BIND_VAR,DSO_R_NULL_HANDLE);
|
||||
return;
|
||||
}
|
||||
|
||||
if(dso->flags & DSO_FLAG_UPCASE_SYMBOL) flags = 0;
|
||||
|
||||
status = do_find_symbol(ptr, &symname_dsc, sym, flags);
|
||||
|
||||
if(!$VMS_STATUS_SUCCESS(status))
|
||||
{
|
||||
unsigned short length;
|
||||
char errstring[257];
|
||||
struct dsc$descriptor_s errstring_dsc;
|
||||
|
||||
errstring_dsc.dsc$w_length = sizeof(errstring);
|
||||
errstring_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
|
||||
errstring_dsc.dsc$b_class = DSC$K_CLASS_S;
|
||||
errstring_dsc.dsc$a_pointer = errstring;
|
||||
|
||||
*sym = NULL;
|
||||
|
||||
status = sys$getmsg(status, &length, &errstring_dsc, 1, 0);
|
||||
|
||||
if (!$VMS_STATUS_SUCCESS(status))
|
||||
lib$signal(status); /* This is really bad. Abort! */
|
||||
else
|
||||
{
|
||||
errstring[length] = '\0';
|
||||
|
||||
DSOerr(DSO_F_VMS_BIND_VAR,DSO_R_SYM_FAILURE);
|
||||
if (ptr->imagename_dsc.dsc$w_length)
|
||||
ERR_add_error_data(9,
|
||||
"Symbol ", symname,
|
||||
" in ", ptr->filename,
|
||||
" (", ptr->imagename, ")",
|
||||
": ", errstring);
|
||||
else
|
||||
ERR_add_error_data(6,
|
||||
"Symbol ", symname,
|
||||
" in ", ptr->filename,
|
||||
": ", errstring);
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static void *vms_bind_var(DSO *dso, const char *symname)
|
||||
{
|
||||
void *sym = 0;
|
||||
vms_bind_sym(dso, symname, &sym);
|
||||
return sym;
|
||||
}
|
||||
|
||||
static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname)
|
||||
{
|
||||
DSO_FUNC_TYPE sym = 0;
|
||||
vms_bind_sym(dso, symname, &sym);
|
||||
return sym;
|
||||
}
|
||||
|
||||
static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg)
|
||||
{
|
||||
if(dso == NULL)
|
||||
{
|
||||
DSOerr(DSO_F_VMS_CTRL,ERR_R_PASSED_NULL_PARAMETER);
|
||||
return(-1);
|
||||
}
|
||||
switch(cmd)
|
||||
{
|
||||
case DSO_CTRL_GET_FLAGS:
|
||||
return dso->flags;
|
||||
case DSO_CTRL_SET_FLAGS:
|
||||
dso->flags = (int)larg;
|
||||
return(0);
|
||||
case DSO_CTRL_OR_FLAGS:
|
||||
dso->flags |= (int)larg;
|
||||
return(0);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
DSOerr(DSO_F_VMS_CTRL,DSO_R_UNKNOWN_COMMAND);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
#endif /* VMS */
|
||||
@@ -65,6 +65,7 @@
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/symhacks.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x00906001L
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6-beta1 [engine] 11 Sep 2000"
|
||||
#define OPENSSL_VERSION_NUMBER 0x00906002L
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6-beta2 [engine] 17 Sep 2000"
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
|
||||
@@ -87,13 +87,13 @@ int PKCS12_add_localkeyid (PKCS12_SAFEBAG *bag, unsigned char *name,
|
||||
return 0;
|
||||
}
|
||||
attrib->object = OBJ_nid2obj(NID_localKeyID);
|
||||
if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) {
|
||||
if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) {
|
||||
PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
sk_ASN1_TYPE_push (attrib->value.set,keyid);
|
||||
attrib->set = 1;
|
||||
if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new (NULL))) {
|
||||
if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new_null ())) {
|
||||
PKCS12err(PKCS12_F_PKCS12_ADD_LOCALKEYID, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
@@ -129,14 +129,14 @@ int PKCS8_add_keyusage (PKCS8_PRIV_KEY_INFO *p8, int usage)
|
||||
return 0;
|
||||
}
|
||||
attrib->object = OBJ_nid2obj(NID_key_usage);
|
||||
if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) {
|
||||
if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) {
|
||||
PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
sk_ASN1_TYPE_push (attrib->value.set,keyid);
|
||||
attrib->set = 1;
|
||||
if (!p8->attributes
|
||||
&& !(p8->attributes = sk_X509_ATTRIBUTE_new (NULL))) {
|
||||
&& !(p8->attributes = sk_X509_ATTRIBUTE_new_null ())) {
|
||||
PKCS12err(PKCS12_F_PKCS8_ADD_KEYUSAGE, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
@@ -195,14 +195,14 @@ int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag,
|
||||
return 0;
|
||||
}
|
||||
attrib->object = OBJ_nid2obj(NID_friendlyName);
|
||||
if (!(attrib->value.set = sk_ASN1_TYPE_new(NULL))) {
|
||||
if (!(attrib->value.set = sk_ASN1_TYPE_new_null())) {
|
||||
PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME,
|
||||
ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
sk_ASN1_TYPE_push (attrib->value.set,fname);
|
||||
attrib->set = 1;
|
||||
if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new (NULL))) {
|
||||
if (!bag->attrib && !(bag->attrib = sk_X509_ATTRIBUTE_new_null ())) {
|
||||
PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI,
|
||||
ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
|
||||
@@ -88,7 +88,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
|
||||
|
||||
if(!X509_check_private_key(cert, pkey)) return NULL;
|
||||
|
||||
if(!(bags = sk_PKCS12_SAFEBAG_new (NULL))) {
|
||||
if(!(bags = sk_PKCS12_SAFEBAG_new_null ())) {
|
||||
PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
|
||||
|
||||
if (!authsafe) return NULL;
|
||||
|
||||
if(!(safes = sk_PKCS7_new (NULL))
|
||||
if(!(safes = sk_PKCS7_new_null ())
|
||||
|| !sk_PKCS7_push(safes, authsafe)) {
|
||||
PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
@@ -137,7 +137,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
|
||||
PKCS8_PRIV_KEY_INFO_free(p8);
|
||||
if (name && !PKCS12_add_friendlyname (bag, name, -1)) return NULL;
|
||||
if(!PKCS12_add_localkeyid (bag, keyid, keyidlen)) return NULL;
|
||||
if(!(bags = sk_PKCS12_SAFEBAG_new(NULL))
|
||||
if(!(bags = sk_PKCS12_SAFEBAG_new_null())
|
||||
|| !sk_PKCS12_SAFEBAG_push (bags, bag)) {
|
||||
PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
|
||||
@@ -93,7 +93,7 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
|
||||
|
||||
/* Allocate stack for ca certificates if needed */
|
||||
if ((ca != NULL) && (*ca == NULL)) {
|
||||
if (!(*ca = sk_X509_new(NULL))) {
|
||||
if (!(*ca = sk_X509_new_null())) {
|
||||
PKCS12err(PKCS12_F_PKCS12_PARSE,ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass)
|
||||
unsigned int maclen;
|
||||
|
||||
if (!(asafes = M_PKCS12_unpack_authsafes(p12))) return 0;
|
||||
if(!(newsafes = sk_PKCS7_new(NULL))) return 0;
|
||||
if(!(newsafes = sk_PKCS7_new_null())) return 0;
|
||||
for (i = 0; i < sk_PKCS7_num (asafes); i++) {
|
||||
p7 = sk_PKCS7_value(asafes, i);
|
||||
bagnid = OBJ_obj2nid(p7->type);
|
||||
|
||||
@@ -909,7 +909,7 @@ static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
|
||||
|
||||
if (*sk == NULL)
|
||||
{
|
||||
*sk = sk_X509_ATTRIBUTE_new(NULL);
|
||||
*sk = sk_X509_ATTRIBUTE_new_null();
|
||||
new_attrib:
|
||||
attr=X509_ATTRIBUTE_create(nid,atrtype,value);
|
||||
sk_X509_ATTRIBUTE_push(*sk,attr);
|
||||
|
||||
@@ -372,7 +372,7 @@ static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
|
||||
part = 0;
|
||||
state = 0;
|
||||
first = 1;
|
||||
parts = sk_BIO_new(NULL);
|
||||
parts = sk_BIO_new_null();
|
||||
*ret = parts;
|
||||
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
|
||||
state = mime_bound_check(linebuf, len, bound, blen);
|
||||
|
||||
@@ -111,7 +111,7 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
/* Add SMIMECapabilities */
|
||||
if(!(flags & PKCS7_NOSMIMECAP))
|
||||
{
|
||||
if(!(smcap = sk_X509_ALGOR_new(NULL))) {
|
||||
if(!(smcap = sk_X509_ALGOR_new_null())) {
|
||||
PKCS7err(PKCS7_F_PKCS7_SIGN,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
@@ -285,7 +285,7 @@ STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags)
|
||||
PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,PKCS7_R_WRONG_CONTENT_TYPE);
|
||||
return NULL;
|
||||
}
|
||||
if(!(signers = sk_X509_new(NULL))) {
|
||||
if(!(signers = sk_X509_new_null())) {
|
||||
PKCS7err(PKCS7_F_PKCS7_GET0_SIGNERS,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -130,6 +130,28 @@
|
||||
static void readtimer(void);
|
||||
static void readscreen(void);
|
||||
|
||||
/* It appears like CURSORINFO, PCURSORINFO and LPCURSORINFO are only defined
|
||||
when WINVER is 0x0500 and up, which currently only happens on Win2000.
|
||||
Unfortunately, those are typedefs, so they're a little bit difficult to
|
||||
detect properly. On the other hand, the macro CURSOR_SHOWING is defined
|
||||
within the same conditional, so it can be use to detect the absence of said
|
||||
typedefs. */
|
||||
|
||||
#ifndef CURSOR_SHOWING
|
||||
/*
|
||||
* Information about the global cursor.
|
||||
*/
|
||||
typedef struct tagCURSORINFO
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD flags;
|
||||
HCURSOR hCursor;
|
||||
POINT ptScreenPos;
|
||||
} CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
|
||||
|
||||
#define CURSOR_SHOWING 0x00000001
|
||||
#endif /* CURSOR_SHOWING */
|
||||
|
||||
typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *, LPCTSTR, LPCTSTR,
|
||||
DWORD, DWORD);
|
||||
typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV, DWORD, BYTE *);
|
||||
@@ -147,6 +169,12 @@ typedef BOOL (WINAPI *PROCESS32)(HANDLE, LPPROCESSENTRY32);
|
||||
typedef BOOL (WINAPI *THREAD32)(HANDLE, LPTHREADENTRY32);
|
||||
typedef BOOL (WINAPI *MODULE32)(HANDLE, LPMODULEENTRY32);
|
||||
|
||||
#include <lmcons.h>
|
||||
#include <lmstats.h>
|
||||
typedef NET_API_STATUS (NET_API_FUNCTION * NETSTATGET)
|
||||
(LMSTR, LMSTR, DWORD, DWORD, LPBYTE*);
|
||||
typedef NET_API_STATUS (NET_API_FUNCTION * NETFREE)(LPBYTE);
|
||||
|
||||
int RAND_poll(void)
|
||||
{
|
||||
MEMORYSTATUS m;
|
||||
@@ -155,15 +183,71 @@ int RAND_poll(void)
|
||||
DWORD w;
|
||||
HWND h;
|
||||
|
||||
HMODULE advapi, kernel, user;
|
||||
HMODULE advapi, kernel, user, netapi;
|
||||
CRYPTACQUIRECONTEXT acquire;
|
||||
CRYPTGENRANDOM gen;
|
||||
CRYPTRELEASECONTEXT release;
|
||||
NETSTATGET netstatget;
|
||||
NETFREE netfree;
|
||||
|
||||
/* load functions dynamically - not available on all systems */
|
||||
advapi = GetModuleHandle("ADVAPI32.DLL");
|
||||
kernel = GetModuleHandle("KERNEL32.DLL");
|
||||
user = GetModuleHandle("USER32.DLL");
|
||||
netapi = GetModuleHandle("NETAPI32.DLL");
|
||||
|
||||
if (netapi)
|
||||
{
|
||||
netstatget = (NETSTATGET) GetProcAddress(netapi,"NetStatisticsGet");
|
||||
netfree = (NETFREE) GetProcAddress(netapi,"NetApiBufferFree");
|
||||
}
|
||||
|
||||
if (netstatget && netfree)
|
||||
{
|
||||
LPBYTE outbuf;
|
||||
/* NetStatisticsGet() is a Unicode only function */
|
||||
if (netstatget(NULL, L"LanmanWorkstation", 0, 0, &outbuf) == 0)
|
||||
{
|
||||
RAND_add(outbuf, sizeof(STAT_WORKSTATION_0), 0);
|
||||
netfree(outbuf);
|
||||
}
|
||||
if (netstatget(NULL, L"LanmanServer", 0, 0, &outbuf) == 0)
|
||||
{
|
||||
RAND_add(outbuf, sizeof(STAT_SERVER_0), 0);
|
||||
netfree(outbuf);
|
||||
}
|
||||
}
|
||||
|
||||
/* Read Performance Statistics from NT/2000 registry */
|
||||
/* The size of the performance data can vary from call to call */
|
||||
/* so we must guess the size of the buffer to use and increase */
|
||||
/* its size if we get an ERROR_MORE_DATA return instead of */
|
||||
/* ERROR_SUCCESS. */
|
||||
{
|
||||
LONG rc=ERROR_MORE_DATA;
|
||||
char * buf=NULL;
|
||||
DWORD bufsz=0;
|
||||
DWORD length;
|
||||
|
||||
while (rc == ERROR_MORE_DATA)
|
||||
{
|
||||
buf = realloc(buf,bufsz+8192);
|
||||
if (!buf)
|
||||
break;
|
||||
bufsz += 8192;
|
||||
|
||||
length = bufsz;
|
||||
rc = RegQueryValueEx(HKEY_PERFORMANCE_DATA, "Global",
|
||||
NULL, NULL, buf, &length);
|
||||
}
|
||||
if (rc == ERROR_SUCCESS)
|
||||
{
|
||||
RAND_add(&length, sizeof(length), 0);
|
||||
RAND_add(buf, length, 0);
|
||||
}
|
||||
if ( buf )
|
||||
free(buf);
|
||||
}
|
||||
|
||||
if (advapi)
|
||||
{
|
||||
@@ -233,11 +317,28 @@ int RAND_poll(void)
|
||||
RAND_add(&h, sizeof(h), 0);
|
||||
}
|
||||
|
||||
if (cursor)
|
||||
{
|
||||
/* unfortunately, its not safe to call GetCursorInfo()
|
||||
* on NT4 even though it exists in SP3 (or SP6) and
|
||||
* higher.
|
||||
*/
|
||||
OSVERSIONINFO osverinfo ;
|
||||
osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ;
|
||||
GetVersionEx( &osverinfo ) ;
|
||||
|
||||
if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT &&
|
||||
osverinfo.dwMajorVersion < 5)
|
||||
cursor = 0;
|
||||
}
|
||||
|
||||
if (cursor)
|
||||
{
|
||||
/* cursor position */
|
||||
cursor((PCURSORINFO)buf);
|
||||
RAND_add(buf, sizeof(buf), 0);
|
||||
CURSORINFO ci;
|
||||
ci.cbSize = sizeof(CURSORINFO);
|
||||
if (cursor(&ci))
|
||||
RAND_add(&ci, ci.cbSize, 0);
|
||||
}
|
||||
|
||||
if (queue)
|
||||
@@ -250,11 +351,12 @@ int RAND_poll(void)
|
||||
|
||||
/* Toolhelp32 snapshot: enumerate processes, threads, modules and heap
|
||||
* http://msdn.microsoft.com/library/psdk/winbase/toolhelp_5pfd.htm
|
||||
* (Win 9x only, not available on NT)
|
||||
* (Win 9x and 2000 only, not available on NT)
|
||||
*
|
||||
* This seeding method was proposed in Peter Gutmann, Software
|
||||
* Generation of Practically Strong Random Numbers,
|
||||
* http://www.cs.auckland.ac.nz/~pgut001/pubs/random2.pdf
|
||||
* http://www.usenix.org/publications/library/proceedings/sec98/gutmann.html
|
||||
* revised version at http://www.cryptoengines.com/~peter/06_random.pdf
|
||||
* (The assignment of entropy estimates below is arbitrary, but based
|
||||
* on Peter's analysis the full poll appears to be safe. Additional
|
||||
* interactive seeding is encouraged.)
|
||||
@@ -307,10 +409,14 @@ int RAND_poll(void)
|
||||
if (heap_first(&hentry,
|
||||
hlist.th32ProcessID,
|
||||
hlist.th32HeapID))
|
||||
{
|
||||
int entrycnt = 50;
|
||||
do
|
||||
RAND_add(&hentry,
|
||||
hentry.dwSize, 0);
|
||||
while (heap_next(&hentry));
|
||||
while (heap_next(&hentry)
|
||||
&& --entrycnt > 0);
|
||||
}
|
||||
} while (heaplist_next(handle,
|
||||
&hlist));
|
||||
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "openssl/e_os.h"
|
||||
|
||||
#ifdef VMS
|
||||
#include <unixio.h>
|
||||
#endif
|
||||
@@ -75,6 +73,7 @@
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/e_os.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ err:
|
||||
|
||||
STACK *sk_new_null(void)
|
||||
{
|
||||
return sk_new((int (*)(const char * const *, const char * const *))NULL);
|
||||
return sk_new((int (*)(const char * const *, const char * const *))0);
|
||||
}
|
||||
|
||||
STACK *sk_new(int (*c)(const char * const *, const char * const *))
|
||||
|
||||
@@ -137,6 +137,10 @@
|
||||
#define SSL_CTX_set_cert_verify_callback SSL_CTX_set_cert_verify_cb
|
||||
#define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud
|
||||
|
||||
/* Hack some long ENGINE names */
|
||||
#define ENGINE_get_default_BN_mod_exp_crt ENGINE_get_def_BN_mod_exp_crt
|
||||
#define ENGINE_set_default_BN_mod_exp_crt ENGINE_set_def_BN_mod_exp_crt
|
||||
|
||||
#endif /* defined VMS */
|
||||
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ if((issuer && !ikeyid) || (issuer == 2)) {
|
||||
if(!(akeyid = AUTHORITY_KEYID_new())) goto err;
|
||||
|
||||
if(isname) {
|
||||
if(!(gens = sk_GENERAL_NAME_new(NULL)) || !(gen = GENERAL_NAME_new())
|
||||
if(!(gens = sk_GENERAL_NAME_new_null()) || !(gen = GENERAL_NAME_new())
|
||||
|| !sk_GENERAL_NAME_push(gens, gen)) {
|
||||
X509V3err(X509V3_F_V2I_AUTHORITY_KEYID,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
|
||||
@@ -160,7 +160,7 @@ static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method,
|
||||
STACK_OF(GENERAL_NAME) *gens = NULL;
|
||||
CONF_VALUE *cnf;
|
||||
int i;
|
||||
if(!(gens = sk_GENERAL_NAME_new(NULL))) {
|
||||
if(!(gens = sk_GENERAL_NAME_new_null())) {
|
||||
X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method,
|
||||
STACK_OF(GENERAL_NAME) *gens = NULL;
|
||||
CONF_VALUE *cnf;
|
||||
int i;
|
||||
if(!(gens = sk_GENERAL_NAME_new(NULL))) {
|
||||
if(!(gens = sk_GENERAL_NAME_new_null())) {
|
||||
X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
@@ -304,7 +304,7 @@ STACK_OF(GENERAL_NAME) *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method,
|
||||
STACK_OF(GENERAL_NAME) *gens = NULL;
|
||||
CONF_VALUE *cnf;
|
||||
int i;
|
||||
if(!(gens = sk_GENERAL_NAME_new(NULL))) {
|
||||
if(!(gens = sk_GENERAL_NAME_new_null())) {
|
||||
X509V3err(X509V3_F_V2I_GENERAL_NAMES,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method,
|
||||
GENERAL_NAME *gen = NULL;
|
||||
CONF_VALUE *cnf;
|
||||
int i;
|
||||
if(!(crld = sk_DIST_POINT_new(NULL))) goto merr;
|
||||
if(!(crld = sk_DIST_POINT_new_null())) goto merr;
|
||||
for(i = 0; i < sk_CONF_VALUE_num(nval); i++) {
|
||||
DIST_POINT *point;
|
||||
cnf = sk_CONF_VALUE_value(nval, i);
|
||||
|
||||
@@ -129,7 +129,7 @@ ASN1_OBJECT *objtmp;
|
||||
CONF_VALUE *val;
|
||||
int i;
|
||||
|
||||
if(!(extku = sk_ASN1_OBJECT_new(NULL))) {
|
||||
if(!(extku = sk_ASN1_OBJECT_new_null())) {
|
||||
X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void GENERAL_NAME_free(GENERAL_NAME *a)
|
||||
|
||||
STACK_OF(GENERAL_NAME) *GENERAL_NAMES_new()
|
||||
{
|
||||
return sk_GENERAL_NAME_new(NULL);
|
||||
return sk_GENERAL_NAME_new_null();
|
||||
}
|
||||
|
||||
void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *a)
|
||||
|
||||
@@ -119,7 +119,7 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
|
||||
ACCESS_DESCRIPTION *acc;
|
||||
int i, objlen;
|
||||
char *objtmp, *ptmp;
|
||||
if(!(ainfo = sk_ACCESS_DESCRIPTION_new(NULL))) {
|
||||
if(!(ainfo = sk_ACCESS_DESCRIPTION_new_null())) {
|
||||
X509V3err(X509V3_F_V2I_ACCESS_DESCRIPTION,ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a)
|
||||
|
||||
STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void)
|
||||
{
|
||||
return sk_ACCESS_DESCRIPTION_new(NULL);
|
||||
return sk_ACCESS_DESCRIPTION_new_null();
|
||||
}
|
||||
|
||||
void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a)
|
||||
|
||||
@@ -80,7 +80,7 @@ int X509V3_add_value(const char *name, const char *value,
|
||||
if(name && !(tname = BUF_strdup(name))) goto err;
|
||||
if(value && !(tvalue = BUF_strdup(value))) goto err;;
|
||||
if(!(vtmp = (CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE)))) goto err;
|
||||
if(!*extlist && !(*extlist = sk_CONF_VALUE_new(NULL))) goto err;
|
||||
if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err;
|
||||
vtmp->section = NULL;
|
||||
vtmp->name = tname;
|
||||
vtmp->value = tvalue;
|
||||
|
||||
@@ -694,7 +694,7 @@ There should be options to explicitly set such things as start and end
|
||||
dates rather than an offset from the current time.
|
||||
|
||||
The code to implement the verify behaviour described in the B<TRUST SETTINGS>
|
||||
is currently being developed. It thus describes the intended behavior rather
|
||||
is currently being developed. It thus describes the intended behaviour rather
|
||||
than the current behaviour. It is hoped that it will represent reality in
|
||||
OpenSSL 0.9.5 and later.
|
||||
|
||||
|
||||
116
doc/crypto/BIO_ctrl.pod
Normal file
116
doc/crypto/BIO_ctrl.pod
Normal file
@@ -0,0 +1,116 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_ctrl, BIO_callback_ctrl, BIO_ptr_ctrl, BIO_int_ctrl, BIO_reset,
|
||||
BIO_seek, BIO_tell, BIO_flush, BIO_eof, BIO_set_close, BIO_get_close,
|
||||
BIO_pending, BIO_wpending, BIO_ctrl_pending, BIO_ctrl_wpending,
|
||||
BIO_get_info_callback, BIO_set_info_callback - BIO control operations
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg);
|
||||
long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long));
|
||||
char * BIO_ptr_ctrl(BIO *bp,int cmd,long larg);
|
||||
long BIO_int_ctrl(BIO *bp,int cmd,long larg,int iarg);
|
||||
|
||||
int BIO_reset(BIO *b);
|
||||
int BIO_seek(BIO *b, int ofs);
|
||||
int BIO_tell(BIO *b);
|
||||
int BIO_flush(BIO *b);
|
||||
int BIO_eof(BIO *b);
|
||||
int BIO_set_close(BIO *b,long flag);
|
||||
int BIO_get_close(BIO *b);
|
||||
int BIO_pending(BIO *b);
|
||||
int BIO_wpending(BIO *b);
|
||||
size_t BIO_ctrl_pending(BIO *b);
|
||||
size_t BIO_ctrl_wpending(BIO *b);
|
||||
|
||||
int BIO_get_info_callback(BIO *b,bio_info_cb **cbp);
|
||||
int BIO_set_info_callback(BIO *b,bio_info_cb *cb);
|
||||
|
||||
typedef void bio_info_cb(BIO *b, int oper, const char *ptr, int arg1, long arg2, long arg3);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_ctrl(), BIO_callback_ctrl(), BIO_ptr_ctrl() and BIO_int_ctrl()
|
||||
are BIO "control" operations taking arguments of various types.
|
||||
These functions are not normally called directly, various macros
|
||||
are used instead. The standard macros are described below, macros
|
||||
specific to a particular type of BIO are described in the specific
|
||||
BIOs manual page as well as any special features of the standard
|
||||
calls.
|
||||
|
||||
BIO_reset() typically resets a BIO to some initial state, in the case
|
||||
of file related BIOs for example it rewinds the file pointer to the
|
||||
start of the file.
|
||||
|
||||
BIO_seek() resets a file related BIO's file position pointer to B<ofs>
|
||||
bytes from start of file.
|
||||
|
||||
BIO_tell() returns the current file position of a file related BIO.
|
||||
|
||||
BIO_flush() normally writes out any internally buffered data, in some
|
||||
cases it is used to signal EOF and that no more data will be written.
|
||||
|
||||
BIO_eof() returns 1 if the BIO has read EOF, the precise meaning of
|
||||
"EOF" varies according to the BIO type.
|
||||
|
||||
BIO_set_close() sets the BIO B<b> close flag to B<flag>. B<flag> can
|
||||
take the value BIO_CLOSE or BIO_NOCLOSE. Typically BIO_CLOSE is used
|
||||
in a source/sink BIO to indicate that the underlying I/O stream should
|
||||
be closed when the BIO is freed.
|
||||
|
||||
BIO_get_close() returns the BIOs close flag.
|
||||
|
||||
BIO_pending(), BIO_ctrl_pending(), BIO_wpending() and BIO_ctrl_wpending()
|
||||
return the number of pending characters in the BIOs read and write buffers.
|
||||
Not all BIOs support these calls. BIO_ctrl_pending() and BIO_ctrl_wpending()
|
||||
return a size_t type and are functions, BIO_pending() and BIO_wpending() are
|
||||
macros which call BIO_ctrl().
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
BIO_reset() returns 1 for success and 0 for failure.
|
||||
|
||||
BIO_seek() and BIO_tell() both return the current file position on success
|
||||
and -1 for failure.
|
||||
|
||||
BIO_flush() returns 1 for success and 0 or -1 for failure.
|
||||
|
||||
BIO_eof() returns 1 if EOF has been reached 0 otherwise.
|
||||
|
||||
BIO_set_close() always returns 1.
|
||||
|
||||
BIO_get_close() returns the close flag value: BIO_CLOSE or BIO_NOCLOSE.
|
||||
|
||||
BIO_pending(), BIO_ctrl_pending(), BIO_wpending() and BIO_ctrl_wpending()
|
||||
return the amount of pending data.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
BIO_flush(), because it can write data may return 0 or -1 indicating
|
||||
that the call should be retried later in a similar manner to BIO_write().
|
||||
The BIO_should_retry() call should be used and appropriate action taken
|
||||
is the call fails.
|
||||
|
||||
The return values of BIO_pending() and BIO_wpending() may not reliably
|
||||
determine the amount of pending data in all cases. For example in the
|
||||
case of a file BIO some data may be available in the FILE structures
|
||||
internal buffers but it is not possible to determine this in a
|
||||
portably way. For other types of BIO they may not be supported.
|
||||
|
||||
Filter BIOs if the do not internally handle a particular BIO_ctrl()
|
||||
operation usually pass the operation to the next BIO in the chain.
|
||||
This often means there is no need to locate the required BIO for
|
||||
a particular operation, it can be called on a chain and it will
|
||||
be automatically passed to the relevant BIO.
|
||||
|
||||
Source/sink BIOs will return an error if the do not recognize the
|
||||
BIO_ctrl() operation.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_f_base64 - base64 BIO
|
||||
BIO_f_base64 - base64 BIO filter
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_f_cipher - cipher BIO
|
||||
BIO_f_cipher, BIO_set_cipher, BIO_get_cipher_status, BIO_get_cipher_ctx - cipher BIO filter
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -38,7 +38,7 @@ is a BIO_ctrl() macro which can be called to determine whether the
|
||||
decryption operation was successful.
|
||||
|
||||
BIO_get_cipher_ctx() is a BIO_ctrl() macro which retrieves the internal
|
||||
BIO cipher context. The retrieved context can be used in conjustion
|
||||
BIO cipher context. The retrieved context can be used in conjunction
|
||||
with the standard cipher routines to set it up. This is useful when
|
||||
BIO_set_cipher() is not flexible enough for the applications needs.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_f_md - message digest BIO
|
||||
BIO_f_md, BIO_set_md, BIO_get_md, BIO_get_md_ctx - message digest BIO filter
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -31,7 +31,7 @@ not supported.
|
||||
BIO_reset() reinitializes a digest BIO.
|
||||
|
||||
BIO_set_md() sets the message digest of BIO B<b> to B<md>: this
|
||||
must be called to initialise a digest BIO before any data is
|
||||
must be called to initialize a digest BIO before any data is
|
||||
passed through it. It is a BIO_ctrl() macro.
|
||||
|
||||
BIO_get_md() places the a pointer to the digest BIOs digest method
|
||||
|
||||
313
doc/crypto/BIO_f_ssl.pod
Normal file
313
doc/crypto/BIO_f_ssl.pod
Normal file
@@ -0,0 +1,313 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_f_ssl, BIO_set_ssl, BIO_get_ssl, BIO_set_ssl_mode, BIO_set_ssl_renegotiate_bytes,
|
||||
BIO_get_num_renegotiates, BIO_set_ssl_renegotiate_timeout, BIO_new_ssl,
|
||||
BIO_new_ssl_connect, BIO_new_buffer_ssl_connect, BIO_ssl_copy_session_id,
|
||||
BIO_ssl_shutdown - SSL BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
BIO_METHOD *BIO_f_ssl(void);
|
||||
|
||||
#define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl)
|
||||
#define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp)
|
||||
#define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)
|
||||
#define BIO_set_ssl_renegotiate_bytes(b,num) \
|
||||
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL);
|
||||
#define BIO_set_ssl_renegotiate_timeout(b,seconds) \
|
||||
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL);
|
||||
#define BIO_get_num_renegotiates(b) \
|
||||
BIO_ctrl(b,BIO_C_SET_SSL_NUM_RENEGOTIATES,0,NULL);
|
||||
|
||||
BIO *BIO_new_ssl(SSL_CTX *ctx,int client);
|
||||
BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
|
||||
BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
|
||||
int BIO_ssl_copy_session_id(BIO *to,BIO *from);
|
||||
void BIO_ssl_shutdown(BIO *bio);
|
||||
|
||||
#define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_f_ssl() returns the SSL BIO method. This is a filter BIO which
|
||||
is a wrapper round the OpenSSL SSL routines adding a BIO "flavour" to
|
||||
SSL I/O.
|
||||
|
||||
I/O performed on an SSL BIO communicates using the SSL protocol with
|
||||
the SSLs read and write BIOs. If an SSL connection is not established
|
||||
then an attempt is made to establish one on the first I/O call.
|
||||
|
||||
If a BIO is appended to an SSL BIO using BIO_push() it is automatically
|
||||
used as the SSL BIOs read and write BIOs.
|
||||
|
||||
Calling BIO_reset() on an SSL BIO closes down any current SSL connection
|
||||
by calling SSL_shutdown(). BIO_reset() is then sent to the next BIO in
|
||||
the chain: this will typically disconnect the underlying transport.
|
||||
The SSL BIO is then reset to the initial accept or connect state.
|
||||
|
||||
If the close flag is set when an SSL BIO is freed then the internal
|
||||
SSL structure is also freed using SSL_free().
|
||||
|
||||
BIO_set_ssl() sets the internal SSL pointer of BIO B<b> to B<ssl> using
|
||||
the close flag B<c>.
|
||||
|
||||
BIO_get_ssl() retrieves the SSL pointer of BIO B<b>, it can then be
|
||||
manipulated using the standard SSL library functions.
|
||||
|
||||
BIO_set_ssl_mode() sets the SSL BIO mode to B<client>. If B<client>
|
||||
is 1 client mode is set. If B<client> is 0 server mode is set.
|
||||
|
||||
BIO_set_ssl_renegotiate_bytes() sets the renegotiate byte count
|
||||
to B<num>. When set after every B<num> bytes of I/O (read and write)
|
||||
the SSL session is automatically renegotiated. B<num> must be at
|
||||
least 512 bytes.
|
||||
|
||||
BIO_set_ssl_renegotiate_timeout() sets the renegotiate timeout to
|
||||
B<seconds>. When the renegotiate timeout elapses the session is
|
||||
automatically renegotiated.
|
||||
|
||||
BIO_get_num_renegotiates() returns the total number of session
|
||||
renegotiations due to I/O or timeout.
|
||||
|
||||
BIO_new_ssl() allocates an SSL BIO using SSL_CTX B<ctx> and using
|
||||
client mode if B<client> is non zero.
|
||||
|
||||
BIO_new_ssl_connect() creates a new BIO chain consisting of an
|
||||
SSL BIO (using B<ctx>) followed by a connect BIO.
|
||||
|
||||
BIO_new_buffer_ssl_connect() creates a new BIO chain consisting
|
||||
of a buffering BIO, an SSL BIO (using B<ctx>) and a connect
|
||||
BIO.
|
||||
|
||||
BIO_ssl_copy_session_id() copies an SSL session id between
|
||||
BIO chains B<from> and B<to>. It does this by locating the
|
||||
SSL BIOs in each chain and calling SSL_copy_session_id() on
|
||||
the internal SSL pointer.
|
||||
|
||||
BIO_ssl_shutdown() closes down an SSL connection on BIO
|
||||
chain B<bio>. It does this by locating the SSL BIO in the
|
||||
chain and calling SSL_shutdown() on its internal SSL
|
||||
pointer.
|
||||
|
||||
BIO_do_handshake() attempts to complete an SSL handshake on the
|
||||
supplied BIO and establish the SSL connection. It returns 1
|
||||
if the connection was established successfully. A zero or negative
|
||||
value is returned if the connection could not be established, the
|
||||
call BIO_should_retry() should be used for non blocking connect BIOs
|
||||
to determine if the call should be retried. If an SSL connection has
|
||||
already been established this call has no effect.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
SSL BIOs are exceptional in that if the underlying transport
|
||||
is non blocking they can still request a retry in exceptional
|
||||
circumstances. Specifically this will happen if a session
|
||||
renegotiation takes place during a BIO_read() operation, one
|
||||
case where this happens is when SGC or step up occurs.
|
||||
|
||||
In OpenSSL 0.9.6 and later the SSL flag SSL_AUTO_RETRY can be
|
||||
set to disable this behaviour. That is when this flag is set
|
||||
an SSL BIO using a blocking transport will never request a
|
||||
retry.
|
||||
|
||||
Since unknown BIO_ctrl() operations are sent through filter
|
||||
BIOs the servers name and port can be set using BIO_set_host()
|
||||
on the BIO returned by BIO_new_ssl_connect() without having
|
||||
to locate the connect BIO first.
|
||||
|
||||
Applications do not have to call BIO_do_handshake() but may wish
|
||||
to do so to separate the handshake process from other I/O
|
||||
processing.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
TBA
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
This SSL/TLS client example, attempts to retrieve a page from an
|
||||
SSL/TLS web server. The I/O routines are identical to those of the
|
||||
unencrypted example in L<BIO_s_connect(3)|BIO_s_connect(3)>.
|
||||
|
||||
BIO *sbio, *out;
|
||||
int len;
|
||||
char tmpbuf[1024];
|
||||
SSL_CTX *ctx;
|
||||
SSL *ssl;
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
ERR_load_SSL_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
|
||||
/* We would seed the PRNG here if the platform didn't
|
||||
* do it automatically
|
||||
*/
|
||||
|
||||
ctx = SSL_CTX_new(SSLv23_client_method());
|
||||
|
||||
/* We'd normally set some stuff like the verify paths and
|
||||
* mode here because as things stand this will connect to
|
||||
* any server whose certificate is signed by any CA.
|
||||
*/
|
||||
|
||||
sbio = BIO_new_ssl_connect(ctx);
|
||||
|
||||
BIO_get_ssl(sbio, &ssl);
|
||||
|
||||
if(!ssl) {
|
||||
fprintf(stderr, "Can't locate SSL pointer\n");
|
||||
/* whatever ... */
|
||||
}
|
||||
|
||||
/* Don't want any retries */
|
||||
SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
|
||||
|
||||
/* We might want to do other things with ssl here */
|
||||
|
||||
BIO_set_conn_hostname(sbio, "localhost:https");
|
||||
|
||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
if(BIO_do_connect(sbio) <= 0) {
|
||||
fprintf(stderr, "Error connecting to server\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
/* whatever ... */
|
||||
}
|
||||
|
||||
if(BIO_do_handshake(sbio) <= 0) {
|
||||
fprintf(stderr, "Error establishing SSL connection\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
/* whatever ... */
|
||||
}
|
||||
|
||||
/* Could examine ssl here to get connection info */
|
||||
|
||||
BIO_puts(sbio, "GET / HTTP/1.0\n\n");
|
||||
for(;;) {
|
||||
len = BIO_read(sbio, tmpbuf, 1024);
|
||||
if(len <= 0) break;
|
||||
BIO_write(out, tmpbuf, len);
|
||||
}
|
||||
BIO_free_all(sbio);
|
||||
BIO_free(out);
|
||||
|
||||
Here is a simple server example. It makes use of a buffering
|
||||
BIO to allow lines to be read from the SSL BIO using BIO_gets.
|
||||
It creates a pseudo web page containing the actual request from
|
||||
a client and also echoes the request to standard output.
|
||||
|
||||
BIO *sbio, *bbio, *acpt, *out;
|
||||
int len;
|
||||
char tmpbuf[1024];
|
||||
SSL_CTX *ctx;
|
||||
SSL *ssl;
|
||||
|
||||
ERR_load_crypto_strings();
|
||||
ERR_load_SSL_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
|
||||
/* Might seed PRNG here */
|
||||
|
||||
ctx = SSL_CTX_new(SSLv23_server_method());
|
||||
|
||||
if (!SSL_CTX_use_certificate_file(ctx,"server.pem",SSL_FILETYPE_PEM)
|
||||
|| !SSL_CTX_use_PrivateKey_file(ctx,"server.pem",SSL_FILETYPE_PEM)
|
||||
|| !SSL_CTX_check_private_key(ctx)) {
|
||||
|
||||
fprintf(stderr, "Error setting up SSL_CTX\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Might do other things here like setting verify locations and
|
||||
* DH and/or RSA temporary key callbacks
|
||||
*/
|
||||
|
||||
/* New SSL BIO setup as server */
|
||||
sbio=BIO_new_ssl(ctx,0);
|
||||
|
||||
BIO_get_ssl(sbio, &ssl);
|
||||
|
||||
if(!ssl) {
|
||||
fprintf(stderr, "Can't locate SSL pointer\n");
|
||||
/* whatever ... */
|
||||
}
|
||||
|
||||
/* Don't want any retries */
|
||||
SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
|
||||
|
||||
/* Create the buffering BIO */
|
||||
|
||||
bbio = BIO_new(BIO_f_buffer());
|
||||
|
||||
/* Add to chain */
|
||||
sbio = BIO_push(bbio, sbio);
|
||||
|
||||
acpt=BIO_new_accept("4433");
|
||||
|
||||
/* By doing this when a new connection is established
|
||||
* we automatically have sbio inserted into it. The
|
||||
* BIO chain is now 'swallowed' by the accept BIO and
|
||||
* will be freed when the accept BIO is freed.
|
||||
*/
|
||||
|
||||
BIO_set_accept_bios(acpt,sbio);
|
||||
|
||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
|
||||
/* Setup accept BIO */
|
||||
if(BIO_do_accept(acpt) <= 0) {
|
||||
fprintf(stderr, "Error setting up accept BIO\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Now wait for incoming connection */
|
||||
if(BIO_do_accept(acpt) <= 0) {
|
||||
fprintf(stderr, "Error in connection\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* We only want one connection so remove and free
|
||||
* accept BIO
|
||||
*/
|
||||
|
||||
sbio = BIO_pop(acpt);
|
||||
|
||||
BIO_free_all(acpt);
|
||||
|
||||
if(BIO_do_handshake(sbio) <= 0) {
|
||||
fprintf(stderr, "Error in SSL handshake\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BIO_puts(sbio, "HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n");
|
||||
BIO_puts(sbio, "<pre>\r\nConnection Established\r\nRequest headers:\r\n");
|
||||
BIO_puts(sbio, "--------------------------------------------------\r\n");
|
||||
|
||||
for(;;) {
|
||||
len = BIO_gets(sbio, tmpbuf, 1024);
|
||||
if(len <= 0) break;
|
||||
BIO_write(sbio, tmpbuf, len);
|
||||
BIO_write(out, tmpbuf, len);
|
||||
/* Look for blank line signifying end of headers*/
|
||||
if((tmpbuf[0] == '\r') || (tmpbuf[0] == '\n')) break;
|
||||
}
|
||||
|
||||
BIO_puts(sbio, "--------------------------------------------------\r\n");
|
||||
BIO_puts(sbio, "</pre>\r\n");
|
||||
|
||||
/* Since there is a buffering BIO present we had better flush it */
|
||||
BIO_flush(sbio);
|
||||
|
||||
BIO_free_all(sbio);
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
@@ -40,7 +40,7 @@ BIO_free_all() and BIO_vfree() do not return values.
|
||||
=head1 NOTES
|
||||
|
||||
Some BIOs (such as memory BIOs) can be used immediately after calling
|
||||
BIO_new(). Others (such as file BIOs) need some additional initialisation,
|
||||
BIO_new(). Others (such as file BIOs) need some additional initialization,
|
||||
and frequently a utility function exists to create and initialize such BIOs.
|
||||
|
||||
If BIO_free() is called on a BIO chain it will only free one BIO resulting
|
||||
|
||||
102
doc/crypto/BIO_new_bio_pair.pod
Normal file
102
doc/crypto/BIO_new_bio_pair.pod
Normal file
@@ -0,0 +1,102 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_new_bio_pair - create a new BIO pair
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_new_bio_pair() creates a buffering BIO pair. It has two endpoints between
|
||||
data can be buffered. Its typical use is to connect one endpoint as underlying
|
||||
input/output BIO to an SSL and access the other one controlled by the program
|
||||
instead of accessing the network connection directly.
|
||||
|
||||
The two new BIOs B<bio1> and B<bio2> are symmetric with respect to their
|
||||
functionality. The size of their buffers is determined by B<writebuf1> and
|
||||
B<writebuf2>. If the size give is 0, the default size is used.
|
||||
|
||||
BIO_new_bio_pair() does not check whether B<bio1> or B<bio2> do point to
|
||||
some other BIO, the values are overwritten, BIO_free() is not called.
|
||||
|
||||
The two BIOs, even though forming a BIO pair and must be BIO_free()'ed
|
||||
separately. This can be of importance, as some SSL-functions like SSL_set_bio()
|
||||
or SSL_free() call BIO_free() implicitly, so that the peer-BIO is left
|
||||
untouched and must also be BIO_free()'ed.
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
The BIO pair can be used to have full control over the network access of an
|
||||
application. The application can call select() on the socket as required
|
||||
without having to go through the SSL-interface.
|
||||
|
||||
BIO *internal_bio, *network_bio;
|
||||
...
|
||||
BIO_new_bio_pair(internal_bio, 0, network_bio, 0);
|
||||
SSL_set_bio(ssl, internal_bio);
|
||||
SSL_operations();
|
||||
...
|
||||
|
||||
application | TLS-engine
|
||||
| |
|
||||
+----------> SSL_operations()
|
||||
| /\ ||
|
||||
| || \/
|
||||
| BIO-pair (internal_bio)
|
||||
+----------< BIO-pair (network_bio)
|
||||
| |
|
||||
socket |
|
||||
|
||||
...
|
||||
SSL_free(ssl); /* implicitly frees internal_bio */
|
||||
BIO_free(network_bio);
|
||||
...
|
||||
|
||||
As the BIO pair will only buffer the data and never directly access the
|
||||
connection, it behaves non-blocking and will return as soon as the write
|
||||
buffer is full or the read buffer is drained. Then the application has to
|
||||
flush the write buffer and/or fill the read buffer.
|
||||
|
||||
Use the BIO_ctrl_pending(), to find out whether data is buffered in the BIO
|
||||
and must be transfered to the network. Use BIO_ctrl_get_read_request() to
|
||||
find out, how many bytes must be written into the buffer before the
|
||||
SSL_operation() can successfully be continued.
|
||||
|
||||
=head1 IMPORTANT
|
||||
|
||||
As the data is buffered, SSL_operation() may return with a ERROR_SSL_WANT_READ
|
||||
condition, but there is still data in the write buffer. An application must
|
||||
not rely on the error value of SSL_operation() but must assure that the
|
||||
write buffer is always flushed first. Otherwise a deadlock may occur as
|
||||
the peer might be waiting for the data before being able to continue.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 1
|
||||
|
||||
The BIO pair was created successfully. The new BIOs are available in
|
||||
B<bio1> and B<bio2>.
|
||||
|
||||
=item 0
|
||||
|
||||
The operation failed. The NULL pointer is stored into the locations for
|
||||
B<bio1> and B<bio2>. Check the error stack for more information.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_set_bio(3)|SSL_set_bio(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>,
|
||||
L<BIO_ctrl_pending(3)|BIO_ctrl_pending(3)>,
|
||||
L<BIO_ctrl_get_read_request(3)|BIO_ctrl_get_read_request(3)>
|
||||
|
||||
=cut
|
||||
@@ -32,16 +32,28 @@ BIO_puts() attempts to write a null terminated string B<buf> to BIO B<b>
|
||||
|
||||
All these functions return either the amount of data successfully read or
|
||||
written (if the return value is positive) or that no data was successfully
|
||||
read or written (if the result is zero or negative).
|
||||
read or written if the result is 0 or -1. If the return value is -2 then
|
||||
the operation is not implemented in the specific BIO type.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
A negative or zero return is not necessarily an indication of an error. In
|
||||
particular when the source/sink is non-blocking or of a certain type (for
|
||||
example an SSL BIO can retry even if the underlying connection is blocking)
|
||||
A 0 or -1 return is not necessarily an indication of an error. In
|
||||
particular when the source/sink is non-blocking or of a certain type
|
||||
it may merely be an indication that no data is currently available and that
|
||||
the application should retry the operation later. L<BIO_should_retry(3)|BIO_should_retry(3)>
|
||||
can be called to determine the precise cause.
|
||||
the application should retry the operation later.
|
||||
|
||||
One technique sometimes used with blocking sockets is to use a system call
|
||||
(such as select(), poll() or equivalent) to determine when data is available
|
||||
and then call read() to read the data. The equivalent with BIOs (that is call
|
||||
select() on the underlying I/O structure and then call BIO_read() to
|
||||
read the data) should B<not> be used because a single call to BIO_read()
|
||||
can cause several reads (and writes in the case of SSL BIOs) on the underlying
|
||||
I/O structure and may block as a result. Instead select() (or equivalent)
|
||||
should be combined with non blocking I/O so successive reads will request
|
||||
a retry instead of blocking.
|
||||
|
||||
See L<BIO_should_retry(3)|BIO_should_retry(3)> for details of how to
|
||||
determine the cause of a retry and other I/O issues.
|
||||
|
||||
If the BIO_gets() function is not supported by a BIO then it possible to
|
||||
work around this by adding a buffering BIO L<BIO_f_buffer(3)|BIO_f_buffer(3)>
|
||||
@@ -49,4 +61,6 @@ to the chain.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<BIO_should_retry(3)|BIO_should_retry(3)>
|
||||
|
||||
TBA
|
||||
|
||||
184
doc/crypto/BIO_s_accept.pod
Normal file
184
doc/crypto/BIO_s_accept.pod
Normal file
@@ -0,0 +1,184 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_s_accept, BIO_set_nbio, BIO_set_accept_port, BIO_get_accept_port,
|
||||
BIO_set_nbio_accept, BIO_set_accept_bios, BIO_set_bind_mode,
|
||||
BIO_get_bind_mode, BIO_do_accept - accept BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD * BIO_s_accept(void);
|
||||
|
||||
#define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name)
|
||||
#define BIO_get_accept_port(b) BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0)
|
||||
|
||||
BIO *BIO_new_accept(char *host_port);
|
||||
|
||||
#define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?"a":NULL)
|
||||
#define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio)
|
||||
|
||||
#define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL)
|
||||
#define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL)
|
||||
|
||||
#define BIO_BIND_NORMAL 0
|
||||
#define BIO_BIND_REUSEADDR_IF_UNUSED 1
|
||||
#define BIO_BIND_REUSEADDR 2
|
||||
|
||||
#define BIO_do_accept(b) BIO_do_handshake(b)
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_s_accept() returns the accept BIO method. This is a wrapper
|
||||
round the platform's TCP/IP socket accept routines.
|
||||
|
||||
Using accept BIOs TCP/IP connections can be accepted and data
|
||||
transferred using only BIO routines. In this way any platform
|
||||
specific operations are hidden by the BIO abstraction.
|
||||
|
||||
Read and write operations on an accept BIO will perform I/O
|
||||
on the underlying connection. If no connection is established
|
||||
and the port (see below) is set up properly then the BIO
|
||||
waits for an incoming connection.
|
||||
|
||||
Accept BIOs support BIO_puts() but not BIO_gets().
|
||||
|
||||
If the close flag is set on an accept BIO then any active
|
||||
connection on that chain is shutdown and the socket closed when
|
||||
the BIO is freed.
|
||||
|
||||
Calling BIO_reset() on a accept BIO will close any active
|
||||
connection and reset the BIO into a state where it awaits another
|
||||
incoming connection.
|
||||
|
||||
BIO_get_fd() and BIO_set_fd() can be called to retrieve or set
|
||||
the accept socket. See L<BIO_s_fd(3)|BIO_s_fd(3)>
|
||||
|
||||
BIO_set_accept_port() uses the string B<name> to set the accept
|
||||
port. The port is represented as a string of the form "host:port",
|
||||
where "host" is the interface to use and "port" is the port.
|
||||
Either or both values can be "*" which is interpreted as meaning
|
||||
any interface or port respectively. "port" has the same syntax
|
||||
as the port specified in BIO_set_conn_port() for connect BIOs,
|
||||
that is it can be a numerical port string or a string to lookup
|
||||
using getservbyname() and a string table.
|
||||
|
||||
BIO_new_accept() combines BIO_new() and BIO_set_accept_port() into
|
||||
a single call: that is it creates a new accept BIO with port
|
||||
B<host_port>.
|
||||
|
||||
BIO_set_nbio_accept() sets the accept socket to blocking mode
|
||||
(the default) if B<n> is 0 or non blocking mode if B<n> is 1.
|
||||
|
||||
BIO_set_accept_bios() can be used to set a chain of BIOs which
|
||||
will be duplicated and prepended to the chain when an incoming
|
||||
connection is received. This is useful if, for example, a
|
||||
buffering or SSL BIO is required for each connection. The
|
||||
chain of BIOs must not be freed after this call, they will
|
||||
be automatically freed when the accept BIO is freed.
|
||||
|
||||
BIO_set_bind_mode() and BIO_get_bind_mode() set and retrieve
|
||||
the current bind mode. If BIO_BIND_NORMAL (the default) is set
|
||||
then another socket cannot be bound to the same port. If
|
||||
BIO_BIND_REUSEADDR is set then other sockets can bind to the
|
||||
same port. If BIO_BIND_REUSEADDR_IF_UNUSED is set then and
|
||||
attempt is first made to use BIO_BIN_NORMAL, if this fails
|
||||
and the port is not in use then a second attempt is made
|
||||
using BIO_BIND_REUSEADDR.
|
||||
|
||||
BIO_do_accept() serves two functions. When it is first
|
||||
called, after the accept BIO has been setup, it will attempt
|
||||
to create the accept socket and bind an address to it. Second
|
||||
and subsequent calls to BIO_do_accept() will await an incoming
|
||||
connection.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
When an accept BIO is at the end of a chain it will await an
|
||||
incoming connection before processing I/O calls. When an accept
|
||||
BIO is not at then end of a chain it passes I/O calls to the next
|
||||
BIO in the chain.
|
||||
|
||||
When a connection is established a new socket BIO is created for
|
||||
the connection and appended to the chain. That is the chain is now
|
||||
accept->socket. This effectively means that attempting I/O on
|
||||
an initial accept socket will await an incoming connection then
|
||||
perform I/O on it.
|
||||
|
||||
If any additional BIOs have been set using BIO_set_accept_bios()
|
||||
then they are placed between the socket and the accept BIO,
|
||||
that is the chain will be accept->otherbios->socket.
|
||||
|
||||
If a server wishes to process multiple connections (as is normally
|
||||
the case) then the accept BIO must be made available for further
|
||||
incoming connections. This can be done by waiting for a connection and
|
||||
then calling:
|
||||
|
||||
connection = BIO_pop(accept);
|
||||
|
||||
After this call B<connection> will contain a BIO for the recently
|
||||
established connection and B<accept> will now be a single BIO
|
||||
again which can be used to await further incoming connections.
|
||||
If no further connections will be accepted the B<accept> can
|
||||
be freed using BIO_free().
|
||||
|
||||
If only a single connection will be processed it is possible to
|
||||
perform I/O using the accept BIO itself. This is often undesirable
|
||||
however because the accept BIO will still accept additional incoming
|
||||
connections. This can be resolved by using BIO_pop() (see above)
|
||||
and freeing up the accept BIO after the initial connection.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
TBA
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
This example accepts two connections on port 4444, sends messages
|
||||
down each and finally closes both down.
|
||||
|
||||
BIO *abio, *cbio, *cbio2;
|
||||
ERR_load_crypto_strings();
|
||||
abio = BIO_new_accept("4444");
|
||||
|
||||
/* First call to BIO_accept() sets up accept BIO */
|
||||
if(BIO_do_accept(abio) <= 0) {
|
||||
fprintf(stderr, "Error setting up accept\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* Wait for incoming connection */
|
||||
if(BIO_do_accept(abio) <= 0) {
|
||||
fprintf(stderr, "Error accepting connection\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
exit(0);
|
||||
}
|
||||
fprintf(stderr, "Connection 1 established\n");
|
||||
/* Retrieve BIO for connection */
|
||||
cbio = BIO_pop(abio);
|
||||
BIO_puts(cbio, "Connection 1: Sending out Data on initial connection\n");
|
||||
fprintf(stderr, "Sent out data on connection 1\n");
|
||||
/* Wait for another connection */
|
||||
if(BIO_do_accept(abio) <= 0) {
|
||||
fprintf(stderr, "Error accepting connection\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
exit(0);
|
||||
}
|
||||
fprintf(stderr, "Connection 2 established\n");
|
||||
/* Close accept BIO to refuse further connections */
|
||||
cbio2 = BIO_pop(abio);
|
||||
BIO_free(abio);
|
||||
BIO_puts(cbio2, "Connection 2: Sending out Data on second\n");
|
||||
fprintf(stderr, "Sent out data on connection 2\n");
|
||||
|
||||
BIO_puts(cbio, "Connection 1: Second connection established\n");
|
||||
/* Close the two established connections */
|
||||
BIO_free(cbio);
|
||||
BIO_free(cbio2);
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
130
doc/crypto/BIO_s_bio.pod
Normal file
130
doc/crypto/BIO_s_bio.pod
Normal file
@@ -0,0 +1,130 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_s_bio, BIO_make_bio_pair, BIO_destroy_bio_pair, BIO_shutdown_wr,
|
||||
BIO_set_write_buf_size, BIO_get_write_buf_size, BIO_new_bio_pair,
|
||||
BIO_get_write_guarantee, BIO_ctrl_get_write_guarantee, BIO_get_read_request,
|
||||
BIO_ctrl_get_read_request, BIO_ctrl_reset_read_request - BIO pair BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD *BIO_s_bio(void);
|
||||
|
||||
#define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
|
||||
#define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
|
||||
|
||||
#define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
||||
|
||||
#define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL)
|
||||
#define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
|
||||
|
||||
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2);
|
||||
|
||||
#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
|
||||
size_t BIO_ctrl_get_write_guarantee(BIO *b);
|
||||
|
||||
#define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
|
||||
size_t BIO_ctrl_get_read_request(BIO *b);
|
||||
|
||||
int BIO_ctrl_reset_read_request(BIO *b);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_s_bio() returns the method for a BIO pair. A BIO pair is a pair of source/sink
|
||||
BIOs where data written to either half of the pair is buffered and can be read from
|
||||
the other half. Both halves must usually by handled by the same application thread
|
||||
since no locking is done on the internal data structures.
|
||||
|
||||
Since BIO chains typically end in a source/sink BIO it is possible to make this
|
||||
one half of a BIO pair and have all the data processed by the chain under application
|
||||
control.
|
||||
|
||||
One typical use of BIO pairs is to place TLS/SSL I/O under application control, this
|
||||
can be used when the application wishes to use a non standard transport for
|
||||
TLS/SSL or the normal socket routines are inappropriate.
|
||||
|
||||
Calls to BIO_read() will read data from the buffer or request a retry if no
|
||||
data is available.
|
||||
|
||||
Calls to BIO_write() will place data in the buffer or request a retry if the
|
||||
buffer is full.
|
||||
|
||||
The standard calls BIO_ctrl_pending() and BIO_ctrl_wpending() can be used to
|
||||
determine the amount of pending data in the read or write buffer.
|
||||
|
||||
BIO_reset() clears any data in the write buffer.
|
||||
|
||||
BIO_make_bio_pair() joins two separate BIOs into a connected pair.
|
||||
|
||||
BIO_destroy_pair() destroys the association between two connected BIOs. Freeing
|
||||
up any half of the pair will automatically destroy the association.
|
||||
|
||||
BIO_shutdown_wr() is used to close down a BIO B<b>. After this call no further
|
||||
writes on BIO B<b> are allowed (they will return an error). Reads on the other
|
||||
half of the pair will return any pending data or EOF when all pending data has
|
||||
been read.
|
||||
|
||||
BIO_set_write_buf_size() sets the write buffer size of BIO B<b> to B<size>.
|
||||
If the size is not initialized a default value is used. This is currently
|
||||
17K, sufficient for a maximum size TLS record.
|
||||
|
||||
BIO_get_write_buf_size() returns the size of the write buffer.
|
||||
|
||||
BIO_new_bio_pair() combines the calls to BIO_new(), BIO_make_bio_pair() and
|
||||
BIO_set_write_buf_size() to create a connected pair of BIOs B<bio1>, B<bio2>
|
||||
with write buffer sizes B<writebuf1> and B<writebuf2>. If either size is
|
||||
zero then the default size is used.
|
||||
|
||||
BIO_get_write_guarantee() and BIO_ctrl_get_write_guarantee() return the maximum
|
||||
length of data that can be currently written to the BIO. Writes larger than this
|
||||
value will return a value from BIO_write() less than the amount requested or if the
|
||||
buffer is full request a retry. BIO_ctrl_get_write_guarantee() is a function
|
||||
whereas BIO_get_write_guarantee() is a macro.
|
||||
|
||||
BIO_get_read_request() and BIO_ctrl_get_read_request() return the
|
||||
amount of data requested, or the buffer size if it is less, if the
|
||||
last read attempt at the other half of the BIO pair failed due to an
|
||||
empty buffer. This can be used to determine how much data should be
|
||||
written to the BIO so the next read will succeed: this is most useful
|
||||
in TLS/SSL applications where the amount of data read is usually
|
||||
meaningful rather than just a buffer size. After a successful read
|
||||
this call will return zero. It also will return zero once new data
|
||||
has been written satisfying the read request or part of it.
|
||||
Note that BIO_get_read_request() never returns an amount larger
|
||||
than that returned by BIO_get_write_guarantee().
|
||||
|
||||
BIO_ctrl_reset_read_request() can also be used to reset the value returned by
|
||||
BIO_get_read_request() to zero.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Both halves of a BIO pair should be freed. That is even if one half is implicit
|
||||
freed due to a BIO_free_all() or SSL_free() call the other half needs to be freed.
|
||||
|
||||
When used in bidirectional applications (such as TLS/SSL) care should be taken to
|
||||
flush any data in the write buffer. This can be done by calling BIO_pending()
|
||||
on the other half of the pair and, if any data is pending, reading it and sending
|
||||
it to the underlying transport. This must be done before any normal processing
|
||||
(such as calling select() ) due to a request and BIO_should_read() being true.
|
||||
|
||||
To see why this is important consider a case where a request is sent using
|
||||
BIO_write() and a response read with BIO_read(), this can occur during an
|
||||
TLS/SSL handshake for example. BIO_write() will succeed and place data in the write
|
||||
buffer. BIO_read() will initially fail and BIO_should_read() will be true. If
|
||||
the application then waits for data to be available on the underlying transport
|
||||
before flushing the write buffer it will never succeed because the request was
|
||||
never sent!
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
TBA
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_set_bio(3)|SSL_set_bio(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>,
|
||||
L<BIO_should_retry(3)|BIO_should_retry(3)>, L<BIO_read(3)|BIO_read(3)>
|
||||
|
||||
=cut
|
||||
182
doc/crypto/BIO_s_connect.pod
Normal file
182
doc/crypto/BIO_s_connect.pod
Normal file
@@ -0,0 +1,182 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port,
|
||||
BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname,
|
||||
BIO_get_conn_port, BIO_get_conn_ip, BIO_get_conn_int_port,
|
||||
BIO_set_nbio, BIO_do_connect - connect BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD * BIO_s_connect(void);
|
||||
|
||||
#define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name)
|
||||
#define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port)
|
||||
#define BIO_set_conn_ip(b,ip) BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip)
|
||||
#define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)
|
||||
#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
|
||||
#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
|
||||
#define BIO_get_conn_ip(b,ip) BIO_ptr_ctrl(b,BIO_C_SET_CONNECT,2)
|
||||
#define BIO_get_conn_int_port(b,port) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,port)
|
||||
|
||||
#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
||||
|
||||
#define BIO_do_connect(b) BIO_do_handshake(b)
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_s_connect() returns the connect BIO method. This is a wrapper
|
||||
round the platform's TCP/IP socket connection routines.
|
||||
|
||||
Using connect BIOs TCP/IP connections can be made and data
|
||||
transferred using only BIO routines. In this way any platform
|
||||
specific operations are hidden by the BIO abstraction.
|
||||
|
||||
Read and write operations on a connect BIO will perform I/O
|
||||
on the underlying connection. If no connection is established
|
||||
and the port and hostname (see below) is set up properly then
|
||||
a connection is established first.
|
||||
|
||||
Connect BIOs support BIO_puts() but not BIO_gets().
|
||||
|
||||
If the close flag is set on a connect BIO then any active
|
||||
connection is shutdown and the socket closed when the BIO
|
||||
is freed.
|
||||
|
||||
Calling BIO_reset() on a connect BIO will close any active
|
||||
connection and reset the BIO into a state where it can connect
|
||||
to the same host again.
|
||||
|
||||
BIO_get_fd() places the underlying socket in B<c> if it is not NULL,
|
||||
it also returns the socket . If B<c> is not NULL it should be of
|
||||
type (int *).
|
||||
|
||||
BIO_set_conn_hostname() uses the string B<name> to set the hostname
|
||||
The hostname can be an IP address. The hostname can also include the
|
||||
port in the form hostname:port . It is also acceptable to use the
|
||||
form "hostname/any/other/path" or "hostname:port/any/other/path".
|
||||
|
||||
BIO_set_conn_port() sets the port to B<port>. B<port> can be the
|
||||
numerical form or a string such as "http". A string will be looked
|
||||
up first using getservbyname() on the host platform but if that
|
||||
fails a standard table of port names will be used. Currently the
|
||||
list is http, telnet, socks, https, ssl, ftp, gopher and wais.
|
||||
|
||||
BIO_set_conn_ip() sets the IP address to B<ip> using binary form,
|
||||
that is four bytes specifying the IP address in big-endian form.
|
||||
|
||||
BIO_set_conn_int_port() sets the port using B<port>. B<port> should
|
||||
be of type (int *).
|
||||
|
||||
BIO_get_conn_hostname() returns the hostname of the connect BIO or
|
||||
NULL if the BIO is initialized but no hostname is set.
|
||||
This return value is an internal pointer which should not be modified.
|
||||
|
||||
BIO_get_conn_port() returns the port as a string.
|
||||
|
||||
BIO_get_conn_ip() returns the IP address in binary form.
|
||||
|
||||
BIO_get_conn_int_port() returns the port as an int.
|
||||
|
||||
BIO_set_nbio() sets the non blocking I/O flag to B<n>. If B<n> is
|
||||
zero then blocking I/O is set. If B<n> is 1 then non blocking I/O
|
||||
is set. Blocking I/O is the default. The call to BIO_set_nbio()
|
||||
should be made before the connection is established because
|
||||
non blocking I/O is set during the connect process.
|
||||
|
||||
BIO_do_connect() attempts to connect the supplied BIO. It returns 1
|
||||
if the connection was established successfully. A zero or negative
|
||||
value is returned if the connection could not be established, the
|
||||
call BIO_should_retry() should be used for non blocking connect BIOs
|
||||
to determine if the call should be retried.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
If blocking I/O is set then a non positive return value from any
|
||||
I/O call is caused by an error condition, although a zero return
|
||||
will normally mean that the connection was closed.
|
||||
|
||||
If the port name is supplied as part of the host name then this will
|
||||
override any value set with BIO_set_conn_port(). This may be undesirable
|
||||
if the application does not wish to allow connection to arbitrary
|
||||
ports. This can be avoided by checking for the presence of the ':'
|
||||
character in the passed hostname and either indicating an error or
|
||||
truncating the string at that point.
|
||||
|
||||
The values returned by BIO_get_conn_hostname(), BIO_get_conn_port(),
|
||||
BIO_get_conn_ip() and BIO_get_conn_int_port() are updated when a
|
||||
connection attempt is made. Before any connection attempt the values
|
||||
returned are those set by the application itself.
|
||||
|
||||
Applications do not have to call BIO_do_connect() but may wish to do
|
||||
so to separate the connection process from other I/O processing.
|
||||
|
||||
If non blocking I/O is set then retries will be requested as appropriate.
|
||||
|
||||
It addition to BIO_should_read() and BIO_should_write() it is also
|
||||
possible for BIO_should_io_special() to be true during the initial
|
||||
connection process with the reason BIO_RR_CONNECT. If this is returned
|
||||
then this is an indication that a connection attempt would block,
|
||||
the application should then take appropriate action to wait until
|
||||
the underlying socket has connected and retry the call.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
BIO_s_connect() returns the connect BIO method.
|
||||
|
||||
BIO_get_fd() returns the socket or -1 if the BIO has not
|
||||
been initialized.
|
||||
|
||||
BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_set_conn_ip() and
|
||||
BIO_set_conn_int_port() always return 1.
|
||||
|
||||
BIO_get_conn_hostname() returns the connected hostname or NULL is
|
||||
none was set.
|
||||
|
||||
BIO_get_conn_port() returns a string representing the connected
|
||||
port or NULL if not set.
|
||||
|
||||
BIO_get_conn_ip() returns a pointer to the connected IP address in
|
||||
binary form or all zeros if not set.
|
||||
|
||||
BIO_get_conn_int_port() returns the connected port or 0 if none was
|
||||
set.
|
||||
|
||||
BIO_set_nbio() always returns 1.
|
||||
|
||||
BIO_do_connect() returns 1 if the connection was successfully
|
||||
established and 0 or -1 if the connection failed.
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
This is example connects to a webserver on the local host and attempts
|
||||
to retrieve a page and copy the result to standard output.
|
||||
|
||||
|
||||
BIO *cbio, *out;
|
||||
int len;
|
||||
char tmpbuf[1024];
|
||||
ERR_load_crypto_strings();
|
||||
cbio = BIO_new_connect("localhost:http");
|
||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
if(BIO_do_connect(cbio) <= 0) {
|
||||
fprintf(stderr, "Error connecting to server\n");
|
||||
ERR_print_errors_fp(stderr);
|
||||
/* whatever ... */
|
||||
}
|
||||
BIO_puts(cbio, "GET / HTTP/1.0\n\n");
|
||||
for(;;) {
|
||||
len = BIO_read(cbio, tmpbuf, 1024);
|
||||
if(len <= 0) break;
|
||||
BIO_write(out, tmpbuf, len);
|
||||
}
|
||||
BIO_free(cbio);
|
||||
BIO_free(out);
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
89
doc/crypto/BIO_s_fd.pod
Normal file
89
doc/crypto/BIO_s_fd.pod
Normal file
@@ -0,0 +1,89 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd - file descriptor BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD * BIO_s_fd(void);
|
||||
|
||||
#define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
|
||||
#define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)
|
||||
|
||||
BIO *BIO_new_fd(int fd, int close_flag);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_s_fd() returns the file descriptor BIO method. This is a wrapper
|
||||
round the platforms file descriptor routines such as read() and write().
|
||||
|
||||
BIO_read() and BIO_write() read or write the underlying descriptor.
|
||||
BIO_puts() is supported but BIO_gets() is not.
|
||||
|
||||
If the close flag is set then then close() is called on the underlying
|
||||
file descriptor when the BIO is freed.
|
||||
|
||||
BIO_reset() attempts to change the file pointer to the start of file
|
||||
using lseek(fd, 0, 0).
|
||||
|
||||
BIO_seek() sets the file pointer to position B<ofs> from start of file
|
||||
using lseek(fd, ofs, 0).
|
||||
|
||||
BIO_tell() returns the current file position by calling lseek(fd, 0, 1).
|
||||
|
||||
BIO_set_fd() sets the file descriptor of BIO B<b> to B<fd> and the close
|
||||
flag to B<c>.
|
||||
|
||||
BIO_get_fd() places the file descriptor in B<c> if it is not NULL, it also
|
||||
returns the file descriptor. If B<c> is not NULL it should be of type
|
||||
(int *).
|
||||
|
||||
BIO_new_fd() returns a file descriptor BIO using B<fd> and B<close_flag>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The behaviour of BIO_read() and BIO_write() depends on the behavior of the
|
||||
platforms read() and write() calls on the descriptor. If the underlying
|
||||
file descriptor is in a non blocking mode then the BIO will behave in the
|
||||
manner described in the L<BIO_read(3)|BIO_read(3)> and L<BIO_should_retry(3)|BIO_should_retry(3)>
|
||||
manual pages.
|
||||
|
||||
File descriptor BIOs should not be used for socket I/O. Use socket BIOs
|
||||
instead.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
BIO_s_fd() returns the file descriptor BIO method.
|
||||
|
||||
BIO_reset() returns zero for success and -1 if an error occurred.
|
||||
BIO_seek() and BIO_tell() return the current file position or -1
|
||||
is an error occurred. These values reflect the underlying lseek()
|
||||
behaviour.
|
||||
|
||||
BIO_set_fd() always returns 1.
|
||||
|
||||
BIO_get_fd() returns the file descriptor or -1 if the BIO has not
|
||||
been initialized.
|
||||
|
||||
BIO_new_fd() returns the newly allocated BIO or NULL is an error
|
||||
occurred.
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
This is a file descriptor BIO version of "Hello World":
|
||||
|
||||
BIO *out;
|
||||
out = BIO_new_fd(fileno(stdout), BIO_NOCLOSE);
|
||||
BIO_printf(out, "Hello World\n");
|
||||
BIO_free(out);
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<BIO_seek(3)|BIO_seek(3)>, L<BIO_tell(3)|BIO_tell(3)>,
|
||||
L<BIO_reset(3)|BIO_reset(3)>, L<BIO_read(3)|BIO_read(3)>,
|
||||
L<BIO_write(3)|BIO_write(3)>, L<BIO_puts(3)|BIO_puts(3)>,
|
||||
L<BIO_gets(3)|BIO_gets(3)>, L<BIO_printf(3)|BIO_printf(3)>,
|
||||
L<BIO_set_close(3)|BIO_set_close(3)>, L<BIO_get_close(3)|BIO_get_close(3)>
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_s_file - FILE bio.
|
||||
BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp,
|
||||
BIO_read_filename, BIO_write_filename, BIO_append_filename,
|
||||
BIO_rw_filename - FILE bio
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -15,9 +17,6 @@
|
||||
BIO_set_fp(BIO *b,FILE *fp, int flags);
|
||||
BIO_get_fp(BIO *b,FILE **fpp);
|
||||
|
||||
BIO_seek(BIO *b,int offset);
|
||||
int BIO_tell(BIO *b);
|
||||
|
||||
int BIO_read_filename(BIO *b, char *name)
|
||||
int BIO_write_filename(BIO *b, char *name)
|
||||
int BIO_append_filename(BIO *b, char *name)
|
||||
@@ -35,8 +34,11 @@ underlying stream. BIO_gets() and BIO_puts() are supported on file BIOs.
|
||||
BIO_flush() on a file BIO calls the fflush() function on the wrapped
|
||||
stream.
|
||||
|
||||
BIO_reset() on a file BIO calls fseek() to reset the position indicator
|
||||
to the start of the file.
|
||||
BIO_reset() attempts to change the file pointer to the start of file
|
||||
using fseek(stream, 0, 0).
|
||||
|
||||
BIO_seek() sets the file pointer to position B<ofs> from start of file
|
||||
using lseek(stream, ofs, 0).
|
||||
|
||||
BIO_eof() calls feof().
|
||||
|
||||
@@ -127,4 +129,9 @@ BIO_rw_filename() return 1 for success or 0 for failure.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
L<BIO_seek(3)|BIO_seek(3)>, L<BIO_tell(3)|BIO_tell(3)>,
|
||||
L<BIO_reset(3)|BIO_reset(3)>, L<BIO_flush(3)|BIO_flush(3)>,
|
||||
L<BIO_read(3)|BIO_read(3)>,
|
||||
L<BIO_write(3)|BIO_write(3)>, L<BIO_puts(3)|BIO_puts(3)>,
|
||||
L<BIO_gets(3)|BIO_gets(3)>, L<BIO_printf(3)|BIO_printf(3)>,
|
||||
L<BIO_set_close(3)|BIO_set_close(3)>, L<BIO_get_close(3)|BIO_get_close(3)>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_s_mem - memory BIO
|
||||
BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf,
|
||||
BIO_get_mem_ptr, BIO_new_mem_buf - memory BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -86,9 +87,7 @@ There should be a way to "rewind" a read write BIO without destroying
|
||||
its contents.
|
||||
|
||||
The copying operation should not occur after every small read of a large BIO
|
||||
to improve efficieny.
|
||||
|
||||
There shoy
|
||||
to improve efficiency.
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
|
||||
61
doc/crypto/BIO_s_socket.pod
Normal file
61
doc/crypto/BIO_s_socket.pod
Normal file
@@ -0,0 +1,61 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_s_socket, BIO_new_socket - socket BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
BIO_METHOD * BIO_s_socket(void);
|
||||
|
||||
#define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
|
||||
#define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)
|
||||
|
||||
BIO *BIO_new_socket(int sock, int close_flag);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_s_socket() returns the socket BIO method. This is a wrapper
|
||||
round the platform's socket routines.
|
||||
|
||||
BIO_read() and BIO_write() read or write the underlying socket.
|
||||
BIO_puts() is supported but BIO_gets() is not.
|
||||
|
||||
If the close flag is set then the socket is shut down and closed
|
||||
when the BIO is freed.
|
||||
|
||||
BIO_set_fd() sets the socket of BIO B<b> to B<fd> and the close
|
||||
flag to B<c>.
|
||||
|
||||
BIO_get_fd() places the socket in B<c> if it is not NULL, it also
|
||||
returns the socket . If B<c> is not NULL it should be of type (int *).
|
||||
|
||||
BIO_new_socket() returns a socket BIO using B<sock> and B<close_flag>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Socket BIOs also support any relevant functionality of file descriptor
|
||||
BIOs.
|
||||
|
||||
The reason for having separate file descriptor and socket BIOs is that on some
|
||||
platforms sockets are not file descriptors and use distinct I/O routines,
|
||||
Windows is one such platform. Any code mixing the two will not work on
|
||||
all platforms.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
BIO_s_socket() returns the socket BIO method.
|
||||
|
||||
BIO_set_fd() always returns 1.
|
||||
|
||||
BIO_get_fd() returns the socket or -1 if the BIO has not been
|
||||
initialized.
|
||||
|
||||
BIO_new_socket() returns the newly allocated BIO or NULL is an error
|
||||
occurred.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
108
doc/crypto/BIO_set_callback.pod
Normal file
108
doc/crypto/BIO_set_callback.pod
Normal file
@@ -0,0 +1,108 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg,
|
||||
BIO_debug_callback - BIO callback functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/bio.h>
|
||||
|
||||
#define BIO_set_callback(b,cb) ((b)->callback=(cb))
|
||||
#define BIO_get_callback(b) ((b)->callback)
|
||||
#define BIO_set_callback_arg(b,arg) ((b)->cb_arg=(char *)(arg))
|
||||
#define BIO_get_callback_arg(b) ((b)->cb_arg)
|
||||
|
||||
long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi,
|
||||
long argl,long ret);
|
||||
|
||||
typedef long callback(BIO *b, int oper, const char *argp,
|
||||
int argi, long argl, long retvalue);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
BIO_set_callback() and BIO_get_callback() set and retrieve the BIO callback,
|
||||
they are both macros. The callback is called during most high level BIO
|
||||
operations. It can be used for debugging purposes to trace operations on
|
||||
a BIO or to modify its operation.
|
||||
|
||||
BIO_set_callback_arg() and BIO_get_callback_arg() are macros which can be
|
||||
used to set and retrieve an argument for use in the callback.
|
||||
|
||||
BIO_debug_callback() is a standard debugging callback which prints
|
||||
out information relating to each BIO operation. If the callback
|
||||
argument is set if is interpreted as a BIO to send the information
|
||||
to, otherwise stderr is used.
|
||||
|
||||
callback() is the callback function itself. The meaning of each
|
||||
argument is described below.
|
||||
|
||||
The BIO the callback is attached to is passed in B<b>.
|
||||
|
||||
B<oper> is set to the operation being performed. For some operations
|
||||
the callback is called twice, once before and once after the actual
|
||||
operation, the latter case has B<oper> or'ed with BIO_CB_RETURN.
|
||||
|
||||
The meaning of the arguments B<argp>, B<argi> and B<argl> depends on
|
||||
the value of B<oper>, that is the operation being performed.
|
||||
|
||||
B<retvalue> is the return value that would be returned to the
|
||||
application if no callback were present. The actual value returned
|
||||
is the return value of the callback itself. In the case of callbacks
|
||||
called before the actual BIO operation 1 is placed in retvalue, if
|
||||
the return value is not positive it will be immediately returned to
|
||||
the application and the BIO operation will not be performed.
|
||||
|
||||
The callback should normally simply return B<retvalue> when it has
|
||||
finished processing, unless if specifically wishes to modify the
|
||||
value returned to the application.
|
||||
|
||||
=head1 CALLBACK OPERATIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<BIO_free(b)>
|
||||
|
||||
callback(b, BIO_CB_FREE, NULL, 0L, 0L, 1L) is called before the
|
||||
free operation.
|
||||
|
||||
=item B<BIO_read(b, out, outl)>
|
||||
|
||||
callback(b, BIO_CB_READ, out, outl, 0L, 1L) is called before
|
||||
the read and callback(b, BIO_CB_READ|BIO_CB_RETURN, out, outl, 0L, retvalue)
|
||||
after.
|
||||
|
||||
=item B<BIO_write(b, in, inl)>
|
||||
|
||||
callback(b, BIO_CB_WRITE, in, inl, 0L, 1L) is called before
|
||||
the write and callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, inl, 0L, retvalue)
|
||||
after.
|
||||
|
||||
=item B<BIO_gets(b, out, outl)>
|
||||
|
||||
callback(b, BIO_CB_GETS, out, outl, 0L, 1L) is called before
|
||||
the operation and callback(b, BIO_CB_GETS|BIO_CB_RETURN, out, outl, 0L, retvalue)
|
||||
after.
|
||||
|
||||
=item B<BIO_puts(b, in)>
|
||||
|
||||
callback(b, BIO_CB_WRITE, in, 0, 0L, 1L) is called before
|
||||
the operation and callback(b, BIO_CB_WRITE|BIO_CB_RETURN, in, 0, 0L, retvalue)
|
||||
after.
|
||||
|
||||
=item B<BIO_ctrl(BIO *b, int cmd, long larg, void *parg)>
|
||||
|
||||
callback(b,BIO_CB_CTRL,parg,cmd,larg,1L) is called before the call and
|
||||
callback(b,BIO_CB_CTRL|BIO_CB_RETURN,parg,cmd, larg,ret) after.
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
The BIO_debug_callback() function is a good example, its source is
|
||||
in crypto/bio/bio_cb.c
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BIO_should_retry, BIO_should_read, BIO_should_write - BIO retry functions
|
||||
BIO_should_retry, BIO_should_read, BIO_should_write,
|
||||
BIO_should_io_special, BIO_retry_type, BIO_should_retry,
|
||||
BIO_get_retry_BIO, BIO_get_retry_reason - BIO retry functions
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -46,7 +48,7 @@ reason other than reading or writing is the cause of the condition.
|
||||
BIO_get_retry_reason() returns a mask of the cause of a retry condition
|
||||
consisting of the values B<BIO_FLAGS_READ>, B<BIO_FLAGS_WRITE>,
|
||||
B<BIO_FLAGS_IO_SPECIAL> though current BIO types will only set one of
|
||||
these (Q: is this correct?).
|
||||
these.
|
||||
|
||||
BIO_get_retry_BIO() determines the precise reason for the special
|
||||
condition, it returns the BIO that caused this condition and if
|
||||
@@ -55,7 +57,7 @@ the reason code and the action that should be taken depends on
|
||||
the type of BIO that resulted in this condition.
|
||||
|
||||
BIO_get_retry_reason() returns the reason for a special condition if
|
||||
pass the relevant BIO, for example as returned by BIO_get_retry_BIO().
|
||||
passed the relevant BIO, for example as returned by BIO_get_retry_BIO().
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@@ -68,53 +70,34 @@ has reached EOF. Some BIO types may place additional information on
|
||||
the error queue. For more details see the individual BIO type manual
|
||||
pages.
|
||||
|
||||
If the underlying I/O structure is in a blocking mode then most BIO
|
||||
types will not signal a retry condition, because the underlying I/O
|
||||
If the underlying I/O structure is in a blocking mode almost all current
|
||||
BIO types will not request a retry, because the underlying I/O
|
||||
calls will not. If the application knows that the BIO type will never
|
||||
signal a retry then it need not call BIO_should_retry() after a failed
|
||||
BIO I/O call. This is typically done with file BIOs.
|
||||
|
||||
The presence of an SSL BIO is an exception to this rule: it can
|
||||
request a retry because the handshake process is underway (either
|
||||
initially or due to a session renegotiation) even if the underlying
|
||||
I/O structure (for example a socket) is in a blocking mode.
|
||||
|
||||
The action an application should take after a BIO has signalled that a
|
||||
retry is required depends on the BIO that caused the retry.
|
||||
|
||||
If the underlying I/O structure is in a blocking mode then the BIO
|
||||
call can be retried immediately. That is something like this can be
|
||||
done:
|
||||
|
||||
do {
|
||||
len = BIO_read(bio, buf, len);
|
||||
} while((len <= 0) && BIO_should_retry(bio));
|
||||
SSL BIOs are the only current exception to this rule: they can request a
|
||||
retry even if the underlying I/O structure is blocking, if a handshake
|
||||
occurs during a call to BIO_read(). An application can retry the failed
|
||||
call immediately or avoid this situation by setting SSL_MODE_AUTO_RETRY
|
||||
on the underlying SSL structure.
|
||||
|
||||
While an application may retry a failed non blocking call immediately
|
||||
this is likely to be very inefficient because the call is likely to
|
||||
fail repeatedly until data can be processed. An application will normally
|
||||
wait until the necessary condition is satisfied. How this is done depends
|
||||
on the underlying I/O structure.
|
||||
this is likely to be very inefficient because the call will fail
|
||||
repeatedly until data can be processed or is available. An application
|
||||
will normally wait until the necessary condition is satisfied. How
|
||||
this is done depends on the underlying I/O structure.
|
||||
|
||||
For example if the cause is ultimately a socket and BIO_should_read()
|
||||
is true then a call to select() may be made to wait until data is
|
||||
available and then retry the BIO operation. By combining the retry
|
||||
conditions of several non blocking BIOs in a single select() call
|
||||
it is possible to service several BIOs in a single thread.
|
||||
|
||||
The cause of the retry condition may not be the same as the call that
|
||||
made it: for example if BIO_write() fails BIO_should_read() can be
|
||||
true. One possible reason for this is that an SSL handshake is taking
|
||||
place.
|
||||
|
||||
Even if data is read from the underlying I/O structure this does not
|
||||
imply that the next BIO I/O call will succeed. For example if an
|
||||
encryption BIO reads only a fraction of a block it will not be
|
||||
able to pass any data to the application until a complete block has
|
||||
been read.
|
||||
it is possible to service several BIOs in a single thread, though
|
||||
the performance may be poor if SSL BIOs are present because long delays
|
||||
can occur during the initial handshake process.
|
||||
|
||||
It is possible for a BIO to block indefinitely if the underlying I/O
|
||||
structure cannot process the data. This depends on the behaviour of
|
||||
structure cannot process or return any data. This depends on the behaviour of
|
||||
the platforms I/O functions. This is often not desirable: one solution
|
||||
is to use non blocking I/O and use a timeout on the select() (or
|
||||
equivalent) call.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BN_mod_mul_reciprocal, BN_RECP_CTX_new, BN_RECP_CTX_init,
|
||||
BN_mod_mul_reciprocal, BN_div_recp, BN_RECP_CTX_new, BN_RECP_CTX_init,
|
||||
BN_RECP_CTX_free, BN_RECP_CTX_set - modular multiplication using
|
||||
reciprocal
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BN_zero, BN_one, BN_set_word, BN_get_word - BIGNUM assignment operations
|
||||
BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM assignment
|
||||
operations
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ERR_error_string - obtain human-readable error message
|
||||
ERR_error_string, ERR_error_string_n, ERR_lib_error_string,
|
||||
ERR_func_error_string, ERR_reason_error_string - obtain human-readable
|
||||
error message
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
ERR_get_error, ERR_peek_error - obtain error code
|
||||
ERR_get_error, ERR_peek_error, ERR_get_error_line, ERR_peek_error_line,
|
||||
ERR_get_error_line_data, ERR_peek_error_line_data - obtain error code and data
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal - EVP digest routines
|
||||
EVP_DigestInit, EVP_DigestUpdate, EVP_DigestFinal, EVP_MAX_MD_SIZE,
|
||||
EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, EVP_MD_block_size,
|
||||
EVP_MD_CTX_md, EVP_MD_CTX_size, EVP_MD_CTX_block_size, EVP_MD_CTX_type,
|
||||
EVP_md_null, EVP_md2, EVP_md5, EVP_sha, EVP_sha1, EVP_dss, EVP_dss1, EVP_mdc2,
|
||||
EVP_ripemd160, EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj -
|
||||
EVP digest routines
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
EVP_EncryptInit, EVP_EncryptUpdate, EVP_EncryptFinal - EVP cipher routines
|
||||
EVP_EncryptInit, EVP_EncryptUpdate, EVP_EncryptFinal, EVP_DecryptInit,
|
||||
EVP_DecryptUpdate, EVP_DecryptFinal, EVP_CipherInit, EVP_CipherUpdate,
|
||||
EVP_CipherFinal, EVP_CIPHER_CTX_set_key_length, EVP_CIPHER_CTX_ctrl,
|
||||
EVP_CIPHER_CTX_cleanup, EVP_get_cipherbyname, EVP_get_cipherbynid,
|
||||
EVP_get_cipherbyobj, EVP_CIPHER_nid, EVP_CIPHER_block_size,
|
||||
EVP_CIPHER_key_length, EVP_CIPHER_iv_length, EVP_CIPHER_flags,
|
||||
EVP_CIPHER_mode, EVP_CIPHER_type, EVP_CIPHER_CTX_cipher, EVP_CIPHER_CTX_nid,
|
||||
EVP_CIPHER_CTX_block_size, EVP_CIPHER_CTX_key_length, EVP_CIPHER_CTX_iv_length,
|
||||
EVP_CIPHER_CTX_get_app_data, EVP_CIPHER_CTX_set_app_data, EVP_CIPHER_CTX_type,
|
||||
EVP_CIPHER_CTX_flags, EVP_CIPHER_CTX_mode, EVP_CIPHER_param_to_asn1,
|
||||
EVP_CIPHER_asn1_to_param - EVP cipher routines
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OPENSSL_VERSION_NUMBER, SSLeay - get OpenSSL version number
|
||||
OPENSSL_VERSION_NUMBER, SSLeay SSLeay_version - get OpenSSL version number
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -11,11 +11,27 @@ OPENSSL_VERSION_NUMBER, SSLeay - get OpenSSL version number
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
long SSLeay(void);
|
||||
char *SSLeay_version(int t);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
OPENSSL_VERSION_NUMBER is a numeric release version identifier:
|
||||
|
||||
MMNNFFPPS: major minor fix patch status
|
||||
|
||||
The status nibble has one of the values 0 for development, 1 to e for betas
|
||||
1 to 14, and f for release.
|
||||
|
||||
for example
|
||||
|
||||
0x000906000 == 0.9.6 dev
|
||||
0x000906023 == 0.9.6b beta 3
|
||||
0x00090605f == 0.9.6e release
|
||||
|
||||
Versions prior to 0.9.3 have identifiers E<lt> 0x0930.
|
||||
Versions between 0.9.3 and 0.9.5 had a version identifier with this
|
||||
interpretation:
|
||||
|
||||
MMNNFFRBB major minor fix final beta/patch
|
||||
|
||||
for example
|
||||
@@ -23,13 +39,39 @@ for example
|
||||
0x000904100 == 0.9.4 release
|
||||
0x000905000 == 0.9.5 dev
|
||||
|
||||
Versions prior to 0.9.3 have identifiers E<lt> 0x0930.
|
||||
Version 0.9.5a had an interrim interpretation that is like the current one,
|
||||
except the patch level got the highest bit set, to keep continuity. The
|
||||
number was therefore 0x0090581f.
|
||||
|
||||
|
||||
For backward compatibility, SSLEAY_VERSION_NUMBER is also defined.
|
||||
|
||||
SSLeay() returns this number. The return value can be compared to the
|
||||
macro to make sure that the correct version of the library has been
|
||||
loaded, especially when using DLLs on Windows systems.
|
||||
|
||||
SSLeay_version() returns different strings depending on B<t>:
|
||||
|
||||
=over 4
|
||||
|
||||
=item SSLEAY_VERSION
|
||||
The text variant of the version number and the release date. For example,
|
||||
"OpenSSL 0.9.5a 1 Apr 2000".
|
||||
|
||||
=item SSLEAY_CFLAGS
|
||||
The flags given to the C compiler when compiling OpenSSL are returned in a
|
||||
string.
|
||||
|
||||
=item SSLEAY_PLATFORM
|
||||
The platform name used when OpenSSL was configured is returned.
|
||||
|
||||
=back
|
||||
|
||||
If the data request isn't available, a text saying that the information is
|
||||
not available is returned.
|
||||
|
||||
For an unknown B<t>, the text "not available" is returned.
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
The version number.
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
OpenSSL_add_all_algorithms() - add algorithms to internal table
|
||||
OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests -
|
||||
add algorithms to internal table
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -17,13 +17,11 @@ RSA_get_ex_new_index, RSA_set_ex_data, RSA_get_ex_data - add application specifi
|
||||
|
||||
void *RSA_get_ex_data(RSA *r, int idx);
|
||||
|
||||
int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
|
||||
void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
|
||||
int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d,
|
||||
typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d,
|
||||
int idx, long argl, void *argp);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
RSA_print, RSA_print_fp, DHparams_print, DHparams_print_fp - print
|
||||
cryptographic parameters
|
||||
RSA_print, RSA_print_fp, DHparams_print, DHparams_print_fp, DSA_print,
|
||||
DSA_print_fp, DHparams_print, DHparams_print_fp - print cryptographic
|
||||
parameters
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
RSA_set_default_method, RSA_get_default_method, RSA_set_method,
|
||||
RSA_get_method, RSA_PKCS1_SSLeay, RSA_PKCS1_RSAref,
|
||||
RSA_PKCS1_null_method, RSA_flags, RSA_new_method - select RSA method
|
||||
RSA_null_method, RSA_flags, RSA_new_method - select RSA method
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -39,4 +39,16 @@ BIO).
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
TBA
|
||||
L<BIO_ctrl(3)|BIO_ctrl(3)>,
|
||||
L<BIO_f_base64(3)|BIO_f_base64(3)>,
|
||||
L<BIO_f_cipher(3)|BIO_f_cipher(3)>, L<BIO_f_md(3)|BIO_f_md(3)>,
|
||||
L<BIO_f_null(3)|BIO_f_null(3)>, L<BIO_f_ssl(3)|BIO_f_ssl(3)>,
|
||||
L<BIO_find_type(3)|BIO_find_type(3)>, L<BIO_new(3)|BIO_new(3)>,
|
||||
L<BIO_new_bio_pair(3)|BIO_new_bio_pair(3)>,
|
||||
L<BIO_push(3)|BIO_push(3)>, L<BIO_read(3)|BIO_read(3)>,
|
||||
L<BIO_s_accept(3)|BIO_s_accept(3)>, L<BIO_s_bio(3)|BIO_s_bio(3)>,
|
||||
L<BIO_s_connect(3)|BIO_s_connect(3)>, L<BIO_s_fd(3)|BIO_s_fd(3)>,
|
||||
L<BIO_s_file(3)|BIO_s_file(3)>, L<BIO_s_mem(3)|BIO_s_mem(3)>,
|
||||
L<BIO_s_null(3)|BIO_s_null(3)>, L<BIO_s_socket(3)|BIO_s_socket(3)>,
|
||||
L<BIO_set_callback(3)|BIO_set_callback(3)>,
|
||||
L<BIO_should_retry(3)|BIO_should_retry(3)>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
HMAC, HMAC_Init, HMAC_Update, HMAC_Final - HMAC message authentication code
|
||||
HMAC, HMAC_Init, HMAC_Update, HMAC_Final, HMAC_cleanup - HMAC message
|
||||
authentication code
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CRYPTO_set_locking_callback, CRYPTO_set_id_callback - OpenSSL thread support
|
||||
CRYPTO_set_locking_callback, CRYPTO_set_id_callback, CRYPTO_num_locks,
|
||||
CRYPTO_set_dynlock_create_callback, CRYPTO_set_dynlock_lock_callback,
|
||||
CRYPTO_set_dynlock_destroy_callback, CRYPTO_get_new_dynlockid,
|
||||
CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -33,6 +36,17 @@ CRYPTO_set_locking_callback, CRYPTO_set_id_callback - OpenSSL thread support
|
||||
|
||||
void CRYPTO_lock(int mode, int n, const char *file, int line);
|
||||
|
||||
#define CRYPTO_w_lock(type) \
|
||||
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
|
||||
#define CRYPTO_w_unlock(type) \
|
||||
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
|
||||
#define CRYPTO_r_lock(type) \
|
||||
CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)
|
||||
#define CRYPTO_r_unlock(type) \
|
||||
CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)
|
||||
#define CRYPTO_add(addr,amount,type) \
|
||||
CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
OpenSSL can safely be used in multi-threaded applications provided
|
||||
@@ -57,6 +71,8 @@ Additionally, OpenSSL supports dynamic locks, and sometimes, some parts
|
||||
of OpenSSL need it for better performance. To enable this, the following
|
||||
is required:
|
||||
|
||||
=over 4
|
||||
|
||||
=item *
|
||||
Three additional callback function, dyn_create_function, dyn_lock_function
|
||||
and dyn_destroy_function.
|
||||
@@ -64,6 +80,8 @@ and dyn_destroy_function.
|
||||
=item *
|
||||
A structure defined with the data that each lock needs to handle.
|
||||
|
||||
=back
|
||||
|
||||
struct CRYPTO_dynlock_value has to be defined to contain whatever structure
|
||||
is needed to handle locks.
|
||||
|
||||
@@ -88,7 +106,7 @@ CRYPTO_lock() is used to lock and unlock the locks. mode is a bitfield
|
||||
describing what should be done with the lock. n is the number of the
|
||||
lock as returned from CRYPTO_get_new_dynlockid(). mode can be combined
|
||||
from the following values. These values are pairwise exclusive, with
|
||||
undefined behavior if misused (for example, CRYPTO_READ and CRYPTO_WRITE
|
||||
undefined behaviour if misused (for example, CRYPTO_READ and CRYPTO_WRITE
|
||||
should not be used together):
|
||||
|
||||
CRYPTO_LOCK 0x01
|
||||
|
||||
25
doc/ssl/SSL_SESSION_free.pod
Normal file
25
doc/ssl/SSL_SESSION_free.pod
Normal file
@@ -0,0 +1,25 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_SESSION_free - free an allocated SSL_SESSION structure
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
void *SSL_SESSION_free(SSL_SESSION *session);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_SESSION_free() decrements the reference count of B<session> and removes
|
||||
the B<SSL_SESSION> structure pointed to by B<session> and frees up the allocated
|
||||
memory, if the the reference count has reached 0.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
SSL_SESSION_free() does not provide diagnostic information.
|
||||
|
||||
L<ssl(3)|ssl(3)>, L<SSL_get_session(3)|SSL_get_session(3)>
|
||||
|
||||
=cut
|
||||
69
doc/ssl/SSL_accept.pod
Normal file
69
doc/ssl/SSL_accept.pod
Normal file
@@ -0,0 +1,69 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_accept - wait for a TLS/SSL client to initiate a TLS/SSL handshake
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int SSL_accept(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_accept() waits for a TLS/SSL client to initiate the TLS/SSL handshake.
|
||||
The communication channel must already have been set and assigned to the
|
||||
B<ssl> by setting an underlying B<BIO>. The behaviour of SSL_accept() depends
|
||||
on the underlying BIO.
|
||||
|
||||
If the underlying BIO is B<blocking>, SSL_accept() will only return once the
|
||||
handshake has been finished or an error occurred, except for SGC (Server
|
||||
Gated Cryptography). For SGC, SSL_accept() may return with -1, but
|
||||
SSL_get_error() will yield B<SSL_ERROR_WANT_READ/WRITE> and SSL_accept()
|
||||
should be called again.
|
||||
|
||||
If the underlying BIO is B<non-blocking>, SSL_accept() will also return
|
||||
when the underlying BIO could not satisfy the needs of SSL_accept()
|
||||
to continue the handshake. In this case a call to SSL_get_error() with the
|
||||
return value of SSL_accept() will yield B<SSL_ERROR_WANT_READ> or
|
||||
B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after
|
||||
taking appropriate action to satisfy the needs of SSL_accept().
|
||||
The action depends on the underlying BIO. When using a non-blocking socket,
|
||||
nothing is to be done, but select() can be used to check for the required
|
||||
condition. When using a buffering BIO, like a BIO pair, data must be written
|
||||
into or retrieved out of the BIO before being able to continue.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 1
|
||||
|
||||
The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
|
||||
established.
|
||||
|
||||
=item 0
|
||||
|
||||
The TLS/SSL handshake was not successful but was shut down controlled and
|
||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
=item -1
|
||||
|
||||
The TLS/SSL handshake was not successful because a fatal error occurred either
|
||||
at the protocol level or a connection failure occurred. The shutdown was
|
||||
not clean. It can also occur of action is need to continue the operation
|
||||
for non-blocking BIOs. Call SSL_get_error() with the return value B<ret>
|
||||
to find out the reason.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>,
|
||||
L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
39
doc/ssl/SSL_clear.pod
Normal file
39
doc/ssl/SSL_clear.pod
Normal file
@@ -0,0 +1,39 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_clear - reset SSL object to allow another connection
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int *SSL_clear(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Reset B<ssl> to allow another connection. All settings (method, ciphers,
|
||||
BIOs) are kept. A completely negotiated B<SSL_SESSION> is not freed but left
|
||||
untouched for the underlying B<SSL_CTX>.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
|
||||
The SSL_clear() operation could not be performed. Check the error stack to
|
||||
find out the reason.
|
||||
|
||||
=item 1
|
||||
|
||||
The SSL_clear() operation was successful.
|
||||
|
||||
=back
|
||||
|
||||
L<SSL_new(3)|SSL_new(3)>, L<SSL_free(3)|SSL_free(3)>,
|
||||
L<ssl(3)|ssl(3)>
|
||||
|
||||
=cut
|
||||
66
doc/ssl/SSL_connect.pod
Normal file
66
doc/ssl/SSL_connect.pod
Normal file
@@ -0,0 +1,66 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_connect - initiate the TLS/SSL handshake with an TLS/SSL server
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int SSL_connect(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_connect() initiates the TLS/SSL handshake with a server. The communication
|
||||
channel must already have been set and assigned to the B<ssl> by setting an
|
||||
underlying B<BIO>. The behaviour of SSL_connect() depends on the underlying
|
||||
BIO.
|
||||
|
||||
If the underlying BIO is B<blocking>, SSL_connect() will only return once the
|
||||
handshake has been finished or an error occurred.
|
||||
|
||||
If the underlying BIO is B<non-blocking>, SSL_connect() will also return
|
||||
when the underlying BIO could not satisfy the needs of SSL_connect()
|
||||
to continue the handshake. In this case a call to SSL_get_error() with the
|
||||
return value of SSL_connect() will yield B<SSL_ERROR_WANT_READ> or
|
||||
B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after
|
||||
taking appropriate action to satisfy the needs of SSL_connect().
|
||||
The action depends on the underlying BIO. When using a non-blocking socket,
|
||||
nothing is to be done, but select() can be used to check for the required
|
||||
condition. When using a buffering BIO, like a BIO pair, data must be written
|
||||
into or retrieved out of the BIO before being able to continue.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 1
|
||||
|
||||
The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
|
||||
established.
|
||||
|
||||
=item 0
|
||||
|
||||
The TLS/SSL handshake was not successful but was shut down controlled and
|
||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
=item -1
|
||||
|
||||
The TLS/SSL handshake was not successful, because a fatal error occurred either
|
||||
at the protocol level or a connection failure occurred. The shutdown was
|
||||
not clean. It can also occur of action is need to continue the operation
|
||||
for non-blocking BIOs. Call SSL_get_error() with the return value B<ret>
|
||||
to find out the reason.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_accept(3)|SSL_accept(3)>,
|
||||
L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
33
doc/ssl/SSL_free.pod
Normal file
33
doc/ssl/SSL_free.pod
Normal file
@@ -0,0 +1,33 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_free - free an allocated SSL structure
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
void *SSL_free(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_free() decrements the reference count of B<ssl>, and removes the SSL
|
||||
structure pointed to by B<ssl> and frees up the allocated memory if the
|
||||
the reference count has reached 0.
|
||||
|
||||
It also calls the free()ing procedures for indirectly affected items, if
|
||||
applicable: the buffering BIO, the read and write BIOs,
|
||||
cipher lists specially created for this B<ssl>, the B<SSL_SESSION>.
|
||||
Do not explicitly free these indirectly freed up items before or after
|
||||
calling SSL_free(), as trying to free things twice may lead to program
|
||||
failure.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
SSL_free() does not provide diagnostic information.
|
||||
|
||||
L<SSL_new(3)|SSL_new(3)>, L<SSL_clear(3)|SSL_clear(3)>,
|
||||
L<ssl(3)|ssl(3)>
|
||||
|
||||
=cut
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_get_error - obtain result code for SSL I/O operation
|
||||
SSL_get_error - obtain result code for TLS/SSL I/O operation
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -15,14 +15,14 @@ SSL_get_error - obtain result code for SSL I/O operation
|
||||
SSL_get_error() returns a result code (suitable for the C "switch"
|
||||
statement) for a preceding call to SSL_connect(), SSL_accept(),
|
||||
SSL_read(), or SSL_write() on B<ssl>. The value returned by that
|
||||
SSL I/O function must be passed to SSL_get_error() in parameter
|
||||
TLS/SSL I/O function must be passed to SSL_get_error() in parameter
|
||||
B<ret>.
|
||||
|
||||
In addition to B<ssl> and B<ret>, SSL_get_error() inspects the
|
||||
current thread's OpenSSL error queue. Thus, SSL_get_error() must be
|
||||
used in the same thread that performed the SSL I/O operation, and no
|
||||
used in the same thread that performed the TLS/SSL I/O operation, and no
|
||||
other OpenSSL function calls should appear in between. The current
|
||||
thread's error queue must be empty before the SSL I/O operation is
|
||||
thread's error queue must be empty before the TLS/SSL I/O operation is
|
||||
attempted, or SSL_get_error() will not work reliably.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
@@ -33,12 +33,12 @@ The following return values can currently occur:
|
||||
|
||||
=item SSL_ERROR_NONE
|
||||
|
||||
The SSL I/O operation completed. This result code is returned
|
||||
The TLS/SSL I/O operation completed. This result code is returned
|
||||
if and only if B<ret E<gt> 0>.
|
||||
|
||||
=item SSL_ERROR_ZERO_RETURN
|
||||
|
||||
The SSL connection has been closed. If the protocol version is SSL 3.0
|
||||
The TLS/SSL connection has been closed. If the protocol version is SSL 3.0
|
||||
or TLS 1.0, this result code is returned only if a closure
|
||||
alert has occurred in the protocol, i.e. if the connection has been
|
||||
closed cleanly. Note that in this case B<SSL_ERROR_ZERO_RETURN>
|
||||
@@ -47,15 +47,15 @@ has been closed.
|
||||
|
||||
=item SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE
|
||||
|
||||
The operation did not complete; the same SSL I/O function should be
|
||||
The operation did not complete; the same TLS/SSL I/O function should be
|
||||
called again later. There will be protocol progress if, by then, the
|
||||
underlying B<BIO> has data available for reading (if the result code is
|
||||
B<SSL_ERROR_WANT_READ>) or allows writing data (B<SSL_ERROR_WANT_WRITE>).
|
||||
For socket B<BIO>s (e.g. when SSL_set_fd() was used) this means that
|
||||
select() or poll() on the underlying socket can be used to find out
|
||||
when the SSL I/O function should be retried.
|
||||
when the TLS/SSL I/O function should be retried.
|
||||
|
||||
Caveat: Any SSL I/O function can lead to either of
|
||||
Caveat: Any TLS/SSL I/O function can lead to either of
|
||||
B<SSL_ERROR_WANT_READ> and B<SSL_ERROR_WANT_WRITE>, i.e. SSL_read()
|
||||
may want to write data and SSL_write() may want to read data.
|
||||
|
||||
@@ -63,7 +63,7 @@ may want to write data and SSL_write() may want to read data.
|
||||
|
||||
The operation did not complete because an application callback set by
|
||||
SSL_CTX_set_client_cert_cb() has asked to be called again.
|
||||
The SSL I/O function should be called again later.
|
||||
The TLS/SSL I/O function should be called again later.
|
||||
Details depend on the application.
|
||||
|
||||
=item SSL_ERROR_SYSCALL
|
||||
|
||||
44
doc/ssl/SSL_get_fd.pod
Normal file
44
doc/ssl/SSL_get_fd.pod
Normal file
@@ -0,0 +1,44 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_get_fd - get file descriptor linked to an SSL object
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int SSL_get_fd(SSL *ssl);
|
||||
int SSL_get_rfd(SSL *ssl);
|
||||
int SSL_get_wfd(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_get_fd() returns the file descriptor which is linked to B<ssl>.
|
||||
SSL_get_rfd() and SSL_get_wfd() return the file descriptors for the
|
||||
read or the write channel, which can be different. If the read and the
|
||||
write channel are different, SSL_get_fd() will return the file descriptor
|
||||
of the read channel.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item -1
|
||||
|
||||
The operation failed, because the underlying BIO is not of the correct type
|
||||
(suitable for file descriptors).
|
||||
|
||||
=item E<gt>=0
|
||||
|
||||
The file descriptor linked to B<ssl>.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_set_fd(3)|SSL_set_fd(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
40
doc/ssl/SSL_get_rbio.pod
Normal file
40
doc/ssl/SSL_get_rbio.pod
Normal file
@@ -0,0 +1,40 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_get_rbio - get BIO linked to an SSL object
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
BIO *SSL_get_rbio(SSL *ssl);
|
||||
BIO *SSL_get_wbio(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_get_rbio() and SSL_get_wbio() return pointers to the BIOs for the
|
||||
read or the write channel, which can be different. The reference count
|
||||
of the BIO is not incremented.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item NULL
|
||||
|
||||
No BIO was connected to the SSL object
|
||||
|
||||
=item Any other pointer
|
||||
|
||||
The BIO linked to B<ssl>.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_set_bio(3)|SSL_set_bio(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
48
doc/ssl/SSL_get_session.pod
Normal file
48
doc/ssl/SSL_get_session.pod
Normal file
@@ -0,0 +1,48 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_get_session - retrieve TLS/SSL session data
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
SSL_SESSION *SSL_get_session(SSL *ssl);
|
||||
SSL_SESSION *SSL_get0_session(SSL *ssl);
|
||||
SSL_SESSION *SSL_get1_session(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_get_session() returns a pointer to the B<SSL_SESSION> actually used in
|
||||
B<ssl>. The reference count of the B<SSL_SESSION> is not incremented, so
|
||||
that the pointer can become invalid when the B<ssl> is freed and
|
||||
SSL_SESSION_free() is implicitly called.
|
||||
|
||||
SSL_get0_session() is the same as SSL_get_session().
|
||||
|
||||
SSL_get1_session() is the same as SSL_get_session(), but the reference
|
||||
count of the B<SSL_SESSION> is incremented by one.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item NULL
|
||||
|
||||
There is no session available in B<ssl>.
|
||||
|
||||
=item Pointer to an SSL
|
||||
|
||||
The return value points to the data of an SSL session.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<ssl(3)|ssl(3)>, L<SSL_free(3)|SSL_free(3)>,
|
||||
L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>
|
||||
|
||||
=cut
|
||||
42
doc/ssl/SSL_new.pod
Normal file
42
doc/ssl/SSL_new.pod
Normal file
@@ -0,0 +1,42 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_new - create a new SSL structure for a connection
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
SSL *SSL_new(SSL_CTX *ctx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_new() creates a new B<SSL> structure which is needed to hold the
|
||||
data for a TLS/SSL connection. The new structure inherits the settings
|
||||
of the underlying context B<ctx>: connection method (SSLv2/v3/TLSv1),
|
||||
options, verification settings, timeout settings.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item NULL
|
||||
|
||||
The creation of a new SSL structure failed. Check the error stack to
|
||||
find out the reason.
|
||||
|
||||
=item Pointer to an SSL structure
|
||||
|
||||
The return value points to an allocated SSL structure.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_free(3)|SSL_free(3)>, L<SSL_clear(3)|SSL_clear(3)>,
|
||||
L<ssl(3)|ssl(3)>
|
||||
|
||||
=cut
|
||||
67
doc/ssl/SSL_read.pod
Normal file
67
doc/ssl/SSL_read.pod
Normal file
@@ -0,0 +1,67 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_read - read bytes from a TLS/SSL connection.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int SSL_read(SSL *ssl, char *buf, int num);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_read() tries to read B<num> bytes from the specified B<ssl> into the
|
||||
buffer B<buf>. If necessary, SSL_read() will negotiate a TLS/SSL session, if
|
||||
not already explicitly performed by SSL_connect() or SSL_accept(). If the
|
||||
peer requests a re-negotiation, it will be performed transparently during
|
||||
the SSL_read() operation. The behaviour of SSL_read() depends on the
|
||||
underlying BIO.
|
||||
|
||||
If the underlying BIO is B<blocking>, SSL_read() will only return, once the
|
||||
read operation has been finished or an error occurred.
|
||||
|
||||
If the underlying BIO is B<non-blocking>, SSL_read() will also return
|
||||
when the underlying BIO could not satisfy the needs of SSL_read()
|
||||
to continue the operation. In this case a call to SSL_get_error() with the
|
||||
return value of SSL_read() will yield B<SSL_ERROR_WANT_READ> or
|
||||
B<SSL_ERROR_WANT_WRITE>. As at any time a re-negotiation is possible, a
|
||||
call to SSL_read() can also cause write operations! The calling process
|
||||
then must repeat the call after taking appropriate action to satisfy the
|
||||
needs of SSL_read(). The action depends on the underlying BIO. When using a
|
||||
non-blocking socket, nothing is to be done, but select() can be used to check
|
||||
for the required condition. When using a buffering BIO, like a BIO pair, data
|
||||
must be written into or retrieved out of the BIO before being able to continue.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item E<gt>0
|
||||
|
||||
The read operation was successful; the return value is the number of
|
||||
bytes actually read from the TLS/SSL connection.
|
||||
|
||||
=item 0
|
||||
|
||||
The read operation was not successful, probably because no data was
|
||||
available. Call SSL_get_error() with the return value B<ret> to find out,
|
||||
whether an error occurred.
|
||||
|
||||
=item -1
|
||||
|
||||
The read operation was not successful, because either an error occurred
|
||||
or action must be taken by the calling process. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_write(3)|SSL_write(3)>,
|
||||
L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
34
doc/ssl/SSL_set_bio.pod
Normal file
34
doc/ssl/SSL_set_bio.pod
Normal file
@@ -0,0 +1,34 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_set_bio - connect the SSL object with a BIO
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
void SSL_set_bio(SSL *ssl, BIO *rbio, BIO *wbio);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_set_bio() connects the BIOs B<rbio> and B<wbio> for the read and write
|
||||
operations of the TLS/SSL (encrypted) side of B<ssl>.
|
||||
|
||||
The SSL engine inherits the behaviour of B<rbio> and B<wbio>, respectively.
|
||||
If a BIO is non-blocking, the B<ssl> will also have non-blocking behaviour.
|
||||
|
||||
If there was already a BIO connected to B<ssl>, BIO_free() will be called
|
||||
(for both the reading and writing side, if different).
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
SSL_set_bio() cannot fail.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_get_rbio(3)|SSL_get_rbio(3)>,
|
||||
L<SSL_connect(3)|SSL_connect(3)>, L<SSL_accept(3)|SSL_accept(3)>,
|
||||
L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
54
doc/ssl/SSL_set_fd.pod
Normal file
54
doc/ssl/SSL_set_fd.pod
Normal file
@@ -0,0 +1,54 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_set_fd - connect the SSL object with a file descriptor
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int SSL_set_fd(SSL *ssl, int fd);
|
||||
int SSL_set_rfd(SSL *ssl, int fd);
|
||||
int SSL_set_wfd(SSL *ssl, int fd);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_set_fd() sets the file descriptor B<fd> as the input/output facility
|
||||
for the TLS/SSL (encrypted) side of B<ssl>. B<fd> will typically be the
|
||||
socket file descriptor of a network connection.
|
||||
|
||||
When performing the operation, a B<socket BIO> is automatically created to
|
||||
interface between the B<ssl> and B<fd>. The BIO and hence the SSL engine
|
||||
inherit the behaviour of B<fd>. If B<fd> is non-blocking, the B<ssl> will
|
||||
also have non-blocking behaviour.
|
||||
|
||||
If there was already a BIO connected to B<ssl>, BIO_free() will be called
|
||||
(for both the reading and writing side, if different).
|
||||
|
||||
SSL_set_rfd() and SSL_set_wfd() perform the respective action, but only
|
||||
for the read channel or the write channel, which can be set independently.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
|
||||
The operation failed. Check the error stack to find out why.
|
||||
|
||||
=item 1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_get_fd(3)|SSL_get_fd(3)>, L<SSL_set_bio(3)|SSL_set_bio(3)>,
|
||||
L<SSL_connect(3)|SSL_connect(3)>, L<SSL_accept(3)|SSL_accept(3)>,
|
||||
L<SSL_shutdown(3)|SSL_shutdown(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
45
doc/ssl/SSL_set_session.pod
Normal file
45
doc/ssl/SSL_set_session.pod
Normal file
@@ -0,0 +1,45 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_set_session - set a TLS/SSL session to be used during TLS/SSL connect
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int *SSL_set_session(SSL *ssl, SSL_SESSION *session);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_set_session() sets B<session> to be used when the TLS/SSL connection
|
||||
is to be established. SSL_set_session() is only useful for TLS/SSL clients.
|
||||
When the session is set, the reference count of B<session> is incremented
|
||||
by 1. If the session is not reused, the reference count is decremented
|
||||
again during SSL_connect().
|
||||
|
||||
If there is already a session set inside B<ssl> (because it was set with
|
||||
SSL_set_session() before or because the same B<ssl> was already used for
|
||||
a connection), SSL_SESSION_free() will be called for that session.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
|
||||
The operation failed; check the error stack to find out the reason.
|
||||
|
||||
=item 1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<ssl(3)|ssl(3)>, L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>
|
||||
|
||||
=cut
|
||||
62
doc/ssl/SSL_shutdown.pod
Normal file
62
doc/ssl/SSL_shutdown.pod
Normal file
@@ -0,0 +1,62 @@
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
SSL_shutdown - shut down a TLS/SSL connection
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
int SSL_shutdown(SSL *ssl);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
SSL_shutdown() shuts down an active TLS/SSL connection. It sends the shutdown
|
||||
alert to the peer. The behaviour of SSL_shutdown() depends on the underlying
|
||||
BIO.
|
||||
|
||||
If the underlying BIO is B<blocking>, SSL_shutdown() will only return once the
|
||||
handshake has been finished or an error occurred.
|
||||
|
||||
If the underlying BIO is B<non-blocking>, SSL_shutdown() will also return
|
||||
when the underlying BIO could not satisfy the needs of SSL_shutdown()
|
||||
to continue the handshake. In this case a call to SSL_get_error() with the
|
||||
return value of SSL_shutdown() will yield B<SSL_ERROR_WANT_READ> or
|
||||
B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after
|
||||
taking appropriate action to satisfy the needs of SSL_shutdown().
|
||||
The action depends on the underlying BIO. When using a non-blocking socket,
|
||||
nothing is to be done, but select() can be used to check for the required
|
||||
condition. When using a buffering BIO, like a BIO pair, data must be written
|
||||
into or retrieved out of the BIO before being able to continue.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 1
|
||||
|
||||
The shutdown was successfully completed.
|
||||
|
||||
=item 0
|
||||
|
||||
The shutdown was not successful. Call SSL_get_error() with the return
|
||||
value B<ret> to find out the reason.
|
||||
|
||||
=item -1
|
||||
|
||||
The shutdown was not successful because a fatal error occurred either
|
||||
at the protocol level or a connection failure occurred. It can also occur of
|
||||
action is need to continue the operation for non-blocking BIOs.
|
||||
Call SSL_get_error() with the return value B<ret> to find out the reason.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>,
|
||||
L<SSL_accept(3)|SSL_accept(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>
|
||||
|
||||
=cut
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user