summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/random.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-03-13check return value for BN_hex2bn in regression testsbcook1-4/+10
2016-03-13Fix examples for EVP_PKEY_CTX_set_rsa_padding.bcook4-4/+4
Noted here, https://github.com/libressl-portable/portable/issues/161, we document a non-existent constant in the examples for EVP_PKEY_CTX_set_rsa_padding. ok deraadt@
2016-03-12Add error handling to the remaining calls to bn_wexpand().bcook4-32/+46
Noticed by pascal-cuoq from Github: https://github.com/libressl-portable/openbsd/issues/56 ok beck@
2016-03-12Remove sentences in RETURN VALUES sections saying that functions withmmcc28-79/+14
void return types 'return no value'. This is obvious and therefore unneccessary to mention. We spare rewind(3)'s sentence because espie@ pointed out that it's a warning - the function masks a potential error. This commit also adds a sentence to X509_free clarifying that it's NULL-safe. This bit was discussed with doug@. ok martijn@, sentiment supported by schwarze@
2016-03-12Bump for LibreSSL 2.4.0bcook2-6/+6
2016-03-11X509_free(3) is NULL-safe, so remove NULL checks before its calls.mmcc30-148/+92
ok doug@
2016-03-10http -> https for a few more IETF URLs in comments or man pagesmmcc6-14/+14
2016-03-10un-vax;jmc1-3/+3
2016-03-07http -> https for IETF/IANA URLs in commentsmmcc2-8/+8
2016-03-06explict_bzero for some asn1 free's - ok miod@beck4-6/+18
2016-03-06Make sure stdio functions don't end up in the library, from miod@beck7-15/+39
ok doug@ bcook@
2016-03-04graduate bn_expand() to a real function. the openssl version of thisderaadt4-8/+32
uses a macro with multiple-evaluations of arguments (different amount than the previous version..), but doug/bcook's inline version makes BIGNUM not opaque [problem spotted by naddy] ok doug
2016-03-04Revert bn_expand until there's consensus on a fix.doug2-28/+6
2016-03-02fix the rest of the read_ledword() calls used as lengths to be bounded.beck2-2/+10
inspired by guido vranken https://guidovranken.wordpress.com/2016/03/01/public-disclosure-malformed-private-keys-lead-to-heap-corruption-in-b2i_pvk_bio/ ok doug@
2016-03-02Add bounds checking for BN_hex2bn/BN_dec2bn.doug4-20/+52
Need to make sure i * 4 won't overflow. Based on OpenSSL: commit 99ba9fd02fd481eb971023a3a0a251a37eb87e4c input + ok bcook@ ok beck@
2016-03-02bound lengths coming out of a pem file to something like realitybeck2-6/+14
ok deraadt@
2016-03-01Remove support for ancient, broken DSA implementations.doug2-120/+40
Based on a few OpenSSL commits: Remove ancient DSA workarounds commit ab4a81f69ec88d06c9d8de15326b9296d7f498ed Remove workaround for broken DSA implementations using negative integers commit dfb10af92e9663ce4eefaa1d6b678817fa85344d Typo in error name (EVP_R_DECODE_ERROR -> DSA_R_DECODE_ERROR) commit f6fb7f1856d443185c23f1a5968c08b4269dd37d ok beck@
2016-02-29remove NULL checks for pqueue_free()mmcc2-22/+12
ok doug@
2016-02-26Add a test for negated POSIX characer classes.millert1-0/+1
2016-02-25refactor option letter parsing into a subfunction, to increase clarityderaadt1-93/+102
about which options are turned on/off by 's' and 'S' ok tedu
2016-02-17Sync some root certificates with Mozilla's cert store. ok bcook@sthen1-84/+1016
- Add new root certificates present in Mozilla cert store from CA organizations who are already in cert.pem (AddTrust, Comodo, DigiCert, Entrust, GeoTrust, USERTrust). - Replace Startcom's root with their updated sha256 version present in Mozilla cert store. (They maintained serial# etc so this is still valid for existing signed certificates). - Add two root certificates from CA not previously present: "C=US, O=Network Solutions L.L.C., CN=Network Solutions Certificate Authority" "C=PL, O=Unizeto Sp. z o.o., CN=Certum CA" (the latter used by yandex.ru) We are still listing some certificates that have been removed from Mozilla's store (1024-bit etc) however these cannot be removed until cert validation is improved (we don't currently accept a certificate as valid unless the CA is at the end of a chain).
2016-02-12word fix from previous; ok sthenjmc1-3/+3
2016-02-08sslv3 has been removed;jmc1-16/+21
prompted by a mail from jiri navratil help/ok sthen
2016-02-07compare pointer to NULL in example codemmcc1-3/+3
2016-02-05be more forceful about not using these.espie1-2/+9
improvements sthen@, jmc@. okay millert@, jca@ jmc@
2016-02-05Fix err(3) calls after allocation failures in examples.schwarze1-8/+8
There is long-standing consensus that err(1, NULL) is the best idiom after failure of malloc(3) and friends. Quirk in the manual noticed by tb@.
2016-02-01Sort cert.pem alphabetically, first by organisation, then by CA namesthen1-1604/+1584
(CN if available, otherwise OU). Add a comment identifying the org. Now to get an easy-to-read list of certificates in the file you can use "grep ^[#=] cert.pem". Prepared with https://spacehopper.org/format-pem.20160201. If you would like to verify this commit to ensure that I didn't sneak in any other changes, it will be easier to use the script rather than do it by hand.
2016-01-31Revamp cert.pem certificate information formatting. Skip headers whichsthen1-2459/+184
aren't really useful (the information can be obtained by feeding the cert into "openssl x509 -in filename -text") and add a separator between certs showing the CA's CN or OU (similar to the display format in web browsers). Include both SHA1 and SHA256 fingerprints for all certificates. ok beck@ zhuk@ jung@
2016-01-29Therefor -> Therefore (where appropriate)tb2-2/+2
from ray@, ok jmc@
2016-01-27deprecate SSL_OP_SINGLE_DH_USElibressl-v2.3.2beck4-74/+12
ok jsing@
2016-01-26Don't crash dumping malloc stats if malloc_init hasn't been called, noted byotto1-1/+3
David CARLIER
2016-01-18Call BIO_sock_init() from tls_init() to ensure sockets are enabled on Windows.bcook1-1/+4
This is of course a no-op on other platforms. Noted by equalsraf from github.
2016-01-06Long ago, malloc internally had two kinds of failures, warnings and errors.tedu2-14/+7
The 'A' option elevated warnings to errors, and has been the default for some time. Then warnings were effectively eliminated in favor of everything being an error, but then the 'a' flag turned real errors into warnings! Remove the 'a' option entirely. You shouldn't have used it anyway. ok tb tdeval
2016-01-04Follow style(9) and drop lint /* NOTREACHED */ annotations fromtb2-6/+4
the examples. Diff from Juuso Lapinlampi < wub () partyvan ! eu >, thanks! ok schwarze@
2016-01-04Use the correct values for TLS certificate / private key flags.bcook1-5/+5
fix from Andreas Bartelt <obsd at bartula.de>
2016-01-04Calling clone(2) with CLONE_NEWPID yields multiple processes with pid=1.bcook2-4/+6
Work around this particular case by reseeding whenever pid=1, but as guenther@ notes, directly calling clone(2), and then forking to match another pid, provides other ways to bypass new process detection on Linux. Hopefully at some point Linux implements something like MAP_INHERIT_ZERO, and does not invent a corresponding mechanism to subvert it. Noted by Sebastian Krahmer and the opmsg team. See http://stealth.openwall.net/crypto/randup.c for a test program. ok beck@
2015-12-30Document that the ssl free() functions are NULL safe. OK mmcc@millert6-12/+42
2015-12-30another case where bad things would happen after wrterrortedu1-2/+4
2015-12-30if somebody makes the mistake of disabling abort, don't deref null intedu1-2/+4
validate_junk. from Michal Mazurek
2015-12-28Remove NULL-checks before free() and a few related dead assignments.mmcc2-8/+5
ok and valuable input from millert@
2015-12-28initialize pointer to avoid undefined free on failurebcook1-2/+2
ok beck@
2015-12-28include time.h over sys/time.h for ctime(3)bcook1-2/+2
ok beck@
2015-12-27remove unused variablechl1-2/+1
ok tedu@
2015-12-24more e-mail -> emailmmcc2-5/+5
2015-12-24More adress -> addressmmcc4-4/+4
2015-12-23remove NULL-check before free()mmcc1-3/+2
2015-12-23remove NULL-checks before free()mmcc6-38/+22
2015-12-23assign pointer NULL rather than 0mmcc2-4/+4
2015-12-23assign pointer to NULL rather than 0mmcc2-4/+4
2015-12-22initialize a pointer to NULL rather than 0mmcc2-4/+4