Commit graph

2823 commits

Author SHA1 Message Date
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
Richard Levitte
f60ceb54eb Through some experimentation and thinking, I think I finally got the
proper implementation of bn_div_words() for VAX.

If the tests go through well, the next step will be to test on Alpha.
2002-12-02 02:28:27 +00:00
Richard Levitte
0f995b2f40 Small bugfix: even when r == d, we need to adjust r and q.
PR: 366
2002-12-01 02:17:23 +00:00
Richard Levitte
848f735ae4 EXIT() needs to be in a function that returns int. 2002-12-01 01:23:35 +00:00
Richard Levitte
a678430602 Redo the VAX assembler version of bn_div_words().
PR: 366
2002-12-01 00:49:36 +00:00
Richard Levitte
e9b553dac1 Remove incorrect assert.
PR: 360
2002-11-29 15:18:22 +00:00
Richard Levitte
43d601641f A few more memset()s converted to OPENSSL_cleanse().
I *think* I got them all covered by now, bu please, if you find any more,
tell me and I'll correct it.
PR: 343
2002-11-29 11:30:45 +00:00
Richard Levitte
55f78baf32 Have all tests use EXIT() to exit rather than exit(), since the latter doesn't
always give the expected result on some platforms.
2002-11-28 18:54:30 +00:00
Richard Levitte
4579924b7e 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:04:36 +00:00
Richard Levitte
2047bda6fb Unused variable removed. 2002-11-27 13:40:41 +00:00
Richard Levitte
406c6f6962 Extra ; removed. 2002-11-27 13:40:11 +00:00
Richard Levitte
df29cc8f77 Add OPENSSL_cleanse() to help cleanse memory and avoid certain compiler
and linker optimizations.
PR: 343
2002-11-27 12:24:05 +00:00
Richard Levitte
ba8ad07490 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:32 +00:00
Bodo Möller
15994b034a rename some functions to improve consistency
Submitted by: Sheueling Chang
2002-11-23 18:16:09 +00:00
Bodo Möller
922fa76e26 add a comment 2002-11-22 09:25:35 +00:00
Bodo Möller
8a09b3866a avoid uninitialized memory read
Submitted by: Nils Larsch
2002-11-20 10:55:27 +00:00
Bodo Möller
137445140b Make ec_GFp_simple_point_get_affine_coordinates() faster
for Montgomery representations.

Submitted by: Sheueling Chang, Bodo Moeller
2002-11-20 10:53:33 +00:00
Richard Levitte
821385ad00 Fix an unsigned/signed mismatch. 2002-11-19 11:28:28 +00:00
Richard Levitte
711f1a3c26 Add the ASN.1 structures and functions for CertificatePair, which is
defined as follows (according to X.509_4thEditionDraftV6.pdf):

CertificatePair ::= SEQUENCE {
	forward		[0]	Certificate OPTIONAL,
	reverse		[1]	Certificate OPTIONAL,
	-- at least one of the pair shall be present -- }

The only thing I'm not sure about is if it's implicit or explicit tags
that I should count on.  For now, I'm thinking explicit, but will
gladly stand corrected.

Also implement the PEM functions to read and write certificate pairs,
and defined the PEM tag as "CERTIFICATE PAIR".

This needed to be defined, mostly for the sake of the LDAP attribute
crossCertificatePair, but may prove useful elsewhere as well.
2002-11-18 23:54:27 +00:00
Richard Levitte
a1d85309ee Determine HZ exactly as in apps/speed.c. 2002-11-18 23:06:36 +00:00
Bodo Möller
a2dbcf3644 remove redundant functions 2002-11-18 14:37:35 +00:00
Bodo Möller
4663355496 use consistent order of function definitions 2002-11-18 14:33:39 +00:00
Bodo Möller
9dc610495c fix memory leak in memory debuggin code ...
Submitted by: Nils Larsch
2002-11-18 14:00:42 +00:00
Richard Levitte
527497a722 A variable of type time_t is supposed to be a time measurement starting at
Epoch.  offset isn't such a measurement, so let's stop pretend it is.
2002-11-18 13:04:08 +00:00
Richard Levitte
b4b82ab465 I forgot this is compiled in test/, not crypto/ec/... 2002-11-16 10:10:39 +00:00
Richard Levitte
0bf23d9b20 WinCE patches 2002-11-15 22:37:18 +00:00
Bodo Möller
acce40c585 this method does not need field_data1 2002-11-15 12:43:15 +00:00
Richard Levitte
6dc78bf7e8 make update 2002-11-15 11:20:43 +00:00
Richard Levitte
ce4f169ff9 A few more Microsoft OIDs added 2002-11-15 11:17:50 +00:00
Dr. Stephen Henson
d78254aa28 Add SETWRAP modifier to ASN1 generate. 2002-11-15 00:26:07 +00:00
Richard Levitte
af67804bef make update 2002-11-14 23:56:12 +00:00
Richard Levitte
35a6db8640 Close the implicitely opened registry key.
PR: 264
2002-11-14 23:33:28 +00:00
Richard Levitte
c863201780 Remove warnings. 2002-11-14 15:57:38 +00:00
Richard Levitte
8d6e60486f Fix to build better with DJGPP.
PR: 338

Here's the description, submitted by Gisle Vanem <giva@bgnett.no>:

1. sock_init() renamed to ssl_sock_init() in ./apps/s_socket.c due
   to name-clash with Watt-32.

2. rand() renamed to Rand() in ./crypto/bn/divtest.c due to name-clash
   with <stdlib.h>

3. Added calls to dbug_init()/sock_init() in some demo programs.

4. Changed cflags/lflags in configure. Watt-32 install root now taken
   from $WATT_ROOT.
2002-11-14 11:22:01 +00:00
Bodo Möller
3bd16a8902 fix output
Submitted by: Nils Larsch
2002-11-14 10:57:45 +00:00
Bodo Möller
555d75252a use new BIO_indent() function here as well
Submitted by: Nils Larsch
2002-11-14 10:56:59 +00:00
Richard Levitte
83411793b6 Handle last lines that aren't properly terminated.
PR: 308
2002-11-14 06:51:18 +00:00
Dr. Stephen Henson
65caee44ff Fix get_email: 0 is a valid return value 2002-11-14 00:46:11 +00:00
Richard Levitte
3f083ef0eb free() -> OPENSSL_free() 2002-11-13 20:25:47 +00:00
Richard Levitte
17ed6c06a7 Merge from 0.9.7-stable. 2002-11-13 18:10:30 +00:00
Richard Levitte
c112323dd5 This didn't get to the 0.9.8-dev thread... 2002-11-13 18:09:27 +00:00
Richard Levitte
0709385d3c Correct support for SunOS 4.1.3_U1.
PR: 227
2002-11-13 16:11:14 +00:00
Ben Laurie
54a656ef08 Security fixes brought forward from 0.9.7. 2002-11-13 15:43:43 +00:00
Bodo Möller
b6fee5c2fb disable weird assert()s 2002-11-13 14:01:34 +00:00
Bodo Möller
10fa047622 remove unused old directory crypto/rijndael (superseded by crypto/aes) 2002-11-13 13:55:41 +00:00
Ben Laurie
eb43641dd3 Fix warnings, makefile cockup. 2002-11-13 11:59:48 +00:00
Dr. Stephen Henson
7fb8d254fe Only accept exact match for modifier or tag name 2002-11-13 00:57:41 +00:00
Dr. Stephen Henson
c99935e32c Add header ctype.h 2002-11-13 00:42:11 +00:00
Dr. Stephen Henson
2232e262bf Fix memory leak in s2i_ASN_INTEGER and return an error
if any invalid characters are present.
2002-11-13 00:40:51 +00:00
Richard Levitte
ccb13ded84 Synchronise... 2002-11-12 13:55:20 +00:00
Dr. Stephen Henson
9ea1b87862 Initial ASN1 generation code. This can construct
arbitrary encodings from strings and config files.

Documentation to follow...
2002-11-12 13:34:51 +00:00
Richard Levitte
69ce48c307 Make the CBC mode od AES accept lengths that aren't multiples of 16.
PR: 330
2002-11-12 11:00:25 +00:00
Bodo Möller
d742bd882e do tests with all built-in curves
Submitted by: Nils Larsch
2002-11-11 10:25:12 +00:00
Bodo Möller
97a06ad9ef corrections to built-in curves
Submitted by: Nils Larsch
2002-11-11 10:24:52 +00:00
Richard Levitte
c81a15099a X509_NAME_cmp() now compares PrintableString and emailAddress with a value of type
ia5String correctly.
PR: 244
2002-11-09 21:52:20 +00:00
Dr. Stephen Henson
491659c436 Typo in OCSP ASN1 module 2002-11-07 17:42:59 +00:00
Bodo Möller
e2916b2540 print less output (no details unless a test failed)
Submitted by: Nils Larsch
2002-11-06 11:48:09 +00:00
Dr. Stephen Henson
38c7271a39 Check for NULL ASN1_ITEM when initializeing
boolean option in ASN1_TYPE.
2002-11-05 13:48:33 +00:00
Bodo Möller
b53e44e572 implement and use new macros BN_get_sign(), BN_set_sign()
Submitted by: Nils Larsch
2002-11-04 13:17:22 +00:00
Richard Levitte
e5f4d8279d Off-by-one-error corrected.
PR: 235
2002-11-04 11:30:47 +00:00
Richard Levitte
db199abd9e Depend on OPENSSL_NO_STATIC_ENGINE rather than OPENSSL_NO_DYNAMIC_ENGINE.
Make sure to include openssl/opensslconf.h to make sure we get the
definition of those macros.
2002-11-01 12:37:22 +00:00
Richard Levitte
b6d0defb98 Remove all referenses to RSAref, since that's been gone for more than
a year.
2002-10-31 16:46:52 +00:00
Richard Levitte
242823c9bc New files have appeared, tell VMS. 2002-10-30 09:46:21 +00:00
Richard Levitte
40efa67248 Plug potential memory leak.
Identified by Goetz Babin-Ebell <babinebell@trustcenter.de>
2002-10-30 09:42:42 +00:00
Richard Levitte
b5148cf1f7 synchronise util/libeay.num with the 0.9.7-stable variant (guys, this
is something we really need to keep track of!).
make update
2002-10-29 14:48:57 +00:00
Bodo Möller
90a617e050 avoid warnings ('index' shadows global declaration)
Submitted by: Nils Larsch
2002-10-29 11:50:20 +00:00
Bodo Möller
259cdf2af9 Sun has agreed to removing the covenant language from most files.
Submitted by: Sheueling Chang <Sheueling.Chang@Sun.COM>
2002-10-29 10:59:32 +00:00
Bodo Möller
6c950e0dc9 'covenant HOWTO' (what to do about the Sun covenant if you modify the code)
Submitted by: Bodo Moeller
2002-10-29 10:58:07 +00:00
Richard Levitte
62dd6f161a The #else part of the conditionals have two statements, so they need
to be surrounded with braces, or the surrounding if..else will fail
miserably in case the #else part is compiled.
2002-10-29 09:42:59 +00:00
Bodo Möller
8ee4845b65 'broken' PKCS #8 format does not apply to ECDSA
Submitted by: Nils Larsch
2002-10-28 14:13:38 +00:00
Bodo Möller
19b8d06a79 clean up new code for NIST primes
create new lock CRYPTO_LOCK_BN to avoid race condition
2002-10-28 14:02:19 +00:00
Bodo Möller
5c6bf03117 fast reduction for NIST curves
Submitted by: Nils Larsch
2002-10-28 13:23:24 +00:00
Bodo Möller
f72ed6153b remove superfluous code
Submitted by: Nils Larsch
2002-10-28 13:19:08 +00:00
Richard Levitte
fbcd27907b External engines aren't in crypto/engine/ any more, so don't try to
build them there.

A command procedure to build the external engines is on it's way.
2002-10-24 19:15:30 +00:00
Richard Levitte
6cb686208e For the mkdef.pl to recognise if the "external" engines are inserted
into libcrypto, we need the "algorithm" STATIC_ENGINE.
2002-10-24 19:09:03 +00:00
Richard Levitte
ffd418f217 In my extreme debug mode, gcc complains that 'static' doesn't come
first.
2002-10-20 20:38:18 +00:00
Geoff Thorpe
0587ec2645 If dynamically-loadable ENGINEs are linked against a shared-library version
of libcrypto, then it is possible that when they are loaded they will share
the same static data as the loading application/library. This means it will
be too late to set memory/ERR/ex_data/[etc] callbacks, but entirely
unnecessary to try. This change puts a static variable in the core ENGINE
code (contained in libcrypto) and a function returning a pointer to it. If
the loaded ENGINE's return value from this function matches the loading
application/library's return value - they share static data. If they don't
match, the loaded ENGINE has its own copy of libcrypto's static data and so
the callbacks need to be set.

Also, although 0.9.7 hasn't been released yet, it's clear this will
introduce a binary incompatibility between dynamic ENGINEs built for 0.9.7
and 0.9.8 (though others probably exist already from EC_*** hooks and
what-not) - so the version control values are correspondingly bumped.
2002-10-18 20:45:38 +00:00
Geoff Thorpe
314c667050 - Remo Inverardi noticed that ENGINEs don't have an "up_ref" function in the
normal 'structural' case (ENGINE_init() satisfies this in the less normal
'functional' case). This change provides such a function.

- Correct some "read" locks that should actually be "write" locks.

- make update.
2002-10-16 01:29:37 +00:00
Richard Levitte
e15ea3d9e1 When BN_add_word() reaches top, it shouldn't try to add the the corresponding
word, since that word may not be zero.
2002-10-14 11:33:32 +00:00
Richard Levitte
677532629d makedepend complains when a header file is included more than once in
the same source file.
2002-10-14 10:02:36 +00:00
Richard Levitte
57d8ff79b2 Complete the VxWorks fix by implementing a NULL RAND_poll() for it.
PR: 253
2002-10-14 09:44:57 +00:00
Richard Levitte
4006c56036 Add more commentary. Check that *num is smaller than the block size. 2002-10-11 22:42:34 +00:00
Richard Levitte
1729588435 The AES CTR API was buggy, we need to save the encrypted counter as well
between calls, or that will be lost if it returned with *num non-zero.
2002-10-11 22:37:29 +00:00
Richard Levitte
75871dda4b Step 13 of move of engines: Remove old files. 2002-10-11 18:52:42 +00:00
Richard Levitte
aae329c447 Step 11c of move of engines: Time to make the changes to support
automatic load of dynamic engines.  Change the iterator to try to load
the requested engine dynamically.  The environment variable
OPENSSL_ENGINES can be used to override the internal default directory
where one can expect to find dynamically loadable engines.

Note: The changes in step 11 have all been made by Geoff Thorpe.
Credit where credit is due.
2002-10-11 18:49:55 +00:00
Richard Levitte
02acf1409e Step 11b of move of engines: Time to make the changes to support
automatic load of dynamic engines.  Add functionality to the dynamic
engine to handle engine directories and loading from those.  This
is currently NOT compatible with the use of LD_LIBRARY_PATH and
similar environment variables.

Note: The changes in step 11 have all been made by Geoff Thorpe.
Credit where credit is due.
2002-10-11 18:47:51 +00:00
Richard Levitte
6ac3309c74 Step 11a of move of engines: Time to make the changes to support
automatic load of dynamic engines.  Unless we don't have shared
library support, do not try to load any "built-in" engines except for
cryptodev.
2002-10-11 18:42:54 +00:00
Richard Levitte
1b15cfa11d Step 10 of move of engines: Change crypto/engine/Makefile.ssl so we
don't build any "built-in" engines in that directory any more, except
fo the cryptodev one.
2002-10-11 18:40:47 +00:00
Richard Levitte
76dfca879f Step 9 of move of engines: rename crypto/engine/hw_cryptodev.c to
eng_cryptodev.c.  This is an engine that (at least currently) has
to be built in.
2002-10-11 18:38:26 +00:00
Richard Levitte
832f9304fd Rhapsody had ftime, Darwin doesn't (any longer?) 2002-10-10 13:35:49 +00:00
Richard Levitte
6a89a25c27 Add a few more VxWorks targets.
Correct misspelled VXWORKS macros.
Add VXWORKS identifying macros to e_os2.h.
Add required inclusions and mappings for VxWorks in e_os.h.
A few small modifications to make OpenSSL build and work on VxWorks.
PR: 253, except for the  change that was handled in an earlier
         commit, and a request for easy build of just parts of OpenSSL.
2002-10-09 13:40:48 +00:00
Richard Levitte
001ab3abad 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:25:12 +00:00
Dr. Stephen Henson
74e3931f84 Various Win32 fixes.
Resolve signed/unsigned conflicts

Make dso_win32.c compile.
2002-10-06 12:14:55 +00:00
Dr. Stephen Henson
12dadc555f Oops, remove old comment out debugging printf... 2002-10-06 12:10:35 +00:00
Richard Levitte
b75b2225e5 Since crypt() isn't defined anywhere, define it locally in destest.c 2002-10-06 00:41:12 +00:00
Richard Levitte
12f27bd414 Please do not use C++ comments in C code. 2002-10-06 00:33:23 +00:00
Richard Levitte
69deec58fb Do not define crypt(). The supported function is DES_crypt() (an des_crypt()
when backward compatibility is desired).
2002-10-06 00:23:28 +00:00
Richard Levitte
6fed88113b For some reason, the random number support removed the destructor 2002-10-05 20:54:09 +00:00
Dr. Stephen Henson
3d840c827f make update 2002-10-04 21:16:58 +00:00
Dr. Stephen Henson
a2a1a04e53 Add declaration got PKCS#7 NDEF. 2002-10-04 21:08:01 +00:00
Richard Levitte
0638ced5cc Add random number generation capability to the cswift engine.
Should this be added to 0.9.6-stable as well?
PR: 275
2002-10-04 13:30:57 +00:00
Richard Levitte
e984b2af64 If we're loading libz dynamically, and COMP_zlib() is called more than once,
only the first call would provide the correct result.
PR: 277
2002-10-04 13:04:37 +00:00
Dr. Stephen Henson
9a48b07ee4 Various enhancements to PKCS#12 code, new
medium level API, improved PKCS12_create
and additional functionality in pkcs12
utility.
2002-10-03 23:53:52 +00:00
Dr. Stephen Henson
230fd6b7b6 Preliminary streaming ASN1 encode support. 2002-10-03 12:38:52 +00:00
Richard Levitte
20b33a015f Removal missing 2002-10-02 00:22:44 +00:00
Richard Levitte
293d5082c7 The OpenBSD project has replaced the first implementation of the /dev/crypto
engine with something they claim is better.  I have nothing to compare to,
and I assume they know what they're talking about.  The interesting part with
this one is that it's loaded by default on OpenBSD systems.
This change was originally introduced in OpenBSD's tracking of OpenSSL.
2002-10-02 00:19:33 +00:00
Richard Levitte
94960c8421 Make sure that the signal storage is regarded as volatile.
This correction was originally introduced in OpenBSD's tracking of OpenSSL.
2002-09-25 14:14:11 +00:00
Richard Levitte
cd98ab6491 Incorrect argument order to memset() 2002-09-25 12:52:13 +00:00
Richard Levitte
b3823ac64b Missing ; 2002-09-25 12:49:40 +00:00
Bodo Möller
e78f137899 really fix race condition
PR: 262
2002-09-23 14:25:07 +00:00
Ulf Möller
40e66398db use OPENSSL_SYS_MSDOS rather than __DJGPP__ to disable egd, this is not
compiler specific
2002-09-22 08:49:22 +00:00
Ulf Möller
6e32d0a74b make files didn't work on case insensitive filesystems 2002-09-22 08:44:03 +00:00
Bodo Möller
4c8f79a33e make sure 'neg' flag (which does not really matter for GF(2^m), but
could cause confusion for ECDSA) is set to zero

Submitted by: Sheueling Chang
2002-09-16 13:52:48 +00:00
Dr. Stephen Henson
48921e00fc Really fix PKCS7_set_detached this time... 2002-09-08 16:25:03 +00:00
Dr. Stephen Henson
f804930150 Fix typos in PKCS#12 ASN1 code.
Make PKCS7_set_detached work again.
2002-09-07 22:57:49 +00:00
Bodo Möller
65b1d31df5 change API for looking at the internal curve list
Submitted by: Nils Larsch
2002-09-02 07:08:33 +00:00
Dr. Stephen Henson
b499ed06d2 Fix ASN1_STRING_to_UTF8: remove non sensical !*out test. 2002-08-30 17:18:22 +00:00
Bodo Möller
6ff7c95843 don't memset(data,0,...) if data is NULL
Submitted by: anonymous
PR: 254
2002-08-29 11:45:40 +00:00
Geoff Thorpe
41cc7096b8 Fix a bug to allow the 4758 ENGINE to build as a DSO. 2002-08-28 19:11:08 +00:00
Bodo Möller
c237de058f don't write beyond buffer
Submitted by: Nils Larsch
2002-08-27 13:32:35 +00:00
Bodo Möller
34f1f2a81c less specific interface for EC_GROUP_get_basis_type
Submitted by: Nils Larsch, Bodo Moeller
2002-08-26 18:08:53 +00:00
Bodo Möller
8aefe253a7 move EC_GROUP_get_basis_type() from ec_lib.c to ec_asn1.c 2002-08-26 11:33:13 +00:00
Bodo Möller
7e31164ae0 ASN1 for binary curves
Submitted by: Nils Larsch
2002-08-26 11:25:54 +00:00
Dr. Stephen Henson
41ab00bedf Reinstate the check for invalid length BIT STRINGS,
which was effectively bypassed in the ASN1 changed.
2002-08-23 00:02:11 +00:00
Dr. Stephen Henson
fc85ac20c7 Make -nameopt work in req and add support for -reqopt 2002-08-22 23:43:48 +00:00
Dr. Stephen Henson
e88479243c Change C++ style comments 2002-08-22 23:03:04 +00:00
Dr. Stephen Henson
c787525ac8 #if out unused function to shut the compiler up. 2002-08-22 23:00:54 +00:00
Bodo Möller
64376cd8ff 'EC' vs. 'ECDSA'
Submitted by: Nils Larsch
2002-08-16 11:19:07 +00:00
Dr. Stephen Henson
3f6db7f518 Fix block_size field for CFB and OFB modes: it should be 1. 2002-08-16 01:53:24 +00:00
Richard Levitte
dcc426fcfe Yet a couple of modules forgotten. These weren't important for
OpenSSL itself, since they aren't used there (yet).  It became quite
visible qhen building a shared library, however...
2002-08-15 09:39:01 +00:00
Bodo Möller
7eb18f1237 Simplify handling of named curves: get rid of EC_GROUP_new_by_name(),
EC_GROUP_new_by_nid() should be enough.  This avoids a lot of
redundancy.

Submitted by: Nils Larsch
2002-08-15 09:21:31 +00:00
Richard Levitte
265e892fed Sometimes, the value of the variable containing the compiler call can
become rather large.  This becomes a problem when the default 1024
character large buffer that WRITE uses isn't enough.  WRITE/SYMBOL
uses a 2048 byte large buffer instead.
2002-08-15 08:28:38 +00:00
Dr. Stephen Henson
2af52de7b5 Fix typo in OBJ_txt2obj which incorrectly passed the content
length, instead of the encoding length to d2i_ASN1_OBJECT.

This wasn't visible before becuse ASN1_get_object() used
to read past the length of the supplied buffer.
2002-08-14 00:48:02 +00:00
Richard Levitte
e09efcf71a Comma forgotten. 2002-08-13 11:49:47 +00:00
Richard Levitte
763b4dcc66 Oh, ec2_smpt.c is #included by ec2_smpl.c! 2002-08-13 11:47:26 +00:00
Richard Levitte
83348e0b80 Do not include openssl/ripemd.h when the RIPEMD algorithm has been deselected.
PR: 216, point 1
2002-08-12 21:22:00 +00:00
Richard Levitte
f13ddd5d0a Do not use the word 'modulus', which is a class template name in VC++ 6.0/SP5.
PR: 216, point 3
2002-08-12 21:20:25 +00:00
Richard Levitte
b2a4e959c9 A few files in the ENGINE and EVP sections forgotten. 2002-08-12 13:31:57 +00:00
Bodo Möller
5488bb6197 get rid of EVP_PKEY_ECDSA (now we have EVP_PKEY_EC instead)
Submitted by: Nils Larsch
2002-08-12 08:47:41 +00:00
Richard Levitte
fd9a4dbe94 One more file to compile on VMS as well. 2002-08-11 12:27:28 +00:00
Richard Levitte
f0db0ed35d Remove clashes between symbols that have the same name except for
casing.
2002-08-11 12:23:08 +00:00
Richard Levitte
6d24cbf452 More long symbols to shorten. 2002-08-11 11:50:32 +00:00
Richard Levitte
5454829ae6 mem* functions are declared in string.h. 2002-08-10 01:36:14 +00:00
Richard Levitte
4705bd9b37 A new header. 2002-08-09 22:34:57 +00:00
Richard Levitte
5bd90983bc Synchronise with Unix.
(I expect the next run will generate lots of errors on VMS :-)).
2002-08-09 22:32:32 +00:00
Richard Levitte
329f981582 More long names to shorten. 2002-08-09 22:23:33 +00:00
Bodo Möller
cece7adcee .cvsignore for crypto/ecdh 2002-08-09 12:17:03 +00:00
Bodo Möller
74cc4903ef make update 2002-08-09 12:16:15 +00:00
Bodo Möller
41fdcfa71e fix warnings 2002-08-09 11:58:28 +00:00
Bodo Möller
60cc56b1a9 add field type to text output
don't print seed value as a number (leading zeros must not be removed)

Submitted by: Nils Larsch
2002-08-09 10:44:44 +00:00
Bodo Möller
f912e9293f use 0, not NULL
Submitted by: Nils Larsch
2002-08-09 09:39:53 +00:00
Bodo Möller
56939728b7 ECDH engine support
Submitted by: Douglas Stebila
2002-08-09 09:39:11 +00:00
Bodo Möller
e172d60ddb Add ECDH support.
Additional changes:
 - use EC_GROUP_get_degree() in apps/req.c
 - add ECDSA and ECDH to apps/speed.c
 - adds support for EC curves over binary fields to ECDSA
 - new function EC_KEY_up_ref() in crypto/ec/ec_key.c
 - reorganize crypto/ecdsa/ecdsatest.c
 - add engine support for ECDH
 - fix a few bugs in ECDSA engine support

Submitted by: Douglas Stebila <douglas.stebila@sun.com>
2002-08-09 08:43:04 +00:00
Bodo Möller
14a7cfb32a use a generic EC_KEY structure (EC keys are not ECDSA specific)
Submitted by: Nils Larsch
2002-08-07 10:49:54 +00:00
Bodo Möller
7a8645d171 avoid SIGSEGV
Submitted by: Nils Larsch, Douglas Stebila
2002-08-07 07:53:47 +00:00
Bodo Möller
d28735a05b oops, undo previous change (was just for testing) 2002-08-03 18:28:34 +00:00
Bodo Möller
183847747a fix bn_expand2 2002-08-03 18:27:47 +00:00
Bodo Möller
bac6012308 use bn_wexpand instead of bn_expand2 (the latter is not needed here,
and it does not yet work correctly)

Submitted by: Douglas Stebila
2002-08-03 17:51:29 +00:00
Dr. Stephen Henson
aaa384ca1a Fix typo 2002-08-02 18:58:33 +00:00
Dr. Stephen Henson
f908226898 Fix the ASN1 sanity check: correct header length
calculation and check overflow against LONG_MAX.
2002-08-02 18:48:55 +00:00
Bodo Möller
909abce800 disable Sun divison algorithm by default 2002-08-02 18:26:02 +00:00
Bodo Möller
33d4e690cc fix bn_expand2 2002-08-02 18:23:55 +00:00
Bodo Möller
848c849584 optical changes 2002-08-02 17:25:05 +00:00
Bodo Möller
102c8f47bf typo 2002-08-02 15:28:31 +00:00
Bodo Möller
d3bcbba45c remove obsolete part of comment 2002-08-02 15:13:10 +00:00
Bodo Möller
0903e56196 remove obsoleted disabled code 2002-08-02 15:07:08 +00:00
Bodo Möller
95ecacf8a2 Let BN_rand_range() abort with an error after 100 iterations
without success.
2002-08-02 15:02:03 +00:00
Bodo Möller
6fb60a84dd Change BN_mod_sqrt() so that it verifies that the input value is
really the square of the return value.
2002-08-02 14:57:53 +00:00
Bodo Möller
5af7d1a3b8 move GF2m tests to the end 2002-08-02 14:49:59 +00:00
Bodo Möller
35b73a1f20 Rename implementations of method functions so that they match
the new method names where _GF... suffixes have been removed.

Revert changes to ..._{get/set}_Jprojective_coordinates_...:
The current implementation for ECC over binary fields does not use
projective coordinates, and if it did, it would not use Jacobian
projective coordinates; so it's OK to use the ..._GFp prefix for all
this.

Add author attributions to some files so that it doesn't look
as if Sun wrote all of this :-)
2002-08-02 14:28:37 +00:00
Bodo Möller
84d7e365a0 ec2_smpt.c must be listed in LIBSRC 2002-08-02 13:50:12 +00:00
Bodo Möller
64c3da230f there is no alternative EC_METHOD for curves over GF(2^m) (yet) 2002-08-02 13:43:26 +00:00
Bodo Möller
7793f30e09 add support for elliptic curves over binary fields
Submitted by: Duglas Stebila <douglas.stebila@sun.com>,
              Sheueling Chang <sheueling.chang@sun.com>

(CHANGES entries by Bodo Moeller)
2002-08-02 13:42:24 +00:00
Bodo Möller
1dc920c8de Binary field arithmetic contributed by Sun Microsystems.
The 'OPENSSL_NO_SUN_DIV' default is still subject to change,
so I didn't bother to finish the CHANGES entry yet.

Submitted by: Douglas Stebila <douglas.stebila@sun.com>, Sheueling Chang <sheueling.chang@sun.com>
(CHANGES entry by Bodo Moeller)
2002-08-02 13:03:55 +00:00
Bodo Möller
16dc1cfb5c Add more WAP/WTLS elliptic curve OIDs.
Submitted by: Douglas Stebila <douglas.stebila@sun.com>
2002-08-02 12:28:34 +00:00
Bodo Möller
819ff32dc4 New error code ERR_R_DISABLED
Submitted by: Douglas Stebila <douglas.stebila@sun.com>
2002-08-02 12:27:21 +00:00
Bodo Möller
5574e0ed41 get rid of OpenSSLDie 2002-08-02 11:48:15 +00:00
Richard Levitte
ba8fb52183 Certain flag macros were tested with #if instead if #ifdef... 2002-08-02 11:13:37 +00:00
Richard Levitte
456bc309d8 make update 2002-08-01 19:45:54 +00:00
Richard Levitte
44c09667ff Avoid yet another name clash with libdes, and make the declaration consistent
with the definition.
2002-08-01 19:30:58 +00:00
Richard Levitte
bd45950f4a OCSP and KRB5 Makefil.ssl should be consistent with all the others 2002-08-01 14:18:52 +00:00
Richard Levitte
0472883cc2 If CRYPTO_realloc() is called with a NULL pointer, have it call
OPENSSL_malloc().
PR: 187
2002-08-01 10:08:37 +00:00
Richard Levitte
e70a39830c Make sure to use $(MAKE) everywhere instead of make.
Part of PR 181
2002-07-31 13:49:06 +00:00
Richard Levitte
6297bcd74c The version of the shared library should, for now, reflect the version
of OpenSSL.
Part of PR 181.
2002-07-31 13:24:26 +00:00
Lutz Jänicke
c046fffa16 OpenSSL Security Advisory [30 July 2002]
Changes marked "(CHATS)" were sponsored by the Defense Advanced
Research Projects Agency (DARPA) and Air Force Research Laboratory,
Air Force Materiel Command, USAF, under agreement number
F30602-01-2-0537.
2002-07-30 13:04:04 +00:00
Lutz Jänicke
3aecef7697 "make update" 2002-07-30 12:44:33 +00:00
Bodo Möller
0bee0e6294 Use SEC1 format for EC private keys.
This is not ECDSA specific, so it's now PEM_STRING_ECPRIVATEKEY etc.

Submitted by: Nils Larsch <nlarsch@compuserve.de>
2002-07-26 08:41:04 +00:00
Bodo Möller
12593e6f45 Move zeroing from bn_expand_internal() to bn_expand2() so that it
happens reliably, even if the BIGNUM is already sufficiently large.

[Note that the bn_expand()/bn_wexpand() macros call bn_expand2() only
if the BIGNUM actually has to grow, so this change does not add any
new overhead as currently bn_expand2() is never called directly.]
2002-07-25 12:12:39 +00:00
Richard Levitte
546405bece Don't clobber loop variable.
PR: 159
2002-07-24 14:43:00 +00:00
Richard Levitte
6d9116f83d If DH is disabled, don't define the DH functions.
Notified by Kim Hellan <KHE@kmd.dk>
2002-07-22 14:18:11 +00:00
Richard Levitte
7a5ed919ad The first compile of the new merger method for VMS *almost* got
through.  That's not enough, is it?  :-)
2002-07-19 11:57:17 +00:00
Richard Levitte
799d7a34cf Two more names that are a little too long for the standard VMS linker. 2002-07-19 11:56:02 +00:00
Richard Levitte
ec9ea6a3c8 Further enhance assembler support on Cygwin and DJGPP.
Make pod2mantest useable on DOS-based systems.
Part of PR 75, the rest is still under investigation.
2002-07-18 12:37:59 +00:00
Richard Levitte
ca6dde5d3d Reverse the change with the following log, it needs further investigation:
Make S/MIME output conform with the mail and MIME standards.
PR: 151
2002-07-18 10:39:20 +00:00
Richard Levitte
8e6cbcd7c0 Make S/MIME output conform with the mail and MIME standards.
PR: 151
2002-07-18 08:47:33 +00:00
Richard Levitte
32bf74e30e OPENSSL_SYS_WIN32 is important so util/mkdef.pl can detect it 2002-07-18 06:34:34 +00:00
Richard Levitte
cd4c36adb8 Add support for shared libraries with OS/2.
PR: 124
2002-07-17 13:27:43 +00:00
Richard Levitte
6789b41d86 The default C compiler on MacOS X doesn't like empty object files 2002-07-16 10:46:00 +00:00
Richard Levitte
b23f50e67e Some older code (never committed) wasn't converted to the new format.
Corrected.
2002-07-16 08:02:31 +00:00
Richard Levitte
cbecb3ac37 There's an ongoing project to bring some kind of path selection
mechanism to the ENGINE framework.  This means there there are going
to be new functionality for the DSO part, and ultimately some way of
merging two file specifications together.

This commit places the merging code into the repository.  It's
currently not used anywhere, and hasn't been tested at all.  It may be
full of errors, including syntactical ones.  Those will be fixed as
promptly as possible.
2002-07-15 15:35:40 +00:00
Bodo Möller
5dbd3efce7 Replace 'ecdsaparam' commandline utility by 'ecparam'
(the same keys can be used for ECC schemes other than ECDSA)
and add some new options.

Similarly, use string "EC PARAMETERS" instead of "ECDSA PARAMETERS"
in 'PEM' format.

Fix ec_asn1.c (take into account the desired conversion form).

'make update'.

Submitted by: Nils Larsch
2002-07-14 16:54:31 +00:00
Richard Levitte
b57c98df7b In UI_UTIL_read_pw(), we should look at the size parameter, not at BUFSIZ.
Submitted by Götz Babin-Ebell <babinebell@trustcenter.de>
2002-07-11 09:12:29 +00:00
Bodo Möller
5c9396e37c remove obsolete comment 2002-07-10 08:39:05 +00:00
Lutz Jänicke
7b63c0fa8c Reorder inclusion of header files:
des_old.h redefines crypt:
#define crypt(b,s)\
        DES_crypt((b),(s))

This scheme leads to failure, if header files with the OS's true definition
of crypt() are processed _after_ des_old.h was processed. This is e.g. the
case on HP-UX with unistd.h.
As evp.h now again includes des.h (which includes des_old.h), this problem
only came up after this modification.
Solution: move header files (indirectly) including e_os.h before the header
files (indirectly) including evp.h.
Submitted by:
Reviewed by:
PR:
2002-07-10 07:01:54 +00:00
Bodo Möller
ea4f109c99 AES cipher suites are now official (RFC3268) 2002-07-04 08:51:09 +00:00
Richard Levitte
40c5cae24a Do not define crypt() on OpenBSD. Notified by Bob Beck of OpenBSD. 2002-06-29 22:04:09 +00:00
Richard Levitte
cce9396dc9 opensslconf.h doesn't define what we want, e_os2.h does.
PR 123
2002-06-27 17:19:55 +00:00
Richard Levitte
47f3eafb8d Try to avoid double declaration of ERR_load_PEM_strings().
PR 71
2002-06-27 17:06:28 +00:00
Richard Levitte
17085b022c Pass CFLAG to dependency makers, so non-standard system include paths are
handled properly.
Part of PR 75
2002-06-27 16:39:25 +00:00
Richard Levitte
4367eb8706 DJGPP has some needed header files that other MSDOS/Windows compilers don't have.
Part of PR 75
2002-06-27 16:32:04 +00:00
Richard Levitte
fb96d9d90d When compiling for Windows, make sure we have the windows definitions declared.
Part of PR 123
2002-06-27 14:55:52 +00:00
Richard Levitte
e1a32c1807 Use 32-bit sections instead of the default, 16-bit ones.
Part of PR 123
2002-06-27 14:54:34 +00:00
Richard Levitte
0df748e7e2 Use bg instead of bag as argument to macros, to avoid clashes with
structure field names.
PR: 112
2002-06-27 09:54:07 +00:00
Richard Levitte
4942ef6f0e A number of includes were removed from evp.h some time ago. The reason
was that they weren't really needed any more for EVP itself.  However,
it seems like soma applications (I know about OpenSSH, but there may
be more) used evp.h as the 'load all' header file, which makes sense
since we try our best to promote the use of EVP instead of the lower
level crypto algorithms.  Therefore, I put the inclusions back so
the application authors don't get too shocked by all the errors they
would otherwise get.

Thanks to Theo de Raadt for making us aware of this.
2002-06-27 05:03:00 +00:00
Bodo Möller
9ae08a9c04 Make sure buffers are large enough even for weird parameters
Submitted by: Nils Larsch
2002-06-26 14:28:41 +00:00
Geoff Thorpe
a6c6874a1a Make sure any ENGINE control commands make local copies of string
pointers passed to them whenever necessary. Otherwise it is possible the
caller may have overwritten (or deallocated) the original string data
when a later ENGINE operation tries to use the stored values.

Submitted by: Götz Babin-Ebell <babinebell@trustcenter.de>
Reviewed by: Geoff Thorpe
PR: 98
2002-06-21 02:38:08 +00:00
Lutz Jänicke
a947f2d2b6 <sys/select.h> is included for AIX, when USE_SOCKETS is defined.
Submitted by: Bernhard Simon <bs@bsws.zid.tuwien.ac.at>
Reviewed by:
PR:
2002-06-20 20:49:27 +00:00
Lutz Jänicke
da0616cd13 AIX (V3) requires <sys/select.h> (included via e_os.h) for fd_set.
Submitted by: Bernhard Simon <bs@bsws.zid.tuwien.ac.at>
Reviewed by:
PR:
2002-06-20 17:32:04 +00:00
Bodo Möller
3f2f3d4264 always include <string.h> (we do this in various other header files,
so it can't be bad)
2002-06-18 09:36:02 +00:00
Bodo Möller
c4c2c61e8c always include <string.h> (we do this in various other header files,
so it can't be bad)

PR: 102
2002-06-18 09:35:43 +00:00
Bodo Möller
5f3d6f70f6 Implement handling of EC parameter seeds (new functions
EC_GROUP_set_seed(), EC_GROUP_get0_seed(), EC_GROUP_get_seed_len()).

New functions ECPKParameters_print(), ECPKParameters_print_fp().

Submitted by: Nils Larsch
2002-06-18 08:38:59 +00:00
Lutz Jänicke
bdb6171334 OpenSSL_add_all_algorithms has been replaced by configuration dependent
functions and is redirected by macros. Switch it off now, possible removal
later.
2002-06-16 10:18:25 +00:00
Lutz Jänicke
65ee74fbc7 Some more prototype fixes.
Use DECLARE macros in asn1* instead of direct declaration.
Submitted by: Goetz Babin-Ebell <babinebell@trustcenter.de>
Reviewed by:
PR: 89
2002-06-14 19:01:52 +00:00
Richard Levitte
451dc18f10 Add support for DJGPP.
PR: 75
2002-06-13 20:42:35 +00:00
Richard Levitte
1ef5026ef9 Making a softlink from crypto/des/asm/perlasm to crypto/perlasm isn't
strictly necessary, so let's not do that.
2002-06-13 19:42:37 +00:00
Lutz Jänicke
40889b9cd3 Add missing prototypes.
Submitted by: Goetz Babin-Ebell <babinebell@trustcenter.de>
PR: 89
2002-06-13 17:40:27 +00:00
Dr. Stephen Henson
99889b46c9 Fix ext_dat.h extension ordering.
Reinstate -reqout code.

Avoid coredump in ocsp if setup_verify
fails.

Fix typo in ocsp usage message.
2002-06-13 12:56:27 +00:00
Lutz Jänicke
82869b3c8d Add OIDs for Secure Electronic Transactions (SET)
Submitted by: Vadim Fedukovich <vf@unity.net>
Reviewed by: Lutz Jaenicke
PR: 80
2002-06-13 11:52:56 +00:00
Dr. Stephen Henson
04cc76660a The new ASN1 code automatically allocates
structures for fields that are not OPTIONAL.

However in the AUTHORITY_INFO_ACCESS case
the 'location' field was set to NULL in
the old code.

So in 0.9.7+ we should free up the field before
overwriting it in v2i_AUTHORITY_INFO_ACCESS.
2002-06-13 00:43:27 +00:00
Bodo Möller
254ef80db1 simplify asn1_flag
Submitted by: Nils Larsch
Reviewed by: Bodo Moeller
2002-06-12 14:01:17 +00:00
Ben Laurie
d15711efc6 Handle read errors. 2002-06-11 12:41:37 +00:00
Ben Laurie
25ace3ed25 Fix warnings. 2002-06-11 12:03:51 +00:00
Bodo Möller
012c86ab74 move ECC ASN1 that is not specific to ECDSA into crypto/ec/,
and make some appropriate changes to the EC library.

Submitted by: Nils Larsch
2002-06-10 12:41:18 +00:00
Bodo Möller
458c29175e move ECC ASN1 that is not specific to ECDSA into crypto/ec/,
and make some appropriate changes to the EC library.

Submitted by: Nils Larsch
2002-06-10 12:18:21 +00:00
Bodo Möller
8a5dbb0a2e fix for 'make update' 2002-06-10 11:46:32 +00:00
Bodo Möller
532203cdb0 remove unnecessary calls to EC_POINT_copy() 2002-06-10 11:02:55 +00:00
Bodo Möller
c6c0e4cb32 fix memory leak
Submitted by: Nils Larsch
2002-06-06 10:33:05 +00:00
Lutz Jänicke
0f7b63c834 Make sure that settings are passed back and forth when walking around
in the tree during build.
Reinstall default PERL settings in Makefiles, as the real reason for the
failure was that the settings were not passed.
2002-06-06 10:16:59 +00:00
Lutz Jänicke
345731731a New OID for X509 usage: pseudonym
Submitted by: Michael Bell <michael.bell@rz.hu-berlin.de>
Reviewed by: Lutz Jaenicke
PR: 83
2002-06-06 07:33:00 +00:00
Richard Levitte
b6fc2386f0 It's not good to have a pointer point at something in an inner block.
PR: 66
2002-06-05 13:47:29 +00:00
Richard Levitte
9f353dd662 Check errors when parsing a PKCS8INF PEM FILE, or there will be a core dump on error.
PR: 77
2002-06-05 11:58:29 +00:00
Richard Levitte
c8062c3a5e Since there's no continuation, the ; can go as well :-) 2002-06-05 09:08:41 +00:00
Lutz Jänicke
05c08fc708 There is no continuation at this point. 2002-06-05 08:00:36 +00:00
Lutz Jänicke
bb0db9c491 The correct PERL interpreter is passed via commandline. 2002-06-05 07:03:17 +00:00
Richard Levitte
6631a7e7f1 use sstrsep() to get the proper type to aoti().
Remove unneeded cast in ustrsep().
PR: 69
2002-06-03 15:27:46 +00:00
Richard Levitte
78055aa6a5 Add the AES test vectors from NIST document SP800-38A. 2002-05-31 13:13:43 +00:00
Richard Levitte
e6bd5e8a6d Make it possible to give vectors only for decryption or encryption. 2002-05-31 13:12:49 +00:00
Richard Levitte
94f1b50c0f For CFB and OFB modes, always create the encryption key. 2002-05-31 13:11:44 +00:00
Richard Levitte
bd54d55c1d Declare the CFB and OFB modes for AES, and prepare for a declaration
of CTR mode.
2002-05-31 13:08:53 +00:00
Richard Levitte
09c70c3261 In CFB mode, the iv is always encrypted. 2002-05-31 13:07:39 +00:00
Richard Levitte
1ed0c6621b Reformat the CFLAG string so it can be made part of a C string.
Incidently, this works pretty well on the command line as well.
PR: 52
2002-05-30 18:06:35 +00:00
Richard Levitte
9cdf87f194 Check the return values where memory allocation failures may happen.
PR: 49
2002-05-30 16:47:45 +00:00
Richard Levitte
dbdc5d14d3 Correct AES counter mode, which incorrectly incremented the counter before
using it.
PR: 56
2002-05-30 14:06:06 +00:00
Bodo Möller
6cbe638294 New functions EC_POINT_point2bn(), EC_POINT_bn2point(), EC_POINT_point2hex(), EC_POINT_hex2point()
Submitted by: Nils Larsch
2002-05-30 13:16:03 +00:00
Dr. Stephen Henson
08241a5814 Make i2c_ASN1_BIT_STRING return the correct length. 2002-05-29 23:14:01 +00:00
Richard Levitte
3d27b1fa85 Set DLOPEN_FLAG the same way on NetBSD as on OpenBSD.
PR: 58, submitted by andrew@cis.uoguelph.ca
2002-05-29 21:00:08 +00:00
Richard Levitte
02cbedc387 Make sure short aliases are used where required. 2002-05-23 13:52:36 +00:00
Richard Levitte
e5d814d040 Define a short alias for another long EC symbol. 2002-05-23 13:34:38 +00:00
Richard Levitte
b09f4fb271 Make sure ECDSA is built and tested on VMS.
Avoid loops if linking an application fails.
2002-05-23 13:33:55 +00:00
Richard Levitte
1f4eada3b4 Make sure ECDSA is built and tested on VMS. 2002-05-23 13:33:08 +00:00
Richard Levitte
b935754cb0 Allow the use of the TCP/IP stack keyword TCPIP and NONE 2002-05-22 11:37:20 +00:00
Richard Levitte
396bc53593 Use OPENSSL_SYS_VMS instead of just VMS 2002-05-22 11:35:45 +00:00
Bodo Möller
7711de24f9 accept NULL in 'free' functions 2002-05-21 08:59:57 +00:00
Dr. Stephen Henson
0fccb00b5b Add missing EVP_CIPHER_CTX_init call. 2002-05-18 23:43:10 +00:00
Bodo Möller
46ffee4792 fix EVP_dsa_sha macro
Submitted by: Nils Larsch
2002-05-16 12:51:18 +00:00
Dr. Stephen Henson
544a2aea4b Zero cipher_data in EVP_CIPHER_CTX_cleanup
Add cleanup calls to evp_test.c

Allow reuse of cipher contexts by removing
automatic cleanup in EVP_*Final().
2002-05-15 18:49:25 +00:00
Bodo Möller
60e5f36d27 make b_print.c consistent with the rest of OpenSSL:
disable assert() except for debug builds
2002-05-14 19:40:58 +00:00
Dr. Stephen Henson
e9ba69631b EVP_SealFinal should return a value. 2002-05-11 17:37:08 +00:00
Dr. Stephen Henson
dc014d43af Fallback to normal multiply if n2 == 8 and dna or dnb is not zero
in bn_mul_recursive.

This is (hopefully) what was triggering bignum errors on 64 bit
platforms and causing the BN_mod_mul test to fail.
2002-05-10 22:18:13 +00:00
Dr. Stephen Henson
2f9cf160e4 Avoid gcc warning: BN_DEC_CONV when SIXTY_FOUR_BIT is defined is unsigned. 2002-05-10 22:07:37 +00:00