From: Felix Fietkau Date: Tue, 25 Mar 2014 15:03:27 +0000 (+0100) Subject: openssl: disable host CN checks for cyassl (TODO) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6a6c5fda35a1e47e6cb67ab6cc269622dc03f067;p=oweals%2Fustream-ssl.git openssl: disable host CN checks for cyassl (TODO) Signed-off-by: Felix Fietkau --- 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; }