aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix the update target and remove duplicate file updatesRichard Levitte2015-05-2262-42/+154
| | | | | | | | | | | | | | | We had updates of certain header files in both Makefile.org and the Makefile in the directory the header file lived in. This is error prone and also sometimes generates slightly different results (usually just a comment that differs) depending on which way the update was done. This removes the file update targets from the top level Makefile, adds an update: target in all Makefiles and has it depend on the depend: or local_depend: targets, whichever is appropriate, so we don't get a double run through the whole file tree. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Ignore files from other branchesMatt Caswell2015-05-221-0/+26
| | | | | | | | | There are a number of files that are created on other branches that are not held in git and are not needed in master. When checking out master after working on another branch these files show up in "git status", so just add them to .gitignore Reviewed-by: Richard Levitte <levitte@openssl.org>
* Lost alert in DTLSLubom2015-05-221-1/+1
| | | | | | | | | | If a client receives a bad hello request in DTLS then the alert is not sent correctly. RT#2801 Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Fix various OPENSSL_NO_* optionsMatt Caswell2015-05-223-12/+40
| | | | | | | This fixes compilation with various OPENSSL_NO_* options that got broken during the big apps cleanup. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix a memory leak in compressionMatt Caswell2015-05-224-26/+45
| | | | | | | | | | | | | | | | The function RECORD_LAYER_clear() is supposed to clear the contents of the RECORD_LAYER structure, but retain certain data such as buffers that are allocated. Unfortunately one buffer (for compression) got missed and was inadvertently being wiped, thus causing a memory leak. In part this is due to the fact that RECORD_LAYER_clear() was reaching inside SSL3_BUFFERs and SSL3_RECORDs, which it really shouldn't. So, I've rewritten it to only clear the data it knows about, and to defer clearing of SSL3_RECORD and SSL3_BUFFER structures to SSL_RECORD_clear() and the new function SSL3_BUFFER_clear(). Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* make updateDr. Stephen Henson2015-05-212-1/+21
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* correctionDr. Stephen Henson2015-05-211-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add scrypt PBE algorithm code.Dr. Stephen Henson2015-05-218-10/+361
| | | | | | | | This adds support for the ASN.1 structures in draft-josefsson-scrypt-kdf-03 Private keys encrypted by scrypt can now be decrypted transparently as long as they don't exceed the memory limits. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add scrypt OID from draft-josefsson-scrypt-kdf-03Dr. Stephen Henson2015-05-214-5/+18
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Replace switch/assignments with table lookupRich Salz2015-05-202-388/+173
| | | | | | | | Typedef STRINT_PAIR to be the same as OPT_PAIR, and use that structure and a bunch of tables instead of switch statements to lookup various values out of the SSL/TLS message buffers. Shrinks a bunch of code. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Correctly check for export size limitKurt Roeckx2015-05-203-5/+4
| | | | | | 40 bit ciphers are limited to 512 bit RSA, 56 bit ciphers to 1024 bit. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add functions to convert between uint64_t and ASN1_INTEGER.Dr. Stephen Henson2015-05-204-0/+57
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Only support >= 256-bit elliptic curves with ecdh_auto (server) or by ↵Emilia Kasper2015-05-203-21/+58
| | | | | | | | | | | | | | | | | | | | | | | | | default (client). Also reorder preferences to prefer prime curves to binary curves, and P-256 to everything else. The result: $ openssl s_server -named_curves "auto" This command will negotiate an ECDHE ciphersuite with P-256: $ openssl s_client This command will negotiate P-384: $ openssl s_client -curves "P-384" This command will not negotiate ECDHE because P-224 is disabled with "auto": $ openssl s_client -curves "P-224" Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove dh512.pemEmilia Kasper2015-05-202-12/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Update documentation with Diffie-Hellman best practices.Emilia Kasper2015-05-201-63/+42
| | | | | | | | | | | | - Do not advise generation of DH parameters with dsaparam to save computation time. - Promote use of custom parameters more, and explicitly forbid use of built-in parameters weaker than 2048 bits. - Advise the callback to ignore <keylength> - it is currently called with 1024 bits, but this value can and should be safely ignored by servers. Reviewed-by: Rich Salz <rsalz@openssl.org>
* dhparam: fix documentationEmilia Kasper2015-05-201-5/+8
| | | | | | | | | | | | | | The default bitlength is now 2048. Also clarify that either the number of bits or the generator must be present: $ openssl dhparam -2 and $ openssl dhparam 2048 generate parameters but $ openssl dhparam does not. Reviewed-by: Matt Caswell <matt@openssl.org>
* make updateDr. Stephen Henson2015-05-203-14/+28
| | | | Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Add scrypt tests.Dr. Stephen Henson2015-05-202-1/+198
| | | | | | | Add scrypt test support to evp_test and add test values from from draft-josefsson-scrypt-kdf-03. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add scrypt support.Dr. Stephen Henson2015-05-203-2/+302
| | | | | | Add scrypt algorithm as described in draft-josefsson-scrypt-kdf-03 Reviewed-by: Rich Salz <rsalz@openssl.org>
* GitHub284: Fix typo in xx-32.pl scripts.StudioEtrange2015-05-202-3/+3
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* bn/asm/vis3-mont.pl: fix intermittent EC failures on SPARC T3.Andy Polyakov2015-05-201-5/+5
| | | | | | | | BLKINIT optimization worked on T4, but for some reason appears "too aggressive" for T3 triggering intermiitent EC failures. It's not clear why only EC is affected... Reviewed-by: Tim Hudson <tjh@openssl.org>
* move masks out of CERT structureDr. Stephen Henson2015-05-197-53/+39
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Don't add write errors into bytecountsRobert Swiecki2015-05-191-2/+4
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Move certificate validity flags out of CERT.Dr. Stephen Henson2015-05-186-35/+36
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Move signing digest out of CERT.Dr. Stephen Henson2015-05-186-49/+45
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* CERT tidyDr. Stephen Henson2015-05-187-63/+54
| | | | | | | | | | Move per-connection state out of the CERT structure: which should just be for shared configuration data (e.g. certificates to use). In particular move temporary premaster secret, raw ciphers, peer signature algorithms and shared signature algorithms. Reviewed-by: Rich Salz <rsalz@openssl.org>
* ASN1 INTEGER refactor.Dr. Stephen Henson2015-05-188-578/+521
| | | | | | | | | | | | | Rewrite and tidy ASN1_INTEGER and ASN1_ENUMERATED handling. Remove code duplication. New functions to convert between int64_t and ASN.1 types without the quirks of the old long conversion functions. Add documentation. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add types to indent.proDr. Stephen Henson2015-05-171-0/+8
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Further version negotiation updatesMatt Caswell2015-05-162-46/+23
| | | | | | More miscellaneous updates to version negotiation following feedback. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Move SSLv3_*method() functionsMatt Caswell2015-05-167-101/+18
| | | | | | | | | Move these functions into t1_clnt.c, t1_srvr.c and t1_meth.c and take advantage of the existing tls1_get*_method() functions that all the other methods are using. Since these now have to support SSLv3 anyway we might as well use the same set of get functions for both TLS and SSLv3. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Updates following review commentsMatt Caswell2015-05-1613-325/+345
| | | | | | | Miscellaneous updates following review comments on the version negotiation rewrite patches. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Version negotiation rewrite doc updatesMatt Caswell2015-05-166-27/+36
| | | | | | | Update various documentation references to the new TLS_*_method names. Also add a CHANGES entry. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Version negotiation rewrite cleanupMatt Caswell2015-05-1617-2104/+283
| | | | | | | | Following the version negotiation rewrite all of the previous code that was dedicated to version negotiation can now be deleted - all six source files of it!! Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Client side version negotiation rewriteMatt Caswell2015-05-1615-38/+127
| | | | | | | | | | Continuing from the previous commit this changes the way we do client side version negotiation. Similarly all of the s23* "up front" state machine code has been avoided and again things now work much the same way as they already did for DTLS, i.e. we just do most of the work in the ssl3_get_server_hello() function. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Server side version negotiation rewriteMatt Caswell2015-05-1626-322/+645
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the way that we do server side protocol version negotiation. Previously we had a whole set of code that had an "up front" state machine dedicated to the negotiating the protocol version. This adds significant complexity to the state machine. Historically the justification for doing this was the support of SSLv2 which works quite differently to SSLv3+. However, we have now removed support for SSLv2 so there is little reason to maintain this complexity. The one slight difficulty is that, although we no longer support SSLv2, we do still support an SSLv3+ ClientHello in an SSLv2 backward compatible ClientHello format. This is generally only used by legacy clients. This commit adds support within the SSLv3 code for these legacy format ClientHellos. Server side version negotiation now works in much the same was as DTLS, i.e. we introduce the concept of TLS_ANY_VERSION. If s->version is set to that then when a ClientHello is received it will work out the most appropriate version to respond with. Also, SSLv23_method and SSLv23_server_method have been replaced with TLS_method and TLS_server_method respectively. The old SSLv23* names still exist as macros pointing at the new name, although they are deprecated. Subsequent commits will look at client side version negotiation, as well of removal of the old s23* code. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Remove unused #ifdef's from header filesRich Salz2015-05-152-40/+0
| | | | | | And remove a duplicate comment, probably from a merge hiccup. Reviewed-by: Matt Caswell <matt@openssl.org>
* Use #error in openssl/srp.hRich Salz2015-05-155-28/+48
| | | | | | | Follow the same convention the other OPENSSL_NO_xxx header files do, and use #error instead of making the header file be a no-op. Reviewed-by: Matt Caswell <matt@openssl.org>
* Make up for a missed 'make update' update.Rich Salz2015-05-151-25/+25
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Update mkdef for moved header file.Rich Salz2015-05-141-1/+1
| | | | | | | crypto/cryptlib.h moved to crypto/include/internal; update the script. Reviewed-by: Richard Levitte <levitte@openssl.org>
* make dependRichard Levitte2015-05-1442-457/+633
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add -Iinclude to crypto/ compilesRichard Levitte2015-05-141-1/+1
| | | | | | | The move of headers from crypto/ to crypto/include/internal/ needs this extra inclusion directory or the build fails. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-14380-378/+378
| | | | | | | | | | | | | There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
* Adjust unixly mk1mf after introduction of tkeyRichard Levitte2015-05-142-3/+9
| | | | | | | | Added depencies on the public variants of some keys in test to Makefile. Added the newly introduced key files from test/ in the list of files to copy in util/pl/unix.pl. Reviewed-by: Rich Salz <rsalz@openssl.org>
* make dependRichard Levitte2015-05-144-67/+68
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Identify and move OpenSSL internal header filesRichard Levitte2015-05-1417-17/+16
| | | | | | | | | | | | | | There are header files in crypto/ that are used by the rest of OpenSSL. Move those to include/internal and adapt the affected source code, Makefiles and scripts. The header files that got moved are: crypto/constant_time_locl.h crypto/o_dir.h crypto/o_str.h Reviewed-by: Matt Caswell <matt@openssl.org>
* Move definition of INTxx_MIN et al to internal headerRichard Levitte2015-05-142-19/+109
| | | | | | | | | | | | | | | | | Having the INTxx_MIN et al macros defined in a public header is unnecessary and risky. Also, it wasn't done for all platforms that might need it. So we move those numbers to an internal header file, do the math ourselves and make sure to account for the integer representations we know of. This introduces include/internal, which is unproblematic since we already use -I$(TOP)/include everywhere. This directory is different from crypto/include/internal, as the former is more general internal headers for all of OpenSSL, while the latter is for libcrypto only. Reviewed-by: Matt Caswell <matt@openssl.org>
* use unit64_t for CPUID and timestamp codeDr. Stephen Henson2015-05-142-23/+11
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* Allow use of standard integer types.Dr. Stephen Henson2015-05-141-0/+39
| | | | | | | | | Include appropriate headers for standard integer types in e_os2.h This should use stdint.h, inttypes.h or a workaround for systems which have neither. Reviewed-by: Matt Caswell <matt@openssl.org>
* Add missing ctype.hRich Salz2015-05-131-0/+1
| | | | | | Had old patch, forgot to push/patch this to master Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix ocsp bugsRich Salz2015-05-131-21/+37
| | | | | | Various bugs found by Viktor, Emilia, Matt, etc. Reviewed-by: Matt Caswell <matt@openssl.org>