aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-08-16 07:25:13 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 18:31:00 (GMT)
commite0bbbb9c917278b44837a36b6ad6bb996c13b491 (patch)
treeee8f9686a14185fd5e78f5b0d4b626439165b00b /src
parent47e06549fd77734bdc859e1a578d19298093e063 (diff)
downloadhostap-06-e0bbbb9c917278b44837a36b6ad6bb996c13b491.zip
hostap-06-e0bbbb9c917278b44837a36b6ad6bb996c13b491.tar.gz
hostap-06-e0bbbb9c917278b44837a36b6ad6bb996c13b491.tar.bz2
Enable SHA256 digest support in OpenSSL
This is needed to allow X.509 certificates with SHA256 digest to be used. [Bug 323] (cherry picked from commit e1ffdfc18be9027b5ff9ae254f92b6255930ac71)
Diffstat (limited to 'src')
-rw-r--r--src/crypto/tls_openssl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index f290a39..5993a68 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -735,6 +735,9 @@ void * tls_init(const struct tls_config *conf)
if (tls_openssl_ref_count == 0) {
SSL_load_error_strings();
SSL_library_init();
+#ifndef OPENSSL_NO_SHA256
+ EVP_add_digest(EVP_sha256());
+#endif /* OPENSSL_NO_SHA256 */
/* TODO: if /dev/urandom is available, PRNG is seeded
* automatically. If this is not the case, random data should
* be added here. */