Commit graph

2592 commits

Author SHA1 Message Date
Richard Levitte
ec517d25e8 Merge from 0.9.7-stable. 2002-12-28 02:41:17 +00:00
Andy Polyakov
0a2407a851 UltraSPARC performance "tune-up." 2002-12-27 14:51:49 +00:00
Richard Levitte
e9883d285d Finally, a bn_div_words() in VAX assembler that goes through all tests.
PR: 413
2002-12-23 11:25:51 +00:00
Richard Levitte
aa18245f7e Make AES_ENCRYPT and AES_DECRYPT macros instead of static constants.
PR: 411
2002-12-20 18:21:35 +00:00
Andy Polyakov
316bfb77b5 Fix for "shift count too large" when compiling for hpux-parisc2 and
irix-mips. The bug was introduced with accelerated support for x86_64.
My fault! Fixed now.
2002-12-20 18:11:30 +00:00
Richard Levitte
9b58214e4a More accurate comments. 2002-12-20 16:38:36 +00:00
Richard Levitte
3c801fa460 A little debugging. 2002-12-20 16:38:06 +00:00
Richard Levitte
1c9202004b Propagate MAKEDEPPROG to the subdirs under crypto/. 2002-12-20 15:28:42 +00:00
Richard Levitte
c9ecb1edd8 Keep the internal lowercase 'surname', for programmer's sake. 2002-12-20 09:39:34 +00:00
Richard Levitte
8baf5fdca0 Be consistent with capitalisation of object names. 2002-12-20 09:24:17 +00:00
Richard Levitte
aafafa314d Be consistent with capitalisation of object names. 2002-12-20 09:18:18 +00:00
Andy Polyakov
07d09fdb66 Fix for RT#405, Solaris refuses to invoke preprocessor if egrep returns 1.
Linux for example doesn't exhibit this behaviour, but I add "exit 0" to all
potentially affected rules, just to be on the safe side.
2002-12-18 09:03:48 +00:00
Andy Polyakov
4553ed276b Make "perl des-586.pl a.out" work, see RT#402 2002-12-17 08:05:49 +00:00
Richard Levitte
e29246cb17 Synchronise with Makefiles. 2002-12-15 20:59:24 +00:00
Andy Polyakov
a45051fbfc DES PIC-ification. "Cygwin" companion. Problem was that preprocessor macro
is not expanded if prepended with a $-sign.
2002-12-15 10:06:27 +00:00
Richard Levitte
9f100cf344 Don't define macros in terms of asm() when __STRICT_ANSI is defined. 2002-12-15 05:54:56 +00:00
Richard Levitte
a5a01e9051 Bring des_locl.h at the same level as in the 0.9.7 branch.
Don't define macros in terms of asm() when __STRICT_ANSI is defined.
2002-12-15 05:54:26 +00:00
Andy Polyakov
6be4688bdc Ooops! No ROTATE on some platforms after x86_64 performance patch... 2002-12-15 00:47:47 +00:00
Andy Polyakov
717c5cdcc7 As you might have noticed I tried to change for . prefix, because it's
the one to be used to denote local labels in single function scope.
Problem is that SHA uses same label set across functions, therefore I
have to switch back to $ prefix.
2002-12-14 23:14:00 +00:00
Andy Polyakov
2f98abbcb6 x86_64 performance patch. 2002-12-14 20:42:05 +00:00
Andy Polyakov
270fa8aeda DES PIC-ification. Windows companion. 2002-12-14 17:54:30 +00:00
Geoff Thorpe
4329db3726 The ampersand is not required in these constructs, and was giving AIX
warnings.

Reported by: Bernhard Simon.
2002-12-13 22:01:46 +00:00
Andy Polyakov
6f7ac8e1b0 IA-32 assembler modules (primarily DES) PIC-ification. Idea is to keep
shared libraries shared.
2002-12-13 17:56:14 +00:00
Richard Levitte
b9b6e14b4a In CRYPTO_lock(), check that the application cares about locking (provided
callbacks) before attempting to lock.
2002-12-11 08:56:35 +00:00
Richard Levitte
442d42300b sk_*_push() returns the number of items on the stack, not the index of the
pushed item.  The index is the number of items - 1.  And if a NULL item was
found, actually use it.
Finally, provide a little bit of safety in CRYPTO_lock() by asserting the a
requested dynamic lock really must exist, instead of just being silent about it
2002-12-11 08:33:31 +00:00
Richard Levitte
75e1c74724 Let's not forget the other places where HEADER_DES_H and HEADER_DES_OLD_H
were defined.
2002-12-11 07:37:54 +00:00
Richard Levitte
5db2b5e573 Let's not forget the other places where HEADER_DES_H and HEADER_DES_OLD_H
were defined.
2002-12-11 07:24:43 +00:00
Richard Levitte
005ef84c5d Since HEADER_DES_H has been the protector of des.h since libdes
(before SSLeay, maybe?), it's better to have that macro protect
the compatibility header des_old.h.  In the new des.h, let's use
a slightly different protecting macro.

The rationale is that there are application that might include (via
other header files, perhaps) both an old libdes des.h and OpenSSL's
des.h.  Whichever comes first would overshadow the other because of
the clash in protecting macro.  This fix solves that problem.
2002-12-11 06:59:16 +00:00
Richard Levitte
c17810b087 A memset() too many got converted into a OPENSSL_cleanse().
PR: 393
2002-12-10 08:26:05 +00:00
Richard Levitte
0edad88a31 make update 2002-12-09 02:19:27 +00:00
Geoff Thorpe
e189872486 Nils Larsch submitted;
- a patch to fix a memory leak in rsa_gen.c
  - a note about compiler warnings with unions
  - a note about improving structure element names

This applies his patch and implements a solution to the notes.
2002-12-08 16:45:26 +00:00
Geoff Thorpe
e9224c7177 This is a first-cut at improving the callback mechanisms used in
key-generation and prime-checking functions. Rather than explicitly passing
callback functions and caller-defined context data for the callbacks, a new
structure BN_GENCB is defined that encapsulates this; a pointer to the
structure is passed to all such functions instead.

This wrapper structure allows the encapsulation of "old" and "new" style
callbacks - "new" callbacks return a boolean result on the understanding
that returning FALSE should terminate keygen/primality processing.  The
BN_GENCB abstraction will allow future callback modifications without
needing to break binary compatibility nor change the API function
prototypes. The new API functions have been given names ending in "_ex" and
the old functions are implemented as wrappers to the new ones.  The
OPENSSL_NO_DEPRECATED symbol has been introduced so that, if defined,
declaration of the older functions will be skipped. NB: Some
openssl-internal code will stick with the older callbacks for now, so
appropriate "#undef" logic will be put in place - this is in case the user
is *building* openssl (rather than *including* its headers) with this
symbol defined.

There is another change in the new _ex functions; the key-generation
functions do not return key structures but operate on structures passed by
the caller, the return value is a boolean. This will allow for a smoother
transition to having key-generation as "virtual function" in the various
***_METHOD tables.
2002-12-08 05:24:31 +00:00
Richard Levitte
86a62cf15c Implement a stateful variant if the ZLIB compression method. The old
stateless variant is kept, but isn't used anywhere.
2002-12-08 02:39:38 +00:00
Andy Polyakov
bbf8198feb Workaround for GCC-ia64 compiler bug.
Submitted by: <appro>
Reviewed by:
PR:
2002-12-06 17:18:10 +00:00
Richard Levitte
3dda0dd2a2 Some compilers are quite picky about non-void functions that don't return
anything.
2002-12-06 08:50:06 +00:00
Richard Levitte
4ba8cabf62 SSL_CERT_FILE should be used in place of the system default file, not as
a first alternative to try
2002-12-05 21:07:26 +00:00
Richard Levitte
b84d5b72f1 Make sure to implement the cryptodev engine only when /dev/crypto exists. 2002-12-05 10:16:28 +00:00
Richard Levitte
8cbccedf7c make update 2002-12-05 01:55:48 +00:00
Richard Levitte
4387f47832 Make sure using SSL_CERT_FILE actually works, and has priority over system defaults.
PR: 376
2002-12-05 01:20:47 +00:00
Richard Levitte
85940ea8ea Only check for a result buffer if the allocated string is a prompt string.
PR: 381
2002-12-05 00:04:30 +00:00
Richard Levitte
439ae4d398 Do not implement RC4 stuff if RC4 is disabled. Concequently, apply the same
rule for SHA stuff.
PR: 381
2002-12-04 22:54:02 +00:00
Bodo Möller
7e8c30b589 In ECPKParameters_print, output the private key length correctly
(length of the order of the group, not length of the actual key, which
will be shorter in some cases).

Submitted by: Nils Larsch
2002-12-04 17:43:01 +00:00
Bodo Möller
2b32b28191 Don't compute timings here, we can do this elsewhere.
Include X9.62 signature examples.

Submitted by: Nils Larsch
2002-12-04 17:38:40 +00:00
Dr. Stephen Henson
716b2079dc Make ASN1_TYPE_get() work for V_ASN1_NULL type. 2002-12-04 00:49:46 +00:00
Dr. Stephen Henson
e7b6228fd3 Typo in X509v3_get_ext_by_critical 2002-12-04 00:16:00 +00:00
Dr. Stephen Henson
2053c43de2 In asn1_d2i_read_bio, don't assume BIO_read will
return the requested number of bytes when reading
content.
2002-12-03 23:50:59 +00:00
Richard Levitte
4707991520 Make CRYPTO_cleanse() independent of endianness. 2002-12-03 16:06:40 +00:00
Richard Levitte
7a1f92fdc3 Windows CE updates, contributed by Steven Reddie <smr@essemer.com.au> 2002-12-03 14:20:44 +00:00
Richard Levitte
6ab285bf4c I think I got it now. Apparently, the case of having to shift down
the divisor was a bit more complex than I first saw.  The lost bit
can't just be discarded, as there are cases where it is important.
For example, look at dividing 320000 with 80000 vs. 80001 (all
decimals), the difference is crucial.  The trick here is to check if
that lost bit was 1, and in that case, do the following:

1. subtract the quotient from the remainder
2. as long as the remainder is negative, add the divisor (the whole
   divisor, not the shofted down copy) to it, and decrease the
   quotient by one.

There's probably a nice mathematical proof for this already, but I
won't bother with that, unless someone requests it from me.
2002-12-02 21:31:45 +00:00
Richard Levitte
1d3159bcca Make some names consistent. 2002-12-02 02:40:27 +00:00