summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2015-01-05convert clock() to clock_gettime() for improved precision (and accuracy?)Ted Unangst
guenther suggested using thread time, which actually may improve accuracy if somebody puts this in a threaded program.
2015-01-04remove code for ancient gcc.Daniel Dickman
ok millert@, kettenis@
2015-01-03Fix incorrect OPENSSL_assert() usage.Doug Hogan
Instead of asserting, return an error code for I/O errors. This is based on OpenSSL commit 2521fcd8527008ceb3e4748f95b0ed4e2d70cfef. Added checks for two calloc()s while I'm here. ok miod@
2015-01-02Rename the tls_connect_socket() parameter 'socket' to 's' to avoidAlexander Bluhm
a compiler warning about shadowing a global declaration. OK jsing@
2015-01-01Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gpMiod Vallat
value, which we have no use for. ok kettenis@
2015-01-01Revert previous; tls_accept_socket() was intentionally undocumentedIngo Schwarze
because the API design isn't fully settled. Requested by jsing@ and tedu@.
2015-01-01minimally document tls_accept_socket();Ingo Schwarze
patch from Sunil at Nimmagadda dot net
2015-01-01Get rid of .Tn; from Kaspars at Bankovskis dot net, tweaked by me.Ingo Schwarze
While here, stop calling the Internet "the ARPA Internet".
2015-01-01Even though i personally consider 8-bit-characters in filenames unwise,Ingo Schwarze
technically, filenames are not restricted to ASCII. Patch from Kaspars at Bankovskis dot net, no opposition when shown on tech@.
2014-12-30self-relocating crt0 bits for sh, and enable static pie by default. With someMiod Vallat
archdep.h help from kettenis@
2014-12-30copy bcrypt autotune from encrypt(1) and expose via crypt_newhashTed Unangst
ok deraadt miod
2014-12-30typo in comment: ouput => outputDamien Miller
2014-12-29Make the PLT read-only on powerpc as well.Mark Kettenis
ok kurt@
2014-12-29don't leak timing info about padding errors by generating a fake keyTed Unangst
afterwards. openssl has a more complicated fix, but it's less intrusive for now to simply hoist the expensive part (fake key generation) up without sweating a branch or two. ok bcook jsing
2014-12-27Static PIE for mips64. Still something not quite right as a full make buildMark Kettenis
fails. ok kurt@
2014-12-27include netinet/in.h to define struct in6_addr.Brent Cook
Noticed while testing libtls on FreeBSD.
2014-12-27Only include "boot.h" if MD_RCRT0_START is defined. Should fix build on vax.Mark Kettenis
ok miod@
2014-12-27Static PIE support for alpha.Mark Kettenis
This adds alpha-specific first-pass GOT relocation code to boot.h. The assembly code is pure magic. The numeric register names don't make it easier to understand (or compare with the equivalent ld.so code). Unfortunately the assembler only understands a few symbolic register names. Renames the crt0.o entry point to __start. Our compiler was already using __start and the linker will soon follow. ok kurt@
2014-12-26Self-relocation code for powerpc.Kurt Miller
2014-12-25return ERANGE instead of ENOMEM, so callers can differentiate real oomSebastian Benoit
from this case where we have a static buffer and cant realloc. ok phessler, claudio, reyk
2014-12-25Use archdep.h GOT_PERMS define for mprotect of GOT. okay kettenis@Kurt Miller
2014-12-24simplify crypt_checkpass. The API promise is that this function doesn'tTed Unangst
use global data. The simplest fix is to only check blowfish passwords, and implicitly lock out DES passwords. crypt_checkpass is currently only used in one place, passwd, to verify the local user's password, so this is probably acceptable. Gives people a little more time to migrate away from DES before introduing checkpass into more places.
2014-12-24Expand Elf_Rel relocations to include DT_JMPREL. Inspect DT_PLTREL valueKurt Miller
to determine if DT_JMPREL relocations are REL or RELA and conditionally perform DT_JMPREL in either REL or RELA as needed (idea from kettenis@). Remove unneeded i386 RELA implementation. i386 static pie working now. okay kettenis@
2014-12-24Fix previos. Pointed out by kurt@.Mark Kettenis
2014-12-24Add missing argument names, and sync the argument types and names withLawrence Teo
the ones used in the code. pointed out by schwarze@
2014-12-23Use the page size passed by the kernel in the Auxilliary Vector to handleMark Kettenis
architectures with variable page size.
2014-12-23Make sure the GOT and PLT are not writable.Mark Kettenis
Note that ommitting PROT_EXEC for the PLT is deliberate; static PIE binaries should never actually hit the PLT. We're still debating what to do when mprotect(2) fails. But that is no excuse not to at least attempt to fix things up. ok deraadt@
2014-12-23do not expose "ra" to cpp because it muddles up the .c code above.Theo de Raadt
instead handle it internally as $ra solution from kettenis, ok guenther
2014-12-23Set up the linkage table register (%r19) before calling _dl_boot_bind.Mark Kettenis
2014-12-22Self-relocation code for i386.Kurt Miller
2014-12-22Self-relocation code for hppa.Mark Kettenis
2014-12-22Self-relocation code for sparc64.Mark Kettenis
2014-12-22When skipping a relocation because the referenced symbol is undefined, makeMark Kettenis
sure we move on to the next relocation entry. While there, also skip relocations for REL architectures.
2014-12-22Introduce new csu0 variant for -static -pie binaries to use calledKurt Miller
rcsu0.o where the initial 'r' is for relocatable. rcsu0.o performs self-relocation on static pie binaries by calling a slightly modified copy of ld.so's _dl_boot_bind() in boot.h. The first arch implementatation is also included for amd64 where __start calls _dl_boot_bind() and then calls ___start(). Includes parts from kettenis@ to help get R_X86_64_64 relocations working and proper handling for undefined weak symbols. This is the first part of several to get static pie self-relocating binaries working. binutils, gcc and kernel changes are forthcoming to complete the solution, then per-arch implementations are needed for MD_RCRT0_START in csu. okay kettenis@ pascal@ deraadt@
2014-12-22fix docs for NOBROADCASTKILLTed Unangst
2014-12-21Show the sign for NaN as per POSIX; from Elliott Hughes.Daniel Dickman
ok martynas@, millert@, doug@
2014-12-19be like the kernel and only unroll if not smallTed Unangst
2014-12-19i386 unrolling blows up the media in a big way, due to -Os forTheo de Raadt
ramdisk libc builds. there has to be a better way without #ifdef's in gross places, but I don't see it yet.
2014-12-18only unroll on i386 and amd64 (where confirmed to be much faster).Ted Unangst
naddy found sparc64 gets a little slower when unrolled. ok deraadt
2014-12-17unroll loops. much faster on amd64. ok deraadt millertTed Unangst
2014-12-17Add size_t to int checks for SSL functions.Doug Hogan
libtls accepts size_t for lengths but libssl accepts int. This verifies that the input does not exceed INT_MAX. It also avoids truncating size_t when comparing with int and adds printf-style attributes for tls_set_error(). with input from deraadt@ and tedu@ ok tedu@
2014-12-16typo; ok deraadtStuart Henderson
2014-12-16warn for correct symbolTheo de Raadt
2014-12-16Now that we have Camellia support in libcrypto, bring in the SHA256 flavour ofMiod Vallat
the Camellia ciphersuites for TLS 1.2 introduced in RFC 5932. From OpenSSL HEAD.
2014-12-16Remove some useless casts and includes. OK deraadt@ tedu@Todd C. Miller
2014-12-16include lock.h, needed for later headers but currently included by magicTed Unangst
ok millert
2014-12-16use .In and delete .Tn; from Kaspars at Bankovskis dot netIngo Schwarze
2014-12-15merge improvements from NetBSD; ok jmc@ nicm@Ingo Schwarze
2014-12-15Add error handling for EVP_DigestInit_ex().Doug Hogan
A few EVP_DigestInit_ex() calls were left alone since reporting an error would change the public API. Changed internal ssl3_cbc_digest_record() to return a value due to the above change. It will also now set md_out_size=0 on failure. This is based on part of BoringSSL's commit to fix malloc crashes: https://boringssl.googlesource.com/boringssl/+/69a01608f33ab6fe2c3485d94aef1fe9eacf5364 ok miod@
2014-12-14unconditionally align SSL payloadsBrent Cook
Remove support for conditional payload alignment, since we would never want to turn it off. Also, consistently use size_t for calculating the alignment. ok miod@