]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Enable SHA256 digest support in OpenSSL
authorJouni Malinen <j@w1.fi>
Sun, 16 Aug 2009 07:25:13 +0000 (10:25 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 16 Aug 2009 07:25:13 +0000 (10:25 +0300)
This is needed to allow X.509 certificates with SHA256 digest to be
used. [Bug 323]

src/crypto/tls_openssl.c

index d3ff2c5a2df7e1a40bec18a506f6776db3cb2803..1a716db3f9f6a0c519a3bf868d5121a3334960c7 100644 (file)
@@ -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. */