Compare commits
61 Commits
OpenSSL_0_
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e61580bbd | ||
|
|
561c71a76b | ||
|
|
c2359eb18c | ||
|
|
cf194c1f68 | ||
|
|
b841e0acd8 | ||
|
|
35af460fef | ||
|
|
7ae634de49 | ||
|
|
8311d32378 | ||
|
|
eff5f6124c | ||
|
|
edbcba6c6b | ||
|
|
3bc90f2373 | ||
|
|
98e04f9eeb | ||
|
|
6e9aee5724 | ||
|
|
b475baffb2 | ||
|
|
617d71bc12 | ||
|
|
9cead2f2a5 | ||
|
|
ce24e726b4 | ||
|
|
7d05b51ade | ||
|
|
9b77955be9 | ||
|
|
60e9a78437 | ||
|
|
3fbde72468 | ||
|
|
67a8142ce0 | ||
|
|
afee764c4a | ||
|
|
2d99cee790 | ||
|
|
1adfda4151 | ||
|
|
f09ba50ec3 | ||
|
|
67b2f21382 | ||
|
|
3bead95bae | ||
|
|
6e1c21abe4 | ||
|
|
8f0edcda9e | ||
|
|
0b6d88b3b8 | ||
|
|
46e80a30e0 | ||
|
|
fd430ae94c | ||
|
|
1d6750b759 | ||
|
|
6e56312f1a | ||
|
|
90cc4e29b3 | ||
|
|
97197984aa | ||
|
|
0806278561 | ||
|
|
e8dbc15933 | ||
|
|
0fa197d8bc | ||
|
|
fd72d831b7 | ||
|
|
1bb30673f9 | ||
|
|
87351c586e | ||
|
|
72fbca2c47 | ||
|
|
555b22cfca | ||
|
|
513393f8d4 | ||
|
|
e77066ea0a | ||
|
|
d12cd41900 | ||
|
|
17b99efcb0 | ||
|
|
afc48ea543 | ||
|
|
b313adc4b6 | ||
|
|
623bb80b77 | ||
|
|
f69ef67c2b | ||
|
|
cdbd4a7229 | ||
|
|
71b4d8971b | ||
|
|
88220dcb21 | ||
|
|
b7a81df46a | ||
|
|
21173cf936 | ||
|
|
35a79ecbae | ||
|
|
311c6efa81 | ||
|
|
c81ccaddad |
23
CHANGES
23
CHANGES
@@ -2,7 +2,28 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.5 and 0.9.5a [XX XXX 2000]
|
||||
Changes between 0.9.5 and 0.9.5a [1 Apr 2000]
|
||||
|
||||
*) Make sure _lrotl and _lrotr are only used with MSVC.
|
||||
|
||||
*) Use lock CRYPTO_LOCK_RAND correctly in ssleay_rand_status
|
||||
(the default implementation of RAND_status).
|
||||
|
||||
*) Rename openssl x509 option '-crlext', which was added in 0.9.5,
|
||||
to '-clrext' (= clear extensions), as intended and documented.
|
||||
[Bodo Moeller; inconsistency pointed out by Michael Attili
|
||||
<attili@amaxo.com>]
|
||||
|
||||
*) Fix for HMAC. It wasn't zeroing the rest of the block if the key length
|
||||
was larger than the MD block size.
|
||||
[Steve Henson, pointed out by Yost William <YostW@tce.com>]
|
||||
|
||||
*) Modernise PKCS12_parse() so it uses STACK_OF(X509) for its ca argument
|
||||
fix a leak when the ca argument was passed as NULL. Stop X509_PUBKEY_set()
|
||||
using the passed key: if the passed key was a private key the result
|
||||
of X509_print(), for example, would be to print out all the private key
|
||||
components.
|
||||
[Steve Henson]
|
||||
|
||||
*) des_quad_cksum() byte order bug fix.
|
||||
[Ulf M<>ller, using the problem description in krb4-0.9.7, where
|
||||
|
||||
@@ -10,7 +10,7 @@ use strict;
|
||||
|
||||
# see INSTALL for instructions.
|
||||
|
||||
my $usage="Usage: Configure [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no-threads] [no-asm] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
|
||||
my $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no-threads] [no-asm] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";
|
||||
|
||||
# Options:
|
||||
#
|
||||
@@ -158,7 +158,7 @@ my %table=(
|
||||
|
||||
# Sunos configs, assuming sparc for the gcc one.
|
||||
##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown)::DES_UNROLL:::",
|
||||
"sunos-gcc","gcc:-O3 -mv8::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
|
||||
"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown)::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::",
|
||||
|
||||
#### IRIX 5.x configs
|
||||
# -mips2 flag is added by ./config when appropriate.
|
||||
@@ -203,6 +203,8 @@ my %table=(
|
||||
# <appro@fy.chalmers.se>
|
||||
#
|
||||
"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
|
||||
# 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::::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
|
||||
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::",
|
||||
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:::",
|
||||
|
||||
|
||||
149
FAQ
149
FAQ
@@ -9,12 +9,22 @@ OpenSSL - Frequently Asked Questions
|
||||
* Why do I get a "PRNG not seeded" error message?
|
||||
* Why does the linker complain about undefined symbols?
|
||||
* Where can I get a compiled version of OpenSSL?
|
||||
* I've compiled a program under Windows and it crashes: why?
|
||||
* I've called <some function> and it fails, why?
|
||||
* I just get a load of numbers for the error output, what do they mean?
|
||||
* Why do I get errors about unknown algorithms?
|
||||
* How do I create certificates or certificate requests?
|
||||
* Why can't I create certificate requests?
|
||||
* Why does <SSL program> fail with a certificate verify error?
|
||||
* How can I create DSA certificates?
|
||||
* Why can't I make an SSL connection using a DSA certificate?
|
||||
* Why can't the OpenSSH configure script detect OpenSSL?
|
||||
|
||||
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.5 was released on February 28th, 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:
|
||||
@@ -102,17 +112,21 @@ OpenSSL functions that need randomness report an error if the random
|
||||
number generator has not been seeded with at least 128 bits of
|
||||
randomness. If this error occurs, please contact the author of the
|
||||
application you are using. It is likely that it never worked
|
||||
correctly. OpenSSL 0.9.5 makes the error visible by refusing to
|
||||
perform potentially insecure encryption.
|
||||
correctly. OpenSSL 0.9.5 and later make the error visible by refusing
|
||||
to perform potentially insecure encryption.
|
||||
|
||||
On systems without /dev/urandom, it is a good idea to use the Entropy
|
||||
Gathering Demon; see the RAND_egd() manpage for details.
|
||||
|
||||
Most components of the openssl command line tool try to use the
|
||||
file $HOME/.rnd (or $RANDFILE, if this environment variable is set)
|
||||
for seeding the PRNG. If this file does not exist or is too short,
|
||||
the "PRNG not seeded" error message may occur.
|
||||
Note that the command "openssl rsa" in OpenSSL 0.9.5 does not do this
|
||||
and will fail on systems without /dev/urandom when trying to
|
||||
password-encrypt an RSA key! This is a bug in the library;
|
||||
try a later snaphost instead.
|
||||
|
||||
[Note to OpenSSL 0.9.5 users: The command "openssl rsa" in version
|
||||
0.9.5 does not do this and will fail on systems without /dev/urandom
|
||||
when trying to password-encrypt an RSA key! This is a bug in the
|
||||
library; try a later version instead.]
|
||||
|
||||
|
||||
* Why does the linker complain about undefined symbols?
|
||||
@@ -150,3 +164,124 @@ a C compiler, read the "Mingw32" section of INSTALL.W32 for information
|
||||
on how to obtain and install the free GNU C compiler.
|
||||
|
||||
A number of Linux and *BSD distributions include OpenSSL.
|
||||
|
||||
|
||||
* I've compiled a program under Windows and it crashes: why?
|
||||
|
||||
This is usually because you've missed the comment in INSTALL.W32. You
|
||||
must link with the multithreaded DLL version of the VC++ runtime library
|
||||
otherwise the conflict will cause a program to crash: typically on the
|
||||
first BIO related read or write operation.
|
||||
|
||||
|
||||
* I've called <some function> and it fails, why?
|
||||
|
||||
Before submitting a report or asking in one of the mailing lists you
|
||||
should try to determine the cause. In particular you should call
|
||||
ERR_print_errors() or ERR_print_errors_fp() after the failed call
|
||||
and see if the message helps.
|
||||
|
||||
|
||||
* I just get a load of numbers for the error output, what do they mean?
|
||||
|
||||
The actual format is described in the ERR_print_errors() manual page.
|
||||
You should call the function ERR_load_crypto_strings() before hand and
|
||||
the message will be output in text form. If you can't do this (for example
|
||||
it is a pre-compiled binary) you can use the errstr utility on the error
|
||||
code itself (the hex digits after the second colon).
|
||||
|
||||
|
||||
* Why do I get errors about unknown algorithms?
|
||||
|
||||
This can happen under several circumstances such as reading in an
|
||||
encrypted private key or attempting to decrypt a PKCS#12 file. The cause
|
||||
is forgetting to load OpenSSL's table of algorithms with
|
||||
OpenSSL_add_all_algorithms(). See the manual page for more information.
|
||||
|
||||
|
||||
* How do I create certificates or certificate requests?
|
||||
|
||||
Check out the CA.pl(1) manual page. This provides a simple wrapper round
|
||||
the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check
|
||||
out the manual pages for the individual utilities and the certificate
|
||||
extensions documentation (currently in doc/openssl.txt).
|
||||
|
||||
|
||||
* Why can't I create certificate requests?
|
||||
|
||||
You typically get the error:
|
||||
|
||||
unable to find 'distinguished_name' in config
|
||||
problems making Certificate Request
|
||||
|
||||
This is because it can't find the configuration file. Check out the
|
||||
DIAGNOSTICS section of req(1) for more information.
|
||||
|
||||
|
||||
* Why does <SSL program> fail with a certificate verify error?
|
||||
|
||||
This problem is usually indicated by log messages saying something like
|
||||
"unable to get local issuer certificate" or "self signed certificate".
|
||||
When a certificate is verified its root CA must be "trusted" by OpenSSL
|
||||
this typically means that the CA certificate must be placed in a directory
|
||||
or file and the relevant program configured to read it. The OpenSSL program
|
||||
'verify' behaves in a similar way and issues similar error messages: check
|
||||
the verify(1) program manual page for more information.
|
||||
|
||||
|
||||
* How can I create DSA certificates?
|
||||
|
||||
Check the CA.pl(1) manual page for a DSA certificate example.
|
||||
|
||||
|
||||
* Why can't I make an SSL connection to a server using a DSA certificate?
|
||||
|
||||
Typically you'll see a message saying there are no shared ciphers when
|
||||
the same setup works fine with an RSA certificate. There are two possible
|
||||
causes. The client may not support connections to DSA servers most web
|
||||
browsers only support connections to servers supporting RSA cipher suites.
|
||||
The other cause is that a set of DH parameters has not been supplied to
|
||||
the server. DH parameters can be created with the dhparam(1) command and
|
||||
loaded using the SSL_CTX_set_tmp_dh() for example: check the source to
|
||||
s_server in apps/s_server.c for an example.
|
||||
|
||||
|
||||
* Why can't the OpenSSH configure script detect OpenSSL?
|
||||
|
||||
There is a problem with OpenSSH 1.2.2p1, in that the configure script
|
||||
can't find the installed OpenSSL libraries. The problem is actually
|
||||
a small glitch that is easily solved with the following patch to be
|
||||
applied to the OpenSSH distribution:
|
||||
|
||||
----- snip:start -----
|
||||
--- openssh-1.2.2p1/configure.in.orig Thu Mar 23 18:56:58 2000
|
||||
+++ openssh-1.2.2p1/configure.in Thu Mar 23 18:55:05 2000
|
||||
@@ -152,10 +152,10 @@
|
||||
AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
|
||||
for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
|
||||
if test ! -z "$ssldir" ; then
|
||||
- LIBS="$saved_LIBS -L$ssldir"
|
||||
+ LIBS="$saved_LIBS -L$ssldir/lib"
|
||||
CFLAGS="$CFLAGS -I$ssldir/include"
|
||||
if test "x$need_dash_r" = "x1" ; then
|
||||
- LIBS="$LIBS -R$ssldir"
|
||||
+ LIBS="$LIBS -R$ssldir/lib"
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS -lcrypto"
|
||||
--- openssh-1.2.2p1/configure.orig Thu Mar 23 18:55:02 2000
|
||||
+++ openssh-1.2.2p1/configure Thu Mar 23 18:57:08 2000
|
||||
@@ -1890,10 +1890,10 @@
|
||||
echo "configure:1891: checking for OpenSSL/SSLeay directory" >&5
|
||||
for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
|
||||
if test ! -z "$ssldir" ; then
|
||||
- LIBS="$saved_LIBS -L$ssldir"
|
||||
+ LIBS="$saved_LIBS -L$ssldir/lib"
|
||||
CFLAGS="$CFLAGS -I$ssldir/include"
|
||||
if test "x$need_dash_r" = "x1" ; then
|
||||
- LIBS="$LIBS -R$ssldir"
|
||||
+ LIBS="$LIBS -R$ssldir/lib"
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS -lcrypto"
|
||||
----- snip:end -----
|
||||
|
||||
3
INSTALL
3
INSTALL
@@ -33,7 +33,8 @@
|
||||
Configuration Options
|
||||
---------------------
|
||||
|
||||
There are several options to ./config to customize the build:
|
||||
There are several options to ./config (or ./Configure) to customize
|
||||
the build:
|
||||
|
||||
--prefix=DIR Install in DIR/bin, DIR/lib, DIR/include/openssl.
|
||||
Configuration files used by OpenSSL will be in DIR/ssl
|
||||
|
||||
9
NEWS
9
NEWS
@@ -5,6 +5,15 @@
|
||||
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.5 and OpenSSL 0.9.5a:
|
||||
|
||||
o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8
|
||||
o Shared library support for HPUX and Solaris-gcc
|
||||
o Support of Linux/IA64
|
||||
o Assembler support for Mingw32
|
||||
o New 'rand' application
|
||||
o New way to check for existence of algorithms from scripts
|
||||
|
||||
Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5:
|
||||
|
||||
o S/MIME support in new 'smime' command
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.5a-beta1 20 Mar 2000
|
||||
OpenSSL 0.9.5a 1 Apr 2000
|
||||
|
||||
Copyright (c) 1998-2000 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
37
STATUS
37
STATUS
@@ -1,10 +1,45 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2000/03/06 14:24:25 $
|
||||
______________ $Date: 2000/03/25 10:44:28 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.5a: Under development...
|
||||
Proposed release date March 31st, 2000
|
||||
0.9.5a-beta1 is available.
|
||||
sunos-gcc - failed (ssize_t)
|
||||
ultrix-gcc, ultrix-cc - failed (ssize_t)
|
||||
sco5-cc - bc fails in test
|
||||
VC-Win32 (MSVC6SP3, nasm) - failed (fixed)
|
||||
FreeBSD-elf (i686-pc-freebsd3.2)- failed (fixed)
|
||||
HPUX (hpux-parisc-cc w/ +02) - passed
|
||||
OpenBSD-x86 - passed
|
||||
solaris-sparcv9-cc - passed
|
||||
0.9.5a-beta2 is available.
|
||||
linux-elf - passed
|
||||
linux-ppc (egcs 2.91.66) - passed
|
||||
OpenBSD-elf - passed
|
||||
FreeBSD-elf (i586-pc-freebsd3.2)- passed
|
||||
solaris-sparcv9-cc - passed
|
||||
solaris-sparcv9-gcc - passed
|
||||
Mingw32 - passed
|
||||
VMS/Alpha 7.1 w/ DEC C 5.6-003 - passed
|
||||
VMS/Alpha 7.2-1 w/ CPQ C 6.2-003- passed
|
||||
VMS/VAX 7.1 w/ DEC C 5.6-003 - passed
|
||||
VMS/VAX 7.2 w/ DEC C 6.0-001 - passed
|
||||
AIX 4.3.3.0 w/ cc - passed
|
||||
AIX 4.3.3.0 w/ gcc (2.7.2.3?) - passed
|
||||
Irix 6.4 w/ cc - passed
|
||||
Irix 6.4 w/ gcc - passed
|
||||
Irix 6.5 w/ cc - passed
|
||||
Irix 6.5 w/ gcc - passed
|
||||
NetBSD-x86 - passed
|
||||
Unixware 7.0.1 w/ native cc - passed
|
||||
Solaris-x86 2.6 w/ gcc 2.7.2.3 - passed
|
||||
Solaris-x86 2.7 w/ gcc 2.7.2.3 - passed
|
||||
True64 Unix w/ gcc 2.7.2.3 - passed
|
||||
Win32 w/ VC++ 5 & NASM 0.98 - passed
|
||||
|
||||
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
|
||||
|
||||
19
TABLE
19
TABLE
@@ -986,6 +986,23 @@ $rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
|
||||
*** hpux-parisc-cc-o4
|
||||
$cc = cc
|
||||
$cflags = -Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$lflags =
|
||||
$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 =
|
||||
|
||||
*** hpux-parisc-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -DB_ENDIAN -DBN_DIV2W
|
||||
@@ -1685,7 +1702,7 @@ $rc5_obj =
|
||||
|
||||
*** sunos-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -mv8
|
||||
$cflags = -O3 -mv8 -Dssize_t=int
|
||||
$unistd =
|
||||
$thread_cflag = (unknown)
|
||||
$lflags =
|
||||
|
||||
11
apps/x509.c
11
apps/x509.c
@@ -126,7 +126,7 @@ static char *x509_usage[]={
|
||||
" -md2/-md5/-sha1/-mdc2 - digest to use\n",
|
||||
" -extfile - configuration file with X509V3 extensions to add\n",
|
||||
" -extensions - section from config file with X509V3 extensions to add\n",
|
||||
" -crlext - delete extensions before signing and input certificate\n",
|
||||
" -clrext - delete extensions before signing and input certificate\n",
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -365,8 +365,15 @@ int MAIN(int argc, char **argv)
|
||||
aliasout= ++num;
|
||||
else if (strcmp(*argv,"-CAcreateserial") == 0)
|
||||
CA_createserial= ++num;
|
||||
else if (strcmp(*argv,"-crlext") == 0)
|
||||
else if (strcmp(*argv,"-clrext") == 0)
|
||||
clrext = 1;
|
||||
#if 1 /* stay backwards-compatible with 0.9.5; this should go away soon */
|
||||
else if (strcmp(*argv,"-crlext") == 0)
|
||||
{
|
||||
BIO_printf(bio_err,"use -clrext instead of -crlext\n");
|
||||
clrext = 1;
|
||||
}
|
||||
#endif
|
||||
else if ((md_alg=EVP_get_digestbyname(*argv + 1)))
|
||||
{
|
||||
/* ok */
|
||||
|
||||
@@ -40,7 +40,7 @@ LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o tmdiff.o cpt_err.o ebcdi
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
EXHEADER= crypto.h tmdiff.h opensslv.h opensslconf.h ebcdic.h
|
||||
HEADER= cryptlib.h buildinf.h $(EXHEADER)
|
||||
HEADER= cryptlib.h buildinf.h md32_common.h $(EXHEADER)
|
||||
|
||||
ALL= $(GENERAL) $(SRC) $(HEADER)
|
||||
|
||||
|
||||
@@ -183,8 +183,10 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
|
||||
|
||||
Free(s);
|
||||
|
||||
#if 0
|
||||
CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);
|
||||
pk->pkey=pkey;
|
||||
#endif
|
||||
|
||||
if (*x != NULL)
|
||||
X509_PUBKEY_free(*x);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
DIR= bn
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES= -I.. -I../../include
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l) )&0xff))
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && defined(_MSC_VER)
|
||||
#define ROTL(a,n) (_lrotl(a,n))
|
||||
#else
|
||||
#define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n))))
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
crypt <= crypt(buf,salt)
|
||||
key <= set_odd_parity(key)
|
||||
int <= is_weak_key(key)
|
||||
keysched<= set_key(key)
|
||||
key <= ecb_encrypt(string8,ks,enc)
|
||||
key <= ecb3_encrypt(input,ks1,ks2,enc)
|
||||
string <= cbc_encrypt(input,ks,ivec,enc) => ivec
|
||||
string <= cbc3_encrypt(input,ks1,ks2,ivec1,ivec2,enc) => ivec1&ivec2
|
||||
ck1,ck2 <= cbc_cksum(input,ks,ivec) => ivec
|
||||
string <= pcbc_encrypt(input,ks,ivec,enc) => ivec
|
||||
string <= ofb_encrypt(input,numbits,ks,ivec) => ivec
|
||||
string <= cfb_encrypt(input,numbits,ks,ivec,enc) => ivec
|
||||
key <= random_key()
|
||||
key <= string_to_key(string)
|
||||
key1,key2<= string_to_2keys(string)
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
} \
|
||||
}
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && defined(_MSC_VER)
|
||||
#define ROTATE(a,n) (_lrotr(a,n))
|
||||
#else
|
||||
#define ROTATE(a,n) (((a)>>(n))+((a)<<(32-(n))))
|
||||
|
||||
@@ -709,7 +709,7 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]);
|
||||
|
||||
printf("Doing quad_cksum\n");
|
||||
cs=quad_cksum(cbc_data,(des_cblock *)lqret,
|
||||
(long)strlen(cbc_data),2,(des_cblock *)cbc_iv);
|
||||
(long)strlen((char *)cbc_data),2,(des_cblock *)cbc_iv);
|
||||
if (cs != 0x70d7a63aL)
|
||||
{
|
||||
printf("quad_cksum error, ret %08lx should be 70d7a63a\n",
|
||||
|
||||
@@ -88,9 +88,11 @@ void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
|
||||
else
|
||||
{
|
||||
memcpy(ctx->key,key,len);
|
||||
memset(&(ctx->key[len]),0,sizeof(ctx->key)-len);
|
||||
ctx->key_length=len;
|
||||
}
|
||||
if(ctx->key_length != HMAC_MAX_MD_CBLOCK)
|
||||
memset(&ctx->key[ctx->key_length], 0,
|
||||
HMAC_MAX_MD_CBLOCK - ctx->key_length);
|
||||
}
|
||||
|
||||
if (reset)
|
||||
|
||||
@@ -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 0x00905811L
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.5a-beta1 20 Mar 2000"
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090581fL
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.5a 1 Apr 2000"
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
#endif /* HEADER_OPENSSLV_H */
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#include <openssl/pkcs12.h>
|
||||
|
||||
PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
|
||||
STACK *ca, int nid_key, int nid_cert, int iter, int mac_iter,
|
||||
STACK_OF(X509) *ca, int nid_key, int nid_cert, int iter, int mac_iter,
|
||||
int keytype)
|
||||
{
|
||||
PKCS12 *p12;
|
||||
@@ -103,8 +103,8 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
|
||||
|
||||
/* Add all other certificates */
|
||||
if(ca) {
|
||||
for(i = 0; i < sk_num(ca); i++) {
|
||||
tcert = (X509 *)sk_value(ca, i);
|
||||
for(i = 0; i < sk_X509_num(ca); i++) {
|
||||
tcert = sk_X509_value(ca, i);
|
||||
if(!(bag = M_PKCS12_x5092certbag(tcert))) return NULL;
|
||||
if(!sk_push(bags, (char *)bag)) {
|
||||
PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE);
|
||||
|
||||
@@ -62,9 +62,17 @@
|
||||
|
||||
/* Simplified PKCS#12 routines */
|
||||
|
||||
static int parse_pk12( PKCS12 *p12, const char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca);
|
||||
static int parse_bags( STACK *bags, const char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid, char *keymatch);
|
||||
static int parse_bag( PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey, X509 **cert, STACK **ca, ASN1_OCTET_STRING **keyid, char *keymatch);
|
||||
static int parse_pk12( PKCS12 *p12, const char *pass, int passlen,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca);
|
||||
|
||||
static int parse_bags( STACK *bags, const char *pass, int passlen,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca,
|
||||
ASN1_OCTET_STRING **keyid, char *keymatch);
|
||||
|
||||
static int parse_bag( PKCS12_SAFEBAG *bag, const char *pass, int passlen,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca,
|
||||
ASN1_OCTET_STRING **keyid, char *keymatch);
|
||||
|
||||
/* Parse and decrypt a PKCS#12 structure returning user key, user cert
|
||||
* and other (CA) certs. Note either ca should be NULL, *ca should be NULL,
|
||||
* or it should point to a valid STACK structure. pkey and cert can be
|
||||
@@ -72,7 +80,7 @@ static int parse_bag( PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PK
|
||||
*/
|
||||
|
||||
int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
|
||||
STACK **ca)
|
||||
STACK_OF(X509) **ca)
|
||||
{
|
||||
|
||||
/* Check for NULL PKCS12 structure */
|
||||
@@ -86,7 +94,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_new(NULL)))
|
||||
if (!(*ca = sk_X509_new(NULL)))
|
||||
{
|
||||
PKCS12err(PKCS12_F_PKCS12_PARSE,ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
@@ -116,7 +124,7 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
|
||||
|
||||
if (pkey && *pkey) EVP_PKEY_free (*pkey);
|
||||
if (cert && *cert) X509_free (*cert);
|
||||
if (ca) sk_pop_free (*ca, X509_free);
|
||||
if (ca) sk_X509_pop_free (*ca, X509_free);
|
||||
return 0;
|
||||
|
||||
}
|
||||
@@ -124,7 +132,7 @@ int PKCS12_parse (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
|
||||
/* Parse the outer PKCS#12 structure */
|
||||
|
||||
static int parse_pk12 (PKCS12 *p12, const char *pass, int passlen,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK **ca)
|
||||
EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca)
|
||||
{
|
||||
STACK *asafes, *bags;
|
||||
int i, bagnid;
|
||||
@@ -159,7 +167,7 @@ static int parse_pk12 (PKCS12 *p12, const char *pass, int passlen,
|
||||
|
||||
|
||||
static int parse_bags (STACK *bags, const char *pass, int passlen,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK **ca,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca,
|
||||
ASN1_OCTET_STRING **keyid, char *keymatch)
|
||||
{
|
||||
int i;
|
||||
@@ -176,7 +184,7 @@ static int parse_bags (STACK *bags, const char *pass, int passlen,
|
||||
#define MATCH_ALL 0x3
|
||||
|
||||
static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK **ca,
|
||||
EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
char *keymatch)
|
||||
{
|
||||
@@ -226,7 +234,10 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
|
||||
if (lkey) {
|
||||
*keymatch |= MATCH_CERT;
|
||||
if (cert) *cert = x509;
|
||||
} else if (ca) sk_push (*ca, (char *)x509);
|
||||
} else {
|
||||
if(ca) sk_X509_push (*ca, x509);
|
||||
else X509_free(x509);
|
||||
}
|
||||
break;
|
||||
|
||||
case NID_safeContentsBag:
|
||||
|
||||
@@ -265,9 +265,9 @@ void PKCS12_SAFEBAG_free(PKCS12_SAFEBAG *a);
|
||||
void ERR_load_PKCS12_strings(void);
|
||||
void PKCS12_PBE_add(void);
|
||||
int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
|
||||
STACK **ca);
|
||||
STACK_OF(X509) **ca);
|
||||
PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
|
||||
STACK *ca, int nid_key, int nid_cert, int iter,
|
||||
STACK_OF(X509) *ca, int nid_key, int nid_cert, int iter,
|
||||
int mac_iter, int keytype);
|
||||
int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12);
|
||||
int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12);
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
WARNING
|
||||
|
||||
Everything in this directory is experimental and is subject to change.
|
||||
|
||||
Do not rely on the stuff in here not changing in the next release
|
||||
@@ -699,6 +699,7 @@ int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
|
||||
if (i <= 0)
|
||||
{
|
||||
PKCS7err(PKCS7_F_PKCS7_DATAVERIFY,ERR_R_X509_LIB);
|
||||
X509_STORE_CTX_cleanup(ctx);
|
||||
goto err;
|
||||
}
|
||||
X509_STORE_CTX_cleanup(ctx);
|
||||
|
||||
@@ -559,9 +559,17 @@ static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
|
||||
|
||||
static int ssleay_rand_status(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_RAND);
|
||||
|
||||
if (!initialized)
|
||||
ssleay_rand_initialize();
|
||||
return (entropy >= ENTROPY_NEEDED);
|
||||
ret = entropy >= ENTROPY_NEEDED;
|
||||
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef WINDOWS
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
DIR= rc4
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES=
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
|
||||
*((c)++)=(unsigned char)(((l) )&0xff))
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && defined(_MSC_VER)
|
||||
#define ROTATE_l32(a,n) _lrotl(a,n)
|
||||
#define ROTATE_r32(a,n) _lrotr(a,n)
|
||||
#else
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
DIR= sha
|
||||
TOP= ../..
|
||||
CC= cc
|
||||
CPP= $(CC) -E
|
||||
INCLUDES=
|
||||
CFLAG=-g
|
||||
INSTALL_PREFIX=
|
||||
|
||||
@@ -179,8 +179,8 @@ union {
|
||||
} GENERAL_NAME;
|
||||
|
||||
typedef struct ACCESS_DESCRIPTION_st {
|
||||
ASN1_OBJECT *method;
|
||||
GENERAL_NAME *location;
|
||||
ASN1_OBJECT *method;
|
||||
GENERAL_NAME *location;
|
||||
} ACCESS_DESCRIPTION;
|
||||
|
||||
DECLARE_STACK_OF(GENERAL_NAME)
|
||||
|
||||
@@ -102,6 +102,35 @@ the request and finally create a PKCS#12 file containing it.
|
||||
CA.pl -signreq
|
||||
CA.pl -pkcs12 "My Test Certificate"
|
||||
|
||||
=head1 DSA CERTIFICATES
|
||||
|
||||
Although the B<CA.pl> creates RSA CAs and requests it is still possible to
|
||||
use it with DSA certificates and requests using the L<req(1)|req(1)> command
|
||||
directly. The following example shows the steps that would typically be taken.
|
||||
|
||||
Create some DSA parameters:
|
||||
|
||||
openssl dsaparam -out dsap.pem 1024
|
||||
|
||||
Create a DSA CA certificate and private key:
|
||||
|
||||
openssl req -x509 -newkey dsa:dsap.pem -keyout cacert.pem -out cacert.pem
|
||||
|
||||
Create the CA directories and files:
|
||||
|
||||
CA.pl -newca
|
||||
|
||||
enter cacert.pem when prompted for the CA file name.
|
||||
|
||||
Create a DSA certificate request and privat key (a different set of parameters
|
||||
can optionally be created first):
|
||||
|
||||
openssl req -out newreq.pem -newkey dsa:dsap.pem
|
||||
|
||||
Sign the request:
|
||||
|
||||
CA.pl -signreq
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
Most of the filenames mentioned can be modified by editing the B<CA.pl> script.
|
||||
|
||||
@@ -12,6 +12,10 @@ I<command>
|
||||
[ I<command_opts> ]
|
||||
[ I<command_args> ]
|
||||
|
||||
B<openssl> [ B<list-standard-commands> | B<list-message-digest-commands> | B<list-cipher-commands> ]
|
||||
|
||||
B<openssl> B<no->I<XXX> [ I<arbitrary options> ]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL
|
||||
@@ -35,6 +39,22 @@ The B<openssl> program provides a rich variety of commands (I<command> in the
|
||||
SYNOPSIS above), each of which often has a wealth of options and arguments
|
||||
(I<command_opts> and I<command_args> in the SYNOPSIS).
|
||||
|
||||
The pseudo-commands B<list-standard-commands>, B<list-message-digest-commands>,
|
||||
and B<list-cipher-commands> output a list (one entry per line) of the names
|
||||
of all standard commands, message digest commands, or cipher commands,
|
||||
respectively, that are available in the present B<openssl> utility.
|
||||
|
||||
The pseudo-command B<no->I<XXX> tests whether a command of the
|
||||
specified name is available. If no command named I<XXX> exists, it
|
||||
returns 0 (success) and prints B<no->I<XXX>; otherwise it returns 1
|
||||
and prints I<XXX>. In both cases, the output goes to B<stdout> and
|
||||
nothing is printed to B<stderr>. Additional command line arguments
|
||||
are always ignored. Since for each cipher there is a command of the
|
||||
same name, this provides an easy way for shell scripts to test for the
|
||||
availability of ciphers in the B<openssl> program. (B<no->I<XXX> is
|
||||
not able to detect pseudo-commands such as B<quit>,
|
||||
B<list->I<...>B<-commands>, or B<no->I<XXX> itself.)
|
||||
|
||||
=head2 STANDARD COMMANDS
|
||||
|
||||
=over 10
|
||||
@@ -296,7 +316,10 @@ L<crypto(3)|crypto(3)>, L<ssl(3)|ssl(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
The openssl(1) document appeared in OpenSSL 0.9.2
|
||||
The openssl(1) document appeared in OpenSSL 0.9.2.
|
||||
The B<list->I<XXX>B<-commands> pseudo-commands were added in OpenSSL 0.9.3;
|
||||
the B<no->I<XXX> pseudo-commands were added in OpenSSL 0.9.5a.
|
||||
For notes on the availability of other commands, see their individual
|
||||
manual pages.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -212,9 +212,10 @@ clears all the prohibited or rejected uses of the certificate.
|
||||
|
||||
=item B<-addtrust arg>
|
||||
|
||||
adds a trusted certificate use. Currently acceptable values
|
||||
are B<all> (any purpose), B<sslclient> (SSL client use), B<sslserver>
|
||||
(SSL server use) B<email> (S/MIME email) and B<objsign> (Object signing).
|
||||
adds a trusted certificate use. Any object name can be used here
|
||||
but currently only B<clientAuth> (SSL client use), B<serverAuth>
|
||||
(SSL server use) and B<emailProtection> (S/MIME email) are used.
|
||||
Other OpenSSL applications may define additional uses.
|
||||
|
||||
=item B<-addreject arg>
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
RAND_add, RAND_seed, RAND_status, RAND_screen - add entropy to the PRNG
|
||||
RAND_add, RAND_seed, RAND_status, RAND_event, RAND_screen - add
|
||||
entropy to the PRNG
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -14,6 +15,7 @@ RAND_add, RAND_seed, RAND_status, RAND_screen - add entropy to the PRNG
|
||||
|
||||
int RAND_status(void);
|
||||
|
||||
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam);
|
||||
void RAND_screen(void);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
@@ -40,17 +42,24 @@ or L<RAND_load_file(3)|RAND_load_file(3)>.
|
||||
|
||||
RAND_seed() is equivalent to RAND_add() when B<num == entropy>.
|
||||
|
||||
RAND_event() collects the entropy from Windows events such as mouse
|
||||
movements and other user interaction. It should be called with the
|
||||
B<iMsg>, B<wParam> and B<lParam> arguments of I<all> messages sent to
|
||||
the window procedure. It will estimate the entropy contained in the
|
||||
event message (if any), and add it to the PRNG. The program can then
|
||||
process the messages as usual.
|
||||
|
||||
The RAND_screen() function is available for the convenience of Windows
|
||||
programmers. It adds the current contents of the screen to the PRNG.
|
||||
For applications that can catch Windows events, seeding the PRNG with
|
||||
the parameters of B<WM_MOUSEMOVE> events is a significantly better
|
||||
source of randomness. It should be noted that both methods cannot be
|
||||
used on servers that run without user interaction.
|
||||
For applications that can catch Windows events, seeding the PRNG by
|
||||
calling RAND_event() is a significantly better source of
|
||||
randomness. It should be noted that both methods cannot be used on
|
||||
servers that run without user interaction.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
RAND_status() returns 1 if the PRNG has been seeded with enough data,
|
||||
0 otherwise.
|
||||
RAND_status() and RAND_event() return 1 if the PRNG has been seeded
|
||||
with enough data, 0 otherwise.
|
||||
|
||||
The other functions do not return values.
|
||||
|
||||
@@ -63,6 +72,6 @@ L<RAND_load_file(3)|RAND_load_file(3)>, L<RAND_cleanup(3)|RAND_cleanup(3)>
|
||||
|
||||
RAND_seed() and RAND_screen() are available in all versions of SSLeay
|
||||
and OpenSSL. RAND_add() and RAND_status() have been added in OpenSSL
|
||||
0.9.5.
|
||||
0.9.5, RAND_event() in OpenSSL 0.9.5a.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -57,28 +57,31 @@ everything after the first 64 bits is ignored.
|
||||
|
||||
The mode functions BF_cbc_encrypt(), BF_cfb64_encrypt() and BF_ofb64_encrypt()
|
||||
all operate on variable length data. They all take an initialisation vector
|
||||
B<ivec> which must be initially filled with zeros, but then just need to be
|
||||
passed along into the next call of the same function for the same message.
|
||||
B<ivec> which needs to be passed along into the next call of the same function
|
||||
for the same message. B<ivec> may be initialised with anything, but the
|
||||
recipient needs to know what it was initialised with, or it won't be able
|
||||
to decrypt. Some programs and protocols simplify this, like SSH, where
|
||||
B<ivec> is simply initialised to zero.
|
||||
BF_cbc_encrypt() operates of data that is a multiple of 8 bytes long, while
|
||||
BF_cfb64_encrypt() and BF_ofb64_encrypt() are used to encrypt an variable
|
||||
number of bytes (the amount does not have to be an exact multiple of 8). The
|
||||
purpose of the latter two is to simulate stream ciphers, and therefore, they
|
||||
need the parameter B<num>, which is a pointer to an integer where the current
|
||||
offset in B<ivec> is stored between calls. This integer must be initialised
|
||||
to zero when B<ivec> is filled with zeros.
|
||||
to zero when B<ivec> is initialised.
|
||||
|
||||
BF_cbc_encrypt() is the Cipher Block Chaining function for Blowfish. It
|
||||
encrypts or decrypts the 64 bits chunks of B<in> using the key B<schedule>,
|
||||
putting the result in B<out>. B<enc> decides if encryption (BF_ENCRYPT) or
|
||||
decryption (BF_DECRYPT) shall be performed. B<ivec> must point at an 8 byte
|
||||
long initialisation vector, which must be initially filled with zeros.
|
||||
long initialisation vector.
|
||||
|
||||
BF_cfb64_encrypt() is the CFB mode for Blowfish with 64 bit feedback.
|
||||
It encrypts or decrypts the bytes in B<in> using the key B<schedule>,
|
||||
putting the result in B<out>. B<enc> decides if encryption (B<BF_ENCRYPT>)
|
||||
or decryption (B<BF_DECRYPT>) shall be performed. B<ivec> must point at an
|
||||
8 byte long initialisation vector, which must be initially filled with zeros.
|
||||
B<num> must point at an integer which must be initially zero.
|
||||
8 byte long initialisation vector. B<num> must point at an integer which must
|
||||
be initially zero.
|
||||
|
||||
BF_ofb64_encrypt() is the OFB mode for Blowfish with 64 bit feedback.
|
||||
It uses the same parameters as BF_cfb64_encrypt(), which must be initialised
|
||||
|
||||
10
e_os.h
10
e_os.h
@@ -194,9 +194,7 @@ extern "C" {
|
||||
# include <io.h>
|
||||
# include <fcntl.h>
|
||||
|
||||
# ifdef __MINGW32__
|
||||
# define ssize_t long
|
||||
# endif
|
||||
# define ssize_t long
|
||||
|
||||
# if defined (__BORLANDC__)
|
||||
# define _setmode setmode
|
||||
@@ -392,6 +390,12 @@ extern HINSTANCE _hInstance;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__ultrix)
|
||||
# ifndef ssize_t
|
||||
# define ssize_t int
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(THREADS) || defined(sun)
|
||||
#ifndef _REENTRANT
|
||||
#define _REENTRANT
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/sh
|
||||
#
|
||||
# Run this script from the OpenSSL root directory:
|
||||
# sh shlib/hpux10-cc.sh
|
||||
#
|
||||
# HP-UX (10.20) shared library installation:
|
||||
# Compile and install OpenSSL with best possible optimization:
|
||||
@@ -16,10 +19,10 @@
|
||||
#
|
||||
# WARNING: At high optimization levels, HP's ANSI-C compiler can chew up
|
||||
# large amounts of memory and CPU time. Make sure to have at least
|
||||
# 128MB of RAM available and that you kernel is configure to allow
|
||||
# 128MB data size (maxdsiz parameter).
|
||||
# 128MB of RAM available and that your kernel is configured to allow
|
||||
# at least 128MB data size (maxdsiz parameter).
|
||||
# The installation process can take several hours, even on fast
|
||||
# machines. +O4 Optimization of the libcrypto.sl shared library may
|
||||
# machines. +O4 optimization of the libcrypto.sl shared library may
|
||||
# take 1 hour on a C200 (200MHz PA8200 CPU), +O3 compilation of
|
||||
# fcrypt_b.c can take 20 minutes on this machine. Stay patient.
|
||||
#
|
||||
@@ -31,7 +34,7 @@ SITEFLAGS="+DAportable +w1"
|
||||
#
|
||||
# Set the default additions to build with HP-UX.
|
||||
# -D_REENTRANT must/should be defined on HP-UX manually, since we do call
|
||||
# Confiugure directly.
|
||||
# Configure directly.
|
||||
# +Oall increases the optimization done.
|
||||
#
|
||||
MYFLAGS="-D_REENTRANT +Oall $SITEFLAGS"
|
||||
|
||||
@@ -772,6 +772,8 @@ static int ssl3_get_server_certificate(SSL *s)
|
||||
s->session->sess_cert=sc;
|
||||
|
||||
sc->cert_chain=sk;
|
||||
/* Inconsistency alert: cert_chain does include the peer's
|
||||
* certificate, which we don't include in s3_srvr.c */
|
||||
x=sk_X509_value(sk,0);
|
||||
sk=NULL;
|
||||
|
||||
|
||||
@@ -1698,6 +1698,8 @@ static int ssl3_get_client_certificate(SSL *s)
|
||||
if (s->session->sess_cert->cert_chain != NULL)
|
||||
sk_X509_pop_free(s->session->sess_cert->cert_chain, X509_free);
|
||||
s->session->sess_cert->cert_chain=sk;
|
||||
/* Inconsistency alert: cert_chain does *not* include the
|
||||
* peer's own certificate, while we do include it in s3_clnt.c */
|
||||
|
||||
sk=NULL;
|
||||
|
||||
|
||||
@@ -599,6 +599,9 @@ STACK_OF(X509) *SSL_get_peer_cert_chain(SSL *s)
|
||||
else
|
||||
r=s->session->sess_cert->cert_chain;
|
||||
|
||||
/* If we are a client, cert_chain includes the peer's own
|
||||
* certificate; if we are a server, it does not. */
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
||||
|
||||
@@ -499,10 +499,24 @@ bad:
|
||||
BIO_printf(bio_stdout, "%d handshakes of %ld bytes done\n",number,bytes);
|
||||
if (print_time)
|
||||
{
|
||||
#ifdef CLOCKS_PER_SEC
|
||||
/* "To determine the time in seconds, the value returned
|
||||
* by the clock function should be divided by the value
|
||||
* of the macro CLOCKS_PER_SEC."
|
||||
* -- ISO/IEC 9899 */
|
||||
BIO_printf(bio_stdout, "Approximate total server time: %6.2f s\n"
|
||||
"Approximate total client time: %6.2f s\n",
|
||||
(double)s_time/CLOCKS_PER_SEC,
|
||||
(double)c_time/CLOCKS_PER_SEC);
|
||||
#else
|
||||
/* "`CLOCKS_PER_SEC' undeclared (first use this function)"
|
||||
* -- cc on NeXTstep/OpenStep */
|
||||
BIO_printf(bio_stdout,
|
||||
"Approximate total server time: %6.2f units\n"
|
||||
"Approximate total client time: %6.2f units\n",
|
||||
(double)s_time,
|
||||
(double)c_time);
|
||||
#endif
|
||||
}
|
||||
|
||||
SSL_free(s_ssl);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
$INSTALLTOP="/usr/local/ssl";
|
||||
$OPTIONS="";
|
||||
$ssl_version="";
|
||||
$banner="\t\@echo Building OpenSSL";
|
||||
|
||||
open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
|
||||
while(<IN>) {
|
||||
|
||||
@@ -109,7 +109,7 @@ sub do_lib_rule
|
||||
{
|
||||
# $ret.="\t\$(RM) \$(O_$Name)\n";
|
||||
$ret.="\techo LIB $<\n";
|
||||
$ret.="\t\$(MKLIB) $lfile$target \$(addprefix +, $objs)\n";
|
||||
$ret.="\t&\$(MKLIB) $lfile$target -+\$**\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ if (open(TEST,">cctest.c")) {
|
||||
print OUT "Compiler doesn't work.\n";
|
||||
goto err;
|
||||
}
|
||||
system("ar r cctest.a");
|
||||
system("ar r cctest.a /dev/null");
|
||||
if (not -f "cctest.a") {
|
||||
print OUT "Check your archive tool (ar).\n";
|
||||
goto err;
|
||||
|
||||
Reference in New Issue
Block a user