Commit graph

545 commits

Author SHA1 Message Date
Bodo Möller
57108f0ad5 Fix openssl passwd -1 2001-01-19 07:37:56 +00:00
Dr. Stephen Henson
73758d435b Additional functionality in ocsp utility: print summary
of status info. Check nonce values. Option to disable
verify. Update usage message.

Rename status to string functions and make them global.
2001-01-19 01:32:23 +00:00
Dr. Stephen Henson
90f63e8f83 Don't shadow. 2001-01-18 01:36:54 +00:00
Dr. Stephen Henson
e8af92fcb1 Implement remaining OCSP verify checks in
accordance with RFC2560.
2001-01-18 01:35:39 +00:00
Richard Levitte
b3466895e6 Keep up with Unix 2001-01-17 01:35:35 +00:00
Dr. Stephen Henson
81f169e95c Initial OCSP certificate verify. Not complete,
it just supports a "trusted OCSP global root CA".
2001-01-17 01:31:34 +00:00
Bodo Möller
dfebac32c0 New '-extfile' option for 'openssl ca'.
This allows keeping extensions in a separate configuration file.

Submitted by: Massimiliano Pala <madwolf@comune.modena.it>
2001-01-15 11:35:24 +00:00
Dr. Stephen Henson
8e5b6314ef Fix warning in apps/ca.c 2001-01-14 13:58:49 +00:00
Dr. Stephen Henson
b4b1bdd5d3 Preliminary ocsp utility documentation.
Fix ocsp usage message.
2001-01-14 00:52:19 +00:00
Dr. Stephen Henson
5782ceb298 New OCSP utility. This can generate, parse and print
OCSP requests. It can also query reponders and parse or
print out responses.

Still needs some more work: OCSP response checks and
of course documentation.
2001-01-13 01:48:38 +00:00
Bodo Möller
c67cdb50d2 New 'openssl ca -status <serial>' and 'openssl ca -updatedb'
commands.

Submitted by: Massimiliano Pala <madwolf@comune.modena.it>
2001-01-12 14:50:44 +00:00
Bodo Möller
d199858e89 New -newreq-nodes option to CA.pl.
Submitted by: Damien Miller <djm@mindrot.org>
2001-01-11 13:23:19 +00:00
Bodo Möller
72e2d9138c It's silly to use a different default for PERL than in the top
Makefile.  (The default is never actually used though because
the top Makefile passes its value of PERL down to sub-Makefiles.)
2001-01-10 16:46:00 +00:00
Bodo Möller
673b3fde82 Add SSLEAY_DIR argument code for SSLeay_version.
Add '-d' option for 'openssl version' (included in '-a').
2001-01-10 15:15:36 +00:00
Bodo Möller
a87e50a945 'char' argument to islower must be converted to 'unsigned char' 2001-01-10 14:58:22 +00:00
Bodo Möller
c06648f7f0 Fix C code generate by 'openssl dsaparam -C'. 2001-01-10 14:26:32 +00:00
Ulf Möller
b2293b1e9b rsa_num is not used with NO_RSA 2001-01-09 21:39:16 +00:00
Dr. Stephen Henson
ecbe07817a Rewrite PKCS#12 code and remove some of the old
horrible macros.

Fix two evil ASN1 bugs. Attempt to use 'ctx' when
NULL if input is indefinite length constructed
in asn1_check_tlen() and invalid pointer to ASN1_TYPE
when reusing existing structure (this took *ages* to
find because the new PKCS#12 code triggered it).
2000-12-31 01:13:04 +00:00
Richard Levitte
701adceb12 "make update" plus a rewrite of both .num files. 2000-12-29 00:19:12 +00:00
Bodo Möller
2c0d10123e If CONF_get_string returns NULL and we want to tolerate this
(e.g., use a default), we have to call ERR_clear_error().
2000-12-15 16:59:49 +00:00
Bodo Möller
3ac82faae5 Locking issues. 2000-12-15 16:40:35 +00:00
Richard Levitte
8d28d5f81b Constification of the data of a hash table. This means the callback
functions need to be constified, and therefore meant a number of easy
changes a little everywhere.

Now, if someone could explain to me why OBJ_dup() cheats...
2000-12-13 17:15:03 +00:00
Richard Levitte
df2c442a6d Make TYPE_RSA the default type instead of just setting it when -new is
given.  That also allows the arguments to come in any order (-new
last, for example).
2000-12-09 11:11:35 +00:00
Geoff Thorpe
d0fa136ce2 Next step in tidying up the LHASH code.
DECLARE/IMPLEMENT macros now exist to create type (and prototype) safe
wrapper functions that avoid the use of function pointer casting yet retain
type-safety for type-specific callbacks. However, most of the usage within
OpenSSL itself doesn't really require the extra function because the hash
and compare callbacks are internal functions declared only for use by the
hash table. So this change catches all those cases and reimplements the
functions using the base-level LHASH prototypes and does per-variable
casting inside those functions to convert to the appropriate item type.

The exception so far is in ssl_lib.c where the hash and compare callbacks
are not static - they're exposed in ssl.h so their prototypes should not be
changed. In this last case, the IMPLEMENT_LHASH_*** macros have been left
intact.
2000-12-08 20:02:01 +00:00
Dr. Stephen Henson
9d6b1ce644 Merge from the ASN1 branch of new ASN1 code
to main trunk.

Lets see if the makes it to openssl-cvs :-)
2000-12-08 19:09:35 +00:00
Ben Laurie
b0dc680f71 Fix warnings. 2000-12-03 10:04:22 +00:00
Geoff Thorpe
35a99b6380 Use the new LHASH macros to declare type-safe wrapper functions that can
be used as the hash/compare callbacks without function pointer casting.

For now, this is just happening in the apps/ directory whilst a few people
check the approach. The rest of the library will be moved across to the
same idea if there's no problems with this.
2000-12-02 23:16:54 +00:00
Ulf Möller
e0c875081e remember the problem with ftime() 2000-12-02 18:50:31 +00:00
Geoff Thorpe
385d81380c First step in tidying up the LHASH code. The callback prototypes (and
casts) used in the lhash code are about as horrible and evil as they can
be. For starters, the callback prototypes contain empty parameter lists.
Yuck.

This first change defines clearer prototypes - including "typedef"'d
function pointer types to use as "hash" and "compare" callbacks, as well as
the callbacks passed to the lh_doall and lh_doall_arg iteration functions.
Now at least more explicit (and clear) casting is required in all of the
dependant code - and that should be included in this commit.

The next step will be to hunt down and obliterate some of the function
pointer casting being used when it's not necessary - a particularly evil
variant exists in the implementation of lh_doall.
2000-12-01 20:31:52 +00:00
Bodo Möller
b5a25a430a "make depend" 2000-12-01 08:48:42 +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
53d286797c avoid segmentation fault 2000-11-29 11:04:31 +00:00
Richard Levitte
d53d271728 Addapt the VMS scripts to the changes in the Makefiles. 2000-11-22 18:17:16 +00:00
Ben Laurie
646d56956b Better handling of EVP names, add EVP to speed. 2000-11-20 04:14:19 +00:00
Bodo Möller
db70a3fd6e Improve usability of 'openssl passwd' by including
password verification where it makes sense.
2000-11-17 09:03:02 +00:00
Ulf Möller
6a8ba34f9d in some new file names the first 8 characters were not unique 2000-11-12 22:32:18 +00:00
Ben Laurie
757e392d4e Make Rijndael work! Those long flights have some good points. 2000-11-12 02:13:38 +00:00
Richard Levitte
ccb9643f02 Remove references to RSAref. The glue library is but a memory to fade
away now...
2000-11-08 17:51:37 +00:00
Richard Levitte
5e4ca4220e The consequence of constification is that to pass the address to a
pointer to a const double pointe parameter, the pointer must point to
const data as well.
2000-11-06 23:16:04 +00:00
Richard Levitte
e7ef1a561a Make all engines available in the openssl application. 2000-11-06 22:03:00 +00:00
Richard Levitte
11c0f1201c Change the engine library so the application writer has to explicitely
load the "external" built-in engines (those that require DSO).  This
makes linking with libdl or other dso libraries non-mandatory.

Change 'openssl engine' accordingly.

Change the engine header files so some declarations (that differed at
that!) aren't duplicated, and make sure engine_int.h includes
engine.h.  That way, there should be no way of missing the needed
info.
2000-11-02 20:33:04 +00:00
Richard Levitte
69e7805f54 'openssl engine' can now list engine capabilities. The current
implementation is contained in the application, and the capability
string building part should really be part of the engine library.
This is therefore an experimental hack, and will be changed in the
near future.
2000-11-02 19:24:48 +00:00
Richard Levitte
e264cfe17a Better error reporting in 'openssl engine' 2000-11-02 18:58:43 +00:00
Richard Levitte
8224b0cbe5 make update 2000-11-02 18:53:25 +00:00
Bodo Möller
15d52ddb55 Never call load_dh_param(NULL) because this leads to an illegal
fopen(NULL).
2000-11-02 10:35:10 +00:00
Richard Levitte
d48f487e2c -t is supported, so display some help about it. 2000-11-01 23:55:45 +00:00
Richard Levitte
14c6d27d63 Add application to enumerate, list and test engines with. 2000-11-01 02:57:35 +00:00
Richard Levitte
92125ffaec Make flag variables int instead of char. This avoids getting into trouble on systems where char is unsigned by default 2000-10-31 11:58:56 +00:00
Richard Levitte
32d862ede4 Add the possibility to use keys handled by engines in more
applications.
2000-10-28 22:40:40 +00:00
Richard Levitte
a44f26d5c9 Small documentation change 2000-10-28 22:21:04 +00:00
Richard Levitte
5660eb489e NetBSD doesn't use ftime(). 2000-10-27 20:28:37 +00:00
Richard Levitte
eb64730b9c The majority of the OCSP code from CertCo. 2000-10-27 11:05:35 +00:00
Richard Levitte
5270e7025e Merge the engine branch into the main trunk. All conflicts resolved.
At the same time, add VMS support for Rijndael.
2000-10-26 21:07:28 +00:00
Bodo Möller
28967cf079 rsautl.c requires RSA. 2000-10-26 12:05:57 +00:00
Bodo Möller
4fb40db932 Don't ever set 'seeded' if RAND_status() returned 0
(although maybe this static variable should be abolished totally,
it was introduced before RAND_status existed).
2000-10-23 07:37:03 +00:00
Richard Levitte
2b59a6ac14 There's no reason why app_RAND_load_file() should return 0 when
RAND_status() hasn't.
Reported by Dale Stimson <dale@accentre.com>.
2000-10-21 22:43:07 +00:00
Dr. Stephen Henson
51754ec835 Update test server certificate in apps/server.pem (it was expired). 2000-10-16 22:56:10 +00:00
Richard Levitte
3ab5651112 The experimental Rijndael code moved to the main trunk.
make update done.
2000-10-14 20:09:54 +00:00
Dr. Stephen Henson
8ca533e378 More code for X509_print_ex() support. 2000-10-06 11:51:47 +00:00
Dr. Stephen Henson
d0c9858914 Global DirectoryString mask fix.
Add support for X509_NAME_print_ex() in req.

Initial code for cutomizable X509 print routines.
2000-10-04 01:16:32 +00:00
Richard Levitte
1cbb729fdc Oops, if the target only had USE_TOD, an error message was issued... 2000-09-21 16:01:08 +00:00
Richard Levitte
c5f8bbbc0b Portability patch for HP MPE/iX. Submitted by Mark Bixby <mark_bixby@hp.com> 2000-09-21 05:42:01 +00:00
Richard Levitte
edb0d64367 AIX doesn't like ftime() either. 2000-09-20 15:10:16 +00:00
Richard Levitte
645749ef98 On VMS, stdout may very well lead to a file that is written to in a
record-oriented fashion.  That means that every write() will write a
separate record, which will be read separately by the programs trying
to read from it.  This can be very confusing.

The solution is to put a BIO filter in the way that will buffer text
until a linefeed is reached, and then write everything a line at a
time, so every record written will be an actual line, not chunks of
lines and not (usually doesn't happen, but I've seen it once) several
lines in one record.  Voila, BIO_f_linebuffer() is born.

Since we're so close to release time, I'm making this VMS-only for
now, just to make sure no code is needlessly broken by this.  After
the release, this BIO method will be enabled on all other platforms as
well.
2000-09-20 13:55:50 +00:00
Richard Levitte
b004872c59 BSDI only supports ftime() through libcompat, which means it's
better not to use it.
2000-09-19 23:14:42 +00:00
Dr. Stephen Henson
688fbf5475 Fix a typo in apps/pkcs12.c which was using the wrong part of
ASN1_TYPE (though they are both ASN1_STRING so it didn't cause
any problems).

Make 'siglen' an int in apps/dgst.c so we can check the return
value of BIO_read() etc.
2000-09-19 17:51:11 +00:00
Richard Levitte
28178bcf24 FreeBSD only supports ftime() through libcompat, which means it's
better not to use it.
2000-09-19 16:13:38 +00:00
Richard Levitte
a3829b8650 ftime() is not supported on SGI.
Reported by Steve Robb <steve@eu.c2.net>
2000-09-18 16:52:05 +00:00
Richard Levitte
62324627aa Use sk_*_new_null() instead of sk_*_new(NULL), since that takes care
of complaints from the compiler about data pointers and function
pointers not being compatible with each other.
2000-09-17 18:21:27 +00:00
Richard Levitte
623eea376a siglen is unsigned, so comparing it to less than 0 is silly, and
generates a compiler warning with Compaq C.
2000-09-17 18:08:38 +00:00
Richard Levitte
1c86d93ca5 'make update' 2000-09-15 22:13:38 +00:00
Richard Levitte
095aadc43f Move up inclusion of conf.h, so non-MONOLITH programs can benefit from
it as well, especially in apps.c.
2000-09-15 19:37:14 +00:00
Richard Levitte
5614bb91f5 rsa_num2 is no longer used, so remove it. 2000-09-14 11:09:03 +00:00
Richard Levitte
03ea28c985 Better error checking for RSA and DSA signature and verification speed
tests.  This was required to not get mysterious errors when they
wouldn't quite want to work.
2000-09-12 08:12:52 +00:00
Richard Levitte
05c2b37176 DSA_verify() and DSA_sign() might return -1... 2000-09-11 22:21:38 +00:00
Richard Levitte
16e91fe8ab OpenBSD doesn't support timeb. 2000-09-11 16:46:35 +00:00
Richard Levitte
ec6a40e278 Last minute update, in time to make it to 0.9.6-beta1 2000-09-11 13:06:48 +00:00
Richard Levitte
97d8e82c4c Marin Kraemer <Martin.Kraemer@MchP.Siemens.De> sent us patches to make
the OpenSSL commands x50 and req work better on a EBCDIC system.
2000-09-10 14:45:19 +00:00
Richard Levitte
0baed24c1b More VMS synchronisation 2000-09-09 18:05:27 +00:00
Richard Levitte
eec79f9bab Synchronise the VMS build with the Unix one. 2000-09-08 20:25:49 +00:00
Dr. Stephen Henson
709e85953d Update verify docs.
New option to verify program to print out diagnostics.
2000-09-08 00:53:58 +00:00
Richard Levitte
62ab514e98 'make update' 2000-09-07 08:46:51 +00:00
Bodo Möller
61f175f4ba Get rid of ASN1_UTCTIME_get, which cannot work with time_t
return type (on platforms where time_t is a 32 bit value).

New function ASN1_UTCTIME_cmp_time_t as a replacement
for use in apps/x509.c.
2000-09-06 15:40:52 +00:00
Bodo Möller
1af407e78f typo 2000-09-06 12:18:24 +00:00
Bodo Möller
2b40660ec1 Add OAEP. Seed the PRNG. 2000-09-06 11:49:43 +00:00
Dr. Stephen Henson
bbb720034a Fix typo in rsautl.
Add support for settable verify time in X509_verify_cert().

Document rsautl utility.
2000-09-05 22:30:38 +00:00
Dr. Stephen Henson
2f043896d1 *BIG* verify code reorganisation.
The old code was painfully primitive and couldn't handle
distinct certificates using the same subject name.

The new code performs several tests on a candidate issuer
certificate based on certificate extensions.

It also adds several callbacks to X509_VERIFY_CTX so its
behaviour can be customised.

Unfortunately some hackery was needed to persuade X509_STORE
to tolerate this. This should go away when X509_STORE is
replaced, sometime...

This must have broken something though :-(
2000-09-05 17:53:58 +00:00
Dr. Stephen Henson
34216c0422 Keep a not of original encoding in certificate requests.
Add new option to PKCS7_sign to exclude S/MIME capabilities.
2000-09-05 13:27:57 +00:00
Bodo Möller
bbb8de0966 Avoid abort() throughout the library, except when preprocessor
symbols for debugging are defined.
2000-09-04 15:34:43 +00:00
Dr. Stephen Henson
bd08a2bd0c Add 'rsautl' low level RSA utility.
Add DER public key routines.

Add -passin argument to 'ca' utility.

Document sign and verify options to dgst.
2000-09-03 23:13:48 +00:00
Dr. Stephen Henson
7df1c720f6 Fix typo in i2d_ASN1_ENUMERATED
Fix bug in read only memory BIOs so BIO_reset() works.

Add sign and verify options to dgst utility, need
to update docs.
2000-08-30 16:14:29 +00:00
Dr. Stephen Henson
d428bf8c56 New option to CA.pl to sign request using CA extensions.
This allows intermediate CAs to be created more easily.

PKCS12_create() now checks private key matches certificate.

Fix typo in x509 app.

Update docs.

New function ASN1_STRING_to_UTF8() converts any ASN1_STRING
type to UTF8.
2000-08-24 23:24:18 +00:00
Dr. Stephen Henson
eaa2818189 Various fixes...
initialize ex_pathlen to -1 so it isn't checked if pathlen
is not present.

set ucert to NULL in apps/pkcs12.c otherwise it gets freed
twice.

remove extraneous '\r' in MIME encoder.

Allow a NULL to be passed to X509_gmtime_adj()


Make PKCS#7 code use definite length encoding rather then
the indefinite stuff it used previously.
2000-08-21 22:02:23 +00:00
Richard Levitte
3009458e2f MD4 implemented. Assar Westerlund provided the digest code itself and the test utility, I added the bits to get a EVP interface, the command line utility and the speed test 2000-08-14 14:05:53 +00:00
Richard Levitte
5ce42a7e68 Memory leaks fix. It now looks like all memory leaks, at least around
building complete chains, are gone.
2000-08-11 22:50:08 +00:00
Richard Levitte
9ee1c838cb Memory leaks fix. There seems to be more in other parts of OpenSSL... 2000-08-11 21:41:08 +00:00
Richard Levitte
88364bc2bc The pkcs12 had no way of getting a CA file or path to be used when
building a complete chain.  Now added through the -CAfile and -CApath
arguments.
2000-08-11 19:43:20 +00:00
Richard Levitte
3132e196bd Unicos doesn't have sys/timeb.h. Fix it by defining the TIMEB macro unless on Unicos. 2000-08-03 21:54:31 +00:00
Bodo Möller
69764d720a Include SKIP DH parameters with OpenSSL.
These have been created by a SHA.1 based procedure, see
http://www.skip-vpn.org/spec/numbers.html.
(These values are taken from that document, I have not
implemented the prime generator.)
2000-08-02 09:04:44 +00:00
Richard Levitte
ee087bb8eb Make it so we can dynamically enable memory allocation debugging through the
environment variable OPENSSL_DEBUG_MEMORY (existence is sufficient).  At the
same time, it makes sure that CRYPTO_malloc_debug_init() gets expanded some-
where and thereby tested for compilation.
2000-08-01 17:15:36 +00:00