From 6a6c5fda35a1e47e6cb67ab6cc269622dc03f067 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 25 Mar 2014 16:03:27 +0100 Subject: [PATCH] openssl: disable host CN checks for cyassl (TODO) Signed-off-by: Felix Fietkau --- ustream-openssl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ustream-openssl.c b/ustream-openssl.c index a45e2f4..678e3c4 100644 --- a/ustream-openssl.c +++ b/ustream-openssl.c @@ -105,6 +105,8 @@ static void ustream_ssl_error(struct ustream_ssl *us, int ret) uloop_timeout_set(&us->error_timer, 0); } +#ifndef CYASSL_OPENSSL_H_ + static bool host_pattern_match(const unsigned char *pattern, const char *cn) { char c; @@ -232,6 +234,8 @@ static void ustream_ssl_verify_cert(struct ustream_ssl *us) us->valid_cn = ustream_ssl_verify_cn(us, cert); } +#endif + __hidden enum ssl_conn_status __ustream_ssl_connect(struct ustream_ssl *us) { void *ssl = us->ssl; @@ -243,7 +247,9 @@ __hidden enum ssl_conn_status __ustream_ssl_connect(struct ustream_ssl *us) r = SSL_connect(ssl); if (r == 1) { +#ifndef CYASSL_OPENSSL_H_ ustream_ssl_verify_cert(us); +#endif return U_SSL_OK; } -- 2.25.1