summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openssl.c b/openssl.c
index 8c107c2..84ab4de 100644
--- a/openssl.c
+++ b/openssl.c
@@ -151,8 +151,8 @@ BOOL ssl_checkCertificateHash(epoll_server_t *server)
if (server->serverData->fingerprint[i] != 0) {
unsigned char md[EVP_MAX_MD_SIZE];
unsigned int n = 20;
- X509_free(cert);
X509_digest(cert, sha1, md, &n);
+ X509_free(cert);
return n == 20 && memcmp(md, server->serverData->fingerprint, n) == 0;
}
}