summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/recallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-11-06Unbreak following elliptic curves to supported groups rename.jsing1-3/+3
Reported by Katherine <luigi30 at gmail dot com> on tech@
2018-11-06disable EC_POINT coordinate blinding due to failures in ECDHE and TLStb1-1/+3
2018-11-06revert use of bn_rand_interval due to failures with ECDHE and TLStb5-24/+33
2018-11-06Add TLSv1.3 to version regress tests.jsing1-4/+80
2018-11-06Include TLSv1.3 in version handling code.jsing1-3/+9
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.jsing2-2/+13
ok beck@ bluhm@ tb@
2018-11-06Start working towards adding feature flags (rather than anti-feature flags)jsing1-1/+10
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-06Unbreak regress following Supported Elliptic Curve extension rename.jsing1-49/+49
2018-11-05Make use of bn_rand_interval() where appropriate.tb5-33/+24
ok beck jsing
2018-11-05Introduce bn_rand_interval() that allows specifying an interval [a, b)tb2-2/+30
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 beforetb3-43/+33
freeing and indent nearby labels. ok beck jsing
2018-11-05Remove two unnecessary BN_FLG_CONSTTIME dances: BN_mod_exp_ct() alreadytb2-21/+7
takes care of this internally. ok beck jsing
2018-11-05Rename the TLS Supported Elliptic Curves extension to Supported Groups.jsing6-88/+92
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,jsing1-89/+112
by moving the needs/build/parse functions into their own struct. ok beck@ tb@
2018-11-05Implement coordinate blinding for EC_POINT.tb10-18/+110
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-05Implement C11's aligned_alloc(3). ok guenther@otto2-5/+84
2018-11-05Clean up the code that checks if we can choose an EC cipher suite.jsing3-16/+7
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.jsing8-871/+672
Discussed with tb@
2018-11-05Mop up ecdh_tmp, since it is no longer used.jsing3-25/+4
ok bluhm@ tb@
2018-11-04Define OPENSSL_NO_ASYNC - our libcryptosink does not have built in asyncjsing1-1/+1
features (and possibly never will).
2018-11-04Update the opensslfeatures.h to include all of the OPENSSL_NO_* flags thatjsing1-8/+84
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-04Reformat and sort the OPENSSL_NO_* defines.jsing1-25/+25
2018-11-02move X509_get0_serialNumber where it belongstb1-1/+1
2018-11-02whitespacetb1-2/+2
2018-11-01Make the documentation of -conv_form match reality. It defaultstb1-6/+6
to uncompressed rather than compressed. From Jacqueline Jolicoeur
2018-10-26show what went wrong with a unix domain socket, rather than fail silentlydlg1-2/+4
handy if you type the path wrong or don't have permission... ok deraadt@
2018-10-24Bump libcrypto/libssl/libtls majors due to symbol removals (libcrypto)jsing3-6/+6
and changes to struct visibility/sizes (libssl).
2018-10-24Make more of libssl's record layer state internal.jsing8-88/+86
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.jsing1-1/+0
2018-10-24Remove a bunch of ancient and highly crufty ASN.1 related code fromjsing9-1633/+22
libcrypto (the "new" stuff replaced this back around 2000 or so...). ok tb@
2018-10-24Remove stack related macros that should have been nuked whenjsing1-333/+1
{CMS,KRB5,SRP} were removed.
2018-10-20Avoid calling memcpy with a length <= 0. Reported due to a GCC 7.3.0tb1-5/+6
compiler warning by Pavel Kraynyukhov. A similar fix was made in OpenSSL commit 369e93398b68b8a328e6c1d766222b. ok inoguchi
2018-10-20With the fixed length checks in aes_wrap.c 1.11, we can remove the uglytb1-11/+3
length checks here.
2018-10-20RFC 3394 section 2 states that we need at least two 64 bit blockstb1-6/+6
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-19Run Wycheproof testvectors for AES Key Wrap without padding (RFC 3394)tb1-4/+144
against libcrypto. Currently contains caller-side length checks that should really be done in the library. This will be fixed after an upcoming commit to libcrypto.
2018-10-19truncate long comments in audit summarytb1-2/+7
2018-10-18simplify BN_bin2bn() calls; no need to pre-declare the variable.tb1-11/+6
2018-10-18Avoid a bad out of bounds access that caused intermittent crashes.tb1-2/+2
2018-10-07whitespace cleanup and other minor things from gofmttb1-44/+39
2018-10-06make sure all CStrings are freedtb1-3/+7
2018-10-06plug a memory leaktb1-1/+2
2018-10-06wrap a few more overlong linestb1-14/+36
2018-10-06wrap some overlong fmt.Printfstb1-53/+106
2018-10-06It's slightly simpler to get the ECDH public key as an EC_POINT by usingtb1-16/+15
EC_KEY_set_public_key_affine_coordinates() and EC_KEY_get0_public_key() than using EC_POINT_set_affine_coordinates_GFp() directly.
2018-10-06free EC_POINT and EC_GROUPtb1-1/+4
2018-10-06Run Wycheproof ECDH Web Crypto test vectors against libcrypto.tb1-6/+155
2018-10-06merge runECDSAWebCryptoTest() into runECDSATest()tb1-53/+31
2018-10-06factor ECDSA signature extraction into its own functiontb1-24/+35
2018-10-06make allocate/use/defer dances more consistent in ECDSA sig extractiontb1-9/+8
2018-10-05Run Wycheproof ECDSA Web Crypto test vectors against libcrypto.tb1-7/+166