The encoding of negative ASN1 INTEGERs and the conversion of BNs to negative
integers was completely broken. Also added a NEG_PUBKEY_BUG compilation option
to compensate for public keys improperly encoded as negative integers.
Bodo Möller [Fri, 14 May 1999 12:40:39 +0000 (12:40 +0000)]
Various bugfixes: Uses locking for some more of the stuff that is not
thread-safe (where thread-safe counterparts are not available on all
platforms), and don't memcpy to NULL-pointers
Submitted by: Anonymous
Reviewed by: Bodo Moeller
Bodo Möller [Fri, 14 May 1999 11:52:49 +0000 (11:52 +0000)]
Introduce and use function typedef pem_password_cb so that we don't call
those functions without having a parameter list declaration.
(There are various similar cases left ...)
Bodo Möller [Thu, 13 May 1999 17:51:35 +0000 (17:51 +0000)]
Don't use reserved name "_encrypt" for parameters;
instead I've picked "enc", because that's what's in the prototypes.
("_encrypt" is reserved only as an external name, but still
using it in an application doesn't look like good style to me --
and it certainly isn't if the point is just avoiding shadowing,
which is apparently why the previous name "encrypt" was changed.)
Bodo Möller [Thu, 13 May 1999 15:09:38 +0000 (15:09 +0000)]
New structure type SESS_CERT used instead of CERT inside SSL_SESSION.
While modifying the sources, I found some inconsistencies on the use of
s->cert vs. s->session->sess_cert; I don't know if those could
really have caused problems, but possibly this is a proper bug-fix
and not just a clean-up.
Bodo Möller [Thu, 13 May 1999 10:32:04 +0000 (10:32 +0000)]
First tiny changes in preparation of changing of "sess_cert" handling.
Also I've subsituted real tabs for 8-spaces sequences in some lines so that
things don't look that weird with a tab-width of 4.
Add new -out option to asn1parse to allow the parsed data to be output.
Fixed -strparse option: it didn't work if used more than once (this was due
to the d2i_ASN1_TYPE call parsing a freed buffer). On Win32 the file wincrypt.h
#define's X509_NAME and PKCS7_SIGNER_INFO causing clashes so these are #undef'ed
Bodo Möller [Tue, 11 May 1999 07:43:16 +0000 (07:43 +0000)]
Make SSL library a little more fool-proof by not requiring any longer
that SSL_set_{accept,connect}_state be called before
SSL_{accept,connect} may be used.
Submitted by:
Reviewed by:
PR:
Bodo Möller [Mon, 10 May 1999 11:18:26 +0000 (11:18 +0000)]
The various character predicates (isspace and the like) may not be
used with negative char values, so I've added casts to unsigned char.
Maybe what really should be done is change all those arrays and
pointers to type unsigned char [] or unsigned char *, respectively;
but using plain char with those predicates is just wrong, so something
had to be done.
Submitted by:
Reviewed by:
PR:
Bodo Möller [Mon, 10 May 1999 11:10:38 +0000 (11:10 +0000)]
Moved some variable declarations inside blocks where they are needed
so that warnings about unused variables (for certain
-D... constellations) are avoided; this corresponds to the earlier
change for SHA1.
Submitted by:
Reviewed by:
PR:
Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall -Wshadow
-Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -Winline'' with EGCS 1.1.2+
Various PKCS#7 fixes to properly (maybe!) handle PKCS#7 enveloped data.
Containts elements of code by Sebastian Akerman <sak@parallelconsulting.com>
and made a bit less "naughty" by Steve.
Bodo Möller [Sun, 9 May 1999 21:22:45 +0000 (21:22 +0000)]
No actual change, but the cert_st member of struct ssl_session_st is now
called sess_cert instead of just cert. This is in preparation of further
changes: Probably often when s->session->sess_cert is used, we should
use s->cert instead; s->session->sess_cert should be a new structure
containing only the stuff that is for just one connection (e.g.
the peer's certificate, which the SSL client implementations currently
store in s->session->[sess_]cert, which is a very confusing thing to do).
Submitted by:
Reviewed by:
PR:
Bodo Möller [Sun, 9 May 1999 20:12:44 +0000 (20:12 +0000)]
Create a duplicate of the SSL_CTX's CERT in SSL_new instead of copying
pointers. The cert_st handling is changed by this in various ways.
Submitted by:
Reviewed by:
PR:
Bodo Möller [Sun, 9 May 1999 15:45:38 +0000 (15:45 +0000)]
Some tiny changes to the source code to make future diffs smaller
when restructuring the cert_st handling (removed unnused parts,
and the like).
Submitted by:
Reviewed by:
PR:
Bodo Möller [Sun, 9 May 1999 10:16:46 +0000 (10:16 +0000)]
Move variable definitions into the blocks where they are really needed,
so that warnings about unused variables don't appear if those blocks
are removed by the C preprocessor.
Various Win32 fixes. Win95 doesn't support MoveFileEx() (which was used for a
Win32 version of rename() ). There isn't a precise rename() equivalent under
Win95: the standard rename() complains if the destination already exists so
replaced with a combination of unlink() and MoveFile().
Bodo Möller [Sat, 8 May 1999 10:12:48 +0000 (10:12 +0000)]
This was an unused derivate of an old version of s_client.c that had
been changed so that it almost could be used under Windows.
No one asked to keep it (and no one volunteered to bring it into useable
state), so away with it.
Submitted by:
Reviewed by:
PR:
Bodo Möller [Thu, 6 May 1999 23:46:26 +0000 (23:46 +0000)]
Restored path names that were changed by a previous "Configure" run.
(Rather than changing the files in places, we really should use .in files.)
Submitted by:
Reviewed by:
PR: