summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-06-01Remove branch prediction hint from conditional branch instruction.Christian Weisgerber
These hints are not recognized by clang's builtin assembler. From the corresponding amd64 change. ok visa@ kettenis@
2017-06-01Re-enabled futex based condvar & mutexes, they are not the cause ofMartin Pieuchot
vmd(8)'s regression.
2017-06-01New condvar introduced a regression with vmd(8), revert until it is found.Martin Pieuchot
Reported by Gregor Best.
2017-05-31Add support for EV_RECEIPT and EV_DISPATCH flagsMike Belopuhov
From FreeBSD via Jan Schreiber <jes at posteo ! de>, thanks! OK tedu, bluhm
2017-05-31install futex(2), ok mpiStuart Henderson
2017-05-30getrlimit is now allowed by "stdio"Theo de Raadt
2017-05-30Don't fall back to heapsort() if we would otherwise switch toTodd C. Miller
insertion sort (when the number of elements is < 7).
2017-05-29Enable futex-based mutex and condvar.Martin Pieuchot
ok everybody
2017-05-29SPINLOCK_SPIN_HOOK is no more, define our own set of macros.Martin Pieuchot
Prodded by kettenis@ and tedu@
2017-05-29sort SEE ALSO;Jason McIntyre
2017-05-29sort SEE ALSO;Jason McIntyre
2017-05-29Randomize link-order of libcrypto as we do with libc. This libraryTheo de Raadt
has many small functions without significant local storage, therefore less tail protection from -fstack-protector-strong to prevent their use as ROP gadgets. It is used in security contexts. Also many functions dribble pointers onto the stack, allowing discovery of gadgets via the fixed relative addresses, so let's randomly bias those. ok tedu jsing The rc script will soon need a strategy for skipping this step on machines with poor IO performance. Or maybe do it less often? However, I don't see many more libraries we'll do this with, these are the two most important ones.
2017-05-29It is distasteful to have manual pages which don't refer to realTheo de Raadt
function calls, but instead a "class" of functions like "sigsetops". Rename to sigaddset", and while at it improve documentation in sigprocmask(2) to point to it. ok tedu
2017-05-28Use membar_enter_after_atomic() and membar_exit_before_atomic().Martin Pieuchot
2017-05-27move sha224_initial_hash_value[] under !SHA2_SMALL; ok deraadt@ millert@Christian Weisgerber
2017-05-27New mutex and condvar implementations based on futex(2).Martin Pieuchot
Not enabled yet, it needs some SPINLOCK_SPIN_HOOK love and some bumps. Tested by many including sthen@ in a bulk. ok visa@, sthen@, kettenis@, tedu@
2017-05-26Avoid a potential NULL pointer dereference in d2i_ECPrivateKey().Joel Sing
Reported by Robert Swiecki, who found the issue using honggfuzz. ok bcook@
2017-05-25Add definitions for three OIDs used in EV certificates.Joel Sing
From Kyle J. McKay <mackyle at gmail dot com>
2017-05-24Support swapping 32-bit aligned elements on 64-bit platforms.Todd C. Miller
Previously they would be swapped a byte at a time when sizeof(int) != sizeof(long). Idea from FreeBSD.
2017-05-20Document that qsort falls back to heapsort() if the recursion depthTodd C. Miller
exceeds 2 lg N and add a reference to the introsort paper.
2017-05-20Use David Musser's introsort algorithm to fall back to heapsort(3)Todd C. Miller
when the recursion depth reaches 2*lg(n + 1). This avoids quicksort's quadratic behavior for pathological input without appreciably changing the average run time.
2017-05-17The BSD qsort() performs tail recursion elimination on the secondTodd C. Miller
side of the array being partitioned to save on stack space. Greater savings can be gained by choosing recursion for the smaller side of the partition and eliminating recursion for the larger side. This also results in a small but measurable performance gain. OK otto@ schwarze@
2017-05-16Plug a memory leak. The main_cert needs to be X509_free()ed sinceClaudio Jeker
SSL_get_peer_certificate() increases the ref count whereas extra_certs do not because SSL_get_peer_cert_chain() won't increase ref counts. OK beck@
2017-05-15Typo: freezeo -> freezeroTheo Buehler
From "fenderq" on freenode via tj@
2017-05-13- fix bug wrt posix_memalign(3) of blocks between half a page and a pageOtto Moerbeek
- document posix_memalign() does not play nice with reacallocarray(3) and freezero(3)
2017-05-11Fix a problem introduced in freezero() conversion and useJonathan Gray
sizeof(struct) not sizeof(pointer). otto@ points out that on OpenBSD currently freezero() would have still zeroed the entire allocation, but this is not documented behaviour and may change in future. ok tom@
2017-05-09Enable TLS support but default to the emulatated TLS model. Enable theMark Kettenis
runtime support code libcompiler_rt for this. This code uses functions that live in libpthread, so code that uses TLS support will need to be linked with -lpthread. This should allow more ports to build with base clang. ok espie@
2017-05-09Prevent memory leak on sbuf by freeing it unconditionally and ensureRicardo Mestre
finalbuf is also free'd if kn_encode_base64 somehow fails hint from tb@, OK millert@ and tb@
2017-05-08Fix exponential CPU use with repeated '*' operators by changing '*'Todd C. Miller
handling to be interative instead of recursive. Fix by Yves Orton, ported to OpenBSD glob.c by Ray Lai. OK tb@
2017-05-08Update STANDARDS section, these are now in XSI BASE.Todd C. Miller
2017-05-08BUF_MEM_grow_clean() returns an int, not a size_t. Humourously, on successJoel Sing
it returns "len", which is a size_t value, as an int...
2017-05-07killpg() is covered by XSI so add a STANDARDS section to that effectTodd C. Miller
and document that handling of process group 0 is not specified by the standard.
2017-05-07Drop cipher suites with DSS authentication - there is no good reason toJoel Sing
keep these around. ok beck@
2017-05-07Don't allow a negative process group ID, it would turn into aTodd C. Miller
process ID when negated.
2017-05-07Instead of starting a 'zero-sized' CBB at the size of the first additionJoel Sing
to the CBB, then doubling, start with an initial size of 64 bytes. Almost all uses will exceed this size and we avoid multiple small recallocarray() calls during the initial usage. ok beck@
2017-05-07Move state from ssl->internal to the handshake structure.Bob Beck
while we are at it, convert SSLerror to use a function internally, so that we may later allocate the handshake structure and check for it ok jsing@
2017-05-07Ensure that a client context has been connected before attempting toJoel Sing
complete a TLS handshake.
2017-05-07Return an error if tls_handshake() is called on a TLS context that hasJoel Sing
already completed a TLS handshake.
2017-05-06Move info about group handling via a negative pid into the listTodd C. Miller
with the other pid-specific details.
2017-05-06Bring in an SSL_HANDSHAKE structure and commence the great shovellingBob Beck
ok jsing@, gcc@, regress@
2017-05-06Use freezero() for the tls_load_file() failure case, since we'reJoel Sing
potentially dealing with key material. Also switch a calloc to malloc, since we immediately copy the same amount of data to the newly allocated buffer.
2017-05-06BIO_free_all() and EVP_PKEY_free() can be called with NULL.Joel Sing
2017-05-06Be explicit about when it is safe to call tls_config_free().Joel Sing
Discussed with beck@
2017-05-06Document tls_unload_file().Joel Sing
2017-05-06Perform reference counting for tls_config. This allows tls_config_free() toJoel Sing
be called as soon as it has been passed to the final tls_configure() call, simplifying lifetime tracking for the application. Requested some time ago by tedu@. ok beck@
2017-05-06Provide a tls_unload_file() function, that frees the memory returned fromJoel Sing
a tls_load_file() call, ensuring that it the contents become inaccessible. This is specifically needed on platforms where the library allocators may be different from the application allocator. ok beck@
2017-05-06Bring in HKDF, from BoringSSL, with regress tests modified to beBob Beck
in C. Ride previous minor bump ok tom@ inoguchi@ jsing@
2017-05-06Provide SSL{,_CTX}_set_{min,max}_proto_version() functions.Joel Sing
Rides minor bump. ok beck@
2017-05-06space needed between macro arg and punctuation;Jason McIntyre
2017-05-06Bump minors for symbol addition in libcryptoBob Beck
ok jsing@