In chacha_init(), allow for a NULL iv. Reported by znz on github.
ok guenther@ jsing@
Correct error checks in EVP_read_pw_string_min(): UI_add_input_string()
and UI_add_verify_string() return -1 (and maybe -2?) on failure and
>=0 on success, instead of always zero on success

problem reported by Mark Patruck (mark (at) wrapped.cx)
ok miod@
Allow B64_EOF to follow a base64 padding character. This restores previous
behaviour that allows a PEM block to be fed through the base64 decoder.

Reported by Dmitry Eremin-Solenikov on tech@

ok deraadt@ tedu@
Prevent a possible use after free by mimicing the s3_srvr.c fixes contributed by
Adam Langley close to three years ago, which were commited in
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e7928282d0148af5f28fa3437a625a2006af0214

ok jsing@
merge fix for CVE-2014-3509 -- basically a missing s->hit check; ok guenther
merge CVE-2014-3510; Fix DTLS anonymous EC(DH) denial of service
https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=17160033765480453be0a41335fa6b833691c049
ok bcook
Fix CVE-2014-3511; TLS downgrade, verbatim diff
https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=280b1f1ad12131defcd986676a8fc9717aaa601b
ok guenther miod
digests: *_LONG_LOG2 is not used, stop talking about it

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
md32_common: allow digest to override Final function

Define HASH_NO_FINAL to let digest implementation to provide Hash_Final
function on its own.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add GOST 28147-89 cipher implementation

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add GOST 28147-89 MAC implementation

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add GOSR R 34.11-94 message digest implementation

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Hook GOST 28147-89 cipher algorithms

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Hook GOST R 34.11-94 message digest algorithm

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Hook GOST 28147-89 MAC algorithm

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Enable GOST algorithms

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add testsuite for GOST algorithms

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Hook GOST error handling and strings

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
ec: add GOST R 34.10-2001 curves

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Add GOST 28147-89 Key wrapping functions

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>