Fix for CVE-2014-0195

A buffer overrun attack can be triggered by sending invalid DTLS fragments
to an OpenSSL DTLS client or server. This is potentially exploitable to
run arbitrary code on a vulnerable client or server.

Fixed by adding consistency check for DTLS fragments.

Thanks to Jüri Aedla for reporting this issue.
Fix for CVE-2014-0224

Only accept change cipher spec when it is expected instead of at any
time. This prevents premature setting of session keys before the master
secret is determined which an attacker could use as a MITM attack.

Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue
and providing the initial fix this patch is based on.
Additional CVE-2014-0224 protection.

Return a fatal error if an attempt is made to use a zero length
master secret.
Fix CVE-2014-0221

Unnecessary recursion when receiving a DTLS hello request can be used to
crash a DTLS client. Fixed by handling DTLS hello request without recursion.

Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue.
Fix CVE-2014-3470

Check session_cert is not NULL before dereferencing it.
Update CHANGES and NEWS
Prepare for 0.9.8za release
Prepare for 0.9.8zb-dev
Fixed Windows compilation failure
Fix 0.9.8 FIPS capable OpenSSL build.

The object file bn_lib.o is excluded from FIPS builds which causes
a linker error for BN_consttime_swap. So move definition from bn_lib.c
to bn_gf2m.c

This change is *only* needed for OpenSSL 0.9.8 which uses the 1.2
FIPS module.
Add two known issues to NEWS.
Use correct wording for website scripts.
Clarify NEWS.
Fix null pointer errors.

PR#3394
(cherry picked from commit 7a9d59c148b773f59a41f8697eeecf369a0974c2)
Allow the maximum value.
(Backported as a result of PR#3377 reported by Rainer Jung <rainer.jung@kippdata.de>)
    Fix off-by-one errors in ssl_cipher_get_evp()

    In the ssl_cipher_get_evp() function, fix off-by-one errors in index validation before accessing arrays.

    PR#3375
Accept CCS after sending finished.

Allow CCS after finished has been sent by client: at this point
keys have been correctly set up so it is OK to accept CCS from
server. Without this renegotiation can sometimes fail.

PR#3400
(cherry picked from commit 99cd6a91fcb0931feaebbb4832681d40a66fad41)
Revert "    Fix off-by-one errors in ssl_cipher_get_evp()"

This reverts commit def1490717c091c6ef669da9fc5ea4c8b2a4d776.

Incorrect attribution
    Fix off-by-one errors in ssl_cipher_get_evp()

    In the ssl_cipher_get_evp() function, fix off-by-one errors in index validation before accessing arrays.

    Bug discovered and fixed by Miod Vallat from the OpenBSD team.

    PR#3375
Make sure BN_sqr can never return a negative value.

PR#3410
(cherry picked from commit e14e764c0d5d469da63d0819c6ffc0e1e9e7f0bb)