From a77de8c8412b867f9e7762845b4c37c6585c545a Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Wed, 9 Apr 2014 16:39:35 +0200 Subject: [PATCH] Prevent warnings in ssl_check_cert_usage() if keyUsage checks are off --- library/ssl_tls.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 588cbc4a2..6e01494b6 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -4769,6 +4769,12 @@ int ssl_check_cert_usage( const x509_crt *cert, const ssl_ciphersuite_t *ciphersuite, int cert_endpoint ) { +#if !defined(POLARSSL_X509_CHECK_KEY_USAGE) + ((void) cert); + ((void) ciphersuite); + ((void) cert_endpoint); +#endif + #if defined(POLARSSL_X509_CHECK_KEY_USAGE) int usage = 0; #endif