summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/setenv.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-07-10ECC constant time scalar multiplication support. First step in overhaulingtb5-46/+337
the EC module. From Billy Brumley and his team, via https://github.com/libressl-portable/openbsd/pull/94 With tweaks from jsing and me. ok jsing
2018-07-10Provide BN_swap_ct(), a constant time function that conditionally swapstb2-2/+53
two bignums. It's saner and substantially less ugly than the existing public BN_constantime_swap() function and will be used in forthcoming work on constant time ECC code. From Billy Brumley and his team. Thanks! ok jsing
2018-07-10Factor out a bit of ugly code that truncates the digest to the order_bitstb1-32/+32
leftmost bits of a longer digest, according to FIPS 183-6, 6.4. Eliminate a microoptimization that only converts the relevant part of the digest to a bignum. ok beck, jsing
2018-07-10$OpenBSD$tb2-1/+2
2018-07-10Now that all *_free() functions are NULL safe, we can generate thetb5-239/+123
freenull test from Symbols.list. Suggested by jsing, discussed with beck and bluhm.
2018-07-10+addsubtb1-1/+2
2018-07-10Add simple regression tests for BN_{,u}{add,sub}(3). With input from jcatb2-0/+248
2018-07-09Move a detail on tls_connect(3) to its documentation and be a bit moretb1-5/+7
explicit about the servername argument of tls_connect_servername(3). input & ok jsing, input & ok schwarze on earlier version
2018-07-09wording tweak for tls_init() from jsingtb1-4/+4
ok jsing, schwarze
2018-07-09sync with const changes in x509.h r1.68.tb1-4/+4
2018-07-09sync with const changes in evp.h r1.64.tb1-3/+3
2018-07-09sync with const changes in bio.h r1.44.tb1-3/+3
2018-07-09sync with const changes in bio.h r1.45.tb1-10/+10
2018-07-08import the relevant parts of a new ASN1_INTEGER_get(3) manual pageschwarze2-1/+240
from OpenSSL, fixing many bugs and polishing many details
2018-07-08Simplify and shorten the description of tls_init(3),schwarze1-4/+4
fixing an awkward wording noticed by tb@. OK tb@
2018-06-16This code is already painful enough to look at. Putting the braces at thetb1-74/+64
right spot helps this a bit. Other whitespace and typo fixes while there.
2018-06-16Tiny tweak to the blinding comment.tb1-2/+4
2018-06-15Basic cleanup. Handle the possibly NULL ctx_in in ecdsa_sign_setup() withtb1-67/+62
the usual idiom. All the allocations are now handled inside conditionals as is usually done in this part of the tree. Turn a few comments into actual sentences and remove a few self-evident ones. Change outdated or cryptic comments into more helpful annotations. In ecdsa_do_verify(), start calculating only after properly truncating the message digest. More consistent variable names: prefer 'order_bits' and 'point' over 'i' and 'tmp_point'. ok jsing
2018-06-15Clean up some whitespace and polish a few comments. Reduces noise intb1-24/+21
an upcoming diff.
2018-06-14Use a blinding value when generating an ECDSA signature, in order totb1-14/+65
reduce the possibility of a side-channel attack leaking the private key. Suggested by Keegan Ryan at NCC Group. With input from and ok jsing
2018-06-14Use a blinding value when generating a DSA signature, in order to reducejsing1-9/+39
the possibility of a side-channel attack leaking the private key. Suggested by Keegan Ryan at NCC Group. With input from and ok tb@
2018-06-14Clarify the digest truncation comment in DSA signature generation.jsing1-3/+4
Requested by and ok tb@
2018-06-14Pull up the code that converts the digest to a BIGNUM - this only needsjsing1-10/+10
to occur once and not be repeated if the signature generation has to be repeated. ok tb@
2018-06-14Fix a potential leak/incorrect return value in DSA signature generation.jsing1-4/+6
In the very unlikely case where we have to repeat the signature generation, the DSA_SIG return value has already been allocated. This will either result in a leak when we allocate again on the next iteration, or it will give a false success (with missing signature values) if any error occurs on the next iteration. ok tb@
2018-06-14Call DSA_SIG_new() instead of hand rolling the same.jsing1-5/+2
ok beck@ tb@
2018-06-14DSA_SIG_new() amounts to a single calloc() call.jsing1-10/+3
ok beck@ tb@
2018-06-13style(9), comments and whitespace.jsing1-30/+32
2018-06-13Avoid a timing side-channel leak when generating DSA and ECDSA signatures.jsing2-7/+4
This is caused by an attempt to do fast modular arithmetic, which introduces branches that leak information regarding secret values. Issue identified and reported by Keegan Ryan of NCC Group. ok beck@ tb@
2018-06-12zap stray tabsthen1-2/+2
2018-06-12Reject excessively large primes in DH key generation. Problem reportedsthen1-1/+6
by Guido Vranken to OpenSSL (https://github.com/openssl/openssl/pull/6457) and based on his diff. suggestions from tb@, ok tb@ jsing@ "During key agreement in a TLS handshake using a DH(E) based ciphersuite a malicious server can send a very large prime value to the client. This will cause the client to spend an unreasonably long period of time generating a key for this prime resulting in a hang until the client has finished. This could be exploited in a Denial Of Service attack."
2018-06-10fix odd whitespacetb1-3/+3
2018-06-10Remove a handrolled GOST_le2bn().jsing1-8/+4
From Dmitry Eremin-Solenikov <dbaryshkov at gmail dot com>.
2018-06-10Now that all of the server-side client key exchange processing functionsjsing1-53/+40
have been converted to CBS, pull it up a level. ok inoguchi@ tb@
2018-06-03Allocate a dedicated buffer for use when deriving a shared key duringjsing1-10/+18
client KEX DHE processing, rather than reusing the buffer that is used to send/receive handshake messages. ok beck@ inoguchi@
2018-06-03Check the return value from DH_size() in ssl3_send_client_kex_dhe().jsing1-4/+6
ok beck@ inoguchi@
2018-06-02Convert ssl3_get_client_kex_ecdhe_ecp() to CBS.jsing1-44/+42
Also allocate a dedicated buffer to hold the shared secret, rather than reusing init_buf. ok inoguchi@ tb@
2018-06-02Update regress for DES cipher suite removal.jsing2-49/+41
2018-06-02Remove the three remaining single DES cipher suites.jsing1-49/+1
These are insecure and should not be used - furthermore, we would should not have been allowing their negotiation with TLSv1.2 (as noted by Robert Merget, Juraj Somorovsky and Simon Friedberger). Removing these cipher suites also fixes this issue. ok beck@ inoguchi@
2018-06-02Zero the client random so that it is easier to spot unintended differences.jsing1-0/+1
2018-06-02Add a const qualifier to the argument of UI_method_get_closer(),tb2-14/+14
UI_method_get_flusher(), UI_method_get_opener(), UI_method_get_prompt_constructor(), UI_method_get_reader(), and UI_method_get_writer(). tested in a bulk build by sthen ok jsing
2018-06-02Add const to the argument of the following callback getters:tb2-18/+18
BIO_meth_get_callback_ctrl, BIO_meth_get_create, BIO_meth_get_ctrl, BIO_meth_get_destroy, BIO_meth_get_gets, BIO_meth_get_puts, BIO_meth_get_read, and BIO_meth_get_write. ok jsing
2018-05-30Add const to both arguments of X509_certificate_type() and clean uptb2-17/+10
a little: Use X509_get0_pubkey() in place of X509_get_pubkey() and EVP_PKEY_free(). Check return value of the former in the appropriate place and simplify the logic for dealing with the potentially NULL pkey argument (includes a neat tweak from jsing). Finally, kill an ugly comment that has been rotting for twenty years and merge the lines around it. tested in a bulk build by sthen ok jsing
2018-05-30Add a const qualifier to the argument of EVP_PKEY_size().tb2-4/+4
tested in a bulk build by sthen ok jsing
2018-05-30Add a const qualifier to the `name' argument oftb2-6/+8
X509_NAME_get_index_by_{OBJ,NID}(). tested in a bulk build by sthen suggested by & ok jsing
2018-05-30Add a const qualifier to the `uni' argument of OPENSSL_uni2asc().tb2-4/+4
tested in a bulk build by sthen ok jsing
2018-05-30Add a const qualifier to the return value of BIO_s_file().tb2-5/+5
tested in a bulk build by sthen ok bcook, jsing
2018-05-26minor markup improvement: .Fa *cctx -> .Pf * Fa cctxschwarze1-3/+3
2018-05-26Quote .Fa arguments containing blanks.schwarze1-4/+4
Diff from Jack Burton <jack at saosce dot com dot au>.
2018-05-24As calloc does the zeroing for us in EVP_PKEY_asn1_new() already, no needtb1-42/+10
to do it a second time by hand, badly. While here, do some style cleanup. This incomplete list of function pointers appears in EVP_PKEY_asn1_copy() as well, fix it by adding sig_print to the members copied over. ok bcook
2018-05-19In ui.h rev. 1.10 2018/05/19 11:03:33, tb@ added a const qualifierschwarze1-3/+3
to the argument of UI_create_method(3). Adjust the manual.