Commit graph

669 commits

Author SHA1 Message Date
Bodo Möller
458cddc104 Have CRYPTO_MDEBUG_TIME automatically set CRYPTO_MDEBUG,
and make it the default for some debugging configurations.
1999-07-19 09:25:35 +00:00
Bodo Möller
3dff94c2e4 Add optional (compile-time configurable) time to CRYPTO_mem_leaks output.
This is much more helpful than the counter when doing tests with the library
interactively.
1999-07-18 22:39:45 +00:00
Bodo Möller
dc347119e6 "make clean" has to delete date.h 1999-07-17 15:17:14 +00:00
Ulf Möller
cfa3747ba9 More DES library cleanups: remove references to srand/rand
and delete an unused file.
1999-07-15 23:47:02 +00:00
Ulf Möller
4f6235f701 RSA private keys without dmp1/dmq1/iqmp are also valid (but slower). 1999-07-15 23:45:04 +00:00
Ulf Möller
9a3bbbce91 NO_HMAC. 1999-07-15 23:44:04 +00:00
Dr. Stephen Henson
924154d9f2 Eliminate a warning: BN_mod_inverse() returns a (BIGNUM *) and remove and
unnecessary cast.
1999-07-13 00:00:05 +00:00
Bodo Möller
7eea36bb48 cosmetic changes 1999-07-12 18:50:34 +00:00
Dr. Stephen Henson
bbdb543844 More NASM support code it still doesn't work but it doesn't work less than it
didn't work before :-)
1999-07-12 18:12:43 +00:00
Bodo Möller
d9f0016bc5 typo in string 1999-07-12 16:46:28 +00:00
Dr. Stephen Henson
72e2ffee20 Beginnings of experimental support for NASM assembler. This is a free
assembler for various X86 platforms including Win32. It can output object files
that VC++ will tolerate so it could be used to provide assembly language support
to Win32 without the need for MASM.

This is preliminary stuff: it doesn't even work yet.
1999-07-12 12:33:16 +00:00
Bodo Möller
3a55fc1aab correct error handling
insert spaces in products that occur in error codes
1999-07-12 09:46:34 +00:00
Bodo Möller
8735ee6f5d typo 1999-07-11 22:06:54 +00:00
Bodo Möller
6519b2cb92 New function RSA_check_key. 1999-07-11 22:01:41 +00:00
Bodo Möller
03cd49447f New function RSA_check_key,
openssl rsa -check
1999-07-11 22:00:55 +00:00
Dr. Stephen Henson
f598cd13a3 Various changes to stop VC++ choking under Win32. 1999-07-11 17:09:04 +00:00
Dr. Stephen Henson
f513939ebb Add a debugging option to PKCS#5 v2.0 key generation function. 1999-07-11 12:40:46 +00:00
Dr. Stephen Henson
0ab8beb480 Copy flags in ASN1_STRING_dup() 1999-07-11 12:30:55 +00:00
Dr. Stephen Henson
f8be08d200 SXnet code was freeing up the extension data rather than the temporary
zone number.
1999-07-10 12:48:31 +00:00
Bodo Möller
777ab7e611 Fix memory checking. 1999-07-09 16:27:30 +00:00
Ulf Möller
a026fd201f Obsolete/experimental code. 1999-07-09 15:23:11 +00:00
Bodo Möller
5685dcd445 improve readability of #if conditions (ELF, if defined, supersedes BSDI
[which we don't really define if ELF is defined, but who knows])
1999-07-06 17:28:29 +00:00
Bodo Möller
c91b5c717c avoid confliction definitions of NDEBUG 1999-07-05 11:01:16 +00:00
Bodo Möller
e334d78b87 Disable asserts for standard configurations. 1999-07-05 10:18:51 +00:00
Ulf Möller
5271ebd9a3 More no-xxx option tweaks. 1999-06-30 00:42:56 +00:00
Ulf Möller
5676d8cb76 Fix no-hmac and no-ripemd. 1999-06-29 23:52:08 +00:00
Dr. Stephen Henson
ce8b257413 New functions to allow RSA_METHODs to be changed without poking round in
RSA structure internals.
1999-06-29 22:22:42 +00:00
Ulf Möller
e371828067 Use "long long" for all Win32 gcc ports. 1999-06-28 16:17:38 +00:00
Bodo Möller
7722424462 With mingw32, use "long long" rather than "_int64" (the latter does
not work, at least the package mentioned in INSTALL.W32 does not know
about it).
1999-06-28 14:38:31 +00:00
Bodo Möller
baac3b4b5f Close another memory hole. 1999-06-25 13:49:55 +00:00
Bodo Möller
227cd06ffe Avoid some memory holes, one of which was pointed out by
"Chad C. Mulligan" <mulligan@antipope.org>.
1999-06-25 13:41:35 +00:00
Dr. Stephen Henson
034292ad6a Fix d2i_ASN1_INTEGER() and i2d_ASN1_INTEGER() so it correctly works out
the length of negative integers.
1999-06-24 01:50:27 +00:00
Bodo Möller
946cbf67af Don't use inline assembler when configured for "no-asm". 1999-06-23 12:18:31 +00:00
Dr. Stephen Henson
170afce58d New function PKCS7_signatureVerify to allow the signing certificate to
be explicitly stated with PKCS#7 verify.

Also fix for util/mkerr.pl: if the -nostatic option is being used this will be
for an external library so the autogenerated C file should include the
header file as:
#include "any/path/to/header.h"
rather than the internal library form:
#include <openssl/header.h>
1999-06-22 13:33:22 +00:00
Dr. Stephen Henson
dbd665c210 Change the PEM_* function prototypes to use DECLARE_PEM macros and change
util/mkdef.pl to handle this. Also do a 'make update'.
1999-06-22 01:38:31 +00:00
Dr. Stephen Henson
66ab08b1cf Implement STACK_OF(ANS1_OBJECT) for extended key usage extension, change the
documentation to reflect the STACK_OF(CONF_VALUE) change to the CONF lib and
use ANSI typedefs for X509V3_EXT_I2D and X509V3_EXT_FREE.
1999-06-21 23:59:09 +00:00
Ben Laurie
10cea23bd4 Don't shadow. 1999-06-21 10:08:56 +00:00
Bodo Möller
a6c1b3a9ac "make update" 1999-06-21 10:04:48 +00:00
Dr. Stephen Henson
ba404b5e86 Convert the CONF library to use a typesafe stack: a STACK_OF(CONF_VALUE). It
seemed like a good idea at the time... several hours later it was rather
obvious that these are used all over the place making the changes rather
extensive.
1999-06-20 22:18:16 +00:00
Dr. Stephen Henson
8623f693d9 New functions CONF_load_bio() and CONF_load_fp() to load a configuration
file from a bio or fp. Added some more constification to the BN library.
1999-06-20 17:36:11 +00:00
Bodo Möller
a111306bbc New function CRYPTO_num_locks. 1999-06-18 16:14:18 +00:00
Bodo Möller
2de625408a Use same name in the definition as in the header file declaration :-/
(the extra "get" makes the name quite long, but otherwise it'd sound
as if you could request something rather than obtain information
about what the peer did).
1999-06-18 12:28:29 +00:00
Bodo Möller
2eae234023 Some people don't have /dev/fd/0 on Solaris, so use - instead. 1999-06-15 23:17:09 +00:00
Bodo Möller
6c82fda2dd Don't try to use zero-byte buffers. 1999-06-15 18:07:44 +00:00
Bodo Möller
b52d109518 long obsolete 1999-06-14 15:51:26 +00:00
Bodo Möller
11e4b79a3a rc4_locl.h and bf_locl.h incorrectly defined _HEADER_...;
opensslconf.h always expects HEADER_... (no leading underscore).

Submitted by: Andy Polyakov <appro@fy.chalmers.se>
1999-06-14 14:48:25 +00:00
Bodo Möller
d7fcc7f6c6 Bugfix. 1999-06-12 11:07:52 +00:00
Bodo Möller
e0f12c41de Avoid some warnings (on silly compilers). 1999-06-12 09:52:44 +00:00
Bodo Möller
95d29597b7 BIO pairs. 1999-06-12 01:03:40 +00:00
Dr. Stephen Henson
9bce3070ac Fix to i2d_DSAPublicKey() to return the correct length.
Submitted by: Jeon KyoungHo <khjeon@sds.samsung.co.kr>
1999-06-11 22:30:45 +00:00
Dr. Stephen Henson
565d1065c3 Document the X509V3 code and change some of the extension function pointers
to use 'void *' rather than 'char *' for an "arbitrary extension".
1999-06-11 01:58:42 +00:00
Ben Laurie
84757d677f Fix warnings. 1999-06-10 19:45:25 +00:00
Bodo Möller
247cf8d279 Avoid warning. 1999-06-10 18:03:14 +00:00
Dr. Stephen Henson
b7d135b353 Two new functions to write out PKCS#8 private keys. Also fixes for some of
the the PBE code and a new constant PKCS5_DEFAULT_ITER for the default
iteration count if it is passed as zero.
1999-06-10 17:32:52 +00:00
Bodo Möller
d58d092bc9 Avoid warnings. 1999-06-10 16:29:32 +00:00
Bodo Möller
0b977773d2 Repair PEM_write_PrivateKey and PEM_write_bio_PrivateKey. 1999-06-09 23:12:08 +00:00
Ulf Möller
adc7fe123b Circumvent bug in SC5 without patch #107357-01.
Submitted by: Andy Polyakov <appro@fy.chalmers.se>
1999-06-09 21:13:27 +00:00
Dr. Stephen Henson
f62676b92d Change the PEM function implementation to use a common set of macros: this
should make modifying them easier.

Fix the selfsign demo: it was rather ancient and used deleted functions.
1999-06-09 18:05:30 +00:00
Bodo Möller
a7bd03960c des_cbc_encrypt / des_ncbc_encrypt issue. 1999-06-09 18:01:49 +00:00
Bodo Möller
5765e24f14 Update dependencies. 1999-06-09 17:38:32 +00:00
Bodo Möller
3bcfce2881 Unify DES library: ncbc_enc.c wasn't used, but its content was almost
duplicated in cbc_enc.c (without IV updating) and in des_enc.c

As pointed out by others on the openssl-dev list, des_cbc_encrypt (without
IV updating; defined in cbc_enc.c) exists only for historical reasons:
des_ncbc_encrypt should be used instead (and the caller does not have
to manually update the IV).

If des_cbc_enrypt is not needed for backwards compatibility, the
definition of des_ncbc_encrypt should be put back into des_enc.c, and
both cbc_enc.c and ncbc_enc.c can be deleted.

If des_cbc_encrypt *is* needed for backwards compatibility, its behaviour
obviously should not change (i.e., don't add IV updating).
1999-06-09 17:28:30 +00:00
Ulf Möller
4e6ec1da04 Remove old libdes version number. 1999-06-09 16:26:50 +00:00
Bodo Möller
7740a1c6ef "make update" (added to top Makefile, and applied). 1999-06-09 16:18:53 +00:00
Bodo Möller
c77f47abfa DES CBC change looks dubious to me. 1999-06-09 13:41:51 +00:00
Bodo Möller
e766a681aa Some pre-POSIX systems don't have unistd.h (but e.g. lib.c).
Allow configuring the name of that header file.
1999-06-09 13:23:38 +00:00
Ben Laurie
9e952fc877 Oops. Get rid of now incorrect comment. 1999-06-09 11:09:12 +00:00
Ben Laurie
05861c77e7 I keep forgetting to fix this: update the IV! Most important! 1999-06-09 11:08:36 +00:00
Ben Laurie
233bf734d3 Make "make test" fail if bntest fails an internal selfcheck. 1999-06-09 10:19:53 +00:00
Ulf Möller
9fe6729b46 The des app. 1999-06-08 20:11:02 +00:00
Ben Laurie
72fbe87dc6 Survive pedanticism. 1999-06-08 18:37:43 +00:00
Ulf Möller
908eb7b85a Call our crypt implementation des_crypt(). crypt() now is a wrapper if
there is no system crypt() available.
1999-06-08 16:35:11 +00:00
Ulf Möller
bf0870ac73 Casts. 1999-06-08 16:25:21 +00:00
Ulf Möller
f947eb318e Warnings and casts. 1999-06-08 16:17:25 +00:00
Ulf Möller
93fd0fd61f Don't #define _, and eliminate casts. 1999-06-08 15:52:47 +00:00
Ulf Möller
bebf2787ea Fix to compile the des app. 1999-06-08 15:35:57 +00:00
Bodo Möller
c035b0c3b2 "request" added. 1999-06-08 10:18:48 +00:00
Dr. Stephen Henson
8eb57af5fe Complete support for PKCS#5 v2.0. Still needs extensive testing. 1999-06-08 00:09:51 +00:00
Bodo Möller
1aad3392e5 Fix for BIO pairs. 1999-06-07 22:51:55 +00:00
Bodo Möller
ba9f280885 Use locking in a way that makes more sense. 1999-06-07 22:50:12 +00:00
Dr. Stephen Henson
97e4a93245 This is the main PKCS#5 v2.0 key generation function, it parses the ASN1
structure and decides what key to generate (if any). Not currently added to
the PBE algorithm list because it is largely untested.
1999-06-07 21:00:19 +00:00
Bodo Möller
3928b6bf48 treat init properly 1999-06-07 20:34:36 +00:00
Bodo Möller
b1c4fe3625 Don't mix real tabs with tabs expanded as 8 spaces -- that's
a pain to read when using 4-space tabs.
1999-06-07 20:26:51 +00:00
Bodo Möller
9e06f6f601 Introduce "BIO pairs", which (when finished) will relay data
so that the SSL library can be used for applications that
have to handle all the actual I/O themselves.
1999-06-07 16:04:45 +00:00
Dr. Stephen Henson
8e21c14607 More PKCS#5 v2.0 development. Add a function to setup a PKCS#5 v2.0
AlgorithmIdentifier and make various ASN1 fixes.
1999-06-06 23:34:44 +00:00
Dr. Stephen Henson
2bd83ca1c9 Change PBE handling a bit more: now the key and iv generator does calls
EVP_CipherInit() this because the IV wont be easily available when doing
PKCS#5 v2.0
1999-06-06 18:41:52 +00:00
Dr. Stephen Henson
69cbf46811 Rewrite PBE handling read to support PKCS#5 v2.0 and update the function
list for Win32.
1999-06-06 13:07:13 +00:00
Dr. Stephen Henson
095ce35378 Change so PEM private key read routines can handle PKCS#8 transparently. 1999-06-05 18:40:51 +00:00
Dr. Stephen Henson
e7871ffaa8 More PKCS#8 stuff. Support for unencrypted forms of private key. 1999-06-05 12:39:10 +00:00
Ben Laurie
8d8a8041ec const/type fixes. 1999-06-05 12:16:33 +00:00
Dr. Stephen Henson
3cbb7937fa Add d2i,i2d bio and fp functions for PKCS#8 and add -inform and -outform
arguments to pkcs8 application.
1999-06-05 01:45:20 +00:00
Dr. Stephen Henson
600dec1586 Add a 'pkcs8' application for initial PKCS#8 support. Still needs lots more
options to handle encrypted and unencrypted forms and DER format input and
output.
1999-06-05 00:32:16 +00:00
Dr. Stephen Henson
b0c6fb8064 The rest of the PKCS#5, PKCS#8 patch I forgot before :-) 1999-06-04 23:33:48 +00:00
Dr. Stephen Henson
ef8335d900 Add PKCS#5 v1.5 compatible algorithms and initial PKCS#8 support. PKCS#8 needs
more work: need an application and make the private key routines automatically
handle PKCS#8.
1999-06-04 23:32:14 +00:00
Ben Laurie
84c15db551 Some constification and stacks that slipped through the cracks (how?). 1999-06-04 22:23:10 +00:00
Ulf Möller
1ec7ac3ce7 Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
1999-06-04 21:47:27 +00:00
Ulf Möller
a53955d8ab Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
1999-06-04 21:35:58 +00:00
Ulf Möller
5c03115af1 Test apps. 1999-06-04 21:31:48 +00:00
Ben Laurie
b4f76582d4 More evil cast removal. 1999-06-03 18:04:04 +00:00
Ben Laurie
213a75dbf2 Make samples compile. 1999-06-03 16:07:37 +00:00
Ben Laurie
5c0a48655f stack 1999-06-02 22:01:56 +00:00
Ben Laurie
8188e1537b Evil cast extermination. 1999-06-02 21:34:46 +00:00
Ben Laurie
8f0edcd142 stack. 1999-06-02 21:13:45 +00:00
Ben Laurie
a1195a19f5 Move stack implementations to more natural places. 1999-06-02 17:14:44 +00:00
Ben Laurie
b05b50e67b Stack. 1999-06-02 17:11:53 +00:00
Ulf Möller
778ec213fb Remove redundant line. 1999-06-01 22:47:40 +00:00
Ulf Möller
0a78c29760 Borland C fix.
Submitted by: Andy Polyakov
1999-06-01 09:41:13 +00:00
Ben Laurie
6d114240b9 stack. 1999-05-31 21:00:25 +00:00
Ben Laurie
426edadf98 Stack. 1999-05-31 20:35:31 +00:00
Ben Laurie
b6436ff2c2 More stack. 1999-05-31 11:57:32 +00:00
Ben Laurie
7e258a56da Yet another stack. 1999-05-30 22:25:19 +00:00
Ben Laurie
fc875472d0 Another stack. 1999-05-30 21:16:24 +00:00
Ben Laurie
e5e932d212 Another safe stack. 1999-05-30 15:40:21 +00:00
Ben Laurie
ee8ba0b26c Another safe stack. 1999-05-30 15:25:47 +00:00
Ben Laurie
80c38957bc And carry on with development... 1999-05-29 14:18:27 +00:00
Ben Laurie
033d858cc2 Oops! 1999-05-29 14:14:56 +00:00
Ben Laurie
31fab3e8da Prepare to release 0.9.3a 1999-05-29 14:13:15 +00:00
Ben Laurie
4da88a8d92 Update dependencies. 1999-05-29 14:10:58 +00:00
Bodo Möller
8e228dc56a Pass INSTALL_PREFIX to subdirectories of crypto
Submitted by: strube@physik3.gwdg.de (Hans Werner Strube)
1999-05-28 23:27:09 +00:00
Bodo Möller
436a376bb0 Some assembler-related clean-ups. 1999-05-28 23:18:51 +00:00
Bodo Möller
410aa5227b Include <stdio.h>. 1999-05-28 20:21:33 +00:00
Bodo Möller
58c7977cfa I386_ONLY is defined in opensslconf.h, so we need to include it.
Submitted by: John Keith <jtkeith@kavi.com>
1999-05-27 00:17:53 +00:00
Bodo Möller
b14d0e0590 Circument egcs bug.
Submitted by: Andy Polyakov <appro@fy.chalmers.se>
1999-05-26 19:59:36 +00:00
Dr. Stephen Henson
f3c751067a Fix for memory leak. 1999-05-26 12:40:08 +00:00
Dr. Stephen Henson
f9073fce9b Update md5 assembly source for Win32. 1999-05-26 00:39:20 +00:00
Bodo Möller
9890b00082 Temporary workaround for IRIX64 build.
Submitted by: Andy Polyakov <appro@fy.chalmers.se>
1999-05-25 20:27:41 +00:00
Ben Laurie
767d6bfb87 Move on to 0.9.4. 1999-05-24 20:59:34 +00:00
Ben Laurie
09befa1905 Here we go: prepare to roll 0.9.3. 1999-05-24 20:52:13 +00:00
Ben Laurie
e09632f986 Move to beta 3. 1999-05-23 16:38:07 +00:00
Ben Laurie
24abc46963 Prepare for final(?) beta. 1999-05-23 16:35:29 +00:00
Dr. Stephen Henson
3550ec4f1f Set ext_list to NULL after use. 1999-05-23 12:02:18 +00:00
Dr. Stephen Henson
4b55c2a3a9 Move the Win32 #undefs of X509_NAME and PKCS7_ISSUER_AND_SERIAL so they will
always get included with the relevant files.
1999-05-21 12:14:35 +00:00
Bodo Möller
96a099f93e Remove traces of bad idea :-) 1999-05-21 11:21:19 +00:00
Bodo Möller
7e70181723 It was a very bad idea to use #include "../e_os.h" -- when this occurs
in cryptlib.h (which is often included as "../cryptlib.h"), then the
question remains relative to which directory this is to be interpreted.
gcc went one further directory up, as intended; but makedepend thinks
differently, and so probably do some C compilers.  So the ../ must go away;
thus e_os.h goes back into include/openssl (but I now use
#include "openssl/e_os.h" instead of <openssl/e_os.h> to make the point) --
and we have another huge bunch of dependency changes.  Argh.
1999-05-21 11:16:48 +00:00
Dr. Stephen Henson
31a352d191 The last argument in the d2i_XXX_fp and d2i_XXX_bio functions should be
of type XXX ** not XXX *
1999-05-21 01:06:23 +00:00
Bodo Möller
d6847aed10 Add a kludge :-(
There were problems with putting e_os.h just into the top directory,
because the test programs are compiled within test/ in the "standard"
case in in their original directories in the makefile.one case;
and in the latter symlinks may not be available.
1999-05-20 22:18:49 +00:00
Bodo Möller
17e3dd1c62 Don't install e_os.h in include/openssl, use it only as a local
include file.
1999-05-20 21:59:20 +00:00
Ulf Möller
9dff4cc051 Bring VMS in sync with the recent changes.
Submitted by: Richard Levitte <levitte@stacken.kth.se>
1999-05-20 21:00:29 +00:00
Ben Laurie
60ed228e71 On seconds thoughts, the version number shoud _never_ decrease. 1999-05-20 19:57:53 +00:00
Ben Laurie
c1c96de01c Revert. 1999-05-20 19:46:23 +00:00
Ben Laurie
6b6596202b Prepare for a beta release. 1999-05-20 19:33:46 +00:00
Bodo Möller
4d5d543e3c Some solaris-usparc MD5 fixes. 1999-05-20 13:11:43 +00:00
Ulf Möller
7a01a45bc4 Declare test key data as static.
Submitted by: Andy Polyakov <appro@fy.chalmers.se>
1999-05-20 01:46:39 +00:00
Ulf Möller
e14d4443a2 Bignum library bug fix. IRIX 6 passes "make test" now!
This also avoids the problems with SC4.2 and unpatched SC5.

Submitted by: Andy Polyakov <appro@fy.chalmers.se>
1999-05-20 01:43:07 +00:00
Bodo Möller
06064bb512 Note that the numbering scheme used to be different. 1999-05-19 18:08:35 +00:00
Ben Laurie
e90c772946 Switch to new version numbering scheme. 1999-05-19 17:36:40 +00:00
Dr. Stephen Henson
e84240d422 New functions sk_set, sk_value and sk_num to replace existing macros: this is
to minimise the effects on existing code.
1999-05-19 12:45:16 +00:00
Dr. Stephen Henson
35f7324c23 Change default PKCS#12 iteration count to 2048, include rsa_oeap_test in the
test batch file.
1999-05-18 20:12:54 +00:00
Ulf Möller
5d818c3051 Spelling error. 1999-05-18 14:53:39 +00:00
Ralf S. Engelschall
09ad8001be Protect applications from failing to compile when they
try to directly include opensslv.h.
1999-05-18 09:19:28 +00:00
Ulf Möller
fb92ba64a0 Move prototypes to the right place. 1999-05-17 22:25:31 +00:00
Dr. Stephen Henson
703126f027 Various clarifications to extension docs: change the name of literal
extensions from RAW to DER to avoid confusion with raw extensions.

Update NEWS file.
1999-05-17 20:05:36 +00:00
Bodo Möller
db2b98359b Make MD5 work on Alpha, and fix a bug.
Submitted by: Andy Polyakov
1999-05-17 11:21:52 +00:00
Bodo Möller
27a186cd5d gcc (in some versions) doesn't like the const_des_cblock typedef.
So omit it for now :-(
1999-05-17 10:54:18 +00:00
Dr. Stephen Henson
1b266dabf5 Fix various less obvious bugs in PKCS#7 handling: such as not zeroing
the secret key before we've encrypted it and using the right NID for RC2-64.
Add various arguments to the experimental programs 'dec' and 'enc' to make
testing less painful.

This stuff has now been tested against Netscape Messenger and it can encrypt
and decrypt S/MIME messages with RC2 (128, 64 and 40 bit) DES and triple DES.

Its still experimental though...
1999-05-16 17:32:32 +00:00
Bodo Möller
edf0bfb52b Change type of various DES function arguments from des_cblock
(meaning pointer to char) to des_cblock * (meaning pointer to
array with 8 char elements), which allows the compiler to
do more typechecking.  (The changed argument types were of type
des_cblock * back in SSLeay, and a lot of ugly casts were
used then to turn them into pointers to elements; but it can be
done without those casts.)

Introduce new type const_des_cblock -- before, the pointers rather
than the elements pointed to were declared const, and for
some reason gcc did not complain about this (but some other
compilers did).
1999-05-16 12:26:16 +00:00
Ben Laurie
e1a228fbce Convert void *. 1999-05-16 11:26:46 +00:00
Dr. Stephen Henson
84fa704c6f Fix some obvious bugs in the PKCS#7 library handling. It didn't try to
find the right RecipientInfo based on the recipient certificate (so would
fail a lot of the time) and fixup cipher structures to correctly (maybe)
modify the AlgorithmIdentifiers.  Largely untested at present... this will be
fixed in due course. Well the stuff was broken to begin with so if its broken
now then you haven't lost anything :-)
1999-05-16 00:25:36 +00:00
Dr. Stephen Henson
a74c55cd8f Various Win32 fixes. Change args in do_ms.bat to put platform last. Fix
unsigned/signed cmp error in asn1parse. Change various pem_all.c args to
use pem_password_cb.
1999-05-15 20:33:15 +00:00
Ben Laurie
ac7d07851c Get rid of casts. 1999-05-15 16:03:26 +00:00
Ben Laurie
62bad77124 Add actual testing to bntest... 1999-05-15 15:59:28 +00:00
Bodo Möller
e1999b1dab Use OPENSSL_GLOBAL, OPENSSL_EXTERN instead of GLOBAL and EXTERN. 1999-05-15 14:38:10 +00:00
Bodo Möller
3398f6cc21 OPENSSL_EXTERN 1999-05-15 14:30:31 +00:00
Bodo Möller
7f0dae3276 OPENSSL_EXTERN, OPENSSL_GLOBAL 1999-05-15 14:23:29 +00:00
Bodo Möller
127640b449 Update dependencies. 1999-05-15 13:38:48 +00:00
Bodo Möller
cdfb093fc3 Get rid of another cast. 1999-05-15 13:31:53 +00:00
Bodo Möller
cbbd384040 Use e_os2.h, not e_os.h in exported header file des.h. 1999-05-15 13:27:13 +00:00
Bodo Möller
64a3b11be6 Comment. 1999-05-15 12:22:46 +00:00
Bodo Möller
79479f0240 Bugfix (set shutdown only when we should).
Submitted by: Oleg Girko
1999-05-15 12:22:19 +00:00
Ben Laurie
531b2cf7e9 Get rid of the cast. 1999-05-15 11:54:21 +00:00
Bodo Möller
8aa5b77c87 Avoid compiler warnings for x86. 1999-05-14 21:07:48 +00:00
Dr. Stephen Henson
1ad2ecb66f 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.
1999-05-14 18:21:21 +00:00
Bodo Möller
2a82c7cf25 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

Also, clean up htons vs. ntohs confusions.
1999-05-14 12:40:39 +00:00
Bodo Möller
d36bcdf5ca Fix cryptlib.c.
Submitted by:
Reviewed by:
PR:
1999-05-14 11:57:17 +00:00
Bodo Möller
3ae76679c7 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 ...)
1999-05-14 11:52:49 +00:00
Bodo Möller
dbd1e38482 Change cast in function calls to that which is, I think, the right
one for those functions (is it?).
1999-05-14 11:47:29 +00:00
Ulf Möller
7de82c29c8 Missed one line. 1999-05-13 17:55:08 +00:00
Bodo Möller
608217d8d0 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.)
1999-05-13 17:51:35 +00:00
Ben Laurie
2adca9cdc6 Update dependencies. 1999-05-13 17:33:27 +00:00
Ben Laurie
90ba7e21e1 Avoid shadowing, and a bit of constification while I'm at it. 1999-05-13 17:10:42 +00:00
Bodo Möller
b56bce4fc7 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.
1999-05-13 15:09:38 +00:00
Bodo Möller
0981259ada For solaris-usparc configurations, avoid problems with GNU as, which
cannot handle all opcodes we need.
1999-05-13 15:02:49 +00:00
Ulf Möller
5c83b4c93f Remove redundant ifdef. 1999-05-13 13:29:41 +00:00
Ulf Möller
75e0770d96 VMS support bug fixes. 1999-05-13 13:21:17 +00:00
Ulf Möller
bd3576d2dd Reorganize and speed up MD5.
Submitted by: Andy Polyakov <appro@fy.chalmers.se>
1999-05-13 13:16:42 +00:00
Ulf Möller
7d7d2cbcb0 VMS support.
Submitted by: Richard Levitte <richard@levitte.org>
1999-05-13 11:37:32 +00:00
Dr. Stephen Henson
8bc1431edd Several of the EVP_CIPHER structures had the get and set asn1 parameter
functions transposed.
1999-05-12 23:11:08 +00:00
Ulf Möller
dcbe935125 Missing argument in prototype.
Submitted by: Andreas Ley <ley@rz.uni-karlsruhe.de>
1999-05-12 00:45:42 +00:00
Ulf Möller
2ec765c81d Use ifndef PEDANTIC for all inline assembler. 1999-05-11 22:14:29 +00:00
Bodo Möller
d797727b20 Comment.
Submitted by:
Reviewed by:
PR:
1999-05-11 22:05:39 +00:00
Dr. Stephen Henson
10243d97fd Various PKCS#7 related fixes,tidies and comments. 1999-05-11 00:52:46 +00:00
Bodo Möller
84a370a400 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:
1999-05-10 11:18:26 +00:00
Bodo Möller
93c5624f04 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:
1999-05-10 11:10:38 +00:00
Ralf S. Engelschall
397f703892 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+
1999-05-10 08:33:56 +00:00
Dr. Stephen Henson
884e8ec615 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.
1999-05-10 00:47:42 +00:00
Dr. Stephen Henson
c8b4185079 Kill evil casts, fix PKCS#7 and add new X509V3 Function. 1999-05-09 16:39:11 +00:00
Bodo Möller
1c10afc32a Makefile.save was missing here.
Submitted by:
Reviewed by:
PR:
1999-05-09 15:47:35 +00:00
Bodo Möller
a0d0c6a61b 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.

Submitted by:
Reviewed by:
PR:
1999-05-09 10:16:46 +00:00
Bodo Möller
303c002898 Use "const char *" instead of "char *" for filenames passed to functions.
Submitted by:
Reviewed by:
PR:
1999-05-09 10:12:10 +00:00
Dr. Stephen Henson
a5ab0532ca 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().
1999-05-08 22:46:51 +00:00
Dr. Stephen Henson
e40b7abeed Allows PKCS#12 password to be placed on command line and add allow config
file name for 'ca' to come from the environment.
1999-05-08 12:59:50 +00:00