aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix declarations and constification for inline stack.Dr. Stephen Henson2016-01-0721-35/+35
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Change STACK_OF to use inline functions.Dr. Stephen Henson2016-01-072-2202/+202
| | | | | | | Change DECLARE_STACK_OF into inline functions. This avoids the need for auto generated mkstack.pl macros and now handles const properly. Reviewed-by: Richard Levitte <levitte@openssl.org>
* DANE make updateViktor Dukhovni2016-01-062-0/+13
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* DANE documentation typosViktor Dukhovni2016-01-062-3/+3
| | | | | | Reported-by: Claus Assmann Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove more (rest?) of FIPS build stuff.Rich Salz2016-01-0612-402/+13
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Remove some unused perl scriptsRich Salz2016-01-064-204/+0
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* DANE support structures, constructructors and accessorsViktor Dukhovni2016-01-0521-77/+1284
| | | | | | | | | Also tweak some of the code in demos/bio, to enable interactive testing of BIO_s_accept's use of SSL_dup. Changed the sconnect client to authenticate the server, which now exercises the new SSL_set1_host() function. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix X509_STORE_CTX_cleanup()Viktor Dukhovni2016-01-034-45/+40
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Drop incorrect id == -1 case from X509_check_trustViktor Dukhovni2016-01-031-2/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* X509_verify_cert() cleanupViktor Dukhovni2016-01-034-345/+400
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Cleanup of verify(1) failure outputViktor Dukhovni2016-01-031-24/+27
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Instead of a local hack, implement SIZE_MAX in numbers.h if it's missingRichard Levitte2016-01-022-5/+6
| | | | Reviewed-by: Stephen Henson <steve@openssl.org>
* Fix a possible memleakRichard Levitte2016-01-021-0/+7
| | | | | | | | If there's a failure allocating md_data, the destination pctx will have a shared pointer with the source EVP_MD_CTX, which will lead to problems when either the source or the destination is freed. Reviewed-by: Stephen Henson <steve@openssl.org>
* Protocol version selection and negotiation rewriteViktor Dukhovni2016-01-0216-479/+543
| | | | | | | | | | | | | | | | | | | The protocol selection code is now consolidated in a few consecutive short functions in a single file and is table driven. Protocol-specific constraints that influence negotiation are moved into the flags field of the method structure. The same protocol version constraints are now applied in all code paths. It is now much easier to add new protocol versions without reworking the protocol selection logic. In the presence of "holes" in the list of enabled client protocols we no longer select client protocols below the hole based on a subset of the constraints and then fail shortly after when it is found that these don't meet the remaining constraints (suiteb, FIPS, security level, ...). Ideally, with the new min/max controls users will be less likely to create "holes" in the first place. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Refine and re-wrap Min/Max protocol docsViktor Dukhovni2016-01-024-52/+122
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Add support for minimum and maximum protocol versionKurt Roeckx2016-01-0215-97/+1063
| | | | Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix no-dh.Ben Laurie2016-01-011-2/+4
| | | | Reviewed-by: Stephen Henson <steve@openssl.org>
* remove invalid freeDr. Stephen Henson2016-01-011-2/+0
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Use X509_get0_pubkey where appropriateDr. Stephen Henson2015-12-3111-63/+28
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Update to SHA256 for TSA signing digest.Rich Salz2015-12-301-1/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix faulty check in the VMS version of opt_prognameRichard Levitte2015-12-301-1/+1
| | | | Reviewed-by: Stephen Henson <steve@openssl.org>
* Remove the #ifndef OPENSSL_SYS_VMS around SSL_add_dir_cert_subjects_to_stackRichard Levitte2015-12-301-2/+0
| | | | | | It served a purpose, but not any more. Reviewed-by: Stephen Henson <steve@openssl.org>
* Correct missing prototypeRichard Levitte2015-12-301-2/+2
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* SIZE_MAX doesn't exist everywhere, supply an alternativeRichard Levitte2015-12-301-0/+5
| | | | | | | | SIZE_MAX is a great macro, and does unfortunately not exist everywhere. Since we check against half of it, using bitwise shift to calculate the value of half SIZE_MAX should be safe enough. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix some missing or faulty header file inclusionsRichard Levitte2015-12-303-2/+4
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Check for missing DSA parameters.Dr. Stephen Henson2015-12-302-4/+11
| | | | | | | | | | | | | If DSA parameters are absent return -1 (for unknown) in DSA_security_bits. If parameters are absent when a certificate is set in an SSL/SSL_CTX structure this will reject the certificate by default. This will cause DSA certificates which omit parameters to be rejected but that is never (?) done in practice. Thanks to Brian 'geeknik' Carpenter for reporting this issue. Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Convert RSA encrypt to use EVP_PKEYDr. Stephen Henson2015-12-291-9/+22
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Prefer ReuseAddr over Reuse, with IO::Socket::INETRichard Levitte2015-12-291-1/+1
| | | | | | Reuse is deprecated and ReuseAddr is prefered, according to documentation. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix no-engine.Ben Laurie2015-12-293-2/+3
| | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* RT4202: Update rt URL's.Rich Salz2015-12-282-9/+10
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* make a "missed make update" updateRich Salz2015-12-281-1/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Increase the max size limit for a CertificateRequest messageMatt Caswell2015-12-271-1/+5
| | | | | | | | | | | | Previous versions of OpenSSL had the max size limit for a CertificateRequest message as |s->max_cert_list|. Previously master had it to be SSL3_RT_MAX_PLAIN_LENGTH. However these messages can get quite long if a server is configured with a long list of acceptable CA names. Therefore the size limit has been increased to be consistent with previous versions. RT#4198 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Simplify calling of the OCSP callbackMatt Caswell2015-12-272-22/+5
| | | | | | | Move all calls of the OCSP callback into one place, rather than repeating it in two different places. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Add some documentation for the OCSP callback functionsMatt Caswell2015-12-271-0/+73
| | | | | | | Describe the usage of the OCSP callback functions on both the client and the server side. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Ensure we don't call the OCSP callback if resuming a sessionMatt Caswell2015-12-271-1/+1
| | | | | | | It makes no sense to call the OCSP status callback if we are resuming a session because no certificates will be sent. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Fix error when server does not send CertificateStatus messageMatt Caswell2015-12-272-26/+34
| | | | | | | | | | | | If a server sends the status_request extension then it may choose to send the CertificateStatus message. However this is optional. We were treating it as mandatory and the connection was failing. Thanks to BoringSSL for reporting this issue. RT#4120 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Add test for missing CertificateStatus messageMatt Caswell2015-12-272-0/+103
| | | | | | | | | | | If the client sends a status_request extension in the ClientHello and the server responds with a status_request extension in the ServerHello then normally the server will also later send a CertificateStatus message. However this message is *optional* even if the extensions were sent. This adds a test to ensure that if the extensions are sent then we can still omit the message. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* fix no-ecDr. Stephen Henson2015-12-243-21/+8
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Server side EVP_PKEY DH supportDr. Stephen Henson2015-12-235-88/+85
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* utility functionDr. Stephen Henson2015-12-232-0/+14
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* EVP_PKEY DH client support.Dr. Stephen Henson2015-12-233-91/+48
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Always generate DH keys for ephemeral DH cipher suites.Dr. Stephen Henson2015-12-234-53/+14
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* The functions take a SSL *, not a SSL_CTX *Daniel Kahn Gillmor2015-12-231-4/+4
| | | | | | | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> RT: #4192, MR: #1533
* redundant redeclaration of 'OPENSSL_strlcpy'Roumen Petrov2015-12-231-1/+0
| | | | | | | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> MR: #1523
* __STDC_VERSION__ is not defined for c89 compilersRoumen Petrov2015-12-231-2/+4
| | | | | | | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> MR: #1522
* remove duplicates in util/libeay.numRoumen Petrov2015-12-231-13/+0
| | | | | | | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> RT: #4195, MR: #1521
* Remove SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER and SSL_OP_TLS_D5_BUG support.Kurt Roeckx2015-12-236-40/+10
| | | | | | | | | Suggested by David Benjamin Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org> MR: #1520
* Avoid using a dangling pointer when removing the last itemKurt Roeckx2015-12-231-0/+2
| | | | | | | | | | | | When it's the last item that is removed int_thread_hash == hash and we would still call int_thread_release(&hash) while hash is already freed. So int_thread_release would compare that dangling pointer to NULL which is undefined behaviour. Instead do already what int_thread_release() would do, and make the call do nothing instead. Reviewed-by: Rich Salz <rsalz@openssl.org> RT: #4155, MR: #1519
* Memory leak in state machine in error pathTodd Short2015-12-231-1/+1
| | | | | | | | | | When EC is disabled, and an error occurs in ssl_generate_master_secret() or RAND_bytes(), the error path does not free rsa_decrypt. RT#4197 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Refactor DTLS cookie generation and verificationRichard Levitte2015-12-231-66/+11
| | | | | | | | DTLS cookie generation and verification were exact copies of each other save the last few lines. This refactors them to avoid code copying. Reviewed-by: Matt Caswell <matt@openssl.org>