summaryrefslogtreecommitdiff
path: root/lib/libcrypto/x509v3
AgeCommit message (Collapse)Author
2016-09-04Expand DECLARE_ASN1_.*FUNCTIONS macros.Joel Sing
No change in preprocessed output, ignoring whitespace and line numbers.
2016-08-31Bring in functions used by stunnel and exim from BoringSSL - this bringsBob Beck
in X509_check_host, X509_check_email, X509_check_ip, and X509_check_ip_asc, with some cleanup on the way in by myself and jsing@ ok bcook@
2016-03-11X509_free(3) is NULL-safe, so remove NULL checks before its calls.Michael McConville
ok doug@
2015-12-14initialize ext_len to 0.Bob Beck
ok guenther@
2015-09-30Replace M_ASN1_OCTET_STRING_(free|new) with ASN1_OCTET_STRING_(free|new).Joel Sing
2015-09-30Replace M_ASN1_IA5STRING_(new|free) with ASN1_IA5STRING_(new|free). SameJoel Sing
with one s/M_ASN1_VISIBLESTRING_new/ASN1_VISIBLESTRING_new/.
2015-09-30Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this isJoel Sing
different from the macro expansion, but the result is the same. Also replace some ASN1_STRING_dup() with ASN1_INTEGER_dup(). ok beck@ doug@
2015-09-29Replace remaining M_ASN1_BIT_STRING_(new|free) macros with calls toJoel Sing
ASN1_BIT_STRING_(new|free). ok beck@ doug@
2015-09-26Use ASN1_item_dup() instead of ASN1_dup().Joel Sing
ok bcook@
2015-07-29Use named initialisers for X509V3_EXT_METHOD structs (for the usualJoel Sing
reasons) - only change in generated assembly is due to line numbering.
2015-07-29Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generatedJoel Sing
assembly. ok bcook@
2015-07-25Expand ASN.1 template macros that got missed in the last pass - only changeJoel Sing
to generated assembly is due to line numbers.
2015-07-25Expand ASN.1 template macros - the generated assembly only differs byJoel Sing
changes to line numbers.
2015-07-19Remove case that can never happen.Doug Hogan
It's a little convoluted due to gotos, but at that point, pci is always NULL. Spotted by Coverity 21702. ok miod@ beck@ bcook@
2015-07-18Fix leak found by coverity, issue 78897 - which also brough toBob Beck
light that the child counting was broken in the original code. this is still fugly, but this preserves all the existing goo. ok doug@
2015-07-15Memory leak; Coverity CID 78836Miod Vallat
ok beck@
2015-07-15Unchecked allocations, and make sure we do not leak upon error. FixesMiod Vallat
Coverity CID 21739 and more. ok bcook@
2015-07-15Avoid leaking objects upon error; tweaks & ok doug@Miod Vallat
2015-02-17Memory leak in error path. Coverity CID 78822.Miod Vallat
ok doug@
2015-02-15Check ASN1_OCTET_STRING_new() for failure. Coverity CID 78904Miod Vallat
ok doug@
2015-02-14Memory leak in `should not happen' condition; Coverity CID 78889.Miod Vallat
ok doug@ jsing@
2015-02-14Memory leak upon error; Coverity CID 78857Miod Vallat
ok doug@ jsing@ CVy: Committing in .
2015-02-13Don't leak memory on errors - fixes coverity issues 105353 105253Bob Beck
ok guenther@ jsg@
2015-02-10unifdef OPENSSL_NO_RFC3779 - this is currently disabled and unlikely toJoel Sing
be enabled, mostly since people use SANs instead. ok beck@ guenther@
2015-02-10Remove more IMPLEMENT_STACK_OF noops that have been hiding for the lastJoel Sing
15 years.
2015-02-10The IMPLEMENT_STACK_OF and IMPLEMENT_ASN1_SET_OF macros were turned intoJoel Sing
noops around 15 years ago. Remove multiple occurances of both that still exist in the code today.
2015-02-10Expand the IMPLEMENT_ASN1_ALLOC_FUNCTIONS macro so that the code is visibleJoel Sing
and functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-09Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible andJoel Sing
functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-07Delete a lot of #if 0 code in libressl.Doug Hogan
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
2014-12-06Avoid modifying input on failure in X509_(TRUST|PURPOSE)_add.Doug Hogan
If X509_TRUST_add() or X509_PURPOSE_add() fail, they will leave the object in an inconsistent state since the name is already freed. This commit avoids changing the original name unless the *_add() call will succeed. Based on BoringSSL's commit: ab2815eaff6219ef57aedca2f7b1b72333c27fd0 ok miod@
2014-11-18further BUF_strdup conversion: these places should be safe to rely onTed Unangst
the function argument not being NULL
2014-10-28Check the result of sk_*_push() operations for failure.Miod Vallat
ok doug@ jsing@
2014-10-05The fixes to X509_PURPOSE_add() in r1.18 actually could cause a globalMiod Vallat
X509_PURPOSE object (obtained with X509_PURPOSE_get0() instead of being allocated in the function) to be freed if modifying that object would fail due to a low memory condition, while this object would still be referenced elsewhere. Fix this by only cleaning the object if we did not allocate it here. While there, fail early if either `name' or `sname' are NULL, rather than allocating an object and realizing we have nothing to strdup() into it. ok guenther@
2014-10-05Be sure to check the stack push operation for success in v2i_POLICY_MAPPINGS();Miod Vallat
if it fails, free the object we were about to push. Factor error handling to avoid having four copies of about the same code. ok guenther@
2014-10-05In v2i_AUTHORITY_INFO_ACCESS(), separate object allocation from object pushMiod Vallat
on a stack; if the latter fails, we need to free the object before returning failure. ok guenther@
2014-10-05Memory leak upon error in set_dist_point_name().Miod Vallat
ok guenther@
2014-10-05Be sure to check object allocation for success before using them.Miod Vallat
Tweaks and ok guenther@
2014-10-05Missing deallocation upon error.Miod Vallat
ok deraadt@ guenther@
2014-10-05Fix memory leak in the error path of v2i_AUTHORITY_KEYID().Miod Vallat
ok deraadt@ guenther@
2014-07-23level_add_node(): if a memory allocation failure causes us to attempt to cleanMiod Vallat
up and return failure, be sure the cleanup work does NOT free objects which are still being referenced by other objects. ok guenther@
2014-07-13The bell tolls for BUF_strdup - Start the migration to usingBob Beck
intrinsics. This is the easy ones, a few left to check one at a time. ok miod@ deraadt@
2014-07-11Only import cryptlib.h in the four source files that actually need it.Joel Sing
Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
2014-07-10Explicitly include <openssl/opensslconf.h> in every file that referencesJoel Sing
an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
2014-07-10Upon realloc() failure, free() the original pointer and remove the stupidMiod Vallat
comments implying you don't have to. ok tedu@
2014-07-10Stop including standard headers via cryptlib.h - pull in the headers thatJoel Sing
are needed in the source files that actually require them. ok beck@ miod@
2014-07-09{malloc,reallocarray} + memset(,0,) -> callocMiod Vallat
ok tedu@
2014-06-28Fix 9 memory leaks.Loganaden Velvindron
(Thanks to Brent Cook) With help from tedu@ OK from tedu@
2014-06-12tags as requested by miod and teduTheo de Raadt
2014-06-11c-file-style hints, begone; ok beckTheo de Raadt
2014-06-07Remove various test stubs. The good ones have been moved by jsingTheo de Raadt
and others to the regress framework. These remaining ones just muddle us up when re-reading code repeatedly. ok jsing