Age | Commit message (Collapse) | Author |
|
tested in a bulk by sthen
ok jsing
|
|
ok jsing
|
|
Simplify parameter checks since this is only called from one place.
Found by Coverity, CID 183502.
ok beck@
|
|
PEM_write(3) and PEM_write_bio(3).
tested in a bulk build by sthen
ok jsing
|
|
OpenSSL commit 7c96dbcdab9 by Rich Salz.
This cleans up the caller side quite a bit and reduces the number of
lines enclosed in #ifndef OPENSSL_NO_ENGINE. codesearch.debian.net
shows that almost nothing checks the return value of ENGINE_finish().
While there, replace a few nearby 'if (!ptr)' with 'if (ptr == NULL)'.
ok jsing, tested by & ok inoguchi
|
|
reduces conditional logic (-218, +82).
MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c
wasn'tt quite right. Two other tricky bits with ASN1_STRING_FLAG_NDEF and
BN_FLG_STATIC_DATA where the condition cannot be collapsed completely.
Passes regress. ok beck
|
|
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
|
|
matter for constant time, and make the public interface only used
external to the library.
This moves us to a model where the important things are constant time
versions unless you ask for them not to be, rather than the opposite.
I'll continue with this method by method.
Add regress tests for same.
ok jsing@
|
|
upon error, as there is no way to do this outside of PEM_SealFinal(), which
can only work if PEM_SealInit() succeeded...
ok beck@ jsing@
|
|
|
|
|
|
|
|
No change in generated assembly.
|
|
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@
|
|
ok deraadt@
|
|
ok miod@
|
|
not 16-bit MS-DOS anymore.
ok bcook@ tedu@
|
|
applied to all code paths.
ok beck@ bcook@ doug@ guenther@
|
|
ok doug@
|
|
|
|
ok miod@
|
|
If you didn't enable deprecated code, there were missing err.h and
bn.h includes. This commit allows building with or without deprecated
code.
This was not derived from an OpenSSL commit. However, they recently
enabled OPENSSL_NO_DEPRECATED in git and fixed these header problems
in a different way.
Verified with clang that this only changes line numbers in the generated
asm.
ok miod@
|
|
Careful review, feedback & ok doug@ jsing@
|
|
arc4random_buf() is guaranteed to always succeed - it is worth noting
that a number of the replaced function calls were already missing return
value checks.
ok deraadt@
|
|
|
|
within libcrypto are safe, but until we can change this function prototype to
use size_t instead of int, better be safe than sorry.
tweaks and ok guenther@
|
|
Improves readability, keeps the code smaller so that it is warmer in your
cache.
review & ok deraadt@
|
|
but without a memory leak.
|
|
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.
ok beck@ miod@
|
|
an OPENSSL_NO_* define. This avoids relying on something else pulling it
in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is
never going to do anything, since OPENSSL_NO_XYZ will never defined, due
to the fact that opensslconf.h has not been included.
This also includes some miscellaneous sorting/tidying of headers.
|
|
are needed in the source files that actually require them.
ok beck@ miod@
|
|
|
|
error path in PEM_X509_INFO_read_bio(); ok guenther@ jsing@
|
|
Also remove unused des_ver.h, which exports some of these strings, but is not installed.
ok miod@ tedu@
|
|
|
|
ok miod
|
|
since the calculated value is not actually used in the uninitialised case.
Change the code so that we only do the calculation if we actually need it.
Issue detected by clang and reported by both brad@ and Brent Cook.
|
|
ok tedu guenther
|
|
potential integer overflows easily changed into an allocation return
of NULL, with errno nicely set if need be. checks for an allocations
returning NULL are commonplace, or if the object is dereferenced
(quite normal) will result in a nice fault which can be detected &
repaired properly.
ok tedu
|
|
ok to firebomb from tedu@
|
|
#if 1 /* new with openssl 0.9.4 */
current code;
#else
obsolete code;
#endif
|
|
including it they get <openssl/opensslconf.h>. So instead of pulling in
<openssl/e_os2.h>, just pull in <openssl/opensslconf.h>.
"go ahead" miod@
|
|
eyeballed before applying. Contributed by Cyril Roelandt on tech@
|
|
This avoids a lot of ugly gymnastics to do snprintfs before sending the
bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c
where it was being called with the incorrect number of arguments and
using random things off the stack as addresses of strings.
ok krw@, jsing@
|
|
|
|
|
|
|
|
Also, use sizeof() for snprintf()'s size argument
|
|
truncation is either desirable, not an issue, or is detected and handled later
ok deraadt@
|
|
funcitons to check for incorrect use. keep BUF_strlcpy and BUF_strlcat
for API comptibility only.
ok tedu@
|