From c4e758dda5177822a99d62f35c61536728ca2c5e Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 27 Oct 2022 19:31:30 -0500 Subject: [PATCH] Fix X509 subject and issuer name_hash mismatch Fix logging message and g++ invalid conversion error. --- src/x509.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/x509.c b/src/x509.c index 7d85083ea..2f56834e4 100644 --- a/src/x509.c +++ b/src/x509.c @@ -2993,7 +2993,8 @@ char* wolfSSL_X509_NAME_oneline(WOLFSSL_X509_NAME* name, char* in, int sz) /* Given an X509_NAME, convert it to canonical form and then hash * with the provided hash type. Returns the first 4 bytes of the hash * as unsigned long on success, and 0 otherwise. */ -static unsigned long X509NameHash(WOLFSSL_X509_NAME* name, int hashType) +static unsigned long X509NameHash(WOLFSSL_X509_NAME* name, + enum wc_HashType hashType) { unsigned long hash = 0; unsigned char* canonName = NULL; @@ -3001,7 +3002,7 @@ static unsigned long X509NameHash(WOLFSSL_X509_NAME* name, int hashType) int size = 0; int rc; - WOLFSSL_ENTER("wolfSSL_X509_name_sha256hash"); + WOLFSSL_ENTER("X509NameHash"); if (name == NULL) { WOLFSSL_ERROR_MSG("WOLFSSL_X509_NAME pointer was NULL");