This commit was manufactured by cvs2svn to create tag 'OpenSSL_0_9_6-beta1'.

This commit is contained in:
cvs2svn
2000-10-10 09:15:50 +00:00
204 changed files with 1008 additions and 10084 deletions

106
CHANGES
View File

@@ -2,109 +2,7 @@
OpenSSL CHANGES
_______________
Changes between 0.9.5a and 0.9.6 [24 Sep 2000]
*) In ssl23_get_client_hello, generate an error message when faced
with an initial SSL 3.0/TLS record that is too small to contain the
first two bytes of the ClientHello message, i.e. client_version.
(Note that this is a pathologic case that probably has never happened
in real life.) The previous approach was to use the version number
from the record header as a substitute; but our protocol choice
should not depend on that one because it is not authenticated
by the Finished messages.
[Bodo Moeller]
*) More robust randomness gathering functions for Windows.
[Jeffrey Altman <jaltman@columbia.edu>]
*) For compatibility reasons if the flag X509_V_FLAG_ISSUER_CHECK is
not set then we don't setup the error code for issuer check errors
to avoid possibly overwriting other errors which the callback does
handle. If an application does set the flag then we assume it knows
what it is doing and can handle the new informational codes
appropriately.
[Steve Henson]
*) Fix for a nasty bug in ASN1_TYPE handling. ASN1_TYPE is used for
a general "ANY" type, as such it should be able to decode anything
including tagged types. However it didn't check the class so it would
wrongly interpret tagged types in the same way as their universal
counterpart and unknown types were just rejected. Changed so that the
tagged and unknown types are handled in the same way as a SEQUENCE:
that is the encoding is stored intact. There is also a new type
"V_ASN1_OTHER" which is used when the class is not universal, in this
case we have no idea what the actual type is so we just lump them all
together.
[Steve Henson]
*) On VMS, stdout may very well lead to a file that is written to
in a record-oriented fashion. That means that every write() will
write a separate record, which will be read separately by the
programs trying to read from it. This can be very confusing.
The solution is to put a BIO filter in the way that will buffer
text until a linefeed is reached, and then write everything a
line at a time, so every record written will be an actual line,
not chunks of lines and not (usually doesn't happen, but I've
seen it once) several lines in one record. BIO_f_linebuffer() is
the answer.
Currently, it's a VMS-only method, because that's where it has
been tested well enough.
[Richard Levitte]
*) Remove 'optimized' squaring variant in BN_mod_mul_montgomery,
it can return incorrect results.
(Note: The buggy variant was not enabled in OpenSSL 0.9.5a,
but it was in 0.9.6-beta[12].)
[Bodo Moeller]
*) Disable the check for content being present when verifying detached
signatures in pk7_smime.c. Some versions of Netscape (wrongly)
include zero length content when signing messages.
[Steve Henson]
*) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR
BIO_ctrl (for BIO pairs).
[Bodo M<>ller]
*) 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]
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
*) Add a few more EBCDIC conditionals that make `req' and `x509'
work better on such systems.
@@ -300,7 +198,7 @@
[Steve Henson]
*) Changes needed for Tandem NSK.
[Scott Uroff <scott@xypro.com>]
[Scott Uroff scott@xypro.com]
*) Fix SSL 2.0 rollback checking: Due to an off-by-one error in
RSA_padding_check_SSLv23(), special padding was never detected

View File

@@ -212,20 +212,11 @@ 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:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn",
# 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:-ldld: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:-ldld: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:::::::::dlfcn",
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
"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",
# HPUX 9.X config.
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
@@ -256,16 +247,13 @@ my %table=(
#"hpux11-64bit-cc","cc:+DA2.0W -g -D_HPUX_SOURCE -Aa -Ae +ESlit::-D_REENTRANT::SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT :::",
# Use unified settings above instead.
#### HP MPE/iX http://jazz.external.hp.com/src/openssl/
"MPE/iX-gcc", "gcc:-D_ENDIAN -DBN_DIV2W -O3 -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB::(unknown):-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
# Dec Alpha, OSF/1 - the alpha164-cc is the flags for a 21164A with
# the new compiler
# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
"alpha-gcc","gcc:-O3::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:asm/alpha.o:::::::::dlfcn:true64-shared",
"alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared",
"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK:asm/alpha.o:::::::::dlfcn:true64-shared",
"FreeBSD-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2:::",
"FreeBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown)::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2:::",
#### Alpha Linux with GNU C and Compaq C setups
# Special notes:
@@ -291,8 +279,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 -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
"debug-linux-elf","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",
"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::",
@@ -371,24 +359,24 @@ my %table=(
# Windows NT, Microsoft Visual C++ 4.0
"VC-NT","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32",
"VC-WIN32","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32",
"VC-NT","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::",
"VC-WIN32","cl:::::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::",
"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::::::::::win32",
"BC-32","bcc32:::::BN_LLONG DES_PTR RC4_INDEX:::",
"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}::::::::::win32",
"Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:",
# CygWin32
"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:",
# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
"ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::",
@@ -405,9 +393,6 @@ 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

6
FAQ
View File

@@ -32,7 +32,7 @@ OpenSSL - Frequently Asked Questions
* Which is the current version of OpenSSL?
The current version is available from <URL: http://www.openssl.org>.
OpenSSL 0.9.6 was released on September 24th, 2000.
OpenSSL 0.9.5a was released on April 1st, 2000.
In addition to the current stable release, you can also access daily
snapshots of the OpenSSL development version at <URL:
@@ -135,7 +135,7 @@ installing the SUNski package from Sun patch 105710-01 (Sparc) which
adds a /dev/random device and make sure it gets used, usually through
$RANDFILE. There are probably similar patches for the other Solaris
versions. However, be warned that /dev/random is usually a blocking
device, which may have some effects on OpenSSL.
device, which may have som effects on OpenSSL.
* Why does the linker complain about undefined symbols?
@@ -194,7 +194,7 @@ unsigned char *buf, *p;
int len;
len = i2d_PKCS7(p7, NULL);
buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */
buf = OPENSSL_Malloc(len); /* or Malloc, error checking omitted */
p = buf;
i2d_PKCS7(p7, &p);

View File

@@ -82,17 +82,12 @@ directory. The syntax is trhe following:
RSAREF compile using the RSAREF Library
NORSAREF compile without using RSAREF
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 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 2: I have never done this, so I've no idea if it works or not.
@@ -134,7 +129,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, MD4, MD5, RIPEMD,
do this with are: RSA, DSA, DH, MD2, 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

View File

@@ -108,8 +108,8 @@
* Compiler installation:
Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/
gnu-win32/mingw32/gcc-2.95.2/gcc-2.95.2-msvcrt.exe>. GNU make is at
Mingw32 is available from <ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/
mingw32/egcs-1.1.2/egcs-1.1.2-mingw32.zip>. GNU make is at
<ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32/binaries/
make-3.76.1.zip>. Install both of them in C:\egcs-1.1.2 and run
C:\egcs-1.1.2\mingw32.bat to set the PATH.

View File

@@ -62,7 +62,7 @@ AR=ar r
RANLIB= ranlib
PERL= perl
TAR= tar
TARFLAGS= --no-recursion
TARFLAGS= --norecurse
# Set BN_ASM to bn_asm.o if you want to use the C version
BN_ASM= bn_asm.o

15
NEWS
View File

@@ -5,21 +5,6 @@
This file gives a brief overview of the major changes between each OpenSSL
release. For more details please read the CHANGES file.
Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6:
o Some documentation for BIO and SSL libraries.
o Enhanced chain verification using key identifiers.
o New sign and verify options to 'dgst' application.
o Support for DER and PEM encoded messages in 'smime' application.
o New 'rsautl' application, low level RSA utility.
o MD4 now included.
o Bugfix for SSL rollback padding check.
o Support for external crypto devices [1].
o Enhanced EVP interface.
[1] The support for external crypto devices is currently a separate
distribution. See the file README.ENGINE.
Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a:
o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8

5
README
View File

@@ -1,5 +1,5 @@
OpenSSL 0.9.6 24 Sep 2000
OpenSSL 0.9.6-beta1 11 Sep 2000
Copyright (c) 1998-2000 The OpenSSL Project
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
@@ -163,9 +163,6 @@
the string "[PATCH]" in the subject. Please be sure to include a
textual explanation of what your patch does.
Note: For legal reasons, contributions from the US can be accepted only
if a copy of the patch is sent to crypt@bxa.doc.gov
The preferred format for changes is "diff -u" output. You might
generate it like this:

View File

@@ -1,63 +0,0 @@
ENGINE
======
With OpenSSL 0.9.6, a new component has been added to support external
crypto devices, for example accelerator cards. The component is called
ENGINE, and has still a pretty experimental status and almost no
documentation. It's designed to be faily easily extensible by the
calling programs.
There's currently built-in support for the following crypto devices:
o CryptoSwift
o Compaq Atalla
o nCipher CHIL
A number of things are still needed and are being worked on:
o An openssl utility command to handle or at least check available
engines.
o A better way of handling the methods that are handled by the
engines.
o Documentation!
What already exists is fairly stable as far as it has been tested, but
the test base has been a bit small most of the time.
Because of this experimental status and what's lacking, the ENGINE
component is not yet part of the default OpenSSL distribution. However,
we have made a separate kit for those who want to try this out, to be
found in the same places as the default OpenSSL distribution, but with
"-engine-" being part of the kit file name. For example, version 0.9.6
is distributed in the following two files:
openssl-0.9.6.tar.gz
openssl-engine-0.9.6.tar.gz
NOTES
=====
openssl-engine-0.9.6.tar.gz does not depend on openssl-0.9.6.tar, you do
not need to download both.
openssl-engine-0.9.6.tar.gz is usable even if you don't have an external
crypto device. The internal OpenSSL functions are contained in the
engine "openssl", and will be used by default.
No external crypto device is chosen unless you say so. You have actively
tell the openssl utility commands to use it through a new command line
switch called "-engine". And if you want to use the ENGINE library to
do something similar, you must also explicitely choose an external crypto
device, or the built-in crypto routines will be used, just as in the
default OpenSSL distribution.
PROBLEMS
========
It seems like the ENGINE part doesn't work too well with Cryptoswift on
Win32. A quick test done right before the release showed that trying
"openssl speed -engine cswift" generated errors. If the DSO gets enabled,
an attempt is made to write at memory address 0x00000002.

19
STATUS
View File

@@ -1,17 +1,18 @@
OpenSSL STATUS Last modified at
______________ $Date: 2000/09/24 15:42:34 $
______________ $Date: 2000/09/11 12:39:43 $
DEVELOPMENT STATE
o OpenSSL 0.9.6: Released on September 24th, 2000
o OpenSSL 0.9.5a: Released on April 1st, 2000
o OpenSSL 0.9.5: Released on February 28th, 2000
o OpenSSL 0.9.4: Released on August 09th, 1999
o OpenSSL 0.9.3a: Released on May 29th, 1999
o OpenSSL 0.9.3: Released on May 25th, 1999
o OpenSSL 0.9.2b: Released on March 22th, 1999
o OpenSSL 0.9.1c: Released on December 23th, 1998
o OpenSSL 0.9.6: Under development (in release cycle)...
Proposed release date September 24, 2000
o OpenSSL 0.9.5a: Released on April 1st, 2000
o OpenSSL 0.9.5: Released on February 28th, 2000
o OpenSSL 0.9.4: Released on August 09th, 1999
o OpenSSL 0.9.3a: Released on May 29th, 1999
o OpenSSL 0.9.3: Released on May 25th, 1999
o OpenSSL 0.9.2b: Released on March 22th, 1999
o OpenSSL 0.9.1c: Released on December 23th, 1998
RELEASE SHOWSTOPPERS

126
TABLE
View File

@@ -36,7 +36,7 @@ $cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = win32
$dso_scheme =
$shared_target=
$shared_cflag =
@@ -76,7 +76,7 @@ $cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = win32
$dso_scheme =
$shared_target=
$shared_cflag =
@@ -102,7 +102,7 @@ $shared_cflag =
*** FreeBSD-alpha
$cc = gcc
$cflags = -DTERMIOS -O -fomit-frame-pointer
$cflags = -DTERMIOS -O3 -fomit-frame-pointer
$unistd =
$thread_cflag = (unknown)
$lflags =
@@ -140,26 +140,6 @@ $dso_scheme =
$shared_target=
$shared_cflag =
*** MPE/iX-gcc
$cc = gcc
$cflags = -D_ENDIAN -DBN_DIV2W -O3 -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB
$unistd =
$thread_cflag = (unknown)
$lflags = -L/SYSLOG/PUB -lsyslog -lsocket -lcurses
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
$bn_obj =
$des_obj =
$bf_obj =
$md5_obj =
$sha1_obj =
$cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme =
$shared_target=
$shared_cflag =
*** Mingw32
$cc = gcc
$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
@@ -176,7 +156,7 @@ $cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = win32
$dso_scheme =
$shared_target=
$shared_cflag =
@@ -416,7 +396,7 @@ $cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = win32
$dso_scheme =
$shared_target=
$shared_cflag =
@@ -496,7 +476,7 @@ $cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = win32
$dso_scheme =
$shared_target=
$shared_cflag =
@@ -825,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 -ldl
$lflags = -lefence
$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
@@ -845,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 = -ldl
$lflags =
$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
@@ -1182,11 +1162,11 @@ $shared_cflag =
*** hpux-parisc-cc
$cc = cc
$cflags = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
$cflags = -Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
$unistd =
$thread_cflag = -D_REENTRANT
$thread_cflag =
$lflags = -ldld
$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
$bn_obj =
$des_obj =
$bf_obj =
@@ -1240,46 +1220,6 @@ $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 = -ldld
$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 = -ldld
$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
@@ -1365,7 +1305,7 @@ $cc = cc
$cflags = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY
$unistd =
$thread_cflag = -D_REENTRANT
$lflags = -ldl
$lflags = -ldld
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_obj =
$des_obj =
@@ -1376,27 +1316,7 @@ $cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = dlfcn
$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 = dlfcn
$dso_scheme = dl
$shared_target=
$shared_cflag =
@@ -1820,26 +1740,6 @@ $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

View File

@@ -146,9 +146,8 @@ 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/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/crypto.h ../include/openssl/des.h
app_rand.o: ../include/openssl/dh.h ../include/openssl/dsa.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
@@ -165,9 +164,8 @@ 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/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/crypto.h ../include/openssl/des.h
apps.o: ../include/openssl/dh.h ../include/openssl/dsa.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
@@ -186,9 +184,8 @@ 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/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/crypto.h ../include/openssl/des.h
asn1pars.o: ../include/openssl/dh.h ../include/openssl/dsa.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
@@ -227,10 +224,9 @@ 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/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/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/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
@@ -271,9 +267,8 @@ 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/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/crypto.h ../include/openssl/des.h
crl2p7.o: ../include/openssl/dh.h ../include/openssl/dsa.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
@@ -291,9 +286,8 @@ 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/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/crypto.h ../include/openssl/des.h
dgst.o: ../include/openssl/dh.h ../include/openssl/dsa.h
dgst.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
dgst.o: ../include/openssl/err.h ../include/openssl/evp.h
dgst.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -311,29 +305,27 @@ 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/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/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/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
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/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/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
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/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/crypto.h ../include/openssl/des.h
dsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
dsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
dsa.o: ../include/openssl/err.h ../include/openssl/evp.h
dsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -351,9 +343,8 @@ 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/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/crypto.h ../include/openssl/des.h
dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h
dsaparam.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h
dsaparam.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -371,9 +362,8 @@ 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/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/crypto.h ../include/openssl/des.h
enc.o: ../include/openssl/dh.h ../include/openssl/dsa.h
enc.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
enc.o: ../include/openssl/err.h ../include/openssl/evp.h
enc.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -392,10 +382,9 @@ enc.o: ../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/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/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/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
@@ -415,9 +404,8 @@ 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/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/crypto.h ../include/openssl/des.h
gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h
gendh.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
gendh.o: ../include/openssl/err.h ../include/openssl/evp.h
gendh.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -436,9 +424,8 @@ gendh.o: ../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/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/crypto.h ../include/openssl/des.h
gendsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
gendsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h
gendsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -456,9 +443,8 @@ 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/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/crypto.h ../include/openssl/des.h
genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
genrsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h
genrsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -476,9 +462,8 @@ 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/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/crypto.h ../include/openssl/des.h
nseq.o: ../include/openssl/dh.h ../include/openssl/dsa.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
@@ -520,9 +505,8 @@ 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/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/crypto.h ../include/openssl/des.h
passwd.o: ../include/openssl/dh.h ../include/openssl/dsa.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
@@ -540,9 +524,8 @@ 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/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/crypto.h ../include/openssl/des.h
pkcs12.o: ../include/openssl/dh.h ../include/openssl/dsa.h
pkcs12.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
pkcs12.o: ../include/openssl/err.h ../include/openssl/evp.h
pkcs12.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -561,9 +544,8 @@ 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/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/crypto.h ../include/openssl/des.h
pkcs7.o: ../include/openssl/dh.h ../include/openssl/dsa.h
pkcs7.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
pkcs7.o: ../include/openssl/err.h ../include/openssl/evp.h
pkcs7.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -581,9 +563,8 @@ 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/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/crypto.h ../include/openssl/des.h
pkcs8.o: ../include/openssl/dh.h ../include/openssl/dsa.h
pkcs8.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
pkcs8.o: ../include/openssl/err.h ../include/openssl/evp.h
pkcs8.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -602,9 +583,8 @@ 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/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/crypto.h ../include/openssl/des.h
rand.o: ../include/openssl/dh.h ../include/openssl/dsa.h
rand.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
rand.o: ../include/openssl/err.h ../include/openssl/evp.h
rand.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -643,9 +623,8 @@ 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/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/crypto.h ../include/openssl/des.h
rsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h
rsa.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
rsa.o: ../include/openssl/err.h ../include/openssl/evp.h
rsa.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -663,9 +642,8 @@ 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/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/crypto.h ../include/openssl/des.h
rsautl.o: ../include/openssl/dh.h ../include/openssl/dsa.h
rsautl.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
rsautl.o: ../include/openssl/err.h ../include/openssl/evp.h
rsautl.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -683,10 +661,9 @@ 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/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/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/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
@@ -706,10 +683,9 @@ 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/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/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/e_os2.h ../include/openssl/err.h
s_client.o: ../include/openssl/evp.h ../include/openssl/idea.h
s_client.o: ../include/openssl/lhash.h ../include/openssl/md2.h
@@ -730,10 +706,9 @@ 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/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/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/e_os2.h ../include/openssl/err.h
s_server.o: ../include/openssl/evp.h ../include/openssl/idea.h
s_server.o: ../include/openssl/lhash.h ../include/openssl/md2.h
@@ -754,10 +729,9 @@ 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/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/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/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
@@ -777,10 +751,9 @@ 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/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/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/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
@@ -801,10 +774,9 @@ 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/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/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/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
@@ -824,9 +796,8 @@ 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/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/crypto.h ../include/openssl/des.h
smime.o: ../include/openssl/dh.h ../include/openssl/dsa.h
smime.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
smime.o: ../include/openssl/err.h ../include/openssl/evp.h
smime.o: ../include/openssl/idea.h ../include/openssl/lhash.h
@@ -844,9 +815,8 @@ 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/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/crypto.h ../include/openssl/des.h
speed.o: ../include/openssl/dh.h ../include/openssl/dsa.h
speed.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h
speed.o: ../include/openssl/err.h ../include/openssl/evp.h
speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h
@@ -906,9 +876,8 @@ 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/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/crypto.h ../include/openssl/des.h
version.o: ../include/openssl/dh.h ../include/openssl/dsa.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

View File

@@ -660,7 +660,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);

View File

@@ -66,7 +66,6 @@
#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);
@@ -100,6 +99,7 @@ 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;

View File

@@ -206,12 +206,6 @@ bad:
goto end;
}
BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
if (oidfile != NULL)
{
@@ -321,7 +315,7 @@ bad:
end:
BIO_free(derout);
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (b64 != NULL) BIO_free(b64);
if (ret != 0)
ERR_print_errors(bio_err);

View File

@@ -690,12 +690,6 @@ bad:
if (verbose)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
TXT_DB_write(out,db);
BIO_printf(bio_err,"%d entries loaded from the database\n",
db->data->num);
@@ -730,15 +724,7 @@ bad:
}
}
else
{
BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
Sout = BIO_push(tmpbio, Sout);
}
#endif
}
}
if (req)
@@ -1034,7 +1020,7 @@ bad:
#endif
BIO_free(in);
BIO_free_all(out);
BIO_free(out);
in=NULL;
out=NULL;
if (rename(serialfile,buf[2]) < 0)
@@ -1251,9 +1237,9 @@ bad:
ret=0;
err:
BIO_free(hex);
BIO_free_all(Cout);
BIO_free_all(Sout);
BIO_free_all(out);
BIO_free(Cout);
BIO_free(Sout);
BIO_free(out);
BIO_free(in);
sk_X509_pop_free(cert_sk,X509_free);
@@ -1368,7 +1354,7 @@ static int save_serial(char *serialfile, BIGNUM *serial)
BIO_puts(out,"\n");
ret=1;
err:
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (ai != NULL) ASN1_INTEGER_free(ai);
return(ret);
}

View File

@@ -108,12 +108,6 @@ int MAIN(int argc, char **argv)
if (bio_err == NULL)
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
STDout = BIO_push(tmpbio, STDout);
}
#endif
argc--;
argv++;
@@ -201,7 +195,7 @@ err:
end:
if (ctx != NULL) SSL_CTX_free(ctx);
if (ssl != NULL) SSL_free(ssl);
if (STDout != NULL) BIO_free_all(STDout);
if (STDout != NULL) BIO_free(STDout);
EXIT(ret);
}

View File

@@ -122,15 +122,7 @@ int MAIN(int argc, char **argv)
if (bio_out == NULL)
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
{
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
bio_out = BIO_push(tmpbio, bio_out);
}
#endif
}
informat=FORMAT_PEM;
outformat=FORMAT_PEM;
@@ -322,15 +314,7 @@ bad:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -356,8 +340,8 @@ bad:
if (!i) { BIO_printf(bio_err,"unable to write CRL\n"); goto end; }
ret=0;
end:
BIO_free_all(out);
BIO_free_all(bio_out);
BIO_free(out);
BIO_free(bio_out);
bio_out=NULL;
X509_CRL_free(x);
if(store) {

View File

@@ -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++) {
@@ -239,15 +239,7 @@ bad:
sk_free(certflst);
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -274,7 +266,7 @@ bad:
ret=0;
end:
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (p7 != NULL) PKCS7_free(p7);
if (crl != NULL) X509_CRL_free(crl);

View File

@@ -74,7 +74,7 @@
#define PROG dgst_main
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, char binout,
EVP_PKEY *key, unsigned char *sigin, int siglen);
EVP_PKEY *key, unsigned char *sigin, unsigned int siglen);
int MAIN(int, char **);
@@ -96,7 +96,7 @@ int MAIN(int argc, char **argv)
char out_bin = -1, want_pub = 0, do_verify = 0;
EVP_PKEY *sigkey = NULL;
unsigned char *sigbuf = NULL;
int siglen = 0;
unsigned int siglen = 0;
apps_startup();
@@ -236,15 +236,7 @@ int MAIN(int argc, char **argv)
if(out_bin)
out = BIO_new_file(outfile, "wb");
else out = BIO_new_file(outfile, "w");
} else {
out = BIO_new_fp(stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
} else out = BIO_new_fp(stdout, BIO_NOCLOSE);
if(!out) {
BIO_printf(bio_err, "Error opening output file %s\n",
@@ -331,7 +323,7 @@ end:
OPENSSL_free(buf);
}
if (in != NULL) BIO_free(in);
BIO_free_all(out);
BIO_free(out);
EVP_PKEY_free(sigkey);
if(sigbuf) OPENSSL_free(sigbuf);
if (bmd != NULL) BIO_free(bmd);
@@ -339,7 +331,7 @@ end:
}
void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, char binout,
EVP_PKEY *key, unsigned char *sigin, int siglen)
EVP_PKEY *key, unsigned char *sigin, unsigned int siglen)
{
int len;
int i;
@@ -353,7 +345,7 @@ void do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, char binout,
{
EVP_MD_CTX *ctx;
BIO_get_md_ctx(bp, &ctx);
i = EVP_VerifyFinal(ctx, sigin, (unsigned int)siglen, key);
i = EVP_VerifyFinal(ctx, sigin, siglen, key);
if(i > 0) BIO_printf(out, "Verified OK\n");
else if(i == 0) BIO_printf(out, "Verification Failure\n");
else

View File

@@ -184,15 +184,7 @@ bad:
}
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -317,7 +309,7 @@ bad:
ret=0;
end:
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (dh != NULL) DH_free(dh);
EXIT(ret);
}

View File

@@ -391,15 +391,7 @@ bad:
goto end;
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -504,7 +496,7 @@ bad:
ret=0;
end:
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (dh != NULL) DH_free(dh);
EXIT(ret);
}

View File

@@ -233,15 +233,7 @@ bad:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -289,7 +281,7 @@ bad:
ret=0;
end:
if(in != NULL) BIO_free(in);
if(out != NULL) BIO_free_all(out);
if(out != NULL) BIO_free(out);
if(dsa != NULL) DSA_free(dsa);
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);

View File

@@ -205,15 +205,7 @@ bad:
}
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -355,7 +347,7 @@ bad:
ret=0;
end:
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (dsa != NULL) DSA_free(dsa);
EXIT(ret);
}

View File

@@ -416,15 +416,7 @@ bad:
if (outf == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outf) <= 0)
@@ -592,7 +584,7 @@ end:
if (strbuf != NULL) OPENSSL_free(strbuf);
if (buff != NULL) OPENSSL_free(buff);
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (benc != NULL) BIO_free(benc);
if (b64 != NULL) BIO_free(b64);
if(pass) OPENSSL_free(pass);

View File

@@ -91,18 +91,12 @@ int MAIN(int argc, char **argv)
out=BIO_new(BIO_s_file());
if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE))
{
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
lh_node_stats_bio((LHASH *)ERR_get_string_table(),out);
lh_stats_bio((LHASH *)ERR_get_string_table(),out);
lh_node_usage_stats_bio((LHASH *)
ERR_get_string_table(),out);
}
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
argc--;
argv++;
}

View File

@@ -142,15 +142,7 @@ bad:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -182,7 +174,7 @@ bad:
end:
if (ret != 0)
ERR_print_errors(bio_err);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (dh != NULL) DH_free(dh);
EXIT(ret);
}

View File

@@ -178,15 +178,7 @@ bad:
if (out == NULL) goto end;
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -217,7 +209,7 @@ end:
if (ret != 0)
ERR_print_errors(bio_err);
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (dsa != NULL) DSA_free(dsa);
if(passout) OPENSSL_free(passout);
EXIT(ret);

View File

@@ -168,15 +168,7 @@ bad:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -220,7 +212,7 @@ bad:
ret=0;
err:
if (rsa != NULL) RSA_free(rsa);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if(passout) OPENSSL_free(passout);
if (ret != 0)
ERR_print_errors(bio_err);

View File

@@ -119,18 +119,11 @@ int MAIN(int argc, char **argv)
"Can't open output file %s\n", outfile);
goto end;
}
} else {
out = BIO_new_fp(stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
} else out = BIO_new_fp(stdout, BIO_NOCLOSE);
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);
@@ -159,7 +152,7 @@ int MAIN(int argc, char **argv)
ret = 0;
end:
BIO_free(in);
BIO_free_all(out);
BIO_free(out);
NETSCAPE_CERT_SEQUENCE_free(seq);
EXIT(ret);

View File

@@ -238,19 +238,13 @@ static int do_cmd(LHASH *prog, int argc, char *argv[])
else if ((strncmp(argv[0],"no-",3)) == 0)
{
BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
bio_stdout = BIO_push(tmpbio, bio_stdout);
}
#endif
f.name=argv[0]+3;
ret = (lh_retrieve(prog,&f) != NULL);
if (!ret)
BIO_printf(bio_stdout, "%s\n", argv[0]);
else
BIO_printf(bio_stdout, "%s\n", argv[0]+3);
BIO_free_all(bio_stdout);
BIO_free(bio_stdout);
goto end;
}
else if ((strcmp(argv[0],"quit") == 0) ||
@@ -275,17 +269,11 @@ static int do_cmd(LHASH *prog, int argc, char *argv[])
else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */
list_type = FUNC_TYPE_CIPHER;
bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
bio_stdout = BIO_push(tmpbio, bio_stdout);
}
#endif
for (fp=functions; fp->name != NULL; fp++)
if (fp->type == list_type)
BIO_printf(bio_stdout, "%s\n", fp->name);
BIO_free_all(bio_stdout);
BIO_free(bio_stdout);
ret=0;
goto end;
}

View File

@@ -81,12 +81,6 @@ int MAIN(int argc, char **argv)
if (out == NULL)
goto err;
BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
badopt = 0, opt_done = 0;
i = 0;
@@ -282,7 +276,7 @@ err:
if (in)
BIO_free(in);
if (out)
BIO_free_all(out);
BIO_free(out);
EXIT(ret);
}

View File

@@ -197,7 +197,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")) {
@@ -350,15 +350,8 @@ int MAIN(int argc, char **argv)
CRYPTO_push_info("write files");
#endif
if (!outfile) {
out = BIO_new_fp(stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
} else out = BIO_new_file(outfile, "wb");
if (!outfile) out = BIO_new_fp(stdout, BIO_NOCLOSE);
else out = BIO_new_file(outfile, "wb");
if (!out) {
BIO_printf(bio_err, "Error opening output file %s\n",
outfile ? outfile : "<stdout>");
@@ -411,7 +404,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)) {
@@ -443,7 +436,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) {
@@ -534,7 +527,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
@@ -550,7 +543,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
@@ -664,7 +657,7 @@ int MAIN(int argc, char **argv)
CRYPTO_remove_all_info();
#endif
BIO_free(in);
BIO_free_all(out);
BIO_free(out);
if (canames) sk_free(canames);
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);
@@ -887,14 +880,14 @@ int print_attribs (BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, char *name)
break;
case V_ASN1_OCTET_STRING:
hex_prin(out, av->value.octet_string->data,
av->value.octet_string->length);
hex_prin(out, av->value.bit_string->data,
av->value.bit_string->length);
BIO_printf(out, "\n");
break;
case V_ASN1_BIT_STRING:
hex_prin(out, av->value.bit_string->data,
av->value.bit_string->length);
hex_prin(out, av->value.octet_string->data,
av->value.octet_string->length);
BIO_printf(out, "\n");
break;

View File

@@ -196,15 +196,7 @@ bad:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -288,6 +280,6 @@ bad:
end:
if (p7 != NULL) PKCS7_free(p7);
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
EXIT(ret);
}

View File

@@ -194,15 +194,8 @@ int MAIN(int argc, char **argv)
"Can't open output file %s\n", outfile);
return (1);
}
} else {
out = BIO_new_fp (stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
} else out = BIO_new_fp (stdout, BIO_NOCLOSE);
if (topk8) {
if(informat == FORMAT_PEM)
pkey = PEM_read_bio_PrivateKey(in, NULL, NULL, passin);
@@ -260,7 +253,7 @@ int MAIN(int argc, char **argv)
}
PKCS8_PRIV_KEY_INFO_free (p8inf);
EVP_PKEY_free(pkey);
BIO_free_all(out);
BIO_free(out);
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);
return (0);
@@ -343,7 +336,7 @@ int MAIN(int argc, char **argv)
}
EVP_PKEY_free(pkey);
BIO_free_all(out);
BIO_free(out);
BIO_free(in);
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);

View File

@@ -101,15 +101,7 @@ int MAIN(int argc, char **argv)
if (outfile != NULL)
r = BIO_write_filename(out, outfile);
else
{
r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
if (r <= 0)
goto err;

View File

@@ -609,12 +609,6 @@ bad:
{
BIO_printf(bio_err,"writing new private key to stdout\n");
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
@@ -810,15 +804,7 @@ loop:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if ((keyout != NULL) && (strcmp(outfile,keyout) == 0))
@@ -904,7 +890,7 @@ end:
}
if ((req_conf != NULL) && (req_conf != config)) CONF_free(req_conf);
BIO_free(in);
BIO_free_all(out);
BIO_free(out);
EVP_PKEY_free(pkey);
X509_REQ_free(req);
X509_free(x509ss);

View File

@@ -278,15 +278,7 @@ bad:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -385,7 +377,7 @@ bad:
ret=0;
end:
if(in != NULL) BIO_free(in);
if(out != NULL) BIO_free_all(out);
if(out != NULL) BIO_free(out);
if(rsa != NULL) RSA_free(rsa);
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);

View File

@@ -198,15 +198,7 @@ int MAIN(int argc, char **argv)
ERR_print_errors(bio_err);
goto end;
}
} else {
out = BIO_new_fp(stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
} else out = BIO_new_fp(stdout, BIO_NOCLOSE);
keysize = RSA_size(rsa);
@@ -263,7 +255,7 @@ int MAIN(int argc, char **argv)
end:
RSA_free(rsa);
BIO_free(in);
BIO_free_all(out);
BIO_free(out);
if(rsa_in) OPENSSL_free(rsa_in);
if(rsa_out) OPENSSL_free(rsa_out);
return ret;

View File

@@ -209,11 +209,9 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port)
s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
if (s == INVALID_SOCKET) { perror("socket"); return(0); }
#ifndef MPE
i=0;
i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
if (i < 0) { perror("keepalive"); return(0); }
#endif
if (connect(s,(struct sockaddr *)&them,sizeof(them)) == -1)
{ close(s); perror("connect"); return(0); }

View File

@@ -206,15 +206,7 @@ bad:
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -270,7 +262,7 @@ bad:
}
ret=0;
end:
if (out != NULL) BIO_free_all(out);
if (out != NULL) BIO_free(out);
if (x != NULL) SSL_SESSION_free(x);
EXIT(ret);
}

View File

@@ -393,15 +393,7 @@ int MAIN(int argc, char **argv)
"Can't open output file %s\n", outfile);
goto end;
}
} else {
out = BIO_new_fp(stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
} else out = BIO_new_fp(stdout, BIO_NOCLOSE);
if(operation == SMIME_VERIFY) {
if(!(store = setup_verify(CAfile, CApath))) goto end;
@@ -498,7 +490,7 @@ end:
PKCS7_free(p7);
BIO_free(in);
BIO_free(indata);
BIO_free_all(out);
BIO_free(out);
if(passin) OPENSSL_free(passin);
return (ret);
}

View File

@@ -87,7 +87,7 @@
#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
# define TIMES
#endif
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE)
#if !defined(_UNICOS)
# define TIMEB
#endif
@@ -115,7 +115,7 @@
#include <sys/timeb.h>
#endif
#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD)
#if !defined(TIMES) && !defined(TIMEB)
#error "It seems neither struct tms nor struct timeb is supported in this platform!"
#endif
@@ -318,7 +318,7 @@ int MAIN(int argc, char **argv)
#define DSA_NUM 3
long count,rsa_count;
int i,j,k;
unsigned rsa_num;
unsigned rsa_num,rsa_num2;
#ifndef NO_MD2
unsigned char md2[MD2_DIGEST_LENGTH];
#endif
@@ -1133,73 +1133,49 @@ 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]);
if (ret == 0)
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++)
{
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 sign failure\n");
ERR_print_errors(bio_err);
count=1;
break;
}
BIO_printf(bio_err,"RSA private encrypt 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",
count,rsa_bits[j],d);
rsa_results[j][0]=d/(double)count;
rsa_count=count;
}
d=Time_F(STOP,usertime);
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]);
if (ret <= 0)
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++)
{
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");
ERR_print_errors(bio_err);
count=1;
break;
}
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",
count,rsa_bits[j],d);
rsa_results[j][1]=d/(double)count;
}
d=Time_F(STOP,usertime);
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)
@@ -1221,77 +1197,54 @@ 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); */
ret=DSA_sign(EVP_PKEY_DSA,buf,20,buf2,
rsa_num=DSA_sign(EVP_PKEY_DSA,buf,20,buf2,
&kk,dsa_key[j]);
if (ret == 0)
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++)
{
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,
&kk,dsa_key[j]);
if (rsa_num == 0)
{
ret=DSA_sign(EVP_PKEY_DSA,buf,20,buf2,
&kk,dsa_key[j]);
if (ret == 0)
{
BIO_printf(bio_err,
"DSA sign failure\n");
ERR_print_errors(bio_err);
count=1;
break;
}
BIO_printf(bio_err,"DSA sign failure\n");
ERR_print_errors(bio_err);
count=1;
break;
}
d=Time_F(STOP,usertime);
BIO_printf(bio_err,"%ld %d bit DSA signs in %.2fs\n",
count,dsa_bits[j],d);
dsa_results[j][0]=d/(double)count;
rsa_count=count;
}
d=Time_F(STOP,usertime);
BIO_printf(bio_err,"%ld %d bit DSA signs in %.2fs\n",
count,dsa_bits[j],d);
dsa_results[j][0]=d/(double)count;
rsa_count=count;
ret=DSA_verify(EVP_PKEY_DSA,buf,20,buf2,
rsa_num2=DSA_verify(EVP_PKEY_DSA,buf,20,buf2,
kk,dsa_key[j]);
if (ret <= 0)
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++)
{
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,
kk,dsa_key[j]);
if (rsa_num2 == 0)
{
ret=DSA_verify(EVP_PKEY_DSA,buf,20,buf2,
kk,dsa_key[j]);
if (ret <= 0)
{
BIO_printf(bio_err,
"DSA verify failure\n");
ERR_print_errors(bio_err);
count=1;
break;
}
BIO_printf(bio_err,"DSA verify failure\n");
ERR_print_errors(bio_err);
count=1;
break;
}
d=Time_F(STOP,usertime);
BIO_printf(bio_err,"%ld %d bit DSA verify in %.2fs\n",
count,dsa_bits[j],d);
dsa_results[j][1]=d/(double)count;
}
d=Time_F(STOP,usertime);
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)
{

View File

@@ -192,15 +192,7 @@ bad:
spkstr = NETSCAPE_SPKI_b64_encode(spki);
if (outfile) out = BIO_new_file(outfile, "w");
else {
out = BIO_new_fp(stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else out = BIO_new_fp(stdout, BIO_NOCLOSE);
if(!out) {
BIO_printf(bio_err, "Error opening output file\n");
@@ -249,15 +241,7 @@ bad:
}
if (outfile) out = BIO_new_file(outfile, "w");
else {
out = BIO_new_fp(stdout, BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else out = BIO_new_fp(stdout, BIO_NOCLOSE);
if(!out) {
BIO_printf(bio_err, "Error opening output file\n");
@@ -284,7 +268,7 @@ end:
CONF_free(conf);
NETSCAPE_SPKI_free(spki);
BIO_free(in);
BIO_free_all(out);
BIO_free(out);
BIO_free(key);
EVP_PKEY_free(pkey);
if(passin) OPENSSL_free(passin);

View File

@@ -183,12 +183,6 @@ int MAIN(int argc, char **argv)
if (bio_err == NULL)
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
STDout = BIO_push(tmpbio, STDout);
}
#endif
informat=FORMAT_PEM;
outformat=FORMAT_PEM;
@@ -582,15 +576,7 @@ bad:
goto end;
}
if (outfile == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
#ifdef VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
out = BIO_push(tmpbio, out);
}
#endif
}
else
{
if (BIO_write_filename(out,outfile) <= 0)
@@ -947,8 +933,8 @@ end:
app_RAND_write_file(NULL, bio_err);
OBJ_cleanup();
CONF_free(extconf);
BIO_free_all(out);
BIO_free_all(STDout);
BIO_free(out);
BIO_free(STDout);
X509_STORE_free(ctx);
X509_REQ_free(req);
X509_free(x);

9
config
View File

@@ -71,10 +71,6 @@ fi
# Now we simply scan though... In most cases, the SYSTEM info is enough
#
case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
MPE/iX:*)
MACHINE=`echo "$MACHINE" | sed -e 's/-/_/g'`
echo "parisc-hp-MPE/iX"; exit 0
;;
A/UX:*)
echo "m68k-apple-aux3"; exit 0
;;
@@ -251,10 +247,6 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
;;
NEWS-OS:4.*)
echo "mips-sony-newsos4"; exit 0;
;;
esac
#
@@ -478,7 +470,6 @@ 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

View File

@@ -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);

View File

@@ -123,8 +123,6 @@ int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **pp)
break;
case V_ASN1_SET:
case V_ASN1_SEQUENCE:
case V_ASN1_OTHER:
default:
if (a->value.set == NULL)
r=0;
else
@@ -161,8 +159,6 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length)
inf=ASN1_get_object(&q,&len,&tag,&xclass,length);
if (inf & 0x80) goto err;
/* If not universal tag we've no idea what it is */
if(xclass != V_ASN1_UNIVERSAL) tag = V_ASN1_OTHER;
ASN1_TYPE_component_free(ret);
@@ -249,8 +245,6 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length)
break;
case V_ASN1_SET:
case V_ASN1_SEQUENCE:
case V_ASN1_OTHER:
default:
/* Sets and sequences are left complete */
if ((ret->value.set=ASN1_STRING_new()) == NULL) goto err;
ret->value.set->type=tag;
@@ -258,6 +252,9 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length)
if (!ASN1_STRING_set(ret->value.set,p,(int)len)) goto err;
p+=len;
break;
default:
ASN1err(ASN1_F_D2I_ASN1_TYPE,ASN1_R_BAD_TYPE);
goto err;
}
ret->type=tag;
@@ -315,8 +312,6 @@ static void ASN1_TYPE_component_free(ASN1_TYPE *a)
case V_ASN1_OBJECT:
ASN1_OBJECT_free(a->value.object);
break;
case V_ASN1_NULL:
break;
case V_ASN1_INTEGER:
case V_ASN1_NEG_INTEGER:
case V_ASN1_ENUMERATED:
@@ -338,10 +333,11 @@ static void ASN1_TYPE_component_free(ASN1_TYPE *a)
case V_ASN1_UNIVERSALSTRING:
case V_ASN1_BMPSTRING:
case V_ASN1_UTF8STRING:
case V_ASN1_OTHER:
default:
ASN1_STRING_free((ASN1_STRING *)a->value.ptr);
break;
default:
/* MEMORY LEAK */
break;
}
a->type=0;
a->value.ptr=NULL;

View File

@@ -83,7 +83,6 @@ extern "C" {
#define V_ASN1_PRIMATIVE_TAG 0x1f
#define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */
#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
#define V_ASN1_NEG 0x100 /* negative flag */

View File

@@ -27,13 +27,11 @@ LIBSRC= bio_lib.c bio_cb.c bio_err.c \
bss_file.c bss_sock.c bss_conn.c \
bf_null.c bf_buff.c b_print.c b_dump.c \
b_sock.c bss_acpt.c bf_nbio.c bss_log.c bss_bio.c
# bf_lbuf.c
LIBOBJ= bio_lib.o bio_cb.o bio_err.o \
bss_mem.o bss_null.o bss_fd.o \
bss_file.o bss_sock.o bss_conn.o \
bf_null.o bf_buff.o b_print.o b_dump.o \
b_sock.o bss_acpt.o bf_nbio.o bss_log.o bss_bio.o
# bf_lbuf.o
SRC= $(LIBSRC)

View File

@@ -1,397 +0,0 @@
/* crypto/bio/bf_buff.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* 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 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 acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS 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 AUTHOR OR 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.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
#include <stdio.h>
#include <errno.h>
#include "cryptlib.h"
#include <openssl/bio.h>
#include <openssl/evp.h>
static int linebuffer_write(BIO *h, const char *buf,int num);
static int linebuffer_read(BIO *h, char *buf, int size);
static int linebuffer_puts(BIO *h, const char *str);
static int linebuffer_gets(BIO *h, char *str, int size);
static long linebuffer_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int linebuffer_new(BIO *h);
static int linebuffer_free(BIO *data);
static long linebuffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
/* A 10k maximum should be enough for most purposes */
#define DEFAULT_LINEBUFFER_SIZE 1024*10
/* #define DEBUG */
static BIO_METHOD methods_linebuffer=
{
BIO_TYPE_LINEBUFFER,
"linebuffer",
linebuffer_write,
linebuffer_read,
linebuffer_puts,
linebuffer_gets,
linebuffer_ctrl,
linebuffer_new,
linebuffer_free,
linebuffer_callback_ctrl,
};
BIO_METHOD *BIO_f_linebuffer(void)
{
return(&methods_linebuffer);
}
typedef struct bio_linebuffer_ctx_struct
{
char *obuf; /* the output char array */
int obuf_size; /* how big is the output buffer */
int obuf_len; /* how many bytes are in it */
} BIO_LINEBUFFER_CTX;
static int linebuffer_new(BIO *bi)
{
BIO_LINEBUFFER_CTX *ctx;
ctx=(BIO_LINEBUFFER_CTX *)OPENSSL_malloc(sizeof(BIO_LINEBUFFER_CTX));
if (ctx == NULL) return(0);
ctx->obuf=(char *)OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE);
if (ctx->obuf == NULL) { OPENSSL_free(ctx); return(0); }
ctx->obuf_size=DEFAULT_LINEBUFFER_SIZE;
ctx->obuf_len=0;
bi->init=1;
bi->ptr=(char *)ctx;
bi->flags=0;
return(1);
}
static int linebuffer_free(BIO *a)
{
BIO_LINEBUFFER_CTX *b;
if (a == NULL) return(0);
b=(BIO_LINEBUFFER_CTX *)a->ptr;
if (b->obuf != NULL) OPENSSL_free(b->obuf);
OPENSSL_free(a->ptr);
a->ptr=NULL;
a->init=0;
a->flags=0;
return(1);
}
static int linebuffer_read(BIO *b, char *out, int outl)
{
int ret=0;
if (out == NULL) return(0);
if (b->next_bio == NULL) return(0);
ret=BIO_read(b->next_bio,out,outl);
BIO_clear_retry_flags(b);
BIO_copy_next_retry(b);
return(ret);
}
static int linebuffer_write(BIO *b, const char *in, int inl)
{
int i,num=0,foundnl;
BIO_LINEBUFFER_CTX *ctx;
if ((in == NULL) || (inl <= 0)) return(0);
ctx=(BIO_LINEBUFFER_CTX *)b->ptr;
if ((ctx == NULL) || (b->next_bio == NULL)) return(0);
BIO_clear_retry_flags(b);
do
{
const char *p;
for(p = in; p < in + inl && *p != '\n'; p++)
;
if (*p == '\n')
{
p++;
foundnl = 1;
}
else
foundnl = 0;
/* If a NL was found and we already have text in the save
buffer, concatenate them and write */
while ((foundnl || p - in > ctx->obuf_size - ctx->obuf_len)
&& ctx->obuf_len > 0)
{
int orig_olen = ctx->obuf_len;
i = ctx->obuf_size - ctx->obuf_len;
if (p - in > 0)
{
if (i >= p - in)
{
memcpy(&(ctx->obuf[ctx->obuf_len]),
in,p - in);
ctx->obuf_len += p - in;
inl -= p - in;
num += p - in;
in = p;
}
else
{
memcpy(&(ctx->obuf[ctx->obuf_len]),
in,i);
ctx->obuf_len += i;
inl -= i;
in += i;
num += i;
}
}
#ifdef DEBUG
BIO_write(b->next_bio, "<*<", 3);
#endif
i=BIO_write(b->next_bio,
ctx->obuf, ctx->obuf_len);
if (i <= 0)
{
ctx->obuf_len = orig_olen;
BIO_copy_next_retry(b);
#ifdef DEBUG
BIO_write(b->next_bio, ">*>", 3);
#endif
if (i < 0) return((num > 0)?num:i);
if (i == 0) return(num);
}
#ifdef DEBUG
BIO_write(b->next_bio, ">*>", 3);
#endif
if (i < ctx->obuf_len)
memmove(ctx->obuf, ctx->obuf + i,
ctx->obuf_len - i);
ctx->obuf_len-=i;
}
/* Now that the save buffer is emptied, let's write the input
buffer if a NL was found and there is anything to write. */
if ((foundnl || p - in > ctx->obuf_size) && p - in > 0)
{
#ifdef DEBUG
BIO_write(b->next_bio, "<*<", 3);
#endif
i=BIO_write(b->next_bio,in,p - in);
if (i <= 0)
{
BIO_copy_next_retry(b);
#ifdef DEBUG
BIO_write(b->next_bio, ">*>", 3);
#endif
if (i < 0) return((num > 0)?num:i);
if (i == 0) return(num);
}
#ifdef DEBUG
BIO_write(b->next_bio, ">*>", 3);
#endif
num+=i;
in+=i;
inl-=i;
}
}
while(foundnl && inl > 0);
/* We've written as much as we can. The rest of the input buffer, if
any, is text that doesn't and with a NL and therefore needs to be
saved for the next trip. */
if (inl > 0)
{
memcpy(&(ctx->obuf[ctx->obuf_len]), in, inl);
ctx->obuf_len += inl;
num += inl;
}
return num;
}
static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr)
{
BIO *dbio;
BIO_LINEBUFFER_CTX *ctx;
long ret=1;
char *p;
int r;
int obs;
ctx=(BIO_LINEBUFFER_CTX *)b->ptr;
switch (cmd)
{
case BIO_CTRL_RESET:
ctx->obuf_len=0;
if (b->next_bio == NULL) return(0);
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
break;
case BIO_CTRL_INFO:
ret=(long)ctx->obuf_len;
break;
case BIO_CTRL_WPENDING:
ret=(long)ctx->obuf_len;
if (ret == 0)
{
if (b->next_bio == NULL) return(0);
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
}
break;
case BIO_C_SET_BUFF_SIZE:
obs=(int)num;
p=ctx->obuf;
if ((obs > DEFAULT_LINEBUFFER_SIZE) && (obs != ctx->obuf_size))
{
p=(char *)OPENSSL_malloc((int)num);
if (p == NULL)
goto malloc_error;
}
if (ctx->obuf != p)
{
if (ctx->obuf_len > obs)
{
ctx->obuf_len = obs;
}
memcpy(p, ctx->obuf, ctx->obuf_len);
OPENSSL_free(ctx->obuf);
ctx->obuf=p;
ctx->obuf_size=obs;
}
break;
case BIO_C_DO_STATE_MACHINE:
if (b->next_bio == NULL) return(0);
BIO_clear_retry_flags(b);
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
BIO_copy_next_retry(b);
break;
case BIO_CTRL_FLUSH:
if (b->next_bio == NULL) return(0);
if (ctx->obuf_len <= 0)
{
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
break;
}
for (;;)
{
BIO_clear_retry_flags(b);
if (ctx->obuf_len > 0)
{
r=BIO_write(b->next_bio,
ctx->obuf, ctx->obuf_len);
#if 0
fprintf(stderr,"FLUSH %3d -> %3d\n",ctx->obuf_len,r);
#endif
BIO_copy_next_retry(b);
if (r <= 0) return((long)r);
if (r < ctx->obuf_len)
memmove(ctx->obuf, ctx->obuf + r,
ctx->obuf_len - r);
ctx->obuf_len-=r;
}
else
{
ctx->obuf_len=0;
ret=1;
break;
}
}
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
break;
case BIO_CTRL_DUP:
dbio=(BIO *)ptr;
if ( !BIO_set_write_buffer_size(dbio,ctx->obuf_size))
ret=0;
break;
default:
if (b->next_bio == NULL) return(0);
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
break;
}
return(ret);
malloc_error:
BIOerr(BIO_F_LINEBUFFER_CTRL,ERR_R_MALLOC_FAILURE);
return(0);
}
static long linebuffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
{
long ret=1;
if (b->next_bio == NULL) return(0);
switch (cmd)
{
default:
ret=BIO_callback_ctrl(b->next_bio,cmd,fp);
break;
}
return(ret);
}
static int linebuffer_gets(BIO *b, char *buf, int size)
{
if (b->next_bio == NULL) return(0);
return(BIO_gets(b->next_bio,buf,size));
}
static int linebuffer_puts(BIO *b, const char *str)
{
return(linebuffer_write(b,str,strlen(str)));
}

View File

@@ -91,7 +91,6 @@ extern "C" {
#define BIO_TYPE_NULL_FILTER (17|0x0200)
#define BIO_TYPE_BER (18|0x0200) /* BER -> bin filter */
#define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */
#define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */
#define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
#define BIO_TYPE_FILTER 0x0200
@@ -475,7 +474,6 @@ 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)
@@ -555,9 +553,6 @@ BIO_METHOD *BIO_s_bio(void);
BIO_METHOD *BIO_s_null(void);
BIO_METHOD *BIO_f_null(void);
BIO_METHOD *BIO_f_buffer(void);
#ifdef VMS
BIO_METHOD *BIO_f_linebuffer(void);
#endif
BIO_METHOD *BIO_f_nbio_test(void);
/* BIO_METHOD *BIO_f_ber(void); */
@@ -644,7 +639,6 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
#define BIO_F_CONN_CTRL 127
#define BIO_F_CONN_STATE 115
#define BIO_F_FILE_CTRL 116
#define BIO_F_LINEBUFFER_CTRL 129
#define BIO_F_MEM_READ 128
#define BIO_F_MEM_WRITE 117
#define BIO_F_SSL_NEW 118

View File

@@ -91,7 +91,6 @@ static ERR_STRING_DATA BIO_str_functs[]=
{ERR_PACK(0,BIO_F_CONN_CTRL,0), "CONN_CTRL"},
{ERR_PACK(0,BIO_F_CONN_STATE,0), "CONN_STATE"},
{ERR_PACK(0,BIO_F_FILE_CTRL,0), "FILE_CTRL"},
{ERR_PACK(0,BIO_F_LINEBUFFER_CTRL,0), "LINEBUFFER_CTRL"},
{ERR_PACK(0,BIO_F_MEM_READ,0), "MEM_READ"},
{ERR_PACK(0,BIO_F_MEM_WRITE,0), "MEM_WRITE"},
{ERR_PACK(0,BIO_F_SSL_NEW,0), "SSL_new"},

View File

@@ -236,7 +236,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c)
}
c->state=BIO_CONN_S_CONNECT;
#if defined(SO_KEEPALIVE) && !defined(MPE)
#ifdef SO_KEEPALIVE
i=1;
i=setsockopt(b->num,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
if (i < 0)

View File

@@ -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 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).
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 :-)

File diff suppressed because it is too large Load Diff

View File

@@ -1,416 +0,0 @@
.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

File diff suppressed because it is too large Load Diff

View File

@@ -85,7 +85,16 @@ int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b,
if (a == b)
{
#if 1
bn_wexpand(tmp,a->top*2);
bn_wexpand(tmp2,a->top*4);
bn_sqr_recursive(tmp->d,a->d,a->top,tmp2->d);
tmp->top=a->top*2;
if (tmp->top > 0 && tmp->d[tmp->top-1] == 0)
tmp->top--;
#else
if (!BN_sqr(tmp,a,ctx)) goto err;
#endif
}
else
{
@@ -181,7 +190,6 @@ 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]);

View File

@@ -188,7 +188,7 @@ void bn_sqr_normal(BN_ULONG *r, BN_ULONG *a, int n, BN_ULONG *tmp)
#ifdef BN_RECURSION
/* r is 2*n words in size,
* a and b are both n words in size. (There's not actually a 'b' here ...)
* a and b are both n words in size.
* n must be a power of 2.
* We multiply and return the result.
* t must be 2*n words in size

View File

@@ -204,15 +204,13 @@ $ 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_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
"dso_openssl,dso_win32,dso_vms"
$ LIB_DSO = "dso_err,dso_lib,dso_null,dso_openssl" ! + ",dso_vms"
$ LIB_BUFFER = "buffer,buf_err"
$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
"bss_mem,bss_null,bss_fd,"+ -
"bss_file,bss_sock,bss_conn,"+ -
"bf_null,bf_buff,b_print,b_dump,"+ -
"b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log,"+ -
"bf_lbuf"
"b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log"
$ LIB_STACK = "stack"
$ LIB_LHASH = "lhash,lh_stats"
$ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,rand_win"
@@ -1138,7 +1136,7 @@ $ ENDIF
$!
$! Set Up Initial CC Definitions, Possibly With User Ones
$!
$ CCDEFS = "VMS=1,TCPIP_TYPE_''P5',DSO_VMS"
$ CCDEFS = "VMS=1,TCPIP_TYPE_''P5'"
$ 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"

View File

@@ -271,9 +271,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
#elif defined(MAC_OS_pre_X)
tty=stdin;
#else
#ifndef MPE
if ((tty=fopen("/dev/tty","r")) == NULL)
#endif
tty=stdin;
#endif
@@ -314,12 +312,8 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
#if defined(TTY_set) && !defined(VMS)
if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1))
#ifdef MPE
; /* MPE lies -- echo really has been disabled */
#else
return(-1);
#endif
#endif
#ifdef VMS
tty_new[0] = tty_orig[0];
tty_new[1] = tty_orig[1] | TT$M_NOECHO;

View File

@@ -84,7 +84,7 @@ int DSA_generate_key(DSA *dsa)
i=BN_num_bits(dsa->q);
for (;;)
{
if (!BN_rand(priv_key,i,0,0))
if (!BN_rand(priv_key,i,1,0))
goto err;
if (BN_cmp(priv_key,dsa->q) >= 0)
BN_sub(priv_key,priv_key,dsa->q);

View File

@@ -181,7 +181,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), 0, 0)) goto err;
if (!BN_rand(&k, BN_num_bits(dsa->q), 1, 0)) goto err;
if (BN_cmp(&k,dsa->q) >= 0)
BN_sub(&k,&k,dsa->q);
if (!BN_is_zero(&k)) break;

View File

@@ -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_vms.c
dso_openssl.c dso_win32.c
LIBOBJ= dso_dl.o dso_dlfcn.o dso_err.o dso_lib.o dso_null.o \
dso_openssl.o dso_win32.o dso_vms.o
dso_openssl.o dso_win32.o
SRC= $(LIBSRC)
@@ -123,13 +123,6 @@ 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

View File

@@ -80,12 +80,6 @@ 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;
@@ -191,9 +185,6 @@ 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 */
@@ -221,10 +212,6 @@ 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
@@ -233,7 +220,6 @@ 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

View File

@@ -83,10 +83,6 @@ 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"},
@@ -98,7 +94,6 @@ 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"},

View File

@@ -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);

View File

@@ -72,8 +72,6 @@ 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

View File

@@ -1,371 +0,0 @@
/* 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, (void **)&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 */

View File

@@ -34,7 +34,7 @@ $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
$
$ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,-
DES,RC2,RC4,RC5,IDEA,BF,CAST,-
BN,RSA,DSA,DH,DSO,-
BN,RSA,DSA,DH,DSO,ENGINE,-
BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,-
EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP
$ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h
@@ -57,6 +57,7 @@ $ EXHEADER_RSA := rsa.h
$ EXHEADER_DSA := dsa.h
$ EXHEADER_DH := dh.h
$ EXHEADER_DSO := dso.h
$ EXHEADER_ENGINE := engine.h
$ EXHEADER_BUFFER := buffer.h
$ EXHEADER_BIO := bio.h
$ EXHEADER_STACK := stack.h,safestack.h

View File

@@ -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 0x0090600fL
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6 24 Sep 2000"
#define OPENSSL_VERSION_NUMBER 0x00906001L
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6-beta1 11 Sep 2000"
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;
}
@@ -172,17 +172,12 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_NO_CONTENT);
return 0;
}
#if 0
/* NB: this test commented out because some versions of Netscape
* illegally include zero length content when signing data.
*/
/* Check for data and content: two sets of data */
if(!PKCS7_get_detached(p7) && indata) {
PKCS7err(PKCS7_F_PKCS7_VERIFY,PKCS7_R_CONTENT_AND_DATA_PRESENT);
return 0;
}
#endif
sinfos = PKCS7_get_signer_info(p7);
@@ -290,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;
}

View File

@@ -130,28 +130,6 @@
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 *);
@@ -169,19 +147,6 @@ typedef BOOL (WINAPI *PROCESS32)(HANDLE, LPPROCESSENTRY32);
typedef BOOL (WINAPI *THREAD32)(HANDLE, LPTHREADENTRY32);
typedef BOOL (WINAPI *MODULE32)(HANDLE, LPMODULEENTRY32);
#include <lmcons.h>
#include <lmstats.h>
#if 1 /* The NET API is Unicode only. It requires the use of the UNICODE
* macro. When UNICODE is defined LPTSTR becomes LPWSTR. LMSTR was
* was added to the Platform SDK to allow the NET API to be used in
* non-Unicode applications provided that Unicode strings were still
* used for input. LMSTR is defined as LPWSTR.
*/
typedef NET_API_STATUS (NET_API_FUNCTION * NETSTATGET)
(LPWSTR, LPWSTR, DWORD, DWORD, LPBYTE*);
typedef NET_API_STATUS (NET_API_FUNCTION * NETFREE)(LPBYTE);
#endif /* 1 */
int RAND_poll(void)
{
MEMORYSTATUS m;
@@ -190,106 +155,15 @@ int RAND_poll(void)
DWORD w;
HWND h;
HMODULE advapi, kernel, user, netapi;
CRYPTACQUIRECONTEXT acquire = 0;
CRYPTGENRANDOM gen = 0;
CRYPTRELEASECONTEXT release = 0;
#if 1 /* There was previously a problem with NETSTATGET. Currently, this
* section is still experimental, but if all goes well, this conditional
* will be removed
*/
NETSTATGET netstatget = 0;
NETFREE netfree = 0;
#endif /* 1 */
/* Determine the OS version we are on so we can turn off things
* that do not work properly.
*/
OSVERSIONINFO osverinfo ;
osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ;
GetVersionEx( &osverinfo ) ;
HMODULE advapi, kernel, user;
CRYPTACQUIRECONTEXT acquire;
CRYPTGENRANDOM gen;
CRYPTRELEASECONTEXT release;
/* load functions dynamically - not available on all systems */
advapi = LoadLibrary("ADVAPI32.DLL");
kernel = LoadLibrary("KERNEL32.DLL");
user = LoadLibrary("USER32.DLL");
netapi = LoadLibrary("NETAPI32.DLL");
#if 1 /* There was previously a problem with NETSTATGET. Currently, this
* section is still experimental, but if all goes well, this conditional
* will be removed
*/
if (netapi)
{
netstatget = (NETSTATGET) GetProcAddress(netapi,"NetStatisticsGet");
netfree = (NETFREE) GetProcAddress(netapi,"NetApiBufferFree");
}
if (netstatget && netfree)
{
LPBYTE outbuf;
/* NetStatisticsGet() is a Unicode only function
* STAT_WORKSTATION_0 contains 45 fields and STAT_SERVER_0
* contains 17 fields. We treat each field as a source of
* one byte of entropy.
*/
if (netstatget(NULL, L"LanmanWorkstation", 0, 0, &outbuf) == 0)
{
RAND_add(outbuf, sizeof(STAT_WORKSTATION_0), 45);
netfree(outbuf);
}
if (netstatget(NULL, L"LanmanServer", 0, 0, &outbuf) == 0)
{
RAND_add(outbuf, sizeof(STAT_SERVER_0), 17);
netfree(outbuf);
}
}
if (netapi)
FreeLibrary(netapi);
#endif /* 1 */
/* It appears like this can cause an exception deep within ADVAPI32.DLL
* at random times on Windows 2000. Reported by Jeffrey Altman.
* Only use it on NT.
*/
if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT &&
osverinfo.dwMajorVersion < 5)
{
/* 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)
{
/* For entropy count assume only least significant
* byte of each DWORD is random.
*/
RAND_add(&length, sizeof(length), 0);
RAND_add(buf, length, length / 4.0);
}
if (buf)
free(buf);
}
advapi = GetModuleHandle("ADVAPI32.DLL");
kernel = GetModuleHandle("KERNEL32.DLL");
user = GetModuleHandle("USER32.DLL");
if (advapi)
{
@@ -304,13 +178,12 @@ int RAND_poll(void)
if (acquire && gen && release)
{
/* poll the CryptoAPI PRNG */
/* The CryptoAPI returns sizeof(buf) bytes of randomness */
if (acquire(&hProvider, 0, 0, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))
{
if (gen(hProvider, sizeof(buf), buf) != 0)
{
RAND_add(buf, sizeof(buf), sizeof(buf));
RAND_add(buf, sizeof(buf), 0);
#ifdef DEBUG
printf("randomness from PROV_RSA_FULL\n");
#endif
@@ -323,7 +196,7 @@ int RAND_poll(void)
{
if (gen(hProvider, sizeof(buf), buf) != 0)
{
RAND_add(buf, sizeof(buf), sizeof(buf));
RAND_add(buf, sizeof(buf), 0);
#ifdef DEBUG
printf("randomness from PROV_INTEL_SEC\n");
#endif
@@ -332,9 +205,6 @@ int RAND_poll(void)
}
}
if (advapi)
FreeLibrary(advapi);
/* timer data */
readtimer();
@@ -344,7 +214,7 @@ int RAND_poll(void)
/* process ID */
w = GetCurrentProcessId();
RAND_add(&w, sizeof(w), 1);
RAND_add(&w, sizeof(w), 0);
if (user)
{
@@ -357,50 +227,34 @@ int RAND_poll(void)
queue = (GETQUEUESTATUS) GetProcAddress(user, "GetQueueStatus");
if (win)
{
{
/* window handle */
h = win();
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.
*/
if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT &&
osverinfo.dwMajorVersion < 5)
cursor = 0;
}
}
if (cursor)
{
/* cursor position */
/* assume 2 bytes of entropy */
CURSORINFO ci;
ci.cbSize = sizeof(CURSORINFO);
if (cursor(&ci))
RAND_add(&ci, ci.cbSize, 2);
cursor((PCURSORINFO)buf);
RAND_add(buf, sizeof(buf), 0);
}
if (queue)
{
/* message queue status */
/* assume 1 byte of entropy */
w = queue(QS_ALLEVENTS);
RAND_add(&w, sizeof(w), 1);
RAND_add(&w, sizeof(w), 0);
}
FreeLibrary(user);
}
/* Toolhelp32 snapshot: enumerate processes, threads, modules and heap
* http://msdn.microsoft.com/library/psdk/winbase/toolhelp_5pfd.htm
* (Win 9x and 2000 only, not available on NT)
* (Win 9x only, not available on NT)
*
* This seeding method was proposed in Peter Gutmann, Software
* Generation of Practically Strong Random Numbers,
* http://www.usenix.org/publications/library/proceedings/sec98/gutmann.html
* revised version at http://www.cryptoengines.com/~peter/06_random.pdf
* http://www.cs.auckland.ac.nz/~pgut001/pubs/random2.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.)
@@ -425,7 +279,7 @@ int RAND_poll(void)
MODULEENTRY32 m;
snap = (CREATETOOLHELP32SNAPSHOT)
GetProcAddress(kernel, "CreateToolhelp32Snapshot");
GetProcAddress(kernel, "CreateToolhelp32Snapshot");
heap_first = (HEAP32FIRST) GetProcAddress(kernel, "Heap32First");
heap_next = (HEAP32NEXT) GetProcAddress(kernel, "Heap32Next");
heaplist_first = (HEAP32LIST) GetProcAddress(kernel, "Heap32ListFirst");
@@ -444,70 +298,45 @@ int RAND_poll(void)
!= NULL)
{
/* heap list and heap walking */
/* HEAPLIST32 contains 3 fields that will change with
* each entry. Consider each field a source of 1 byte
* of entropy.
* HEAPENTRY32 contains 5 fields that will change with
* each entry. Consider each field a source of 1 byte
* of entropy.
*/
hlist.dwSize = sizeof(HEAPLIST32);
if (heaplist_first(handle, &hlist))
do
{
RAND_add(&hlist, hlist.dwSize, 3);
RAND_add(&hlist, hlist.dwSize, 0);
hentry.dwSize = sizeof(HEAPENTRY32);
if (heap_first(&hentry,
hlist.th32ProcessID,
hlist.th32HeapID))
{
int entrycnt = 50;
do
RAND_add(&hentry,
hentry.dwSize, 5);
while (heap_next(&hentry)
&& --entrycnt > 0);
}
hentry.dwSize, 0);
while (heap_next(&hentry));
} while (heaplist_next(handle,
&hlist));
/* process walking */
/* PROCESSENTRY32 contains 9 fields that will change
* with each entry. Consider each field a source of
* 1 byte of entropy.
*/
p.dwSize = sizeof(PROCESSENTRY32);
if (process_first(handle, &p))
do
RAND_add(&p, p.dwSize, 9);
RAND_add(&p, p.dwSize, 0);
while (process_next(handle, &p));
/* thread walking */
/* THREADENTRY32 contains 6 fields that will change
* with each entry. Consider each field a source of
* 1 byte of entropy.
*/
t.dwSize = sizeof(THREADENTRY32);
if (thread_first(handle, &t))
do
RAND_add(&t, t.dwSize, 6);
RAND_add(&t, t.dwSize, 0);
while (thread_next(handle, &t));
/* module walking */
/* MODULEENTRY32 contains 9 fields that will change
* with each entry. Consider each field a source of
* 1 byte of entropy.
*/
m.dwSize = sizeof(MODULEENTRY32);
if (module_first(handle, &m))
do
RAND_add(&m, m.dwSize, 9);
RAND_add(&m, m.dwSize, 1);
while (module_next(handle, &m));
CloseHandle(handle);
}
FreeLibrary(kernel);
}
#ifdef DEBUG
@@ -567,12 +396,11 @@ void RAND_screen(void) /* function available for backward compatibility */
/* feed timing information to the PRNG */
static void readtimer(void)
{
DWORD w;
DWORD w, cyclecount;
LARGE_INTEGER l;
static int have_perfc = 1;
#ifndef __GNUC__
static int have_tsc = 1;
DWORD cyclecount;
if (have_tsc) {
__try {

View File

@@ -61,6 +61,8 @@
#include <stdlib.h>
#include <string.h>
#include "openssl/e_os.h"
#ifdef VMS
#include <unixio.h>
#endif
@@ -73,7 +75,6 @@
# include <sys/stat.h>
#endif
#include <openssl/e_os.h>
#include <openssl/crypto.h>
#include <openssl/rand.h>

View File

@@ -111,7 +111,7 @@ err:
STACK *sk_new_null(void)
{
return sk_new((int (*)(const char * const *, const char * const *))0);
return sk_new((int (*)(const char * const *, const char * const *))NULL);
}
STACK *sk_new(int (*c)(const char * const *, const char * const *))

View File

@@ -137,10 +137,6 @@
#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 */

View File

@@ -339,15 +339,16 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
ret = X509_check_issued(issuer, x);
if (ret == X509_V_OK)
return 1;
/* If we haven't asked for issuer errors don't set ctx */
if (!(ctx->flags & X509_V_FLAG_CB_ISSUER_CHECK))
return 0;
ctx->error = ret;
ctx->current_cert = x;
ctx->current_issuer = issuer;
if (ctx->verify_cb)
return ctx->verify_cb(0, ctx);
else
{
ctx->error = ret;
ctx->current_cert = x;
ctx->current_issuer = issuer;
if ((ctx->flags & X509_V_FLAG_CB_ISSUER_CHECK) && ctx->verify_cb)
return ctx->verify_cb(0, ctx);
else
return 0;
}
return 0;
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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)

View File

@@ -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)

View File

@@ -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;

View File

@@ -1,3 +0,0 @@
PKCS#12 demo applications
Written by Steve Henson.

View File

@@ -1,61 +0,0 @@
/* pkread.c */
#include <stdio.h>
#include <stdlib.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/pkcs12.h>
/* Simple PKCS#12 file reader */
int main(int argc, char **argv)
{
FILE *fp;
EVP_PKEY *pkey;
X509 *cert;
STACK_OF(X509) *ca = NULL;
PKCS12 *p12;
int i;
if (argc != 4) {
fprintf(stderr, "Usage: pkread p12file password opfile\n");
exit (1);
}
SSLeay_add_all_algorithms();
ERR_load_crypto_strings();
if (!(fp = fopen(argv[1], "rb"))) {
fprintf(stderr, "Error opening file %s\n", argv[1]);
exit(1);
}
p12 = d2i_PKCS12_fp(fp, NULL);
fclose (fp);
if (!p12) {
fprintf(stderr, "Error reading PKCS#12 file\n");
ERR_print_errors_fp(stderr);
exit (1);
}
if (!PKCS12_parse(p12, argv[2], &pkey, &cert, &ca)) {
fprintf(stderr, "Error parsing PKCS#12 file\n");
ERR_print_errors_fp(stderr);
exit (1);
}
PKCS12_free(p12);
if (!(fp = fopen(argv[3], "w"))) {
fprintf(stderr, "Error opening file %s\n", argv[1]);
exit(1);
}
if (pkey) {
fprintf(fp, "***Private Key***\n");
PEM_write_PrivateKey(fp, pkey, NULL, NULL, 0, NULL, NULL);
}
if (cert) {
fprintf(fp, "***User Certificate***\n");
PEM_write_X509_AUX(fp, cert);
}
if (ca && sk_num(ca)) {
fprintf(fp, "***Other Certificates***\n");
for (i = 0; i < sk_X509_num(ca); i++)
PEM_write_X509_AUX(fp, sk_X509_value(ca, i));
}
fclose(fp);
return 0;
}

View File

@@ -1,46 +0,0 @@
/* pkwrite.c */
#include <stdio.h>
#include <stdlib.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/pkcs12.h>
/* Simple PKCS#12 file creator */
int main(int argc, char **argv)
{
FILE *fp;
EVP_PKEY *pkey;
X509 *cert;
PKCS12 *p12;
if (argc != 5) {
fprintf(stderr, "Usage: pkwrite infile password name p12file\n");
exit(1);
}
SSLeay_add_all_algorithms();
ERR_load_crypto_strings();
if (!(fp = fopen(argv[1], "r"))) {
fprintf(stderr, "Error opening file %s\n", argv[1]);
exit(1);
}
cert = PEM_read_X509(fp, NULL, NULL, NULL);
rewind(fp);
pkey = PEM_read_PrivateKey(fp, NULL, NULL, NULL);
fclose(fp);
p12 = PKCS12_create(argv[2], argv[3], pkey, cert, NULL, 0,0,0,0,0);
if(!p12) {
fprintf(stderr, "Error creating PKCS#12 structure\n");
ERR_print_errors_fp(stderr);
exit(1);
}
if (!(fp = fopen(argv[4], "wb"))) {
fprintf(stderr, "Error opening file %s\n", argv[1]);
ERR_print_errors_fp(stderr);
exit(1);
}
i2d_PKCS12_fp(fp, p12);
PKCS12_free(p12);
fclose(fp);
return 0;
}

View File

@@ -1 +0,0 @@
state_machine

View File

@@ -1,9 +0,0 @@
CFLAGS=-I../../include -Wall -Werror -g
all: state_machine
state_machine: state_machine.o
$(CC) -o state_machine state_machine.o -L../.. -lssl -lcrypto
test: state_machine
./state_machine 10000 ../../apps/server.pem ../../apps/server.pem

View File

@@ -1,395 +0,0 @@
/* ====================================================================
* 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
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
/*
* Nuron, a leader in hardware encryption technology, generously
* sponsored the development of this demo by Ben Laurie.
*
* See http://www.nuron.com/.
*/
/*
* the aim of this demo is to provide a fully working state-machine
* style SSL implementation, i.e. one where the main loop acquires
* some data, then converts it from or to SSL by feeding it into the
* SSL state machine. It then does any I/O required by the state machine
* and loops.
*
* In order to keep things as simple as possible, this implementation
* listens on a TCP socket, which it expects to get an SSL connection
* on (for example, from s_client) and from then on writes decrypted
* data to stdout and encrypts anything arriving on stdin. Verbose
* commentary is written to stderr.
*
* This implementation acts as a server, but it can also be done for a client. */
#include <openssl/ssl.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <openssl/err.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
/* die_unless is intended to work like assert, except that it happens
always, even if NDEBUG is defined. Use assert as a stopgap. */
#define die_unless(x) assert(x)
typedef struct
{
SSL_CTX *pCtx;
BIO *pbioRead;
BIO *pbioWrite;
SSL *pSSL;
} SSLStateMachine;
void SSLStateMachine_print_error(SSLStateMachine *pMachine,const char *szErr)
{
unsigned long l;
fprintf(stderr,"%s\n",szErr);
while((l=ERR_get_error()))
{
char buf[1024];
ERR_error_string_n(l,buf,sizeof buf);
fprintf(stderr,"Error %lx: %s\n",l,buf);
}
}
SSLStateMachine *SSLStateMachine_new(const char *szCertificateFile,
const char *szKeyFile)
{
SSLStateMachine *pMachine=malloc(sizeof *pMachine);
int n;
die_unless(pMachine);
pMachine->pCtx=SSL_CTX_new(SSLv23_server_method());
die_unless(pMachine->pCtx);
n=SSL_CTX_use_certificate_file(pMachine->pCtx,szCertificateFile,
SSL_FILETYPE_PEM);
die_unless(n > 0);
n=SSL_CTX_use_PrivateKey_file(pMachine->pCtx,szKeyFile,SSL_FILETYPE_PEM);
die_unless(n > 0);
pMachine->pSSL=SSL_new(pMachine->pCtx);
die_unless(pMachine->pSSL);
pMachine->pbioRead=BIO_new(BIO_s_mem());
pMachine->pbioWrite=BIO_new(BIO_s_mem());
SSL_set_bio(pMachine->pSSL,pMachine->pbioRead,pMachine->pbioWrite);
SSL_set_accept_state(pMachine->pSSL);
return pMachine;
}
void SSLStateMachine_read_inject(SSLStateMachine *pMachine,
const unsigned char *aucBuf,int nBuf)
{
int n=BIO_write(pMachine->pbioRead,aucBuf,nBuf);
/* If it turns out this assert fails, then buffer the data here
* and just feed it in in churn instead. Seems to me that it
* should be guaranteed to succeed, though.
*/
assert(n == nBuf);
fprintf(stderr,"%d bytes of encrypted data fed to state machine\n",n);
}
int SSLStateMachine_read_extract(SSLStateMachine *pMachine,
unsigned char *aucBuf,int nBuf)
{
int n;
if(!SSL_is_init_finished(pMachine->pSSL))
{
fprintf(stderr,"Doing SSL_accept\n");
n=SSL_accept(pMachine->pSSL);
if(n == 0)
fprintf(stderr,"SSL_accept returned zero\n");
if(n < 0)
{
int err;
if((err=SSL_get_error(pMachine->pSSL,n)) == SSL_ERROR_WANT_READ)
{
fprintf(stderr,"SSL_accept wants more data\n");
return 0;
}
SSLStateMachine_print_error(pMachine,"SSL_accept error");
exit(7);
}
return 0;
}
n=SSL_read(pMachine->pSSL,aucBuf,nBuf);
if(n < 0)
{
int err=SSL_get_error(pMachine->pSSL,n);
if(err == SSL_ERROR_WANT_READ)
{
fprintf(stderr,"SSL_read wants more data\n");
return 0;
}
}
fprintf(stderr,"%d bytes of decrypted data read from state machine\n",n);
return n;
}
int SSLStateMachine_write_can_extract(SSLStateMachine *pMachine)
{
int n=BIO_pending(pMachine->pbioWrite);
if(n)
fprintf(stderr,"There is encrypted data available to write\n");
else
fprintf(stderr,"There is no encrypted data available to write\n");
return n;
}
int SSLStateMachine_write_extract(SSLStateMachine *pMachine,
unsigned char *aucBuf,int nBuf)
{
int n;
n=BIO_read(pMachine->pbioWrite,aucBuf,nBuf);
fprintf(stderr,"%d bytes of encrypted data read from state machine\n",n);
return n;
}
void SSLStateMachine_write_inject(SSLStateMachine *pMachine,
const unsigned char *aucBuf,int nBuf)
{
int n=SSL_write(pMachine->pSSL,aucBuf,nBuf);
/* If it turns out this assert fails, then buffer the data here
* and just feed it in in churn instead. Seems to me that it
* should be guaranteed to succeed, though.
*/
assert(n == nBuf);
fprintf(stderr,"%d bytes of unencrypted data fed to state machine\n",n);
}
int OpenSocket(int nPort)
{
int nSocket;
struct sockaddr_in saServer;
struct sockaddr_in saClient;
int one=1;
int nSize;
int nFD;
int nLen;
nSocket=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if(nSocket < 0)
{
perror("socket");
exit(1);
}
if(setsockopt(nSocket,SOL_SOCKET,SO_REUSEADDR,(char *)&one,sizeof one) < 0)
{
perror("setsockopt");
exit(2);
}
memset(&saServer,0,sizeof saServer);
saServer.sin_family=AF_INET;
saServer.sin_port=htons(nPort);
nSize=sizeof saServer;
if(bind(nSocket,(struct sockaddr *)&saServer,nSize) < 0)
{
perror("bind");
exit(3);
}
if(listen(nSocket,512) < 0)
{
perror("listen");
exit(4);
}
nLen=sizeof saClient;
nFD=accept(nSocket,(struct sockaddr *)&saClient,&nLen);
if(nFD < 0)
{
perror("accept");
exit(5);
}
fprintf(stderr,"Incoming accepted on port %d\n",nPort);
return nFD;
}
int main(int argc,char **argv)
{
SSLStateMachine *pMachine;
int nPort;
int nFD;
const char *szCertificateFile;
const char *szKeyFile;
if(argc != 4)
{
fprintf(stderr,"%s <port> <certificate file> <key file>\n",argv[0]);
exit(6);
}
nPort=atoi(argv[1]);
szCertificateFile=argv[2];
szKeyFile=argv[3];
SSL_library_init();
OpenSSL_add_ssl_algorithms();
SSL_load_error_strings();
ERR_load_crypto_strings();
nFD=OpenSocket(nPort);
pMachine=SSLStateMachine_new(szCertificateFile,szKeyFile);
for( ; ; )
{
fd_set rfds,wfds;
unsigned char buf[1024];
int n;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
/* Select socket for input */
FD_SET(nFD,&rfds);
/* Select socket for output */
if(SSLStateMachine_write_can_extract(pMachine))
FD_SET(nFD,&wfds);
/* Select stdin for input */
FD_SET(0,&rfds);
/* Wait for something to do something */
n=select(nFD+1,&rfds,&wfds,NULL,NULL);
assert(n > 0);
/* Socket is ready for input */
if(FD_ISSET(nFD,&rfds))
{
n=read(nFD,buf,sizeof buf);
if(n == 0)
{
fprintf(stderr,"Got EOF on socket\n");
exit(0);
}
assert(n > 0);
SSLStateMachine_read_inject(pMachine,buf,n);
}
/* FIXME: we should only extract if stdout is ready */
n=SSLStateMachine_read_extract(pMachine,buf,n);
if(n < 0)
{
SSLStateMachine_print_error(pMachine,"read extract failed");
break;
}
assert(n >= 0);
if(n > 0)
{
int w;
w=write(1,buf,n);
/* FIXME: we should push back any unwritten data */
assert(w == n);
}
/* Socket is ready for output (and therefore we have output to send) */
if(FD_ISSET(nFD,&wfds))
{
int w;
n=SSLStateMachine_write_extract(pMachine,buf,sizeof buf);
assert(n > 0);
w=write(nFD,buf,n);
/* FIXME: we should push back any unwritten data */
assert(w == n);
}
/* Stdin is ready for input */
if(FD_ISSET(0,&rfds))
{
n=read(0,buf,sizeof buf);
if(n == 0)
{
fprintf(stderr,"Got EOF on stdin\n");
exit(0);
}
assert(n > 0);
SSLStateMachine_write_inject(pMachine,buf,n);
}
}
/* not reached */
return 0;
}

View File

@@ -325,7 +325,7 @@ Send encrypted mail using triple DES:
Sign and encrypt mail:
openssl smime -sign -in ml.txt -signer my.pem -text \
| openssl smime -encrypt -out mail.msg \
| openssl -encrypt -out mail.msg \
-from steve@openssl.org -to someone@somewhere \
-subject "Signed and Encrypted message" -des3 user.pem

View File

@@ -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 behaviour rather
is currently being developed. It thus describes the intended behavior rather
than the current behaviour. It is hoped that it will represent reality in
OpenSSL 0.9.5 and later.

View File

@@ -1,128 +0,0 @@
=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 (that is file descriptor and
FILE BIOs) 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() normally returns 1 for success and 0 or -1 for failure. File
BIOs are an exception, they return 0 for success and -1 for failure.
BIO_seek() and BIO_tell() both return the current file position on success
and -1 for failure, except file BIOs which for BIO_seek() always return 0
for 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 they 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. However this can cause
unexpected results: for example no current filter BIOs implement
BIO_seek(), but this may still succeed if the chain ends in a FILE
or file descriptor BIO.
Source/sink BIOs return an 0 if they do not recognize the BIO_ctrl()
operation.
=head1 BUGS
Some of the return values are ambiguous and care should be taken. In
particular a return value of 0 can be returned if an operation is not
supported, if an error occurred, if EOF has not been reached and in
the case of BIO_seek() on a file BIO for a successful operation.
=head1 SEE ALSO
TBA

Some files were not shown because too many files have changed in this diff Show More