summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)Author
2015-09-06Replace X509 macros with functionsDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-05Make TS structures opaque.Rich Salz
Most of the accessors existed and were already used so it was easy. TS_VERIFY_CTX didn't have accessors/settors so I added the simple and obvious ones, and changed the app to use them. Also, within crypto/ts, replaced the functions with direct access to the structure members since we generally aren't opaque within a directory. Also fix RT3901. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-05RT3951: Add X509_V_FLAG_NO_CHECK_TIME to suppress time checkDavid Woodhouse
In some environments, such as firmware, the current system time is entirely meaningless. Provide a clean mechanism to suppress the checks against it. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-05make X509_REVOKED opaqueDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-04RT3998: Allow scrypt to be disabledRich Salz
This does 64-bit division and multiplication, and on 32-bit platforms pulls in libgcc symbols (and MSVC does similar) which may not be available. Mostly done by David Woodhouse. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-09-03Revert "OPENSSL_NO_xxx cleanup: RFC3779"David Woodhouse
This reverts the non-cleanup parts of commit c73ad69017. We do actually have a reasonable use case for OPENSSL_NO_RFC3779 in the EDK2 UEFI build, since we don't have a strspn() function in our runtime environment and we don't want the RFC3779 functionality anyway. In addition, it changes the default behaviour of the Configure script so that RFC3779 support isn't disabled by default. It was always disabled from when it was first added in 2006, right up until the point where OPENSSL_NO_RFC3779 was turned into a no-op, and the code in the Configure script was left *trying* to disable it, but not actually working. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-03RT3674: Make no-cms build work.David Bar
Also has changes from from David Woodhouse <David.Woodhouse@intel.com> and some tweaks from me. Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-03PBE lookup testDr. Stephen Henson
Add test to check PBE lookups: these can fail if the PBE table is not correctly orders. Add to "make test". Reviewed-by: Matt Caswell <matt@openssl.org>
2015-09-02Add and use OPENSSL_zallocRich Salz
There are many places (nearly 50) where we malloc and then memset. Add an OPENSSL_zalloc routine to encapsulate that. (Missed one conversion; thanks Richard) Also fixes GH328 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-02make X509_CRL opaqueDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-02delete unused structureDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-02Move OPENSSL_ITEM to store.hRich Salz
The only place that uses it. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-01Fix the comment for POINT_CONVERSION_UNCOMPRESSEDTim Zhang
The |z| value should be 0x04 not 0x02 RT#3838 Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-09-01functions to retrieve certificate flagsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-01use uint32_t for certificate flagsDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-01RT3984: Fix clang compiler warning on Mac OS X where %ld is used for uint64_t.Adam Eijdenberg
clang suggests %llu instead, but it isn't clear that is portable on all platforms. C99 and above define a handy macro for us, so we try to use that definition and fall back to current definition if needed (though we switch to 'u' for unsigned). Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-31Add X509_up_ref function.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-31Add X509_CRL_up_ref functionDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-31make X509_REQ opaqueDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-31make X509_CERT_AUX opaqueDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-26Remove _locked memory functions.Rich Salz
Undocumented, unused, unnecessary (replaced by secure arena). Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-17Add new GOST OIDsDmitry Belyavsky
Add new OIDs for latest GOST updates Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-14Add CCM ciphersuites from RFC6655 and RFC7251Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-14ccm8 supportDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-14CCM support.Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-11Remove Gost94 signature algorithm.Rich Salz
This was obsolete in 2001. This is not the same as Gost94 digest. Thanks to Dmitry Belyavsky <beldmit@gmail.com> for review and advice. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-11Fix seg fault with 0 p val in SKEGuy Leaver (guleaver)
If a client receives a ServerKeyExchange for an anon DH ciphersuite with the value of p set to 0 then a seg fault can occur. This commits adds a test to reject p, g and pub key parameters that have a 0 value (in accordance with RFC 5246) The security vulnerability only affects master and 1.0.2, but the fix is additionally applied to 1.0.1 for additional confidence. CVE-2015-1794 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-11Normalise make errors outputMatt Caswell
make errors wants things in a different order to the way things are currently defined in the header files. The easiest fix is to just let it reorder it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-10RT3999: Remove sub-component version stringsRich Salz
Especially since after the #ifdef cleanups this is not useful. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-08-03Fix make errors for the CCS changesMatt Caswell
The move of CCS into the state machine was causing make errors to fail. This fixes it. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-03Move TLS CCS processing into the state machineMatt Caswell
The handling of incoming CCS records is a little strange. Since CCS is not a handshake message it is handled differently to normal handshake messages. Unfortunately whilst technically it is not a handhshake message the reality is that it must be processed in accordance with the state of the handshake. Currently CCS records are processed entirely within the record layer. In order to ensure that it is handled in accordance with the handshake state a flag is used to indicate that it is an acceptable time to receive a CCS. Previously this flag did not exist (see CVE-2014-0224), but the flag should only really be considered a workaround for the problem that CCS is not visible to the state machine. Outgoing CCS messages are already handled within the state machine. This patch makes CCS visible to the TLS state machine. A separate commit will handle DTLS. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-07-31RT3959: Fix misleading commentNicholas Cooper
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-07-30CAMELLIA PSK ciphersuites from RFC6367Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-07-30Add RFC4785 ciphersuitesDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-07-30Add RFC4279, RFC5487 and RFC5489 ciphersuites.Dr. Stephen Henson
Note: some of the RFC4279 ciphersuites were originally part of PR#2464. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-07-30Initial new PSK ciphersuite definesDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-07-30New PSK keyex text constantsDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-07-27Remove support for SSL3_FLAGS_DELAY_CLIENT_FINISHEDMatt Caswell
This flag was not set anywhere within the codebase (only read). It could only be set by an app reaching directly into s->s3->flags and setting it directly. However that method became impossible when libssl was opaquified. Even in 1.0.2/1.0.1 if an app set the flag directly it is only relevant to ssl3_connect(), which calls SSL_clear() during initialisation that clears any flag settings. Therefore it could take effect if the app set the flag after the handshake has started but before it completed. It seems quite unlikely that any apps really do this (especially as it is completely undocumented). The purpose of the flag is suppress flushing of the write bio on the client side at the end of the handshake after the client has written the Finished message whilst resuming a session. This enables the client to send application data as part of the same flight as the Finished message. This flag also controls the setting of a second flag SSL3_FLAGS_POP_BUFFER. There is an interesting comment in the code about this second flag in the implementation of ssl3_write: /* This is an experimental flag that sends the * last handshake message in the same packet as the first * use data - used to see if it helps the TCP protocol during * session-id reuse */ It seems the experiment did not work because as far as I can tell nothing is using this code. The above comment has been in the code since SSLeay. This commit removes support for SSL3_FLAGS_DELAY_CLIENT_FINISHED, as well as the associated SSL3_FLAGS_POP_BUFFER. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-20Rewrite crypto/ex_dataRich Salz
Removed ability to set ex_data impl at runtime. This removed these three functions: const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void); int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i); int CRYPTO_ex_data_new_class(void); It is no longer possible to change the ex_data implementation at runtime. (Luckily those functions were never documented :) Also removed the ability to add new exdata "classes." We don't believe this received much (if any) use, since you can't add it to OpenSSL objects, and there are probably better (native) methods for developers to add their own extensible data, if they really need that. Replaced the internal hash table (of per-"class" stacks) with a simple indexed array. Reserved an index for "app" application. Each API used to take the lock twice; now it only locks once. Use local stack storage for function pointers, rather than malloc, if possible (i.e., number of ex_data items is under a dozen). Make CRYPTO_EX_DATA_FUNCS opaque/internal. Also fixes RT3710; index zero is reserved. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-07-16Remove obsolete key formats.Rich Salz
Remove support for RSA_NET and Netscape key format (-keyform n). Also removed documentation of SGC. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-07-15Maintain backwards-compatible SSLv23_method macrosViktor Dukhovni
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-07-09make stacksDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-07Extend -show_chain option to verify to show more infoMatt Caswell
The -show_chain flag to the verify command line app shows information about the chain that has been built. This commit adds the text "untrusted" against those certificates that have been used from the untrusted list. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-29Use single master secret generation function.Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-23Add PSK GCM ciphersuites from RFC5487Dr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-23Tidy up ssl3_digest_cached_records logic.Dr. Stephen Henson
Rewrite ssl3_digest_cached_records handling. Only digest cached records if digest array is NULL: this means it is safe to call ssl3_digest_cached_records multiple times (subsequent calls are no op). Remove flag TLS1_FLAGS_KEEP_HANDSHAKE instead only update handshake buffer if digest array is NULL. Add additional "keep" parameter to ssl3_digest_cached_records to indicate if the handshake buffer should be retained after digesting cached records (needed for TLS 1.2 client authentication). Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-23More secure storage of key material.Rich Salz
Add secure heap for storage of private keys (when possible). Add BIO_s_secmem(), CBIGNUM, etc. Add BIO_CTX_secure_new so all BIGNUM's in the context are secure. Contributed by Akamai Technologies under the Corporate CLA. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-16Remove one extraneous parenthesisRichard Levitte
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-06-12Fix ABI break with HMACMatt Caswell
Recent HMAC changes broke ABI compatibility due to a new field in HMAC_CTX. This backs that change out, and does it a different way. Thanks to Timo Teras for the concept. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-10Remove SSL_OP_TLS_BLOCK_PADDING_BUGEmilia Kasper
This is a workaround so old that nobody remembers what buggy clients it was for. It's also been broken in stable branches for two years and nobody noticed (see https://boringssl-review.googlesource.com/#/c/1694/). Reviewed-by: Tim Hudson <tjh@openssl.org>