Commit Graph

2847 Commits

Author SHA1 Message Date
Ulf Möller
4b757c830d typo 2000-12-01 01:51:04 +00:00
Richard Levitte
9b7a552f4b Recognise Darwin as well. For now, have it do exactly the same thing as for Rhapsody 2000-12-01 01:11:54 +00:00
Bodo Möller
8df788c97f COMP_zlib should always be declared, even if it is not functional.
Don't dump core in ssltest.
2000-11-30 23:41:58 +00:00
Bodo Möller
12cfcc128c Fix the recently introduced test that checks if the result is 0 2000-11-30 22:58:27 +00:00
Richard Levitte
f9b3bff6f7 First tentative impementation of Kerberos 5 cryptos and keys for SSL/TLS. Implemented by Vern Staats <staatsvr@asc.hpc.mil>, further hacked and distributed by Jeffrey Altman <jaltnab@columbia.edu> 2000-11-30 22:53:34 +00:00
Bodo Möller
fc2e05c2d5 Fix BN_rshift, which caused lots of trouble. 2000-11-30 22:34:57 +00:00
Bodo Möller
b2993bdea1 Remove randomness from the test. These constants give me a segment
violation in test_kron on a 32 bit system.
2000-11-30 21:03:13 +00:00
Bodo Möller
470fa98f8a BN_mod_exp(r,a,p,m,ctx) should not be called with r == p.
But even if this is avoided, there are still segmentation violations
(during one of the BN_free()s at the end of test_kron
in some cases, in other cases during BN_kronecker, or
later in BN_sqrt; choosing a different exponentiation
algorithm in bntest.c appears to influence when the SIGSEGV
takes place).
2000-11-30 20:03:24 +00:00
Bodo Möller
de6e207db6 It's "#elif", not "#elsif". 2000-11-30 19:35:51 +00:00
Richard Levitte
1363155145 A few bug fixes for Windows. 2000-11-30 17:41:01 +00:00
Bodo Möller
db5bda670f Changes to Lenka's Montgomery implementation.
Submitted by: Lenka Fibikova
2000-11-30 17:35:17 +00:00
Richard Levitte
0ae485dc07 New format for the FAQ. We now have different sections for different
types of questions.  Hopefully, that'll make them easier to spot, and
specially, easier to refer to.
2000-11-30 13:04:14 +00:00
Bodo Möller
19cda70045 Corrections to the comments in BN_mod_inverse. 2000-11-30 12:53:53 +00:00
Richard Levitte
4751717cd8 The compression method may be undefined for some reason that has
generated errors.  Therefore, print whatever error there may be...
2000-11-30 12:53:15 +00:00
Richard Levitte
bd68b6b1f6 Simplify and provide the possibility to clean a compression method. 2000-11-30 12:22:35 +00:00
Richard Levitte
cd9b7d7c35 comp_methods in a SSL_CTX points at an internal database. Do *not*
free that, since it's shared by all SSL_CTX's, present and future.
2000-11-30 12:21:33 +00:00
Richard Levitte
058123afb6 Turn off memory checking when loading new compression algorithms. 2000-11-30 12:19:54 +00:00
Richard Levitte
a4614bf06d COMP_METHOD has a new argument since some time back... 2000-11-30 12:18:10 +00:00
Richard Levitte
23f80f46a4 Make it possible to test SSL compression 2000-11-30 11:57:31 +00:00
Richard Levitte
c4438dc0e5 Change c_zlib further to allow loading a shared zlib on all operating
systems where such an operation is supported.
2000-11-30 11:56:00 +00:00
Bodo Möller
04ca16890b BN_mod_exp problems ... 2000-11-30 11:47:04 +00:00
Richard Levitte
20f88b9bd4 Changes to c_zlib.c to make ZLIB.DLL dynamically loadable under
Windows.  Really, this should probably be done on Unix as well, but
that will be a later story...
2000-11-30 10:25:45 +00:00
Bodo Möller
25439b76ad Move reduction step from BN_mod_exp to BN_mod_exp_mont_word.
Fix BN_mod_exp_simple for a==0 (mod m).
Skip useless round in BN_mod_sqrt (1 is always a square, no need
to test BN_kronecker for it).
2000-11-30 09:45:26 +00:00
Geoff Thorpe
3465dd3853 * Fix a slight bug in the state-machine. This caused the client end of a
tunnel to not pro-actively close down when failing an SSL handshake.

* Change the cert-chain callback - originally this was the same one used in
  s_client and s_server but the output's as ugly as sin, so I've prettied
  tunala's copy output up a bit (and made the output level configurable).

* Remove the superfluous "errors" from the SSL state callback - these are just
  non-blocking side-effects.
2000-11-30 01:34:26 +00:00
Bodo Möller
ac445acf69 bn_modfs.c is no longer needed, a BN_sqrt implementation
exists in bn_sqrt.c now
2000-11-30 00:43:41 +00:00
Bodo Möller
77ac92d00a Fix bntest.c problem -- one of the primes got lost 2000-11-30 00:37:49 +00:00
Bodo Möller
73c2522c7c Handle special cases correctly in exponentation functions.
test_bn still fails in the BN_sqrt test because
small primes appear to turn into zero for no
obvious reason, leading to "div by zero" errors.
2000-11-30 00:33:18 +00:00
Bodo Möller
6b5d39e82d BN_mod_sqrt 2000-11-30 00:20:20 +00:00
Bodo Möller
cd2eebfd64 BN_sqrt 2000-11-30 00:18:19 +00:00
Ulf Möller
06676624fc Add a warning about the usage of the montgomery functions (if the inputs
are not reduced modulo m, the outputs won't be either).
2000-11-29 22:37:14 +00:00
Geoff Thorpe
ef8b601789 Amend the original CHANGES log entry. The ex_data handling has been
similarly modified now on DH and DSA.
2000-11-29 20:02:00 +00:00
Bodo Möller
01e62900c7 BN_legendre is no longer needed now that OpenSSL has BN_kronecker. 2000-11-29 19:59:59 +00:00
Geoff Thorpe
d50f1bdfac Do to DH and DSA what has already been done to RSA. This involves moving
the initialisation and cleanup of "ex_data" elements to before an init()
handler and after a finish() handler respectively.
2000-11-29 19:59:45 +00:00
Bodo Möller
38b40c624c mark a bug 2000-11-29 19:29:47 +00:00
Bodo Möller
eb1f1b0a34 Fix BN_kronecker so that it works correctly if 'a' is negative
(we need the two's complement of BN_lsw then).
2000-11-29 19:26:33 +00:00
Geoff Thorpe
a9376dbff9 More little changes to the tunala demo;
* A little bit of code-cleanup
* Reformat the usage string (not so wide)
* Allow adding an alternative (usually DSA) cert/key pair (a la s_server)
* Allow control over cert-chain verify depth
2000-11-29 19:22:54 +00:00
Bodo Möller
14697d9d6d BN_to_montgomery expects its inputs to be in the interval 0 .. modulus-1,
so we have to reduce the random numbers used in test_mont.

Before this change, test_mont failed in [debug-]solaris-sparcv9-gcc
configurations ("Montgomery multiplication test failed!" because
the multiplication result obtained with Montgomery multiplication
differed from the result obtained by BN_mod_mul).
Substituing the old version of bn_gcd.c (BN_mod_inverse) did not avoid
the problem.

The strange thing is that it I did not observe any problems
when using debug-solaris-sparcv8-gcc and solaris-sparcv9-cc,
as well as when compiling OpenSSL 0.9.6 in the solaric-sparcv9-gcc
configuration on the same system.
2000-11-29 18:08:24 +00:00
Lutz Jänicke
c6a926d9e2 Log security relevant change. 2000-11-29 18:06:18 +00:00
Ulf Möller
c1db5bfc08 fix for Borland C 2000-11-29 16:43:50 +00:00
Bodo Möller
429b8162c6 add missing braces 2000-11-29 16:43:03 +00:00
Lutz Jänicke
0dd2254d76 Store verify_result with sessions to avoid potential security hole.
For the server side this was already done one year ago :-(
2000-11-29 16:04:38 +00:00
Bodo Möller
03a0848922 Fix warnings in expspeed.c (but the segmentation fault remains)
Improve readability of bn_shift.c.

Add comment in bn_lib.c (why zero data between top and max?)

Change bntest.c output for BN_kronecker test
2000-11-29 13:40:08 +00:00
Bodo Möller
9161672950 BN_bin2bn did *not* contain an off-by-one error;
I'm still investigating what caused the segementation fault
(maybe "make clean; make" will cure it ...).
But BN_bin2bn should always reset ret->neg.
2000-11-29 12:53:41 +00:00
Bodo Möller
a08bcccc67 Expand expspeed.c to make BN_kronecker timings.
This caused a segmentation fault in calls to malloc, so I cleaned up
bn_lib.c a little so that it is easier to see what is going on.
The bug turned out to be an off-by-one error in BN_bin2bn.
2000-11-29 12:32:10 +00:00
Bodo Möller
bdec3c5323 Implement BN_kronecker test.
Modify "CHANGES" entry for BN_mod_inverse (it's not just avoiding BN_div
that increases performance, avoiding BN_mul also helps)
2000-11-29 11:06:50 +00:00
Bodo Möller
53d286797c avoid segmentation fault 2000-11-29 11:04:31 +00:00
Bodo Möller
b6cafbd7d8 Make BN_mod_inverse a little faster 2000-11-29 09:57:13 +00:00
Bodo Möller
499e167fda Improve BN_mod_inverse performance.
Get the BN_mod_exp_mont bugfix (for handling negative inputs) correct
this time.
2000-11-29 09:41:19 +00:00
Richard Levitte
0135e33511 Copy and paste error... bn_add_part_words() should of course call
bn_add_words(), not bn_sub_words()...
2000-11-29 09:36:48 +00:00
Geoff Thorpe
f2cc7559dd Make s_client/s_server-style cert verification output configurable by
command line, and make the peer-authentication similarly configurable.
2000-11-29 01:29:08 +00:00