Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Get rid of the last remaining BUF_strdup and BUF_strlcpy and friends, use | beck | 2014-10-16 | 1 | -2/+3 | |
| | | | | | intrinsic functions everywhere, and wrap these functions in an #ifndef LIBRESSL_INTERNAL to make sure we don't bring their use back. | |||||
* | Previous fix (1.12) would cause a NULL pointer dereference in the error path | miod | 2014-09-29 | 1 | -4/+3 | |
| | | | | | if a NULL stack was passed as argument. Fix this by returning NULL early in that case. | |||||
* | check_cert(): be sure to reset ctx->current_crl to NULL before freeing it. | miod | 2014-09-29 | 1 | -10/+5 | |
| | | | | | | | | | X509_STORE_CTX_init(): do not free the X509_STORE_CTX * parameter upon failure, for we did not allocate it and it might not come from the heap, such as in check_crl_path() in this very same file where X509_STORE_CTX_init() gets invoked with a stack address. ok bcook@ | |||||
* | X509_NAME_get_text_by_OBJ(): make sure we do not pass a negative size to | miod | 2014-09-29 | 1 | -3/+5 | |
| | | | | | memcpy(). ok bcook@ | |||||
* | X509_VERIFY_PARAM_set1_name(): if invoked with NULL as the second | miod | 2014-09-29 | 1 | -1/+2 | |
| | | | | | parameter, correctly set param->name to NULL after having freed it. ok bcook@ | |||||
* | X509v3_add_ext(): do not free stuff we did not allocate in the error path. | miod | 2014-09-28 | 1 | -2/+2 | |
| | | | | ok bcook@ | |||||
* | X509_TRUST_add(): check X509_TRUST_get0() return value before dereferencing it, | miod | 2014-09-28 | 1 | -15/+23 | |
| | | | | | | for it may be NULL. Do not leak memory upon error. ok bcook@ | |||||
* | Someone (TM) thought it was smart to save memory by using malloc(1) and | miod | 2014-09-28 | 1 | -5/+4 | |
| | | | | | | | | | | | | | manual field fiddling to create an ASN1_INTEGER object, instead of using M_ASN1_INTEGER_new() which will allocate sizeof(long) bytes. That person had probably never looked into malloc(3) and never heard of allocation size rounding. Thus, replace the obfuscated code with M_ASN1_INTEGER_new() followed by ASN1_INTEGER_set(), to achieve a similar result, without the need for /* version == 0 */ comments. ok bcook@ | |||||
* | X509_STORE_new(): do not leak memory upon error. | miod | 2014-09-26 | 1 | -14/+17 | |
| | | | | | | | X509_STORE_get1_certs(), X509_STORE_get1_crls(): check the result of allocations. ok tedu@ | |||||
* | X509_issuer_and_serial_hash(): do not leak memory if an error occurs during | miod | 2014-09-26 | 1 | -1/+3 | |
| | | | | | | the first EVP block. ok tedu@ | |||||
* | X509at_add1_attr(): do not free stuff we did not allocate in the error path. | miod | 2014-09-26 | 1 | -3/+3 | |
| | | | | ok tedu@ | |||||
* | Fix regression introduced in revision 1.15 by using strndup() instead of | miod | 2014-09-23 | 1 | -6/+6 | |
| | | | | | | strdup() to allocated directory list components. ok jsing@ | |||||
* | BIO_free() returns immediately when the sole input is NULL. | doug | 2014-07-25 | 1 | -5/+3 | |
| | | | | | | Remove unnecessary NULL check. ok miod@ | |||||
* | Kill a bunch more BUF_strdup's - these are converted to have a check for | beck | 2014-07-22 | 1 | -2/+4 | |
| | | | | | NULL before an intrinsic strdup. ok miod@ | |||||
* | Free sktmp when it's no longer needed. By doing so, we fix a bunch of memory ↵ | logan | 2014-07-17 | 1 | -2/+4 | |
| | | | | | | | | leaks. From miod@ OK from miod@ and guenther@ | |||||
* | Check X509_NAME_oneline() return value when it will have to allocate memory. | miod | 2014-07-13 | 1 | -1/+3 | |
| | ||||||
* | jsing and I are investigating removal of all? most? 'getenv from library' | deraadt | 2014-07-12 | 1 | -1/+3 | |
| | | | | | | | instances. This one for OPENSSL_ALLOW_PROXY_CERTS gets turned off first, especially since it had this special comment: /* A hack to keep people who don't want to modify their software happy */ ok beck jsing | |||||
* | if (x) FOO_free(x) -> FOO_free(x). | miod | 2014-07-12 | 1 | -3/+2 | |
| | | | | | | | Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@ | |||||
* | Principle of least surprise: make CMAC_CTX_free(), OCSP_REQ_CTX_free() and | miod | 2014-07-12 | 1 | -1/+4 | |
| | | | | | X509_STORE_CTX_free() accept NULL pointers as input without dereferencing them, like all the other well-behaved *_CTX_free() functions do. | |||||
* | When looking for the issuer of a certificate, if the current candidate is | miod | 2014-07-11 | 3 | -13/+97 | |
| | | | | | | | expired or not valid yet, continue looking; only return an expired certificate if no valid certificates have been found. OpenSSL PR #3359 via OpenSSL trunk. | |||||
* | Only import cryptlib.h in the four source files that actually need it. | jsing | 2014-07-11 | 22 | -85/+85 | |
| | | | | | | | | 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@ | |||||
* | Explicitly include <openssl/opensslconf.h> in every file that references | jsing | 2014-07-10 | 7 | -9/+25 | |
| | | | | | | | | | 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. | |||||
* | Stop including standard headers via cryptlib.h - pull in the headers that | jsing | 2014-07-10 | 8 | -12/+26 | |
| | | | | | | are needed in the source files that actually require them. ok beck@ miod@ | |||||
* | delete some casts. ok miod | tedu | 2014-07-10 | 1 | -2/+2 | |
| | ||||||
* | remove unused, private version strings except SSL_version_str | bcook | 2014-07-09 | 1 | -3/+1 | |
| | | | | | | Also remove unused des_ver.h, which exports some of these strings, but is not installed. ok miod@ tedu@ | |||||
* | Memory-leak-in-error-path of the day in X509_ATTRIBUTE_set1_data(). | miod | 2014-07-03 | 1 | -2/+3 | |
| | | | | ok logan@ beck@ | |||||
* | Fix a memory leak and another one that occurs in the error paths. | logan | 2014-06-28 | 1 | -2/+6 | |
| | | | | | | | (Thanks to Brent Cook) OK from tedu@ | |||||
* | Unifdef -UNO_SYS_TYPES_H | miod | 2014-06-24 | 1 | -4/+2 | |
| | ||||||
* | Since this is a library, place issetugid() before every getenv() | deraadt | 2014-06-23 | 2 | -5/+7 | |
| | | | | ok miod | |||||
* | wrap getenv OPENSSL_ALLOW_PROXY_CERTS in an issetugid check, to protect | deraadt | 2014-06-20 | 1 | -2/+2 | |
| | | | | | setuid applications from being fooled. ok miod | |||||
* | check stack push return and make some effort to clean up. ok beck miod | tedu | 2014-06-19 | 1 | -2/+6 | |
| | ||||||
* | improve error checking. set error code on error, and check malloc return. | tedu | 2014-06-19 | 1 | -2/+13 | |
| | | | | add missing unlock in one case. ok lteo miod | |||||
* | tags as requested by miod and tedu | deraadt | 2014-06-12 | 26 | -26/+26 | |
| | ||||||
* | Stop setting the EVP_MD_CTX_FLAG_NON_FIPS_ALLOW - it has been ignored since | jsing | 2014-06-11 | 1 | -1/+0 | |
| | | | | | | OpenSSL 1.0.0. ok miod@ (a little while back) | |||||
* | malloc() result does not need a cast. | deraadt | 2014-06-07 | 3 | -6/+6 | |
| | | | | ok miod | |||||
* | no need for null check before free. from Brendan MacDonell | tedu | 2014-05-30 | 2 | -4/+2 | |
| | ||||||
* | convert 53 malloc(a*b) to reallocarray(NULL, a, b). that is 53 | deraadt | 2014-05-29 | 1 | -1/+1 | |
| | | | | | | | | | 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 | |||||
* | Everything sane has stdio, and FILE *. we don't need ifdefs for this. | beck | 2014-05-29 | 2 | -22/+0 | |
| | | | | ok to firebomb from tedu@ | |||||
* | Any sane platform has stdio. Stop pretending we will ever use a platform | beck | 2014-05-29 | 3 | -8/+0 | |
| | | | | | that does not. "fire bomb" tedu@ | |||||
* | calloc instead of malloc/memset. from Benjamin Baier | tedu | 2014-05-25 | 2 | -4/+2 | |
| | ||||||
* | Almost nothing actually needs to include <openssl/e_os2.h>, however by | jsing | 2014-05-24 | 1 | -1/+2 | |
| | | | | | | | 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@ | |||||
* | Replace all use of ERR_add_error_data with ERR_asprintf_error_data. | beck | 2014-04-26 | 2 | -2/+2 | |
| | | | | | | | | 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@ | |||||
* | Restore beck's (void)snprintf(): they were reviewed. | guenther | 2014-04-20 | 2 | -3/+3 | |
| | ||||||
* | KNF. | jsing | 2014-04-20 | 5 | -238/+305 | |
| | ||||||
* | More KNF. | jsing | 2014-04-20 | 2 | -3/+3 | |
| | ||||||
* | KNF. | jsing | 2014-04-20 | 6 | -714/+951 | |
| | ||||||
* | KNF. | jsing | 2014-04-20 | 6 | -470/+592 | |
| | ||||||
* | KNF. | jsing | 2014-04-20 | 4 | -264/+359 | |
| | ||||||
* | More KNF. | jsing | 2014-04-19 | 3 | -33/+34 | |
| | ||||||
* | We'll interpret a (void) cast on snprintf() to mean it's been verified that | guenther | 2014-04-19 | 2 | -2/+2 | |
| | | | | | | truncation is either desirable, not an issue, or is detected and handled later ok deraadt@ |