summaryrefslogtreecommitdiff
path: root/lib/libcrypto/pem
AgeCommit message (Collapse)Author
2015-07-19Drop stupid (int) casts for the arguments of malloc() and friends. This isMiod Vallat
not 16-bit MS-DOS anymore. ok bcook@ tedu@
2015-07-16Make sure the `reject negative sizes' logic introduced in 1.34 is actuallyMiod Vallat
applied to all code paths. ok beck@ bcook@ doug@ guenther@
2015-05-15Fix return paths with missing EVP_CIPHER_CTX_cleanup() calls.Jonathan Gray
ok doug@
2015-02-11Guenther has plans for OPENSSL_NO_CMS, so revert this for the moment.Bob Beck
2015-02-11get rid of OPENSSL_NO_CMS code we do not use.Bob Beck
ok miod@
2015-02-11Enable building with -DOPENSSL_NO_DEPRECATED.Doug Hogan
If you didn't enable deprecated code, there were missing err.h and bn.h includes. This commit allows building with or without deprecated code. This was not derived from an OpenSSL commit. However, they recently enabled OPENSSL_NO_DEPRECATED in git and fixed these header problems in a different way. Verified with clang that this only changes line numbers in the generated asm. ok miod@
2015-02-10Replace assert() and OPENSSL_assert() calls with proper error return paths.Miod Vallat
Careful review, feedback & ok doug@ jsing@
2014-10-22Use arc4random_buf() instead of RAND_bytes() or RAND_pseudo_bytes().Joel Sing
arc4random_buf() is guaranteed to always succeed - it is worth noting that a number of the replaced function calls were already missing return value checks. ok deraadt@
2014-10-18None of these need to include <openssl/rand.h>Joel Sing
2014-07-23Make sure PEM_def_callback() correctly handles negative buffer sizes; all usesMiod Vallat
within libcrypto are safe, but until we can change this function prototype to use size_t instead of int, better be safe than sorry. tweaks and ok guenther@
2014-07-12if (x) FOO_free(x) -> FOO_free(x).Miod Vallat
Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
2014-07-11Missing bounds check in do_PVK_body(); OpenSSL RT #2277, from OpenSSL trunk,Miod Vallat
but without a memory leak.
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-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-10delete some casts. ok miodTed Unangst
2014-07-10Missing allocation checks and potential NULL pointer dereference in theMiod Vallat
error path in PEM_X509_INFO_read_bio(); ok guenther@ jsing@
2014-07-09remove unused, private version strings except SSL_version_strBrent Cook
Also remove unused des_ver.h, which exports some of these strings, but is not installed. ok miod@ tedu@
2014-06-12tags as requested by miod and teduTheo de Raadt
2014-06-07malloc() result does not need a cast.Theo de Raadt
ok miod
2014-06-01Avoid the use of an uninitialised variable. In reality, this is a non-issueJoel Sing
since the calculated value is not actually used in the uninitialised case. Change the code so that we only do the calculation if we actually need it. Issue detected by clang and reported by both brad@ and Brent Cook.
2014-05-30more: no need for null check before freeTheo de Raadt
ok tedu guenther
2014-05-29convert 53 malloc(a*b) to reallocarray(NULL, a, b). that is 53Theo de Raadt
potential integer overflows easily changed into an allocation return of NULL, with errno nicely set if need be. checks for an allocations returning NULL are commonplace, or if the object is dereferenced (quite normal) will result in a nice fault which can be detected & repaired properly. ok tedu
2014-05-29Everything sane has stdio, and FILE *. we don't need ifdefs for this.Bob Beck
ok to firebomb from tedu@
2014-05-26We don't really to keep history in constructs such as:Miod Vallat
#if 1 /* new with openssl 0.9.4 */ current code; #else obsolete code; #endif
2014-05-24Almost nothing actually needs to include <openssl/e_os2.h>, however byJoel Sing
including it they get <openssl/opensslconf.h>. So instead of pulling in <openssl/e_os2.h>, just pull in <openssl/opensslconf.h>. "go ahead" miod@
2014-05-22if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefullyMiod Vallat
eyeballed before applying. Contributed by Cyril Roelandt on tech@
2014-04-26Replace all use of ERR_add_error_data with ERR_asprintf_error_data.Bob Beck
This avoids a lot of ugly gymnastics to do snprintfs before sending the bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c where it was being called with the incorrect number of arguments and using random things off the stack as addresses of strings. ok krw@, jsing@
2014-04-23Unifdef -UPEDANTIC. ok beck@ tedu@Miod Vallat
2014-04-21More KNF.Joel Sing
2014-04-21KNF.Joel Sing
2014-04-20Restore beck's rev 1.7: snprintf() was reviewed.Philip Guenther
Also, use sizeof() for snprintf()'s size argument
2014-04-19We'll interpret a (void) cast on snprintf() to mean it's been verified thatPhilip Guenther
truncation is either desirable, not an issue, or is detected and handled later ok deraadt@
2014-04-19use intrinsic strlcpy and strlcat everywhere so we only have one set ofBob Beck
funcitons to check for incorrect use. keep BUF_strlcpy and BUF_strlcat for API comptibility only. ok tedu@
2014-04-17fix some of the leaksJonathan Gray
ok miod@ looks good deraadt@
2014-04-17Change library to use intrinsic memory allocation functions instead ofBob Beck
OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
2014-04-17Do not feed RSA private key information to the random subsystem asTheo de Raadt
entropy. It might be fed to a pluggable random subsystem.... What were they thinking?! ok guenther
2014-04-15we don't use these files for buildingTed Unangst
2014-04-15remove FIPS mode support. people who require FIPS can buy something thatTed Unangst
meets their needs, but dumping it in here only penalizes the rest of us. ok beck deraadt
2014-04-15Send the rotIBM stream cipher (ebcdic) to Valhalla to party for eternityBob Beck
with the bearded ones... some API's that nobody should be using will dissapear with this commit.
2014-04-15Part 1 of eliminating BIO_snprintf(). This fixes mechanical conversionsBob Beck
where the return value is ignored changing to (void) snprintf. ok deraadt@
2014-04-14remove auto-generated dependencies from the old unused build system, soTheo de Raadt
that it is easier to find code pieces. They are getting in the way. ok miod
2014-04-13Cope with the removal of openssl/symhacks.hTheo de Raadt
2014-04-13Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.Miod Vallat
2011-11-03openssl-1.0.0e: resolve conflictsDamien Miller
2010-10-01resolve conflicts, fix local changesDamien Miller
2010-10-01import OpenSSL-1.0.0aDamien Miller
2009-04-06resolve conflictsDamien Miller
2009-01-09resolve conflictsDamien Miller
2008-09-06resolve conflictsDamien Miller