| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ChaCha context. Other changes will also ride this crank.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ensure that we save it and consume it on subsequent writes. Otherwise we
end up discarding part of the key stream and instead generate a new block
at the start of the next write.
This was only an issue for callers that did multiple writes that are not
multiples of 64 bytes - in particular, the ChaCha20Poly1305 usage does not
hit this problem since it performs encryption in a single-shot. For the
same reason, this is also a non-issue when openssl(1) is used to encrypt
with ChaCha.
Issue identified by insane coder; reported to bugs@ by Joseph M. Schwartz.
ok beck@
|
|
|
|
|
|
|
| |
single-shot CRYPTO_chacha_20() interface (the ChaCha interface was already
tested via the EVP regress, but not extensively). The additional ChaCha
tests include single-shot writes, along with partial/single-byte writes
that currently fail due to a bug in the underlying implementation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handrolled version could not even make use of sscanf(), since that would
not work with a certain antiquated compiler.
It is worth noting that there is a tiny change in behaviour - previously
calling BIO_get_host_ip() with something that looked like it might be a
valid IP address (for example, "1." or even ".") would result in it
returning failure rather than trying a BIO_gethostbyname() - now we'll
always try a BIO_gethostbyname() if it was not a valid IPv4 address.
ok beck@ miod@ deraadt@
|
|
|
|
|
|
| |
appear by itself.
ok beck@ miod@
|
|
|
|
|
|
| |
Thanks to Brenk Cook.
OK from miod@
|
|
|
|
| |
ok miod
|
|
|
|
| |
RANDOM_UUID is an enum member.
|
| |
|
|
|
|
|
|
| |
multiline comments
ok jsing@
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
an atoi() followed by an unsigned short cast. This stops things like "-1"
and "66536" from being considered to be "valid" port numbers.
ok beck@ deraadt@
|
|
|
|
|
| |
BIO_get_port() and fails since the current code believes that "-1" is a
valid port.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
names to shorten line lengths
ok beck
|
| |
|
|
|
|
| |
artificially constrain alternative implementations. ok deraadt
|
|
|
|
|
|
| |
to avoid duplication. Also use fewer magic numbers.
ok miod@
|
|
|
|
|
|
| |
From OpenSSL.
ok miod@
|
|
|
|
| |
ok miod@
|
|
|
|
|
|
| |
available via boringssl.
ok deraadt@
|
|
|
|
| |
correct record is already known, so avoid reassignment.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
OK from miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modern compiler toolchains are capable of optimizing even across
translation unit boundaries, so simply moving the memory clearing into
a separate function is not guaranteed to clear memory.
To avoid this, we take advantage of ELF weak symbol semantics, and
insert a call to an empty, weakly named function. The semantics of
calling this function aren't determinable until load time, so the
compiler and linker need to keep the memset() call.
There are still ways a toolchain might defeat this trick (e.g.,
optimistically expecting the weak symbol to not be overloaded, and
only calling memset() if it is; promoting weak symbols to strong
symbols at link-time when emitting a static binary because they won't
be interposed; implementing load-time optimizations). But at least
for the foreseeable future, these seem unlikely.
ok deraadt
|
| |
|
|
|
|
|
| |
change the behaviour of the library in such a complicated fashion.
ok miod
|
|
|
|
|
| |
setuid applications from being fooled.
ok miod
|
| |
|
| |
|
|
|
|
| |
ok deraadt@ beck@
|
|
|
|
|
|
| |
/dev/urandom. Does well in the fallback case. Get it in tree so
it can be worked on.
ok otto@ deraadt@
|
|
|
|
| |
have been used under DJGPP in the previous century (if at all).
|
|
|
|
|
| |
noticed and fix by Fedor Indutny of Joyent
( https://github.com/joyent/node/issues/7704 )
|
|
|
|
|
| |
( https://github.com/joyent/node/issues/7704 ), about to be fixed in
libcrypto.
|
|
|
|
| |
it getting siblings.
|
|
|
|
|
|
|
| |
Allow other non-zero return values in case we change our mind to
return an ssize_t byte count instead of simple success/fail.
ok deraadt, djm
|
|
|
|
|
|
| |
libc interfaces over libcrypto interfaces. for now we also prefer
timingsafe_memcmp over timingsafe_bcmp, even when the latter is acceptable.
ok beck deraadt matthew miod
|