summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-12-03Prepare for 1.0.1q releaseOpenSSL_1_0_1qMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-03make updateMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-03Update CHANGES and NEWSMatt Caswell
Update the CHANGES and NEWS files for the new release. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-03Add PSS parameter check.Dr. Stephen Henson
Avoid seg fault by checking mgf1 parameter is not NULL. This can be triggered during certificate verification so could be a DoS attack against a client or a server enabling client authentication. Thanks to Loïc Jonas Etienne (Qnective AG) for discovering this bug. CVE-2015-3194 Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-03Fix leak with ASN.1 combine.Dr. Stephen Henson
When parsing a combined structure pass a flag to the decode routine so on error a pointer to the parent structure is not zeroed as this will leak any additional components in the parent. This can leak memory in any application parsing PKCS#7 or CMS structures. CVE-2015-3195. Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using libFuzzer. PR#4131 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-03e_os.h: limit _MSC_VER trickery to older compilers.Andy Polyakov
PR: #3390, backport from 1.0.2. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-02typoDr. Stephen Henson
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-12-02_BSD_SOURCE is deprecated, use _DEFAULT_SOURCE insteadRichard Levitte
The feature_test_macros(7) manual tells us that _BSD_SOURCE is deprecated since glibc 2.20 and that the compiler will warn about it being used, unless _DEFAULT_SOURCE is defined as well. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f9fd35248c9a3b1125d9ab82ffb19d62e86533ac)
2015-11-30Return errors even if the cookie validation has succeededMatt Caswell
In the DTLS ClientHello processing the return value is stored in |ret| which by default is -1. We wish to return 1 on success or 2 on success *and* we have validated the DTLS cookie. Previously on successful validation of the cookie we were setting |ret| to 2. Unfortunately if we later encounter an error then we can end up returning a successful (positive) return code from the function because we already set |ret| to a positive value. This does not appear to have a security consequence because the handshake just fails at a later point. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-11-24Use both sun and __sunKurt Roeckx
Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit ed02493567390cac6d07447f193fcaac5b219af3)
2015-11-24mark openssl configuration as loaded at end of OPENSSL_configMarcus Meissner
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@akamai.com> GH: #466 (cherry picked from commit 434b58457c8cca4d09f77a1774d6d2c446604bae)
2015-11-24ssl3_free(): Return if it wasn't createdPascal Cuoq
If somewhere in SSL_new() there is a memory allocation failure, ssl3_free() can get called with s->s3 still being NULL. Patch also provided by Willy Tarreau <wtarreau@haproxy.com> Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org> (cherry picked from commit 3e7bd2ce0b16f8611298175d6dc7cb35ee06ea6d)
2015-11-24Set reference count earlierKurt Roeckx
Backport of 0e04674e964b905e67e3d215bcf888932c92765f Reviewed-by: Steve Henson <steve@openssl.org> RT #4047, #4110, MR #1356
2015-11-24Fix uninitialised p error.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 63eb10a07ee29a312e50a227f5b3a290b1ad22b4)
2015-11-24Limit depth of ASN1 parse printing.Dr. Stephen Henson
Thanks to Guido Vranken <guidovranken@gmail.com> for reporting this issue. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 158e5207a794603f5d64ffa95e0247c7808ab445) Conflicts: crypto/asn1/asn1_par.c
2015-11-22Use defined(__sun) instead of defined(sun)Kurt Roeckx
Strict ISO confirming C compilers only define __sun Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org> RT #4144, MR #1353 (cherry picked from commit 3d32218812e87221344f2985512e42e4aaa88745)
2015-11-21Add initial AppVeyor configurationAlessandro Ghedini
Original patch by Frank Morgner. Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@akamai.com> GH: #456 (cherry picked from commit 68db80e2d1accdd4c4a6b4763559c6cfe9663820)
2015-11-20Ensure all EVP calls have their returns checked where appropriateMatt Caswell
There are lots of calls to EVP functions from within libssl There were various places where we should probably check the return value but don't. This adds these checks. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 56d913467541506572f908a34c32ca7071f77a94) Conflicts: ssl/s3_enc.c ssl/s3_srvr.c
2015-11-18Fix release in README.Rich Salz
Reviewed-by: Steve Marquess <marquess@openssl.com>
2015-11-13RT32671: wrong multiple errs TS_check_status_infoGraeme Perrow
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit f236ef27bd2ca99b3367554aa3e2fc9ca345deb5)
2015-11-10Stop DTLS servers asking for unsafe legacy renegotiationMatt Caswell
If a DTLS client that does not support secure renegotiation connects to an OpenSSL DTLS server then, by default, renegotiation is disabled. If a server application attempts to initiate a renegotiation then OpenSSL is supposed to prevent this. However due to a discrepancy between the TLS and DTLS code, the server sends a HelloRequest anyway in DTLS. This is not a security concern because the handshake will still fail later in the process when the client responds with a ClientHello. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit d40ec4ab8e7c0ff39bf4f9918fbb9dfdca4c5221)
2015-11-10Only call ssl3_init_finished_mac once for DTLSMatt Caswell
In DTLS if an IO retry occurs during writing of a fragmented ClientHello then we can end up reseting the finish mac variables on the retry, which causes a handshake failure. We should only reset on the first attempt not on retries. Thanks to BoringSSL for reporting this issue. RT#4119 Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 15a7164eb7d4d031608fcec2801d7f7b11b16923)
2015-11-09Fix missing malloc return value checksMatt Caswell
During work on a larger change in master a number of locations were identified where return value checks were missing. This backports the relevant fixes. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 903738ac63e60c10552741e2d6de9753c67e0ff3) Conflicts: crypto/cms/cms_sd.c
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> (cherry picked from commit 6703c4ea87b30554283deaa5df1f8d68725d3ee4)
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> (cherry picked from commit 3d866ea67e8b19777e88ac2a78ee4188e0983168)
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> (cherry picked from commit f89ee71bc81017e04ac50f570d8aed87f495bcf2)
2015-11-01Some README and CONTRIBUTING cleanups.Rich Salz
Close GH Issue 69 Close GH PR 457/RT4113 Some other updates By Rich Salz, Alessandro Ghedini, Steve Marquess, Collin Anderson (manual cherry-pick of a2aaf8be7e3c22a61ef89f273aa85f482b955336 and b06935f439af7150d3ae566922353c3f210e63ed) Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-10-29BN_GF2m_mod_inv(): check bn_wexpand return valuePascal Cuoq
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@akamai.com> MR #1276, RT #4107 (cherry picked from commit 94b3664a528258df5ebcaae213d19bf6568cc47d)
2015-10-23Remove useless codeAlessandro Ghedini
RT#4081 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 070c23325af4526c9a8532a60d63522c58d5554b)
2015-10-23Check memory allocationAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 8cf9d71a3a43d9b98a8a278d47dc08088a954a7b)
2015-10-23Fix references to various RFCsAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 3240e7cf5f651d9d94814b4d494fbe294e463b72)
2015-10-23Fix typosAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit d900a015b5a89ea2018e6122dd2738925e4d68ab)
2015-10-23Set salt length after the malloc has succeededAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit c2319cf9fce87a2e82efb6e58ced11a85190dc3d)
2015-10-23Fix memory leaks and other mistakes on errorsAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 3f6c7691870d1cd2ad0e0c83638cef3f35a0b548)
2015-10-23Replace malloc+strlcpy with strdupAlessandro Ghedini
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 8acaabec429b39f9436f6a88006384d72d292539)
2015-10-23Do not treat 0 return value from BIO_get_fd() as errorAlessandro Ghedini
0 is a valid file descriptor. RT#4068 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 4428c7dba8f6f407d915c1226f4e0f673e8be241)
2015-10-22Clarify return values for EVP_DigestVerifyFinal.Adam Eijdenberg
Previous language was unclear. New language isn't pretty but I believe it is more accurate. Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Ben Laurie <ben@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 8cbb048c3ea416f2bd8a3706d027f3aa26ef08d9)
2015-10-11Typo.Dr. Stephen Henson
PR#4079 Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit c69ce9351336f5b4a8b33890756b3fd185528210) Conflicts: crypto/evp/e_des3.c
2015-10-09Avoid SHA1 weaknessRich Salz
In X509_cmp, if cert digest is equal, look at DER of the signed part. This is what master and 1.0.2 already do. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-10-08Fix travis build for 1.0.1Rich Salz
Add explicit linux-clang targets Add --strict-warnings support for clang Disable mingw debug builds Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-10-08Don't treat a bare OCTETSTRING as DigestInfo in int_rsa_verifyMatt Caswell
The function int_rsa_verify is an internal function used for verifying an RSA signature. It takes an argument |dtype| which indicates the digest type that was used. Dependant on that digest type the processing of the signature data will vary. In particular if |dtype == NID_mdc2| and the signature data is a bare OCTETSTRING then it is treated differently to the default case where the signature data is treated as a DigestInfo (X509_SIG). Due to a missing "else" keyword the logic actually correctly processes the OCTETSTRING format signature first, and then attempts to continue and process it as DigestInfo. This will invariably fail because we already know that it is a bare OCTETSTRING. This failure doesn't actualy make a real difference because it ends up at the |err| label regardless and still returns a "success" result. This patch just cleans things up to make it look a bit more sane. RT#4076 Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit dffe51091f412dcbc18f6641132f0b4f0def6bce)
2015-10-08When ENGINE_add finds that id or name is missing, actually returnRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 5850cc75ea0c1581a9034390f1ca77cadc596238)
2015-10-07Move BN_CTX_start() call so the error case can always call BN_CTX_end().Pascal Cuoq
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> MR #1231 (cherry picked from commit 99c203337574d967c86ffbfa13f40ace51048485)
2015-10-07Set flags to 0 before calling BN_with_flags()Pascal Cuoq
BN_with_flags() will read the dest->flags to keep the BN_FLG_MALLOCED but overwrites everything else. Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> MR #1231 (cherry picked from commit f92768e6f5259069bd21dbed2b98b3423c1dfca4)
2015-10-06Don't try and parse boolean type.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit e58c4d3cdde7a0a01df2884bfeec31a2b07be22d)
2015-10-05Change functions to pass in a limit rather than calculate itMatt Caswell
Some extension handling functions were passing in a pointer to the start of the data, plus the length in order to calculate the end, rather than just passing in the end to start with. This change makes things a little more readable. Reviewed-by: Emilia Käsper <emilia@openssl.org> Conflicts: ssl/s3_srvr.c ssl/ssl_locl.h ssl/t1_lib.c
2015-10-05Validate ClientHello extension field lengthAlessandro Ghedini
RT#4069 Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-03Fix more d2i cases to properly update the input pointerKurt Roeckx
Thanks to David Benjamin <davidben@google.com> for pointing them out. Reviewed-by: Steve Henson <steve@openssl.org> MR #1198 (cherry picked from commit 605236f6a8fe0743af2f63d93239a74c69dae137)
2015-09-29Link in applink with fips_premain_dsoDr. Stephen Henson
PR#4042 Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit d62c64b947ae96463a331de005165c57966d2149)
2015-09-29GH367: use random data if seed too short.Ismo Puustinen
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 6f997dc36504d67d1339ceb6bce4ecba673d8568)