summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-12-13further document pcap_dump; from jan staryJason McIntyre
text tweaked and ok djm
2018-12-12some pcap_setdirection details; from jan staryJason McIntyre
ok djm
2018-12-10Improve speed for the multi-threaded case by reducing lock contention.Otto Moerbeek
tested by many; ok florian@
2018-12-09add basic MPLS filtering supportdenis
OK claudio@ jca@
2018-12-09style; OK ottoFlorian Obser
2018-12-07Remove an ugly hack in the client certificate verification code that worksTheo Buehler
around broken GOST implementations. It looks like client certificates with GOST have been completely broken since reimport of the GOST code, so no-one is using LibreSSL this way. The client side was fixed only last week for TLSv1.0 and TLSv1.1. This workaround is now in the way of much needed simplifcation and cleanup, so it is time for it to go. suggested by and ok jsing
2018-12-05remove a stray line accidentally left behind in rev. 1.120;Ingo Schwarze
patch from Hiltjo Posthuma <hiltjo at codemadness dot org>
2018-12-03Send SSL_AD_DECODE alerts in the case of a bad hello request or anTheo Buehler
invalid change cipher spec. Found due to dead assignment warnings by the Clang static analyzer. ok inoguchi (previous version), jsing
2018-11-30Fix a typo and remove broken example.Martin Pieuchot
From Edgar Pettijohn.
2018-11-30Restore function prototype for ASN1_dup, fixing usage on I32LP64 platforms.Jeremy Evans
This prototype was removed inadvertantly in r1.50. OK jsing@
2018-11-29remove double .Pp. oops - sorry for not spotting!Jason McIntyre
2018-11-29Improve introduction so there is more clarity about the patterns ofTheo de Raadt
unveil calls should follow. ok various, including jmc
2018-11-29missed adding tls_default_ca_cert_file here. found by sthenTed Unangst
2018-11-29expose the default cert file as a function, not a define. it's reallyTed Unangst
an internal detail of the library, so the string should live inside it, not in the application code. ok jsing
2018-11-29Refactor a tangle in ssl3_send_client_verify() into one function for eachTheo Buehler
type, sigalgs/rsa/ec/gost. Move a few special dances for GOST where they belong now. This prompted a fix for a long-standing bug with GOST client certificate authentication where tls1_transcript_data() fails since the transcript was already freed before. Add a bit of missing error checking and leave some further cleanup for later. idea, guidance & ok jsing
2018-11-28fuse_parse_cmd_line(3) is called fuse_parse_cmdline(3).Martin Pieuchot
Based on a diff from Edgar Pettijohn III.
2018-11-28Correct lock initialisation for libcrypto.Joel Sing
The current crypto_lock_init() function is not called early enough, meaning that locks are already in use before it gets called. Worse, locks could be in use when they are then initialised. Furthermore, since functions like CRYPTO_lock() are public API, these could be called directly bypassing initialisation. Avoid these issues by using static initialisers. ok bcook@
2018-11-27Refactor "find the right pool" code into a function. ok djm@ tb@Otto Moerbeek
2018-11-25spelling; from miodJason McIntyre
2018-11-24zap 10 tab leading whitespace before 'struct evp_pkey_ctx_st {'Theo Buehler
2018-11-24Store and return the locking callbacks, restoring previous behaviour.Joel Sing
The previous code meant that a caller could set the locking callback, after which CRYPTO_get_locking_callback() would return non-NULL. Some existing code depends on this behaviour, specifically to identify if lock handling has been configured. As such, always returning NULL from CRYPTO_get_locking_callback() can result in unexpected application behaviour. ok bcook@
2018-11-22Make alpha less special: _dl_boot_bind() is written to completePhilip Guenther
relocation of ld.so's GOT without using it, so _reloc_alpha_got() merely made the call to _dl_boot_bind() from asm simpler...while itself being a call that required special handling. diff and muild baking by miod@ ok guenther@
2018-11-21Fix DTLS transcript handling for HelloVerifyRequest.Joel Sing
If DTLS sees a HelloVerifyRequest the transcript is reset - the previous tls1_init_finished_mac() function could be called multiple times and would discard any existing state. The replacement tls1_transcript_init() is more strict and fails if a transcript already exists. Provide an explicit tls1_transcript_reset() function and call it from the appropriate places. This also lets us make DTLS less of a special snowflake and call tls1_transcript_init() in the same place as used for TLS. ok beck@ tb@
2018-11-21fold the contents of malloc.conf.5 into malloc.3 and sysctl.2,Jason McIntyre
now that there is essentially no malloc.conf; text tweaked by deraadt; ok otto deraadt
2018-11-21Introducing malloc_usable_size() was a mistake. While some otherOtto Moerbeek
libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
2018-11-20Saw a mention somewhere a while back that the gotdata() function inTheo de Raadt
here could creates non-uniformity since very short fetches of 0 would be excluded. blocks of 0 are just as random as any other data, including blocks of 4 4 4.. This is a misguided attempt to identify errors from the entropy churn/gather code doesn't make sense, errors don't happen. ok bcook
2018-11-19Fix compilation on alpha, where DEF_WEAK() really must be paired withPhilip Guenther
PROTO_NORMAL(). Problem noted by deraadt@
2018-11-19delete the dns jackport experiment. it has no future.Ted Unangst
2018-11-19Revert previous - DTLSv1 uses MD5+SHA1 for RSA signature verification.Joel Sing
Discussed with beck@
2018-11-19Revert previous - the default sigalg for RSA key exchange is {sha1,rsa}.Joel Sing
In TLSv1.2, if the client does not send a signature algorithms extension then for RSA key exchange a signature algorithm of {sha1,rsa} is implied. The MD5+SHA1 hash only applies to older versions of TLS, which do not support sigalgs.
2018-11-18Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageOtto Moerbeek
2018-11-17Add new KERN_CPUSTATS sysctl(2) so we can identify offline CPUs.cheloha
Because of hw.smt we need a way to determine whether a given CPU is "online" or "offline" from userspace. KERN_CPTIME2 is an array, and so cannot be cleanly extended for this purpose, so add a new sysctl(2) KERN_CPUSTATS with an extensible struct. At the moment it's just KERN_CPTIME2 with a flags member, but it can grow as needed. KERN_CPUSTATS appears to have been defined by BSDi long ago, but there are few (if any) packages in the wild still using the symbol so breakage in ports should be near zero. No other system inherited the symbol from BSDi, either. Then, use the new sysctl(2) in systat(1) and top(1): - systat(1) draws placeholder marks ('-') instead of percentages for offline CPUs in the cpu view. - systat(1) omits offline CPU ticks when drawing the "big bar" in the vmstat view. The upshot is that the bar isn't half idle when half your logical CPUs are disabled. - top(1) does not draw lines for offline CPUs; if CPUs toggle on or offline in interactive mode we redraw the display to expand/reduce space for the new/missing CPUs. This is consistent with what some top(1) implementations do on Linux. - top(1) omits offline CPUs from the totals when CPU totals are combined into a single line (the '-1' flag). Originally prompted by deraadt@. Discussed endlessly with deraadt@, ketennis@, and sthen@. Tested by jmc@ and jca@. Earlier versions also discussed with jca@. Earlier versions tested by jmc@, tb@, and many others. docs ok jmc@, kernel bits ok ketennis@, everything ok sthen@, "Is your stuff in yet?" deraadt@
2018-11-17Fix DTLS, because DTLS still remains a special flower, allows regress to passBob Beck
2018-11-17Fix whitespace around assignment operators.Theo Buehler
2018-11-16revert previousBob Beck
2018-11-16Fix DTLS. Because the DTLS code is strange. I am really coming around toBob Beck
joel's line of thinking about it
2018-11-16Unbreak legacy ciphers for prior to 1.1 by setting having a legacyBob Beck
sigalg for MD5_SHA1 and using it as the non sigalgs default ok jsing@
2018-11-16Handle signals that get sent to any threadTed Unangst
from Rian Hunter
2018-11-15Port OpenSSL commit 99540ec79491f59ed8b46b4edf130e17dc907f52 -- mitigationTheo Buehler
for a timing vullnerability in ECDSA signature generation (CVE-2018-0735). Note that the blinding that we introduced back in June for ECDSA and DSA should mitigate this and related issues. This simply adds an additional layer of protection. discussed with jsing
2018-11-14Record an inter-library dependency on libcurses in libedit and libreadline,Stuart Henderson
avoiding runtime failures on architectures using ld.lld. Also add a note to libcurses shlib_version reminding about bumps (as done with libcrypto/libssl). Thanks guenther@ for suggestions of tests involving library bumps and jca@ for doing these tests and hint about DPADD. Looks good kettenis@, ok jca@
2018-11-14Fix wrong sizeof argument by using 'uint16_t *', with minor nit from tb@,Ricardo Mestre
instead of 'uint16_t' Found with llvm's static analyzer, noticed that it was also already reported in Coverity CID 155890 and to ensure this was correct also inspected OpenSSL's equivalent code. OK tb@ and jsing@
2018-11-14In TLS1.2 we use evp_sha1 if we fall back this far, not evp_md5_sha1 as in 1.1Bob Beck
Makes connections to outlook.office365.com work
2018-11-13Temporary workaround for breakage seen in www.videolan.org with curve mismatchBob Beck
2018-11-13NULL out mdctx to prevent possible double free introduced in version 1.4Bob Beck
Spotted by maestre@, ok tb@
2018-11-13Fix pkey_ok to be less strange, and add cuve checks required for the EC onesBob Beck
ok tb@
2018-11-12Missing initialization for pub_key. CID 184303.Theo Buehler
ok bcook
2018-11-11Add check function to verify that pkey is usable with a sigalg.Bob Beck
Include check for appropriate RSA key size when used with PSS. ok tb@
2018-11-11Add back a few missing compatibility stubsBrent Cook
ok beck@
2018-11-11quiet warning on other compilersBrent Cook
ok beck@
2018-11-11Add EVP_sm3() to OpenSSL_add_all_digests_internal().Theo Buehler
ok beck inoguchi