summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't include asn1_mac.h if all you need is asn1.h.miod2014-07-132-4/+4
|
* Take out __bounded__ in the include files we use it in when not on OpenBSD.beck2014-07-138-10/+32
| | | | | | | while we can take it out in portable at compile time, it is still a problem when we install this header file on a system that doesn't support __bounded__ if this is unguarded. ok miod@ bcook@
* While we thought this would make portable life easier it actuallybeck2014-07-131-3/+1
| | | | | makes it much harder. ok bcook@ kettenis@
* No need to include evp_locl.h in there.miod2014-07-1312-36/+12
|
* Take away the use of the address of main as a source of entropy. Causesbeck2014-07-136-6/+30
| | | | | | distractions to people testing and seeing link errors in some setups. This will come back in another form ok deraadt@
* KNF and some code cleaning.jsing2014-07-132-72/+92
|
* remove silly castderaadt2014-07-132-4/+4
|
* Another large dose of KNF.jsing2014-07-132-472/+814
|
* Apply a large dose of KNF.jsing2014-07-122-252/+404
|
* duplicate function names in head1miod2014-07-122-2/+2
|
* The correct name for EDH is DHE, likewise EECDH should be ECDHE.jsing2014-07-1218-236/+236
| | | | | | Based on changes to OpenSSL trunk. ok beck@ miod@
* No need to include asn1_mac.h here.miod2014-07-124-8/+4
|
* remove double brackets. fixes build with clang.jsg2014-07-122-4/+4
| | | | ok jsing@
* Remove this sentence:miod2014-07-122-6/+4
| | | | | | | ``The probability that a randomly generated key is weak is -1/2^52, so it is not really worth checking for them.'' This kind of naively optimistic attitude is not compatible with security.
* more MLINKSmiod2014-07-121-1/+56
|
* getentropy on Windows. It compiles but has not been thoroughly tested yet.wouter2014-07-122-0/+112
| | | | OK: beck@
* Remove signed/unsigned warning, statement before declaration andwouter2014-07-126-58/+64
| | | | | | add a function to use function pointers that does not take sizeof(fptr). OK beck@
* We have EVP_CIPH_FLAG_DEFAULT_ASN1 in evp.h; no need to keep constructs tomiod2014-07-122-68/+56
| | | | | | build on pre-EVP_CIPH_FLAG_DEFAULT_ASN1 codebases. ok jsing@
* Remove private_{Camellia,RC4}_set_key FIPS indirection tentacles, as has beenmiod2014-07-1219-314/+73
| | | | done for other symmetric algorithms recently.
* Provide ssl_version_string() function, which uses one of those modern Cjsing2014-07-128-56/+62
| | | | | | | | constructs (a switch statement) and returns the appropriate string defined by SSL_TXT_* for the given version, including support for DTLSv1 and DTLSv1-bad. Use this function in SSL_get_version() and SSL_SESSION_print(). ok beck@
* In openssl_startup(), call SSL_library_init() and SSL_load_error_strings().jsing2014-07-128-28/+10
| | | | | | | | This allows us to remove the ERR_load_crypto_strings() call, along with the various SSL_load_error_strings() and OpenSSL_add_ssl_algorithms() calls scattered around the place. ok beck@
* Make the BLOCK_CIPHER_{generic,custom} macros expand to more readable structmiod2014-07-122-134/+204
| | | | definitions using C99 field initializers. No functional change.
* Wrap "thread_private.h" with #ifdef __OpenBSD__ so that other systemsderaadt2014-07-121-1/+3
| | | | | | can copy this file (plus chacha_private.h) directly and reuse it trivially. Well, as long as they have a getentropy() as well.. ok beck
* Remove extra parenthesis.jsing2014-07-122-4/+4
|
* need_cert is now always true, so remove the variable and associatedjsing2014-07-122-66/+42
| | | | | | conditionals. ok miod@
* More KNF.jsing2014-07-121-95/+108
|
* Remove #ifndefs for OPENSSL_NO_DH, OPENSSL_NO_ECDH andjsing2014-07-121-41/+0
| | | | | OPENSSL_NO_X509_VERIFY. We're not going to build with these and the same removal has already been done for libssl.
* openssl(1) is only built as a single monolithic binary, so just calljsing2014-07-1239-154/+47
| | | | | | load_config() once when we start. ok miod@
* jsing and I are investigating removal of all? most? 'getenv from library'deraadt2014-07-122-2/+6
| | | | | | | 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
* A few fixes/improvements:miod2014-07-122-40/+38
| | | | | | | | | | | | | | | | - first, BN_free == BN_clear_free in our libcrypto, so we do not need to treat CBIGNUM (crypto BN) separately from BIGNUM (regular BN). - then, in bn_i2c(), since BN_bn2bin returns BN_num_bytes(input), take advantage of this to avoid calling BN_num_bytes() a second time. BN_num_bytes() is cheap, but this not a reason to perform redundant work. - finally, in bn_c2i, if bn_new() fails, return early. Otherwise BN_bin2bn will try to create a BN too, and although this will probably fail since we were already out of memory, if we are on a threaded process and suddenly the allocation succeeds, we will leak it since it will never be stored in *pval. ok jsing@
* Make sure the return value of X509_NAME_oneline(, NULL,) is checked againstmiod2014-07-124-10/+26
| | | | | NULL. ok deraadt@ guenther@ jsing@
* if (x) FOO_free(x) -> FOO_free(x).miod2014-07-12128-1098/+638
| | | | | | | Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
* more MLINKsmiod2014-07-121-1/+4
|
* guard inclusion of sys/sysctl.h so we can detect at compile time andbeck2014-07-122-2/+6
| | | | | keep linux distros happy that don't have it. ok bcook@
* Principle of least surprise: make CMAC_CTX_free(), OCSP_REQ_CTX_free() andmiod2014-07-126-6/+24
| | | | | X509_STORE_CTX_free() accept NULL pointers as input without dereferencing them, like all the other well-behaved *_CTX_free() functions do.
* remove gratuitous differences, ok beckderaadt2014-07-122-78/+80
|
* remove gratuitous differences, ok beck bcookderaadt2014-07-124-24/+24
|
* Split arc4random_uniform into it's own file, to assist other projectsderaadt2014-07-123-39/+60
| | | | | | now using this as upstream code. The particular problem is systems that contain older arc4random derivations lacking arc4random_uniform(). ok tedu miod
* Solaris uses a symbolic link for /dev/urandom which harms best practice ofbeck2014-07-122-36/+68
| | | | | using O_NOFOLLOW - cope with it as best as possible by trying two different paths. - written by deraadt@ and kettenis@
* Remove remnants from PSK, KRB5 and SRP.jsing2014-07-1216-318/+86
| | | | ok beck@ miod@
* typosmiod2014-07-126-10/+10
|
* Place comments in a block above the if statement, rather than attemptingjsing2014-07-124-94/+126
| | | | | to interleave them within the conditions. Also fix wrapping and indentation.
* Make disabling last cipher work.guenther2014-07-122-18/+18
| | | | | From Thijs Alkemade via OpenSSL trunk ok miod@
* -DOPENSSL_NO_KRB5 is no longer neededderaadt2014-07-121-2/+2
| | | | ok guenther
* odds are that some ABI change occured today, no matter how careful everyonederaadt2014-07-122-2/+2
| | | | is
* enough churn, a crank is advised by guenther..deraadt2014-07-122-2/+2
|
* Initial version of libressl - a library that provides a clean, simple,jsing2014-07-129-0/+847
| | | | | | | | | | consistent and secure-by-default API for SSL clients (and soon servers). This is a long way from complete and the interface will likely change substantially - committing now so that further work can happen in the tree. Initiated by tedu@ and inspired by discussions with tedu@, beck@ and other developers.
* As reported by David Ramos, most consumer of ssl_get_message() perform latemiod2014-07-116-106/+296
| | | | | | | | | | | | | | | | | | bounds check, after reading the 2-, 3- or 4-byte size of the next chunk to process. But the size fields themselves are not checked for being entirely contained in the buffer. Since reading past your bounds is bad practice, and may not possible if you are using a secure memory allocator, we need to add the necessary bounds check, at the expense of some readability. As a bonus, a wrong size GOST session key will now trigger an error instead of a printf to stderr and it being handled as if it had the correct size. Creating this diff made my eyes bleed (in the real sense); reviewing it made guenther@'s and beck@'s eyes bleed too (in the literal sense). ok guenther@ beck@
* Provide LIBRESSL_VERSION_NUMBER for people who use such things tobeck2014-07-112-2/+4
| | | | | detect versions distinct from OPENSSL_BLAH_WOOF.. ok jsing@ tedu@ deraadt@
* Another regress test for OpenSSL PR #3397 (Joyent 7704), from agl via OpenSSLmiod2014-07-111-0/+57
| | | | RT.