Commit graph

123 commits

Author SHA1 Message Date
Richard Levitte
920b700d4a Cleanse memory using the new OPENSSL_cleanse() function.
I've covered all the memset()s I felt safe modifying, but may have missed some.
2002-11-28 08:06:36 +00:00
Richard Levitte
1c4d82a776 The logic in the main signing and verifying functions to check lengths was
incorrect.  Fortunately, there is a second check that's correct, when adding
the pads.
PR: 355
2002-11-26 11:14:38 +00:00
Richard Levitte
9952cfcf62 Use double dashes so makedepend doesn't misunderstand the flags we
give it.
For 0.9.7 and up, that means util/domd needs to remove those double
dashes from the argument list when gcc is used to find the
dependencies.
2002-10-09 13:16:31 +00:00
Lutz Jänicke
d12eb7b024 "make update"
Submitted by:
Reviewed by:
PR:
2002-07-30 09:32:45 +00:00
Richard Levitte
578c1cdefa make update 2002-06-13 21:57:57 +00:00
Richard Levitte
d66c022a1f Check the return values where memory allocation failures may happen.
PR: 49
2002-05-30 16:49:00 +00:00
Richard Levitte
2ff622cf9d Add the configuration target VxWorks. 2002-02-14 15:36:50 +00:00
Ulf Möller
8935c03618 add casts as in head (required for VC++) 2002-02-11 17:44:30 +00:00
Bodo Möller
3ece3605ac remove redundant ERR_load_... declarations 2001-12-17 19:24:39 +00:00
Richard Levitte
75df0bb231 perl util/mkerr.pl -recurse -write -rebuild 2001-11-15 12:44:57 +00:00
Bodo Möller
a7113d645f improve OAEP check 2001-09-06 10:43:42 +00:00
Bodo Möller
27f3a1bd9c always reject data >= n 2001-07-25 17:03:22 +00:00
Ulf Möller
19352b794d as in head 2001-06-08 14:17:12 +00:00
Bodo Möller
a650df440b when checking OAEP, signal just a single kind of 'decoding error' 2001-06-06 18:48:57 +00:00
Ulf Möller
afd7b5affe as in head 2001-06-06 17:24:03 +00:00
Ulf Möller
38c3436577 make sure we don't write to seed[-1] 2001-06-06 17:15:47 +00:00
Ulf Möller
1777e3fd5e check the CRT result. 2001-03-28 04:49:39 +00:00
Geoff Thorpe
4910cbf6db Backfit a bugfix from 0.9.7-dev to 0.9.6-stable. init() and finish()
handlers were previously getting called before (and after, respectively)
the "ex_data" structures - this meant init() had very little that it
could initialise, and finish() had very little it could cleanup.
2001-02-24 17:32:34 +00:00
Ulf Möller
a39ded513a BN_rand_range() as in main branch. 2001-02-21 15:54:31 +00:00
Bodo Möller
73bc0cfd93 fix indentation 2000-12-19 12:39:12 +00:00
Bodo Möller
cbfa030de7 Don't hold CRYPTO_LOCK_RSA during time-consuming operations. 2000-12-19 12:19:16 +00:00
Bodo Möller
bb617a9646 Obtain lock CRYPTO_LOCK_RSA before creating BN_MONT_CTX
structures and setting rsa->_method_mod_{n,p,q}.

Submitted by: "Reddie, Steven" <Steven.Reddie@ca.com>
2000-12-18 16:36:07 +00:00
Richard Levitte
eb3633164e Fix from main trunk, 2000-09-25 10:52 levitte:
'ranlib' doesn't always run on some systems.  That's actually
acceptable, since all that happens if it fails is a library with an
index, which makes linking slower, but still working correctly.
2000-10-11 02:04:16 +00:00
Richard Levitte
62ab514e98 'make update' 2000-09-07 08:46:51 +00:00
Richard Levitte
3009458e2f MD4 implemented. Assar Westerlund provided the digest code itself and the test utility, I added the bits to get a EVP interface, the command line utility and the speed test 2000-08-14 14:05:53 +00:00
Bodo Möller
37569e64e8 Fix SSL 2.0 rollback checking: The previous implementation of the
test was never triggered due to an off-by-one error.

In s23_clnt.c, don't use special rollback-attack detection padding
(RSA_SSLV23_PADDING) if SSL 2.0 is the only protocol enabled in the
client; similarly, in s23_srvr.c, don't do the rollback check if
SSL 2.0 is the only protocol enabled in the server.
2000-07-29 18:50:41 +00:00
Richard Levitte
c2bbf9cf6c I got sick and tired of having to keep track of NIDs when such a thing
could be done automagically, much like the numbering in libeay.num and
ssleay.num.  The solution works as follows:

  - New object identifiers are inserted in objects.txt, following the
    syntax given in objects.README.
  - objects.pl is used to process obj_mac.num and create a new
    obj_mac.h.
  - obj_dat.pl is used to create a new obj_dat.h, using the data in
    obj_mac.h.

This is currently kind of a hack, and the perl code in objects.pl
isn't very elegant, but it works as I intended.  The simplest way to
check that it worked correctly is to look in obj_dat.h and check the
array nid_objs and make sure the objects haven't moved around (this is
important!).  Additions are OK, as well as consistent name changes.
2000-07-05 02:45:36 +00:00
Dr. Stephen Henson
d3ed8ceb3d Add support for the modified SGC key format used in IIS. 2000-06-15 23:48:05 +00:00
Geoff Thorpe
1c4f90a05d Enable DSO support on alpha (OSF1), cc and gcc.
Also, "make update" has added some missing functions to libeay.num,
updated the TABLE for the alpha changes, and updated thousands of
dependancies that have changed from recent commits.
2000-06-13 12:59:38 +00:00
Richard Levitte
ef33b97050 Using checks of the existence of HEADER_{foo}_H in other header files
was a really bad idea.  For example, the following:

	#include <x509.h>
	#include <bio.h>
	#include <asn1.h>

would make sure that things like ASN1_UTCTIME_print() wasn't defined
unless you moved the inclusion of bio.h to above the inclusion of
x509.h.  The reason is that x509.h includes asn1.h, and the
declaration of ASN1_UTCTIME_print() depended on the definition of
HEADER_BIO_H.  That's what I call an obscure bug.

Instead, this change makes sure that whatever header files are needed
for the correct process of one header file are included automagically,
and that the definitions of, for example, BIO-related things are
dependent on the absence of the NO_{foo} macros.  This is also
consistent with the way parts of OpenSSL can be excluded at will.
2000-06-09 10:41:35 +00:00
Richard Levitte
26a3a48d65 There have been a number of complaints from a number of sources that names
like Malloc, Realloc and especially Free conflict with already existing names
on some operating systems or other packages.  That is reason enough to change
the names of the OpenSSL memory allocation macros to something that has a
better chance of being unique, like prepending them with OPENSSL_.

This change includes all the name changes needed throughout all C files.
2000-06-01 22:19:21 +00:00
Ulf Möller
db82b8f9bd Bug fix for 64 bit HP-UX.
Submitted by: Karsten Spang <ks@bellesystems.com>
2000-06-01 14:24:59 +00:00
Richard Levitte
82271cee5b In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,
"Jan Mikkelsen" <janm@transactionsite.com> correctly states that the
OpenSSL header files have #include's and extern "C"'s in an incorrect
order.  Thusly fixed.
2000-05-02 12:16:01 +00:00
Geoff Thorpe
deb4d50e51 Previously, the default RSA_METHOD was NULL until the first RSA structure was
initialised, at which point an appropriate default was chosen. This meant a
call to RSA_get_default_method might have returned FALSE.

This change fixes that; now any called to RSA_new(), RSA_new_method(NULL), or
RSA_get_default_method() will ensure that a default is chosen if it wasn't
already.
2000-04-20 06:44:18 +00:00
Bodo Möller
59fc2b0fc2 Preserve reason strings in automatically build tables. 2000-03-05 00:19:36 +00:00
Ulf Möller
17ef291661 Check tlen size in all padding_check functions. As called within the rsa
library, the output buffer always is large enough, but if the tlen
parameter is there, it should be checked in the interest of clarity,
as proposed by David Sacerdote <das33@cornell.edu>.
2000-02-22 11:34:01 +00:00
Ulf Möller
9b141126d4 New functions BN_CTX_start(), BN_CTX_get(), BN_CTX_end() to access
temporary BIGNUMs. BN_CTX still uses a fixed number of BIGNUMs, but
the BN_CTX implementation could now easily be changed.
2000-02-05 14:17:32 +00:00
Ulf Möller
657e60fa00 ispell (and minor modifications) 2000-02-03 23:23:24 +00:00
Ulf Möller
4e3b0992da Checked in some junk. Sorry. 2000-01-30 23:46:18 +00:00
Ulf Möller
51ca375e7e Seek out and destroy another evil cast. 2000-01-30 23:33:40 +00:00
Dr. Stephen Henson
dd9d233e2a Tidy up CRYPTO_EX_DATA structures. 2000-01-23 23:41:49 +00:00
Ulf Möller
4486d0cd7a Document the DH library, and make some minor changes along the way. 2000-01-22 20:05:23 +00:00
Ulf Möller
721b5b2a5c Rename rsa_oaep_test to the more appropriate name rsa_test for the
benefit of MS-DOS users.
2000-01-18 15:08:49 +00:00
Bodo Möller
105c0be00f Let "make test" survive without DEVRANDOM
(and rename a target in test/Makefile.ssl to make it
easier to guess the name of the file executed by it)
2000-01-14 18:43:22 +00:00
Ulf Möller
eb952088f0 Precautions against using the PRNG uninitialized: RAND_bytes() now
returns int (1 = ok, 0 = not seeded). New function RAND_add() is the
same as RAND_seed() but takes an estimate of the entropy as an additional
argument.
2000-01-13 20:59:17 +00:00
Bodo Möller
76aa0ddc86 Turn BN_prime_checks into a macro.
Primes p where (p-1)/2 is prime too are called "safe", not "strong".
2000-01-12 11:57:30 +00:00
Bodo Möller
798757762a Improve support for running everything as a monolithic application.
Submitted by: Lennart Bång, Bodo Möller
1999-10-25 19:36:01 +00:00
Dr. Stephen Henson
08e9c1af6c Replace the macros in asn1.h with function equivalents. Also make UTF8Strings
tolerated in certificates.
1999-10-20 01:50:23 +00:00
Dr. Stephen Henson
1c80019a2c Add new sign and verify members to RSA_METHOD and change SSL code to use sign
and verify rather than direct encrypt/decrypt.
1999-09-18 22:37:44 +00:00
Bodo Möller
5671876d1d "make update" 1999-09-10 15:34:55 +00:00