summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-11-06unrevert the use of bn_rand_interval().Theo Buehler
ok beck jsing
2018-11-06Unset Z_is_zero after applying coordinate blinding andTheo Buehler
re-enable coordinate blinding. ok jsing
2018-11-06Flip reversed test in bn_rand_interval().Theo Buehler
ok jsing
2018-11-06disable EC_POINT coordinate blinding due to failures in ECDHE and TLSTheo Buehler
2018-11-06revert use of bn_rand_interval due to failures with ECDHE and TLSTheo Buehler
2018-11-06Include TLSv1.3 in version handling code.Joel Sing
This is effectively a no-op, since most of the code clamps to the maximum version supported by the TLS method (which are still at TLSv1.2). ok beck@ bluhm@ tb@
2018-11-06Add TLS1_3_VERSION and SSL_OP_NO_TLSv1_3 defines under guards.Joel Sing
ok beck@ bluhm@ tb@
2018-11-06Start working towards adding feature flags (rather than anti-feature flags)Joel Sing
for LibreSSL. Add a (commented out) feature flag for TLSv1.3 and define the OPENSSL_NO_TLS1_3 anti-feature flag based on the feature flag. ok beck@ bluhm@ tb@
2018-11-05Make use of bn_rand_interval() where appropriate.Theo Buehler
ok beck jsing
2018-11-05Introduce bn_rand_interval() that allows specifying an interval [a, b)Theo Buehler
from which a a BIGNUM is chosen uniformly at random. ok beck jsing
2018-11-05Eliminate a few "} else" branches, a few unneeded NULL checks beforeTheo Buehler
freeing and indent nearby labels. ok beck jsing
2018-11-05Remove two unnecessary BN_FLG_CONSTTIME dances: BN_mod_exp_ct() alreadyTheo Buehler
takes care of this internally. ok beck jsing
2018-11-05Rename the TLS Supported Elliptic Curves extension to Supported Groups.Joel Sing
RFC 7919 renamed the Supported Elliptic Curves TLS extension to Supported Groups and redefined it to include finite field DH (FFDH) in addition to elliptic curve DH (ECDH). As such, rename the TLS extension and change the associated code to refer to groups rather than curves. ok beck@ tb@
2018-11-05Rework the TLS extension handling code to improve readability/flexibility,Joel Sing
by moving the needs/build/parse functions into their own struct. ok beck@ tb@
2018-11-05Implement coordinate blinding for EC_POINT.Theo Buehler
Based on OpenSSL commit 875ba8b21ecc65ad9a6bdc66971e50 by Billy Brumley, Sohaib ul Hassan and Nicola Tuveri. ok beck jsing commit 875ba8b21ecc65ad9a6bdc66971e50461660fcbb Author: Sohaib ul Hassan <soh.19.hassan@gmail.com> Date: Sat Jun 16 17:07:40 2018 +0300 Implement coordinate blinding for EC_POINT This commit implements coordinate blinding, i.e., it randomizes the representative of an elliptic curve point in its equivalence class, for prime curves implemented through EC_GFp_simple_method, EC_GFp_mont_method, and EC_GFp_nist_method. This commit is derived from the patch https://marc.info/?l=openssl-dev&m=131194808413635 by Billy Brumley. Coordinate blinding is a generally useful side-channel countermeasure and is (mostly) free. The function itself takes a few field multiplicationss, but is usually only necessary at the beginning of a scalar multiplication (as implemented in the patch). When used this way, it makes the values that variables take (i.e., field elements in an algorithm state) unpredictable. For instance, this mitigates chosen EC point side-channel attacks for settings such as ECDH and EC private key decryption, for the aforementioned curves. For EC_METHODs using different coordinate representations this commit does nothing, but the corresponding coordinate blinding function can be easily added in the future to extend these changes to such curves. Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Billy Brumley <bbrumley@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6526)
2018-11-05Mention aligned_alloc(), prompted by Brad; ok jmc@Otto Moerbeek
2018-11-05aligned_alloc bumpOtto Moerbeek
2018-11-05Implement C11's aligned_alloc(3). ok guenther@Otto Moerbeek
2018-11-05Clean up the code that checks if we can choose an EC cipher suite.Joel Sing
The tls1_check_ec_tmp_key() function is now rather misnamed, so just inline the code. Also, rather than running tls1_get_shared_curve() once per EC cipher suite, we can run it once at the start of the ssl3_choose_cipher() function. ok bluhm@ tb@
2018-11-05Consolidate all of the SSL method structs/functions into a single file.Joel Sing
Discussed with tb@
2018-11-05Mop up ecdh_tmp, since it is no longer used.Joel Sing
ok bluhm@ tb@
2018-11-04Define OPENSSL_NO_ASYNC - our libcryptosink does not have built in asyncJoel Sing
features (and possibly never will).
2018-11-04Update the opensslfeatures.h to include all of the OPENSSL_NO_* flags thatJoel Sing
currently exist in OpenSSL - comment out that ones that we do not already define. Some OPENSSL_NO_* flags that we define have been removed from OpenSSL (and code that depended on these to know when features are not available now think that the features have been enabled...). We keep these defined but in their own separate group. ok bluhm@ tb@
2018-11-04add missing NET_RT_TABLEdenis
OK benno@
2018-11-04Reformat and sort the OPENSSL_NO_* defines.Joel Sing
2018-11-03For correctness, do not read struct servent if getservbyname_r() failed.Eric Faurot
Also simplify code.
2018-11-02move X509_get0_serialNumber where it belongsTheo Buehler
2018-11-02whitespaceTheo Buehler
2018-10-31Add comment to remind people to bump libc++.Mark Kettenis
2018-10-31typo; fix from hiltjo posthumaTheo de Raadt
2018-10-31remove a guard in mio_read(), mio_write, sio_read() & sio_write() for amiko
zero length request. return value of zero is preserved in this case. OK ratchov@
2018-10-30use Mdocdate;Jason McIntyre
2018-10-30Add C11's timespec_get(3); minor bump for libc.Philip Guenther
Tweaked diff from brad@ manpage tweaks florian@ and jmc@ ok deraadt@ millert@
2018-10-28Correctly deal with upper level unveil's by keeping track of the coveringBob Beck
unveil for each unveil in the process at unveil() time, and refactoring the handling of current directory and ISDOTDOT to be much more sensible. Worked out at ns2k18 with guenther@. ok deraadt@
2018-10-26remove a misleading comment; ok ratchov@miko
2018-10-24Bump libcrypto/libssl/libtls majors due to symbol removals (libcrypto)Joel Sing
and changes to struct visibility/sizes (libssl).
2018-10-24Make more of libssl's record layer state internal.Joel Sing
In January 2017, we changed large amounts of libssl's data structures to be non-visible/internal, however intentionally left things that the software ecosystem was needing to use. The four or so applications that reached into libssl for record layer related state now implement alternative code. As such, make these data structures internal. ok tb@
2018-10-24Remove a GOST data symbol that should not be exported.Joel Sing
2018-10-24Remove a bunch of ancient and highly crufty ASN.1 related code fromJoel Sing
libcrypto (the "new" stuff replaced this back around 2000 or so...). ok tb@
2018-10-24Remove stack related macros that should have been nuked whenJoel Sing
{CMS,KRB5,SRP} were removed.
2018-10-22More "explicitely" -> "explicitly" in various comments.Kenneth R Westerback
ok guenther@ tb@ deraadt@
2018-10-21Switch alpha to futex(2) based condvars, mutexes and semaphores.Visa Hankala
From Brad, tested by Miod, OK kettenis@
2018-10-21Add quad-precision floating-point support routines for mips64.Visa Hankala
OK kettenis@
2018-10-21Backport libunwind hardware floating point handling for mips64.Visa Hankala
Upstream reference: https://reviews.llvm.org/D41968 OK kettenis@
2018-10-20Avoid calling memcpy with a length <= 0. Reported due to a GCC 7.3.0Theo Buehler
compiler warning by Pavel Kraynyukhov. A similar fix was made in OpenSSL commit 369e93398b68b8a328e6c1d766222b. ok inoguchi
2018-10-20RFC 3394 section 2 states that we need at least two 64 bit blocksTheo Buehler
for wrapping and, accordingly, three 64 bit blocks for unwrapping. That is: we need at least 16 bytes for wrapping and 24 bytes for unwrapping. This also matches the lower bounds that OpenSSL have in their CRYPTO_128_{un,}wrap() functions. In fact, if we pass an input with 'inlen < 8' to AES_unwrap_key(), this results in a segfault since then inlen -= 8 underflows. Found while playing with the Wycheproof keywrap test vectors. ok bcook
2018-10-15Switch powerpc to futex(2) based condvars, mutexes and semaphores.Visa Hankala
From Brad, OK mpi@ kettenis@
2018-10-13Link libc++.so against libc++abi.so such that linking C binaries againstMark Kettenis
a C++ shared library will work correctly with modern linkers. ok guenther@
2018-10-11In re_fastputc(), set lastline to the new line, not the previousTodd C. Miller
line so it gets initialized properly. Fixes a crash in bc with MALLOC_OPTIONS=UJ. OK deraadt@, committing on behalf of yasuoka@
2018-10-09Fix a "copy-and-paste" error that Coverity picked up in the augment codeDavid Gwynne
This brings it back in line with the macros. via Paco A. and the FRRouting project. ok deraadt@ visa@ guenther@ tb@