Matt Caswell
a561bfe944
Add malloc failure checks
...
Add some missing checks for memory allocation failures in ca app.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-03-17 13:39:53 +00:00
Matt Caswell
918bb86529
Unchecked malloc fixes
...
Miscellaneous unchecked malloc fixes. Also fixed some mem leaks on error
paths as I spotted them along the way.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-03-05 09:09:57 +00:00
Rich Salz
75d0ebef2a
Dead code clean: #if 0 removal in apps
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-30 14:52:57 -05:00
Rich Salz
68b00c2372
ifdef cleanup part 3: OPENSSL_SYSNAME
...
Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx
Remove MS_STATIC; it's a relic from platforms <32 bits.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-23 11:58:26 -05:00
Matt Caswell
50e735f9e5
Re-align some comments after running the reformat script.
...
This should be a one off operation (subsequent invokation of the
script should not move them)
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:20:10 +00:00
Matt Caswell
0f113f3ee4
Run util/openssl-format-source -v -c .
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:20:09 +00:00
Matt Caswell
68d39f3ce6
Move more comments that confuse indent
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:20:09 +00:00
Matt Caswell
3a83462dfe
Further comment amendments to preserve formatting prior to source reformat
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-06 15:45:25 +00:00
Tim Hudson
1d97c84351
mark all block comments that need format preserving so that
...
indent will not alter them when reformatting comments
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-30 22:10:26 +00:00
Richard Levitte
57dc72e018
Clear warnings/errors within RL_DEBUG code sections (RL_DEBUG should be renamed)
...
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-17 10:15:09 +01:00
Dr. Stephen Henson
a30bdb55d1
Show errors on CSR verification failure.
...
If CSR verify fails in ca utility print out error messages.
Otherwise some errors give misleading output: for example
if the key size exceeds the library limit.
PR#2875
2014-06-29 13:33:44 +01:00
Dr. Stephen Henson
d2aea03829
Memory leak and NULL dereference fixes.
...
PR#3403
2014-06-27 14:35:07 +01:00
Veres Lajos
478b50cf67
misspellings fixes by https://github.com/vlajos/misspell_fixer
2013-09-05 21:39:42 +01:00
Dr. Stephen Henson
f7ac0ec89d
fix printout of expiry days if -enddate is used in ca
2012-11-20 15:22:15 +00:00
Dr. Stephen Henson
648f551a4a
New -valid option to add a certificate to the ca index.txt that is valid and not revoked
2012-09-09 12:58:49 +00:00
Andy Polyakov
a50bce82ec
Sanitize usage of <ctype.h> functions. It's important that characters
...
are passed zero-extended, not sign-extended.
PR: 2682
2012-01-12 16:21:35 +00:00
Dr. Stephen Henson
624fbfcadb
free up sigopts STACK
2010-03-14 13:09:00 +00:00
Dr. Stephen Henson
510777f2fc
clear bogus errors in ca utility
2010-03-14 13:07:48 +00:00
Dr. Stephen Henson
4c623cddbe
add -sigopt option to ca utility
2010-03-14 12:54:45 +00:00
Dr. Stephen Henson
3533ab1fee
Replace the broken SPKAC certification with the correct version.
2009-12-02 14:41:51 +00:00
Dr. Stephen Henson
0e039aa797
Fix warnings about ignoring fgets return value
2009-10-04 16:42:56 +00:00
Dr. Stephen Henson
17b5326ba9
PR: 2013
...
Submitted by: steve@openssl.org
Include a flag ASN1_STRING_FLAG_MSTRING when a multi string type is created.
This makes it possible to tell if the underlying type is UTCTime,
GeneralizedTime or Time when the structure is reused and X509_time_adj_ex()
can handle each case in an appropriate manner.
Add error checking to CRL generation in ca utility when nextUpdate is being
set.
2009-09-02 13:54:50 +00:00
Dr. Stephen Henson
c869da8839
Update from 1.0.0-stable
2009-07-27 21:10:00 +00:00
Dr. Stephen Henson
33ab2e31f3
PR: 1854
...
Submitted by: Oliver Martin <oliver@volatilevoid.net>
Reviewed by: steve@openssl.org
Support GeneralizedTime in ca utility.
2009-03-09 13:59:07 +00:00
Andy Polyakov
2140659b00
Incidentally http://cvs.openssl.org/chngview?cn=17710 also made it possible
...
to build the library without -D_CRT_NONSTDC_NO_DEPRECATE. This commit
expands it even to apps catalog and actually omits the macro in question
from Configure.
2008-12-22 14:05:42 +00:00
Dr. Stephen Henson
87d3a0cd90
Experimental new date handling routines. These fix issues with X509_time_adj()
...
and should avoid any OS date limitations such as the year 2038 bug.
2008-10-07 22:55:27 +00:00
Ben Laurie
5ce278a77b
More type-checking.
2008-06-04 11:01:43 +00:00
Dr. Stephen Henson
c451bd828f
Avoid case in ca.c fix.
2008-06-02 12:10:06 +00:00
Dr. Stephen Henson
8ecfbedd85
Revert, doesn't fix warning :-(
2008-06-02 10:42:57 +00:00
Dr. Stephen Henson
c173fce4e2
Avoid cast with wrapper function.
2008-06-02 10:37:53 +00:00
Dr. Stephen Henson
c6ddacf7f8
Stop const mismatch warning.
2008-05-31 19:28:57 +00:00
Ben Laurie
3c1d6bbc92
LHASH revamp. make depend.
2008-05-26 11:24:29 +00:00
Dr. Stephen Henson
7c337e00d2
Fix some warnings.
2008-03-16 20:59:10 +00:00
Ben Laurie
309fa55bbb
Return an error if the serial number is badly formed. (Coverity ID 116).
2007-04-04 14:35:56 +00:00
Ben Laurie
96ea4ae91c
Add RFC 3779 support.
2006-11-27 14:18:05 +00:00
Dr. Stephen Henson
f6e7d01450
Support for multiple CRLs with same issuer name in X509_STORE. Modify
...
verify logic to try to use an unexpired CRL if possible.
2006-07-25 17:39:38 +00:00
Dr. Stephen Henson
03919683f9
Add support for default public key digest type ctrl.
2006-05-07 17:09:39 +00:00
Dr. Stephen Henson
ee1d9ec019
Remove link between digests and signature algorithms.
...
Use cross reference table in ASN1_item_sign(), ASN1_item_verify() to eliminate
the need for algorithm specific code.
2006-04-19 17:05:59 +00:00
Andy Polyakov
ffa101872f
Eliminate dependency on read/write/stat in apps under _WIN32.
2005-11-04 09:30:55 +00:00
Nils Larsch
cc29c1204b
successfully updating the db shouldn't result in an error message
2005-09-30 16:47:38 +00:00
Dr. Stephen Henson
cbdac46d58
Update from stable branch.
2005-07-04 23:12:04 +00:00
Nils Larsch
ff990440ee
const fixes
2005-04-15 18:29:33 +00:00
Nils Larsch
7d727231b7
some const fixes
2005-04-05 19:11:19 +00:00
Dr. Stephen Henson
10c8505734
Use the default_md config file value when signing CRLs.
...
PR:662
2004-11-11 13:47:06 +00:00
Dr. Stephen Henson
b5a93e2250
Call setup_engine after autoconfig.
2004-08-06 12:44:34 +00:00
Dr. Stephen Henson
64674bcc8c
Reduce chances of issuer and serial number duplication by use of random
...
initial serial numbers.
PR: 842
2004-04-20 12:05:26 +00:00
Dr. Stephen Henson
ae44fc1ec4
Clear error if unique_subject lookup fails.
2004-04-15 00:32:19 +00:00
Richard Levitte
d420ac2c7d
Use BUF_strlcpy() instead of strcpy().
...
Use BUF_strlcat() instead of strcat().
Use BIO_snprintf() instead of sprintf().
In some cases, keep better track of buffer lengths.
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2003-12-27 14:40:17 +00:00
Richard Levitte
03ddbdd9b9
Move another common functionality (reproduced so far with cut'n'paste)
...
to apps.c, and give it the hopefully descriptive name parse_yesno().
2003-11-28 14:45:09 +00:00
Richard Levitte
6d5ffb591b
Move do_subject() to apps.c and rename it to parse_name(). The
...
rationale behind the move is that it's use by several applications.
The rationale behind the name change is that it describes what the
function does a bit better.
2003-11-28 14:07:14 +00:00
Richard Levitte
7ce9e425bc
Allow multi-valued rdns in subjects. This adds the -multivalue-rdn option
...
to 'openssl req' and 'openssl ca'.
PR: 779
Submitted by: Michael Bell <michael.bell@cms.hu-berlin.de>
Reviewed by: Richard Levitte
(there will be some follow-up changes)
2003-11-28 14:04:09 +00:00
Richard Levitte
4d8743f490
Netware-specific changes,
...
PR: 780
Submitted by: Verdon Walker <VWalker@novell.com>
Reviewed by: Richard Levitte
2003-11-28 13:10:58 +00:00
Geoff Thorpe
2754597013
A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.
...
I have tried to convert 'len' type variable declarations to unsigned as a
means to address these warnings when appropriate, but when in doubt I have
used casts in the comparisons instead. The better solution (that would get
us all lynched by API users) would be to go through and convert all the
function prototypes and structure definitions to use unsigned variables
except when signed is necessary. The proliferation of (signed) "int" for
strictly non-negative uses is unfortunate.
2003-10-29 20:24:15 +00:00
Richard Levitte
e6fa67fa93
Generalise the definition of strcasecmp() and strncasecmp() for
...
platforms that don't (necessarely) have it. In the case of VMS, this
means moving a couple of functions from apps/ to crypto/ and make them
general (although only used privately).
2003-09-09 14:48:36 +00:00
Richard Levitte
fd4ef69913
Implement CRL numbers.
...
Contributed in whole by Laurent Genier <Laurent.Genier@intrinsec.com>
PR: 644
2003-06-19 17:40:16 +00:00
Richard Levitte
4c771796d5
Convert save_serial() to work like save_index(), and add a
...
rotate_serial() that works like rotate_index().
2003-04-04 15:10:35 +00:00
Richard Levitte
d6df2b281f
Add documentation on the added functionality in 'openssl ca'.
2003-04-04 14:39:44 +00:00
Richard Levitte
3ae70939ba
Correct a lot of printing calls. Remove extra arguments...
2003-04-03 23:39:48 +00:00
Richard Levitte
16b1b03543
Implement self-signing in 'openssl ca'. This makes it easier to have
...
the CA certificate part of the CA database, and combined with
'unique_subject=no', it should make operations like CA certificate
roll-over easier.
2003-04-03 22:33:59 +00:00
Richard Levitte
c4448f60d6
Reset the version number of the issuer certificate? I believe this
...
hasn't been tested in a long while...
2003-04-03 18:50:15 +00:00
Richard Levitte
63b6fe2bf6
Conditionalise all debug strings.
2003-04-03 18:07:39 +00:00
Richard Levitte
f85b68cd49
Make it possible to have multiple active certificates with the same
...
subject.
2003-04-03 16:33:03 +00:00
Richard Levitte
0b13e9f055
Add the possibility to build without the ENGINE framework.
...
PR: 287
2003-01-30 17:39:26 +00:00
Richard Levitte
4e78074b39
cert_sk isn't always allocated, so freeing it may cause a crash.
...
PR: 481
2003-01-30 10:27:43 +00:00
Dr. Stephen Henson
09ad2458b8
Typo.
2003-01-09 16:54:21 +00:00
Dr. Stephen Henson
5b7249f302
NULL tofree when it is freed to avoid double free.
...
Make sure key is not NULL before freeing it.
2003-01-09 13:06:49 +00:00
Richard Levitte
e235000169
Spelling error.
...
This patch was taken from the OpenBSD copy of OpenSSL 0.9.7 beta3 with patches
2002-12-25 22:16:56 +00:00
Richard Levitte
1c3e4a3660
EXIT() may mean return(). That's confusing, so let's have it really mean
...
exit() in whatever way works for the intended platform, and define
OPENSSL_EXIT() to have the old meaning (the name is of course because
it's only used in the openssl program)
2002-12-03 16:33:03 +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
c863201780
Remove warnings.
2002-11-14 15:57:38 +00:00
Ben Laurie
54a656ef08
Security fixes brought forward from 0.9.7.
2002-11-13 15:43:43 +00:00
Richard Levitte
ddff68bee7
Windows doesn't know sys/file.h
2002-11-07 21:40:06 +00:00
Richard Levitte
d610d27f30
On certain platforms, we redefine certain symbols using macros in
...
apps.h. For those, it's better to include apps.h after the system
headers where those symbols may be defined, since there's otherwise a
chance that the C compiler will barf when it sees something that looks
like this after expansion:
int VMS_strcasecmp((str1),(str2))(const char *, const char *);
2002-10-24 10:03:55 +00:00
Bodo Möller
907a8f1e6e
fix warnings, and harmonize indentation
2002-10-23 13:11:38 +00:00
Richard Levitte
2245cd87d4
BN_bn2hex() returns "0" instead of "00" for zero. This disrputs the
...
requirement that the serial number always be an even amount of characters.
PR: 248
2002-10-11 09:38:56 +00:00
Richard Levitte
d7b2342a6a
Add missing LF
2002-10-09 06:35:47 +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
da9b972466
Make it possible to load keys from stdin, and restore that
...
functionality in the programs that had that before.
Part fo PR 164
2002-08-01 16:28:40 +00:00
Richard Levitte
87e8feca95
If the email address is moved from the subject to the subject alternate name,
...
the subject in the certificate would differ from the subject in the index file,
which has quite bad concequences.
PR: 180
2002-07-31 14:05:57 +00:00
Bodo Möller
7e6617611f
Fix bug introduced with revision 1.95 when this filed was modified to
...
use the new X509_CRL_set_issuer_name() function:
The CRL issuer should be X509_get_subject_name(x509), not
X509_get_issuer_name(x509).
Submitted by: Juergen Lesny <lesnyj@informatik.tu-muenchen.de>
typo
2002-07-18 11:23:50 +00:00
Richard Levitte
9335a5f7c0
Unixware doesn't have strings.h, so we need to declare strcasecmp()
...
differently.
Unixware 2 needs to link with libresolv.
PR: 148
2002-07-18 07:47:30 +00:00
Dr. Stephen Henson
eee6c81af8
Reorganise -subj option code, fix buffer overrun.
2002-05-19 16:31:10 +00:00
Lutz Jänicke
c0455cbb18
Fix escaping when using the -subj option of "openssl req", document
...
'hidden' -nameopt support. (Robert Joop <joop@fokus.gmd.de>)
2002-04-30 12:08:18 +00:00
Dr. Stephen Henson
26e1237380
Fix the Win32_rename() function so it correctly
...
returns an error code. Use the same code in Win9X
and NT.
Fix some ca.c options so they work under Win32:
unlink/rename wont work under Win32 unless the file
is closed.
2002-03-08 19:11:15 +00:00
Richard Levitte
26414ee013
Increase internal security when using strncpy, by making sure the resulting string is NUL-terminated
2002-02-28 12:42:19 +00:00
Dr. Stephen Henson
3647bee263
Config code updates.
...
CONF_modules_unload() now calls CONF_modules_finish()
automatically.
Default use of section openssl_conf moved to
CONF_modules_load()
Load config file in several openssl utilities.
Most utilities now load modules from the config file,
though in a few (such as version) this isn't done
because it couldn't be used for anything.
In the case of ca and req the config file used is
the same as the utility itself: that is the -config
command line option can be used to specify an
alternative file.
2002-02-22 14:01:21 +00:00
Richard Levitte
3e83e686ba
Add the configuration target VxWorks.
2002-02-14 15:37:38 +00:00
Bodo Möller
4d94ae00d5
ECDSA support
...
Submitted by: Nils Larsch <nla@trustcenter.de>
2002-02-13 18:21:51 +00:00
Dr. Stephen Henson
6229a5607c
Fix email address delete code.
2001-11-06 01:44:21 +00:00
Dr. Stephen Henson
9b55da73ca
Another noemailDN fix.
2001-10-27 17:53:06 +00:00
Dr. Stephen Henson
e7156ff2e8
Allow ca to certify requests containing BMPStrings and UTF8Strings.
2001-10-27 17:04:47 +00:00
Dr. Stephen Henson
437db75b94
Bugfixes for noemailDN option. Make it use the
...
correct name (instead of NULL) if nomailDN is
not set, fix memory leaks and retain DN structure
when deleting emailAddress.
2001-10-27 17:03:20 +00:00
Bodo Möller
89da653fa6
Add '-noemailDN' option to 'openssl ca'. This prevents inclusion of
...
the e-mail address in the DN (i.e., it will go into a certificate
extension only). The new configuration file option 'email_in_dn = no'
has the same effect.
Submitted by: Massimiliano Pala madwolf@openca.org
2001-10-25 08:25:19 +00:00
Geoff Thorpe
1372965e2e
Reduce the header dependencies on engine.h in apps/.
2001-09-12 02:39:06 +00:00
Dr. Stephen Henson
b65f851318
Make -passin -passout etc work again.
...
Fix leak in ca.c when using -passin.
2001-08-17 01:09:54 +00:00
Dr. Stephen Henson
35bf35411c
Add CRL utility functions to allow CRLs to be
...
built up without accessing structures directly.
Update ca.c to use new functions.
Fix ca.c so it now build CRLs correctly again.
2001-08-17 00:33:43 +00:00
Dr. Stephen Henson
ee306a1332
Initial OCSP server support, using index.txt format.
...
This can process internal requests or behave like a
mini responder.
Todo: documentation, update usage info.
2001-07-12 20:41:51 +00:00
Dr. Stephen Henson
b7a26e6daf
Modify apps to use NCONF code instead of old CONF code.
...
Add new extension functions which work with NCONF.
Tidy up extension config routines and remove redundant code.
Fix NCONF_get_number().
Todo: more testing of apps to see they still work...
2001-06-28 11:41:50 +00:00
Richard Levitte
ce16450a89
Make better use of load_cert, load_certs and load_key.
2001-06-27 09:12:43 +00:00
Richard Levitte
531d630b5c
Provide an application-common setup function for engines and use it
...
everywhere.
2001-06-18 06:22:33 +00:00