summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-11-09Standardise our style for checking malloc failuresMatt Caswell
if we have a malloc |x = OPENSSL_malloc(...)| sometimes we check |x| for NULL and sometimes we treat it as a boolean |if(!x) ...|. Standardise the approach in libssl. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-09Remove redundant check from SSL_shutdownMatt Caswell
The SSL object was being deref'd and then there was a later redundant check to see if it is NULL. We assume all SSL_foo functions pass a non NULL SSL object and do not check it. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-09Make the match for previous cflags a bit more strictRichard Levitte
./Configure [target] --strict-warnings -Wno-pedantic-ms-format would not add '-pedantic' because it matches '-Wno-pedantic-ms-format', which was added first. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-08Replace L suffix with UDr. Stephen Henson
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-08Use uint32_t and int32_t for SSL_CIPHER structure.Dr. Stephen Henson
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-06Fix compilation problems with SCTPMatt Caswell
The SCTP code is not compiled by default. This fixes some compilation problems in that code. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-06Remove some redundant assignmentsMatt Caswell
We were setting |s->renegotiate| and |s->new_session| to 0 twice in tls_finish_handshake. This is redundant so now we just do it once! Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-11-06Don't finish the handshake twiceMatt Caswell
We finish the handshake when we move into the TLS_ST_OK state. At various points we were also unnecessarily finishing it when we were reading/writing the Finished message. It's much simpler just to do it in TLS_ST_OK, so remove the other calls. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-11-05Rebuild error source files.Dr. Stephen Henson
Rebuild error source files: the new mkerr.pl functionality will now pick up and translate static function names properly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-05fix discrepancyDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-05Read function names from C source files.Dr. Stephen Henson
In mkerr.pl read parse functions names in C source files and use them for translation and sanity checks. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-05Ensure the dtls1_get_*_methods work with DTLS_ANY_VERSIONMatt Caswell
The various dtls1_get*_methods did not handle the DTLS_ANY_VERSION case, so this needed to be added. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-04Minor EVP_SignInit_ex doc fixMatt Caswell
EVP_SignInit_ex was missing from the NAME section of its man page so typing "man EVP_SignInit_ex" failed to load the page. Reviewed-by: Stephen Henson <steve@openssl.org>
2015-11-02Fix usage of BIO_ctrl_set_connectedRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-02Remove the state parameter from BIO_ctrl_set_connectedRichard Levitte
The actual implementation has the state of the connection being controlled with the peer parameter, non-NULL meaning connected and NULL meaning connected. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-02BIO_s_datagram() ctrl doesn't support SEEK/TELL, so don't pretend it doesRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-02Correct or add comments indicating what controls belong to whatRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-02Remove PROXY controls that aren't used anywhereRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-02Remove dummy argument from BIO_get_bind_modeRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-02Document how BIO_get_conn_ip and BIO_get_conn_int_port actually workRichard Levitte
No dummy arguments. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-02Have BIO_get_conn_int_port use BIO_ctrl instead BIO_int_ctrlRichard Levitte
BIO_int_ctrl isn't made for the purpose BIO_get_conn_int_port used it for. This also changes BIO_C_GET_CONNECT to actually return the port instead of assigning it to a pointer that was never returned back to the caller. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-02Clarify the preferred way of creating patch filesMatt Caswell
Clarify that git format-patch output is preferred for creating patch files. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-02Remove a reachable assert from ssl3_write_bytesMatt Caswell
A buggy application that call SSL_write with a different length after a NBIO event could cause an OPENSSL_assert to be reached. The assert is not actually necessary because there was an explicit check a little further down that would catch this scenario. Therefore remove the assert an move the check a little higher up. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-02Remove an OPENSSL_assert which could failMatt Caswell
An OPENSSL_assert was being used which could fail (e.g. on a malloc failure). Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-02Remove a trivially true OPENSSL_assertMatt Caswell
This OPENSSL_assert in (d)tls1_hearbeat is trivially always going to be true because it is testing the sum of values that have been set as constants just a few lines above and nothing has changed them. Therefore remove this. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-11-02Fixed typo in rsautl.podSoheil Rashidi
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-01PR1279: Clean up CONTRIBUTINGRich Salz
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-01Various README updatesRich Salz
Close GH Issue 69 Close GH PR 457 Some other updates By Rich Salz, Alessandro Ghedini, Steve Marquess, Collin Anderson Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-01Remove des_ver.h; broke build.Rich Salz
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-30Replace "SSLeay" in API with OpenSSLRich Salz
All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Remove some SSLv2 referencesMatt Caswell
There were a few remaining references to SSLv2 support which are no longer relevant now that it has been removed. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Add SRP and PSK to disallowed CertificateRequest ciphersuitesMatt Caswell
There was a discrepancy between what ciphersuites we allowed to send a CertificateRequest, and what ciphersuites we allowed to receive one. So add PSK and SRP to the disallowed ones. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Remove the inline keywordMatt Caswell
Some functions were marked as inline in statem_srvr.c where they probably didn't need to be, so remove it. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Remove superfluous checkMatt Caswell
|tls_process_finished| was checking that |peer_finish_md_len| was non-negative. However neither |tls1_final_finish_mac| or |ssl3_final_finish_mac| can ever return a negative value, so the check is superfluous. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Change SSL_state_string return strings to start with a TMatt Caswell
Due the rest of the state machine changes it makes sense to change the SSL_state_string return strings from 3* to T*. They are not SSL3 specific Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Change snprintf to memcpyMatt Caswell
There was a few uses of snprintf in the DTLS SCTP code which made more sense to be a memcpy. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Add ossl_statem prefix to various functionsMatt Caswell
Add the ossl_statem prefix to various funtions to avoid name clashes. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Convert enums to typedefsMatt Caswell
Various enums were introduced as part of the state machine rewrite. As a matter of style it is preferred for these to be typedefs. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Make dtls1_link_min_mtu staticMatt Caswell
The function dtls1_link_min_mtu() was only used within d1_lib.c so make it static. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Fix a bogus clang warningMatt Caswell
Clang with --strict-warnings was complaining about an uninitalised variable. In reality it will never be used uninitialised but clang can't figure out the logic, so just init it anyway to silence the warning. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Fix empty NewSessionTicket processingMatt Caswell
Rebasing the state machine code introduced a problem with empty NewSessionTicket processing. The return value from the tls_process_new_session_ticket() is supposed to be an enum, but a bare integer was being used. Unfortunately this is valid C so the compiler doesn't pick it up. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Fix uninitialised variableMatt Caswell
Fix another instance of |al| being unitialised in certain error scenarios. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30make updateMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Fix various error codesMatt Caswell
A number of error codes were wrong due to a rebase of the state machine code. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Move in_handshake into STATEMMatt Caswell
The SSL variable |in_handshake| seems misplaced. It would be better to have it in the STATEM structure. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Fix unitialised variable problemMatt Caswell
tls_process_client_hello() failed to initialise the |al| variable in some (error) scenarios. This could cause issues with creating the alert. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Fix DTLSv1_listen following state machine changesMatt Caswell
Adding the new state machine broke the DTLSv1_listen code because calling SSL_in_before() was erroneously returning true after DTLSv1_listen had successfully completed. This change ensures that SSL_in_before returns false. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Add a function to get the info_callbackMatt Caswell
Remove repeated blocks of checking SSL and then SSL_CTX for the info_callback. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Remove the old state definesMatt Caswell
Remove all the defines for the old state machines states. Mapping old to new is probably going to cause more problems than it solves so it is probably better to just remove them. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Change SUB_STATE_RETURN into a typedefMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>