diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index c551cca664dec5f1584f9e900fa5592d00523120..4980d674fec460aae665fa17d94416ff5567d3ff 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -827,6 +827,7 @@ CURLcode Curl_pin_peer_pubkey(const char *pinnedpubkey,
   return result;
 }
 
+#ifndef CURL_DISABLE_CRYPTO_AUTH
 void Curl_ssl_md5sum(unsigned char *tmp, /* input */
                      size_t tmplen,
                      unsigned char *md5sum, /* output */
@@ -844,6 +845,7 @@ void Curl_ssl_md5sum(unsigned char *tmp, /* input */
   Curl_MD5_final(MD5pw, md5sum);
 #endif
 }
+#endif
 
 /*
  * Check whether the SSL backend supports the status_request extension.