mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
Fix X509 subject and issuer name_hash mismatch
Fix logging message and g++ invalid conversion error.
This commit is contained in:
@ -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
|
/* 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
|
* with the provided hash type. Returns the first 4 bytes of the hash
|
||||||
* as unsigned long on success, and 0 otherwise. */
|
* 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 long hash = 0;
|
||||||
unsigned char* canonName = NULL;
|
unsigned char* canonName = NULL;
|
||||||
@ -3001,7 +3002,7 @@ static unsigned long X509NameHash(WOLFSSL_X509_NAME* name, int hashType)
|
|||||||
int size = 0;
|
int size = 0;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
WOLFSSL_ENTER("wolfSSL_X509_name_sha256hash");
|
WOLFSSL_ENTER("X509NameHash");
|
||||||
|
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
WOLFSSL_ERROR_MSG("WOLFSSL_X509_NAME pointer was NULL");
|
WOLFSSL_ERROR_MSG("WOLFSSL_X509_NAME pointer was NULL");
|
||||||
|
Reference in New Issue
Block a user