summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-06-09Use bio_err not stderr in apps.Rich Salz
Except for VMS startup code. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-09No fprintf in the txt_db componentRich Salz
Also removed a source file that isn't built, and moved another one to test for eventual fixing. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-08Explicitly mention PKCS5_PBKDF2_HMAC in EVP doc.Jeffrey Walton
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-09Only allow a temporary rsa key exchange when they key is larger than 512.Kurt Roeckx
Reviewed-by: Matt Caswell <matt@openssl.org> MR #588
2015-06-09Properly check certificate in case of export ciphers.Kurt Roeckx
Reviewed-by: Matt Caswell <matt@openssl.org> MR #588
2015-06-08return correct NID for undefined objectDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-08Use CRYPTO_memcmp in ssl3_record.cEmilia Kasper
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-08Use CRYPTO_memcmp when comparing authenticatorsEmilia Kasper
Pointed out by Victor Vasiliev (vasilvv@mit.edu) via Adam Langley (Google). Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-06Increase buffer size for passwords in pkcs12 CLIRodger Combs
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-06Update trace code.Dr. Stephen Henson
Add extension and ciphersuites to trace code. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-06Check ASN1_INTEGER_get for errors.Dr. Stephen Henson
Check return value when calling ASN1_INTEGER_get to retrieve a certificate serial number. If an error occurs (which will be caused by the value being out of range) revert to hex dump of serial number. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-04Set error code, no fprintf stderr, on errors.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-04GH293: Typo in CHANGES file.Github User
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-04Allow all curves when the client doesn't send an supported elliptic curves ↵Kurt Roeckx
extension At least in the case of SSLv3 we can't send an extention. Reviewed-by: Matt Caswell <matt@openssl.org> MR #811
2015-06-04Rename all static TS_xxx to ts_xxxRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-04Remove misleading commentMatt Caswell
Remove a comment that suggested further clean up was required. DH_free() performs the necessary cleanup. With thanks to the Open Crypto Audit Project for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-04Clean premaster_secret for GOSTMatt Caswell
Ensure OPENSSL_cleanse() is called on the premaster secret value calculated for GOST. With thanks to the Open Crypto Audit Project for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-04Fix off-by-one error in BN_bn2hexMatt Caswell
A BIGNUM can have the value of -0. The function BN_bn2hex fails to account for this and can allocate a buffer one byte too short in the event of -0 being used, leading to a one byte buffer overrun. All usage within the OpenSSL library is considered safe. Any security risk is considered negligible. With thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke and Filip Palian for discovering and reporting this issue. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-04Fix DTLS session resumptionMatt Caswell
The session object on the client side is initially created during construction of the ClientHello. If the client is DTLS1.2 capable then it will store 1.2 as the version for the session. However if the server is only DTLS1.0 capable then when the ServerHello comes back the client switches to using DTLS1.0 from then on. However the session version does not get updated. Therefore when the client attempts to resume that session the server throws an alert because of an incorrect protocol version. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-03make update.Dr. Stephen Henson
Make update with manual edit so EVP_PKEY_asn1_set_item uses the same ordinal as 1.0.2. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-03Add funtions to set item_sign and item_verifySergey Agievich
PR#3872 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org> (cherry picked from commit ad0fb7f4988c8a717fe6bcb035304385fbdaef41) Conflicts: crypto/asn1/ameth_lib.c
2015-06-02Fix compilation failure for some tool chainsMatt Caswell
Some tool chains (e.g. android) do not define IP_PMTUDISC_PROBE, and so this build breaks. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-06-02RT3230: Better test for C identifierAnnie Yousar
objects.pl only looked for a space to see if the name could be used as a C identifier. Improve the test to match the real C rules. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-02Standardize handling of #ifdef'd options.Rich Salz
Here are the "rules" for handling flags that depend on #ifdef: - Do not ifdef the enum. Only ifdef the OPTIONS table. All ifdef'd entries appear at the end; by convention "engine" is last. This ensures that at run-time, the flag will never be recognized/allowed. The next two bullets entries are for silencing compiler warnings: - In the while/switch parsing statement, use #ifdef for the body to disable it; leave the "case OPT_xxx:" and "break" statements outside the ifdef/ifndef. See ciphers.c for example. - If there are multiple options controlled by a single guard, OPT_FOO, OPT_BAR, etc., put a an #ifdef around the set, and then do "#else" and a series of case labels and a break. See OPENSSL_NO_AES in cms.c for example. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-02RT832: Use REUSEADDR in ocsp responderRich Salz
I also re-ordered some of #ifdef's. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-02RT3472: Doc pkcs8 -iter flag is in OpenSSL 1.1Jeffrey Walton
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-02Add the macro OPENSSL_SYS_WIN64Richard Levitte
This is for consistency. Additionally, have its presence define OPENSSL_SYS_WINDOWS as well. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-02RT3848: Call SSL_COMP_free_compression_methodsGunnar Kudrjavets
Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-02GH249: Fix bad regexp in arg parsing.Olaf Johansson
Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-02Fix IP_MTU_DISCOVER typoPer Allansson
The code in bss_dgram.c checks if IP_MTUDISCOVER is defined, where it should test for IP_MTU_DISCOVER RT#3888 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-02Fix race condition in NewSessionTicketMatt Caswell
If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session already in the client session cache. Since the session ID is the key to the cache this breaks the cache access. Parts of this patch were inspired by this Akamai change: https://github.com/akamai/openssl/commit/c0bf69a791239ceec64509f9f19fcafb2461b0d3 Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-01Check the message type requested is the type received in DTLSMatt Caswell
dtls1_get_message has an |mt| variable which is the type of the message that is being requested. If it is negative then any message type is allowed. However the value of |mt| is not checked in one of the main code paths, so a peer can send a message of a completely different type and it will be processed as if it was the message type that we were expecting. This has very little practical consequences because the current behaviour will still fail when the format of the message isn't as expected. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-05-31Silence Clang warning about unit'd variableRich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-30fix warningDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-30clear/cleanse cleanupRich Salz
Where we called openssl_cleanse, make sure we do it on all error paths. Be consistent in use of sizeof(foo) when possible. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-05-29Remove struct ccs_header_stMatt Caswell
struct ccs_header_st is not used so it should be removed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-29fix asn1parse -informDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-29Remove OPENSSL_CONF=/dev/null from testsRichard Levitte
Almost two months ago, the warning about non-existing config file was supressed by setting the environment variable OPENSSL_CONF to /dev/null everywhere. Now that this warning is gone, that practice is no longer needed. Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-29Restore module loadingRichard Levitte
The module loading feature got broken a while ago, so restore it, but have it a bit more explicit this time around. Reviewed-by: Stephen Henson <steve@openssl.org>
2015-05-29Fix double BIO_free in reqRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-29Fix build errors with enable-ec_nistp_64_gcc_128Peter Dettman
RT 3871 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-28RT3876: Only load config when neededRich Salz
Create app_load_config(), a routine to load config file. Remove the "always load config" from the main app. Change the places that used to load config to call the new common routine. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-28PEM doc fixesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-28check for error when creating PKCS#8 structureDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-28Use enum for X509_LOOKUP_TYPERich Salz
Using an enum with -Wswitch means all lookup routines handle all cases. Remove X509_LU_PKEY which was never used. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-28Change return type of the new accessorsMatt Caswell
The new accessors SSL_get_client_random, SSL_get_server_random and SSL_SESSION_get_master_key should return a size_t to match the type of the |outlen| parameter. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-28Change the new functions to use size_tMatt Caswell
Change the new SSL_get_client_random(), SSL_get_server_random() and SSL_SESSION_get_master_key() functions to use size_t for |outlen| instead of int. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-28Clarify that SSL3_RANDOM_SIZE is a constant, for now.Nick Mathewson
Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-28Add new functions to extract {client,server}_random, master_keyNick Mathewson
Tor uses these values to implement a low-rent clone of RFC 5705 (which, in our defense, we came up with before RFC 5705 existed). But now that ssl_st is opaque, we need another way to get at them. Includes documentation, with suitable warnings about not actually using these functions. Signed-off-by: Nick Mathewson <nickm@torproject.org> Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-28Add a documentation clarification suggested by Matt CaswellNick Mathewson
Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>