summaryrefslogtreecommitdiffstats
path: root/ssl
AgeCommit message (Collapse)Author
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>
2015-12-23utility functionDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-23EVP_PKEY DH client support.Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-23Always generate DH keys for ephemeral DH cipher suites.Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-23Remove SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER and SSL_OP_TLS_D5_BUG support.Kurt Roeckx
Suggested by David Benjamin Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org> MR: #1520
2015-12-23Memory leak in state machine in error pathTodd Short
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>
2015-12-23Fix inline build failureMatt Caswell
After the recent change to use ossl_inline, builds were failing on some platforms due to a missing usage of "inline". Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-22Add ossl_inlineDr. Stephen Henson
Add macro ossl_inline for use in public headers where a portable inline is required. Change existing inline to use ossl_inline Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-12-22remove unused error codeDr. Stephen Henson
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-22make updateDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-22make errorsDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-22Load module in SSL_library_initDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-22Add ssl_mcnf.c to MakefileDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-22SSL library configuration module.Dr. Stephen Henson
This adds support for SSL/TLS configuration using configuration modules. Sets of command value pairs are store and can be replayed through an SSL_CTX or SSL structure using SSL_CTX_config or SSL_config. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-19Remove fixed DH ciphersuites.Dr. Stephen Henson
Remove all fixed DH ciphersuites and associated logic. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-19delete unused contextDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-18Remove the "eay" c-file-style indicatorsRichard Levitte
Since we don't use the eay style any more, there's no point tryint to tell emacs to use it. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-17Add SSL_CIPHER_description() for Chacha20/Poly1305Matt Caswell
SSL_CIPHER_description() was returning "unknown" for the encryption in the new ChaCha20/Poly1305 TLS ciphersuites. RT#4183 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-16fix for no-ecDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-16Use EVP_PKEY for client side EC.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Use EVP_PKEY for server EC.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Add ECDH/DH utility functions.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16remove unnecessary key copyDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Remove ECDH client auth code.Dr. Stephen Henson
Remove incomplete non-functional ECDH client authentication code. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Remove SSL_OP_SINGLE_ECDH_USE code.Dr. Stephen Henson
Since auto ecdh is now always used SSL_OP_SINGLE_ECDH_USE is redundant. Simplify associated code. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Use EC_KEY_key2buf and EC_oct2key in libssl.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-15Fix compile failure with no-srpMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-13Don't use EC when no-ec.Ben Laurie
Reviewed-by: Richard Levitte <levitte@openssl.org>