summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)Author
2017-02-16Prepare for 1.1.0f-devMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-02-16Prepare for 1.1.0e releaseOpenSSL_1_1_0eMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-02-16Don't change the state of the ETM flags until CCS processingMatt Caswell
Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on negotiation of ETM, rather than at CCS. Therefore, during a renegotiation, if the ETM state is changing (usually due to a change of ciphersuite), then an error/crash will occur. Due to the fact that there are separate CCS messages for read and write we actually now need two flags to determine whether to use ETM or not. CVE-2017-3733 Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-01-28Document what EXFLAG_SET is for in x509v3.hRichard Levitte
Reviewed-by: Kurt Roeckx <kurt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2314) (cherry picked from commit 2d60c923141e7853c268364f26195343a5e995bf)
2017-01-26Prepare for 1.1.0e-devMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-01-26Prepare for 1.1.0d releaseOpenSSL_1_1_0dMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-01-26Better check of DH parameters in TLS dataRichard Levitte
When the client reads DH parameters from the TLS stream, we only checked that they all are non-zero. This change updates the check to use DH_check_params() DH_check_params() is a new function for light weight checking of the p and g parameters: check that p is odd check that 1 < g < p - 1 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2017-01-25Fix the overlapping check for fragmented "Update" operationsMatt Caswell
When doing in place encryption the overlapping buffer check can fail incorrectly where we have done a partial block "Update" operation. This fixes things to take account of any pending partial blocks. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2275) (cherry picked from commit 7141ba31969d0b378d08104a51f8f99b9187b9d5)
2017-01-18Clean dead macros and definesFdaSilvaYY
... mostly related to some old discarded modules . Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1906) (cherry picked from commit 31a51151fc163a7f5f4d07dff9478be50e4b5707)
2017-01-13Clarify what RUN_ONCE returnsRichard Levitte
RUN_ONCE really just returns 0 on failure or whatever the init function returned. By convention, however, the init function must return 0 on failure and 1 on success. This needed to be clarified. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2225) (cherry picked from commit 37b8f1e21c56996644afa38816f575b05eb483ae)
2017-01-12GH2176: Add X509_VERIFY_PARAM_get_timeRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2208) (cherry picked from commit 329f2f4a428b0acb7a579869a13f6cd6bf0a3551)
2017-01-09Rename "verify_cb" to SSL_verify_cbRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2151) (cherry picked from commit 3adc41dd22080c4161d8a2af98d7b29fdbb11915)
2017-01-09Doc nits: callback function typedefsRich Salz
Enhance find-doc-nits to be better about finding typedefs for callback functions. Fix all nits it now finds. Added some new typedef names to ssl.h some of which were documented but did not exist Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2151) (cherry picked from commit 121677b4875b08df99a48d20ab5c26f54782f21d)
2016-12-30Fix the SSL_set1_sigalgs() macroMatt Caswell
This macro has a typo in it which makes it unusable. This issue was already fixed in 1.0.2 in commit 75fdee04827, but the same fix was not applied to other branches. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2160) (cherry picked from commit fb3ae0e830097a3a2a41a0ea82c7ad725f05a451)
2016-12-20M_check_autoarg: sanity check the keyRichard Levitte
For now, checking that the size is non-zero will suffice. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2120) (cherry picked from commit d7c8f142ea5953bf260b70a58739c1c9b0f038eb)
2016-12-13Add X509_VERIFY_PARAM inheritance flag set/getRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2079)
2016-12-12Remove ENGINE_load_dasync() (no OPENSSL_INIT_ENGINE_DASYNC already)Azat Khuzhin
Fixes: 8d00e30f96fb86b20bc992f626b188c3548fc58c ("Don't try to init dasync internally") Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> CLA: trivial (cherry picked from commit b9b5181dd2f52ff0560a33b116396cdae5e48048)
2016-12-12Restore the ERR_FATAL_ERROR() macroBenjamin Kaduk
Commit 0cd0a820abc6124cf8e176fa92d620a2abf9e419 removed this macro along with many unused function and reason codes; ERR_FATAL_ERROR() was not used in the tree, but did have external consumers. Add it back to restore the API compatibility and avoid breaking applications for no internal benefit. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2049) (cherry picked from commit 036ba500f7886ca2e7231549fa574ec2cdd45cef)
2016-12-10VMS UI_OpenSSL: generate OpenSSL errors when things go wrong.Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2063) (cherry picked from commit c922ebe23247ff9ee07310fa30647623c0547cd9)
2016-12-10Check input length to pkey_rsa_verify()Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2065) (cherry picked from commit 71bbc79b7d3b1195a7a7dd5f547d52ddce32d6f0)
2016-12-08In UI_OpenSSL's open(), generate an error on unknown errnoRichard Levitte
TTY_get() sometimes surprises us with new errno values to determine if we have a controling terminal or not. This generated error is a helpful tool to figure out that this was what happened and what the unknown value is. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2043) (cherry picked from commit 4984448648f69ed4425df68900b1fd6f17c6c271)
2016-12-08UI_process() didn't generate errorsRichard Levitte
Since there are many parts of UI_process() that can go wrong, it isn't very helpful to only return -1 with no further explanation. With this change, the error message will at least show which part went wrong. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2037) (cherry picked from commit 0a687ab0a92d2d68289364a6e232028c229f44bb)
2016-11-16Remove a hack from ssl_test_oldMatt Caswell
ssl_test_old was reaching inside the SSL structure and changing the internal BIO values. This is completely unneccessary, and was causing an abort in the test when enabling TLSv1.3. I also removed the need for ssl_test_old to include ssl_locl.h. This required the addition of some missing accessors for SSL_COMP name and id fields. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit e304d3e20f45243f9e643607edfe4db49c329596)
2016-11-15Reword documentation for {SCT_CTX/CT_POLICY_EVAL_CTX}_set_timeRob Percival
Do not call the time "current", as a different time can be provided. For example, a time slightly in the future, to provide tolerance for CT logs with a clock that is running fast. Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1554) (cherry picked from commit 1871a5aa8a538c2b8ac3d302c1e9e72867f5ee0f)
2016-11-15Remove obsolete error constant CT_F_CTLOG_NEW_NULLRob Percival
ctlog_new_null() no longer exists. Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1554) (cherry picked from commit 333c2e43729a92cf37d4bd12d6a3531b4bd7e1da)
2016-11-15Check that SCT timestamps are not in the futureRob Percival
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1554) (cherry picked from commit 1fa9ffd934429f140edcfbaf76d2f32cc21e449b)
2016-11-14dsa/dsa_gen: add error message for seed_len < 0Sebastian Andrzej Siewior
prio openssl 1.1.0 seed_len < q was accepted and the seed argument was then ignored. Now DSA_generate_parameters_ex() returns an error in such a case but no error string. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1657) (cherry picked from commit af5474126546b558b0e6f8be4bec4b70977e24b7)
2016-11-10Prepare for 1.1.0d-devMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-10Prepare for 1.1.0c releaseOpenSSL_1_1_0cMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-07Implement RSASSA-PKCS1-v1_5 as specified.David Benjamin
RFC 3447, section 8.2.2, steps 3 and 4 states that verifiers must encode the DigestInfo struct and then compare the result against the public key operation result. This implies that one and only one encoding is legal. OpenSSL instead parses with crypto/asn1, then checks that the encoding round-trips, and allows some variations for the parameter. Sufficient laxness in this area can allow signature forgeries, as described in https://www.imperialviolet.org/2014/09/26/pkcs1.html Although there aren't known attacks against OpenSSL's current scheme, this change makes OpenSSL implement the algorithm as specified. This avoids the uncertainty and, more importantly, helps grow a healthy ecosystem. Laxness beyond the spec, particularly in implementations which enjoy wide use, risks harm to the ecosystem for all. A signature producer which only tests against OpenSSL may not notice bugs and accidentally become widely deployed. Thus implementations have a responsibility to honor the specification as tightly as is practical. In some cases, the damage is permanent and the spec deviation and security risk becomes a tax all implementors must forever pay, but not here. Both BoringSSL and Go successfully implemented and deployed RSASSA-PKCS1-v1_5 as specified since their respective beginnings, so this change should be compatible enough to pin down in future OpenSSL releases. See also https://tools.ietf.org/html/draft-thomson-postel-was-wrong-00 As a bonus, by not having to deal with sign/verify differences, this version is also somewhat clearer. It also more consistently enforces digest lengths in the verify_recover codepath. The NID_md5_sha1 codepath wasn't quite doing this right. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1474 (cherry picked from commit 608a026494c1e7a14f6d6cfcc5e4994fe2728836)
2016-11-02Add a DSO_dsobyaddr() functionMatt Caswell
This works the same way as DSO_pathbyaddr() but instead returns a ptr to the DSO that contains the provided symbol. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit b39eda7ee69a9277c722f8789736e00dc680cda6)
2016-11-02Partial revert of 3d8b2ec42 to add back DSO_pathbyaddrMatt Caswell
Commit 3d8b2ec42 removed various unused functions. However now we need to use one of them! This commit resurrects DSO_pathbyaddr(). We're not going to resurrect the Windows version though because what we need to achieve can be done a different way on Windows. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit cb6ea61c161e88aa0268c77f308469a67b2ec063)
2016-09-29Fix missing NULL checks in NewSessionTicket constructionMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 83ae4661315d3d0ad52ddaa8fa5c8f1055c6c6f6)
2016-09-26Prepare for 1.1.0c-devMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-26Prepare for 1.1.0b releaseOpenSSL_1_1_0bMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-22Prepare for 1.1.0b-devMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-22Prepare for 1.1.0a releaseOpenSSL_1_1_0aMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-22Add OCSP_RESPID_match()Matt Caswell
Add a function for testing whether a given OCSP_RESPID matches with a certificate. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-22Add the ability to set OCSP_RESPID fieldsMatt Caswell
OCSP_RESPID was made opaque in 1.1.0, but no accessors were provided for setting the name/key value for the OCSP_RESPID. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-21Don't allow too many consecutive warning alertsMatt Caswell
Certain warning alerts are ignored if they are received. This can mean that no progress will be made if one peer continually sends those warning alerts. Implement a count so that we abort the connection if we receive too many. Issue reported by Shi Lei. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit af58be768ebb690f78530f796e92b8ae5c9a4401)
2016-09-13bio.h: fix number of arguments passed to BIO_ptr_ctrl()Viktor Szakats
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1520) (cherry picked from commit c2efa78309e39019642f922b2babc1fd35f68768)
2016-08-25Prepare for 1.1.0a-devMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-25Prepare for 1.1.0 releaseOpenSSL_1_1_0Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-24Un-delete still documented X509_STORE_CTX_set_verifyViktor Dukhovni
It should not have been removed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-24Updates the CT_POLICY_EVAL_CTX PODRob Percival
Ownership semantics and function names have changed. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-24Documents the CTLOG functionsRob Percival
CTLOG_new_null() has been removed from the code, so it has also been removed from this POD. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-24Add comment about calling CT_POLICY_EVAL_CTX_freeRob Percival
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-24Fix comment about what SCT_LIST_validate does.Rob Percival
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-23Removes {i2o,o2i}_SCT_signature from the CT public APIRob Percival
They may return if an SCT_signature struct is added in the future that allows them to be refactored to conform to the i2d/d2i function signature conventions. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-23Internalizes SCT_verify and removes SCT_verify_v1Rob Percival
SCT_verify is impossible to call through the public API (SCT_CTX_new() is not part of the public API), so rename it to SCT_CTX_verify and move it out of the public API. SCT_verify_v1 is redundant, since SCT_validate does the same verification (by calling SCT_verify) and more. The API is less confusing with a single verification function (SCT_validate). Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>