summaryrefslogtreecommitdiffstats
path: root/ssl
AgeCommit message (Collapse)Author
2016-01-29Templatize util/domdRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-29Implement Async SSL_shutdownMatt Caswell
This extends the existing async functionality to SSL_shutdown(), i.e. SSL_shutdown() can now casuse an SSL_ERROR_WANT_ASYNC error to be returned from SSL_get_error() if async mode has been enabled. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-26Add SSL_up_ref() and SSL_CTX_up_ref()Matt Caswell
The SSL and SSL_CTX structures are reference counted. However since libssl was made opaque there is no way for users of the library to manipulate the reference counts. This adds functions to enable that. Reviewed-by: Stephen Henson <steve@openssl.org>
2016-01-24Move pqueue into sslRich Salz
This is an internal facility, never documented, not for public consumption. Move it into ssl (where it's only used for DTLS). I also made the typedef's for pqueue and pitem follow our style: they name structures, not pointers. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-22Fix build failure with CIPHER_DEBUGAlessandro Ghedini
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-01-20Remove update tagsRich Salz
Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-20Handle SSL_shutdown while in init more appropriatelyMatt Caswell
Calling SSL_shutdown while in init previously gave a "1" response, meaning everything was successfully closed down (even though it wasn't). Better is to send our close_notify, but fail when trying to receive one. The problem with doing a shutdown while in the middle of a handshake is that once our close_notify is sent we shouldn't really do anything else (including process handshake/CCS messages) until we've received a close_notify back from the peer. However the peer might send a CCS before acting on our close_notify - so we won't be able to read it because we're not acting on CCS messages! Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-20make EVP_PKEY opaqueDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-19Validate ClientHello session_id field length and send alert on failureAlessandro Ghedini
RT#4080 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-19Support disabling any or all TLS or DTLS versionsViktor Dukhovni
Some users want to disable SSL 3.0/TLS 1.0/TLS 1.1, and enable just TLS 1.2. In the future they might want to disable TLS 1.2 and enable just TLS 1.3, ... This commit makes it possible to disable any or all of the TLS or DTLS protocols. It also considerably simplifies the SSL/TLS tests, by auto-generating the min/max version tests based on the set of supported protocols (425 explicitly written out tests got replaced by two loops that generate all 425 tests if all protocols are enabled, fewer otherwise). Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-19use TLS PRFDr. Stephen Henson
Modify libssl to use EVP_PKEY TLS PRF. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-19Fix GOST2012-NULL-GOST12Dmitry Belyavsky
Fix a typo in the definition of the GOST2012-NULL-GOST12 ciphersuite. RT#4213 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz
Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-16Better invalid SNI name error handlingViktor Dukhovni
Also report an SSL_dane_enable error when the basedomain is an invalid SNI name. Avoid side-effects when such a name is valid with X509_VERIFY_PARAM_set1_host(), as e.g. with an empty name, by setting the SNI name first. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-16Empty SNI names are not validViktor Dukhovni
While empty inputs to SSL_set1_host() clear the reference identifier list. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-14Make SSL_set_debug deprecated in 1.1Rich Salz
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-14RT4232: Extra space in help message.Rich Salz
It turns out that -pause calls the undocumented function SSL_set_debug. That just sets flag inside the SSL structure. That flag, despite the command is never used. So remove the flag, the field, and the function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-14EDH >= 1024 bits even at security level 0Viktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12Move Makefiles to Makefile.inRich Salz
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12STACK_OF(SSL_COMP) is a public typeViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12make updateRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-12Adapt all EVP_CIPHER_CTX users for it becoming opaqueRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11GH528: "cipher -v" output is confusing.Rich Salz
Fix the docs, and refactor some common code. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-11Use ossl_inline and DEFINE_LHASH_OFDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Add lh_doall_arg inliningDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Add lh_new() inliningDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-11Make SSL{_CTX,}_{get,set,clear}_options functionsViktor Dukhovni
These now take and return unsigned long, and get is constified. Updated related documentation and util/ssleay.num Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-10Regenerate SSL record/statem error stringsViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-10Allow disabling the min and max versionKurt Roeckx
Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org>
2016-01-07mem functions cleanupRich Salz
Only two macros CRYPTO_MDEBUG and CRYPTO_MDEBUG_ABORT to control this. If CRYPTO_MDEBUG is not set, #ifdef out the whole debug machinery. (Thanks to Jakob Bohm for the suggestion!) Make the "change wrapper functions" be the only paradigm. Wrote documentation! Format the 'set func' functions so their paramlists are legible. Format some multi-line comments. Remove ability to get/set the "memory debug" functions at runtme. Remove MemCheck_* and CRYPTO_malloc_debug_init macros. Add CRYPTO_mem_debug(int flag) function. Add test/memleaktest. Rename CRYPTO_malloc_init to OPENSSL_malloc_init; remove needless calls. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson
Applications wishing to include their own stacks now just need to include DEFINE_STACK_OF(foo) in a header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Fix declarations and constification for inline stack.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-05DANE support structures, constructructors and accessorsViktor Dukhovni
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>
2016-01-02Instead of a local hack, implement SIZE_MAX in numbers.h if it's missingRichard Levitte
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-01-02Protocol version selection and negotiation rewriteViktor Dukhovni
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>
2016-01-02Add support for minimum and maximum protocol versionKurt Roeckx
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-01Fix no-dh.Ben Laurie
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-01-01remove invalid freeDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-31Use X509_get0_pubkey where appropriateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-30Correct missing prototypeRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-30SIZE_MAX doesn't exist everywhere, supply an alternativeRichard Levitte
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>
2015-12-30Check for missing DSA parameters.Dr. Stephen Henson
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>
2015-12-29Convert RSA encrypt to use EVP_PKEYDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-27Increase the max size limit for a CertificateRequest messageMatt Caswell
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>
2015-12-27Simplify calling of the OCSP callbackMatt Caswell
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>
2015-12-27Ensure we don't call the OCSP callback if resuming a sessionMatt Caswell
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>
2015-12-27Fix error when server does not send CertificateStatus messageMatt Caswell
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>
2015-12-24fix no-ecDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-23Server side EVP_PKEY DH supportDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>