Fix Windows build.
(cherry picked from commit 5f4c5a902b0508eab235adecb34b236cdc0048a5)
Added OPENSSL_assert check as per PR#3377 reported by Rainer Jung <rainer.jung@kippdata.de>
Facilitate back-porting of AESNI and SHA modules.
Fix SEH and stack handling in Win64 build.
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
Client-side namecheck wildcards.

A client reference identity of ".example.com" matches a server
certificate presented identity that is any sub-domain of "example.com"
(e.g. "www.sub.example.com).

With the X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS flag, it matches
only direct child sub-domains (e.g. "www.sub.example.com").
Revert "Fixed incorrect return code handling in ssl3_final_finish_mac"

This reverts commit 2f1dffa88e1b120add4f0b3a794fbca65aa7768d.

Missing attribution.
Fixed incorrect return code handling in ssl3_final_finish_mac.
Based on an original patch by Joel Sing (OpenBSD) who also originally identified the issue.