summaryrefslogtreecommitdiff
path: root/src/lib/libssl (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Assign p to CBS_data since it is used later.doug2015-07-192-4/+6
| | | | | | The p initialization was hiding this bug but Coverity 126279 saw it. ok miod@ bcook@ beck@
* abort when ENGINE_remove fails, fix Coverity 21656bcook2015-07-191-5/+2
| | | | ok doug@, beck@
* Convert dtls1_get_message_header to CBS and change to int.doug2015-07-186-32/+74
| | | | | | | Changed return value from void to int. It should never return an error given that the input length is not checked yet. ok miod@
* rand_err doesn't exist anymore, coverity 78808beck2015-07-181-3/+3
| | | | ok doug@
* Coverity 21651beck2015-07-181-3/+7
| | | | ok doug@
* Convert dtls1_get_record to CBS.doug2015-07-182-42/+56
| | | | ok miod@, input + ok jsing@
* Remove repeated code in dtls1_get_record.doug2015-07-182-80/+32
| | | | | | | | The "if" is a bit ugly, but this does remove a lot of repetitive code. This will be converted to CBS later as well. ok miod@ jsing@ roughly ok with it after seeing the CBS version
* Dead code, Coverity 78798beck2015-07-181-3/+1
| | | | ok bcook@ doug@
* Coverity ID 78910 - Yet another stupid API designed to not show failures. do thebeck2015-07-181-6/+8
| | | | | | | | | | lease worst alternative and do nothing rather than dereference NULL, but having a function with fundamentally broken API to simply make a list of strings, sort them, and call a function with each string as an argument is really quite silly.... and of course it was exposed API that the ecosystem uses that we can't delete.. yet. ok miod@ doug@
* Remove SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER workaround.doug2015-07-1810-58/+26
| | | | | | This was a hack to work around problems on IE 6 with SSLv3. ok miod@ bcook@
* Check the return value of ASN1_STRING_set(), for it may fail to allocatemiod2015-07-182-6/+14
| | | | | memory. Coverity CID 24810, 24846. ok bcook@ doug@
* Remove support for the SSL_OP_TLS_D5_BUG compat hack from SSLeay.doug2015-07-186-28/+22
| | | | | | | | This is a 17 year old workaround from SSLeay 0.9.0b. It was for clients that send RSA client key exchange in TLS using SSLv3 format (no length prefix). ok jsing@
* Fix leak found by coverity, issue 78897 - which also brough tobeck2015-07-183-25/+33
| | | | | | light that the child counting was broken in the original code. this is still fugly, but this preserves all the existing goo. ok doug@
* delete doubled words;schwarze2015-07-174-4/+4
| | | | patch from Theo Buehler <theo at math dot ethz dot ch>
* extenstion -> extensionmiod2015-07-171-1/+1
|
* Convert ssl_parse_serverhello_use_srtp_ext to CBS.doug2015-07-174-24/+34
| | | | ok miod@ jsing@
* Remove compat hack that disabled ECDHE-ECDSA on OS X.doug2015-07-1710-208/+26
| | | | | | | | | For a few old releases, ECDHE-ECDSA was broken on OS X. This option cannot differentiate between working and broken OS X so it disabled ECDHE-ECDSA support on all OS X >= 10.6. 10.8-10.8.3 were the faulty releases but these are no longer relevant. Tested on OS X 10.10 by jsing. ok jsing@
* Remove workaround for TLS padding bug from SSLeay days.doug2015-07-1712-74/+24
| | | | | | | | | OpenSSL doesn't remember which clients were impacted and the functionality has been broken in their stable releases for 2 years. Based on OpenSSL commit a8e4ac6a2fe67c19672ecf0c6aeafa15801ce3a5. ok jsing@
* Bump LIBRESSL_VERSION defines.bcook2015-07-161-3/+7
| | | | | | | Moving forward, software should expect that LIBRESSL_VERSION_TEXT and LIBRESSL_VERSION_NUMBER will increment for each LibreSSL-portable release. ok deraadt@, beck@
* Enforce V_ASN1_OCTET_STRING type before accessing the object as octet string;miod2015-07-161-2/+4
| | | | | from OpenSSL (RT #3683) ok doug@ jsing@
* After reading a password with terminal echo off, restore the terminal toguenther2015-07-161-6/+5
| | | | | | | its original state instead of blindly turning echo on. problem reported on the openssl-dev list by William Freeman ok miod@ beck@
* Explicitely cast a char into unsigned long before shifting it left by 24, formiod2015-07-161-2/+2
| | | | | | | | | | | this would promote it to int for the shift, and then cast to unsigned long, sign-extending it if sizeof(long) > sizeof(int). This was not a problem because the computed value was explicitely range checked afterwards, with an upper bound way smaller than 1U<<31, but it's better practice to cast correctly. ok beck@
* Check return value of all used functions in OCSP_REQUEST_print(); coversmiod2015-07-161-5/+9
| | | | Coverity CID 78796; ok beck@
* Make sure the `reject negative sizes' logic introduced in 1.34 is actuallymiod2015-07-161-3/+4
| | | | | applied to all code paths. ok beck@ bcook@ doug@ guenther@
* check n before cbs_init, coverity - ID 125063beck2015-07-152-6/+18
| | | | ok bcook@ miod@
* test for n<0 before use in CBS_init - mostly to shut up coverity.beck2015-07-156-22/+66
| | | | reluctant ok miod@
* Flense out dead code, we don't do ecdhe_clnt_cert.beck2015-07-154-374/+150
| | | | | coverity ID's 21691 21698 ok miod@, "Fry it" jsing@
* Fix inverted test in previous. Commit message told what we intended, butmiod2015-07-151-2/+2
| | | | we did not notice my fingers slipping. Noticed by bcook@
* Remove dead code. Coverity CID 21688miod2015-07-151-4/+1
| | | | ok beck@
* Fix two theoretical NULL pointer dereferences which can only happen if youmiod2015-07-151-4/+9
| | | | | | | | have seriously corrupted your memory; Coverity CID 21708 and 21721. While there, plug a memory leak upon error in x509_name_canon(). ok bcook@ beck@
* Fix possible 32 byte buffer overrun, found by coverity, CID 78869beck2015-07-151-2/+2
| | | | ok miod@
* Memory leak; Coverity CID 78836miod2015-07-151-6/+8
| | | | ok beck@
* Unchecked allocations, and make sure we do not leak upon error. Fixesmiod2015-07-151-21/+36
| | | | | Coverity CID 21739 and more. ok bcook@
* Avoid leaking objects upon error; tweaks & ok doug@miod2015-07-151-18/+18
|
* Do not allow TS_check_signer_name() with signer == NULL frommiod2015-07-151-1/+4
| | | | | | | | | | | | | | | | | int_TS_RESP_verify_token(). Coverity CID 21710. Looking further, int_TS_RESP_verify_token() will only initialize signer to something non-NULL if TS_VFY_SIGNATURE is set in ctx->flags. But guess what? TS_REQ_to_TS_VERIFY_CTX() in ts/ts_verify_ctx.c, which is the TS_VERIFY_CTX constructor, explicitely clears this bit, with: ret->flags = TS_VFY_ALL_IMPRINT & ~(TS_VFY_TSA_NAME | TS_VFY_SIGNATURE); followed by more conditional flag clears. Of course, nothing prevents the user to fiddle with ctx->flags afterwards. This is exactly what ts.c in usr.bin/openssl does. This is gross, mistakes will happen. ok beck@
* Previous fix for Coverity CID 21785 did not cope correctly with seed_len != 0,miod2015-07-151-1/+3
| | | | | | seed_in == NULL case. Since this situation is an error anyway, bail out early. with and ok beck@
* Partially convert ssl3_get_message to CBS.doug2015-07-142-12/+30
| | | | | | | | Unlike the other conversions, this only partially converts the function for now. This is the second to last function which still uses the n2l3 macro. That macro is deprecated since we're using CBS. ok miod@ jsing@
* Convert dtls1_get_hello_verify to CBS.doug2015-07-142-34/+46
| | | | ok miod@ jsing@
* Convert ssl3_get_cipher_by_char to CBS.doug2015-07-142-4/+16
| | | | ok miod@ jsing@
* Convert ssl3_get_client_certificate to CBS.doug2015-07-142-30/+38
| | | | ok miod@ jsing@
* Convert ssl3_get_finished to CBS.doug2015-07-142-12/+18
| | | | ok miod@ jsing@
* Convert ssl_parse_clienthello_use_srtp_ext to CBS.doug2015-07-144-84/+50
| | | | ok miod@ jsing@
* Convert ssl3_get_cert_status to CBS.doug2015-07-142-34/+52
| | | | ok miod@ jsing@
* Convert ssl3_get_server_certificate to CBS.doug2015-07-142-34/+36
| | | | ok miod@
* fix the build on arm after the recent addition of -Wundefjsg2015-06-291-2/+2
| | | | ok doug@ deraadt@
* Convert ssl_bytes_to_cipher_list to CBS.doug2015-06-284-20/+40
| | | | | | | Link in the new 'unit' regress and expand the invalid tests to include some that would fail before the CBS conversion. input + ok miod@ jsing@
* Fix pointer to unsigned long conversion.doug2015-06-272-5/+7
| | | | | | | bcook@ notes that this check really only impacted 64-bit Windows. Also, changed the check to be unsigned for consistency. ok bcook@
* Put BUF_memdup() and BUF_reverse() under #ifndef LIBRESSL_INTERNAL.jsing2015-06-241-3/+2
|
* Stop using BUF_memdup() within the LibreSSL code base - it is correctlyjsing2015-06-244-12/+14
| | | | | | spelt malloc+memcpy, which is what is used in all except two places. ok deraadt@ doug@
* Change CBS_dup() to also sync the offset.doug2015-06-232-2/+4
| | | | | | | Previously, CBS_dup() had its own offset. However, it is more consistent to copy everything. ok miod@ jsing@