From 237f47e38e3adbb84c4107ffbfd460de67313d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 27 Feb 2022 15:05:51 +0100 Subject: [PATCH] src: simplify arg type of AddFingerprintDigest PR-URL: https://github.com/nodejs/node/pull/42101 Reviewed-By: Filip Skokan Reviewed-By: Darshan Sen --- src/crypto/crypto_common.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index c7476483925dc6..f019cc69ac2a94 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -431,20 +431,20 @@ MaybeLocal GetLastIssuedCert( void AddFingerprintDigest( const unsigned char* md, unsigned int md_size, - char (*fingerprint)[3 * EVP_MAX_MD_SIZE + 1]) { + char fingerprint[3 * EVP_MAX_MD_SIZE + 1]) { unsigned int i; const char hex[] = "0123456789ABCDEF"; for (i = 0; i < md_size; i++) { - (*fingerprint)[3*i] = hex[(md[i] & 0xf0) >> 4]; - (*fingerprint)[(3*i)+1] = hex[(md[i] & 0x0f)]; - (*fingerprint)[(3*i)+2] = ':'; + fingerprint[3*i] = hex[(md[i] & 0xf0) >> 4]; + fingerprint[(3*i)+1] = hex[(md[i] & 0x0f)]; + fingerprint[(3*i)+2] = ':'; } if (md_size > 0) { - (*fingerprint)[(3*(md_size-1))+2] = '\0'; + fingerprint[(3*(md_size-1))+2] = '\0'; } else { - (*fingerprint)[0] = '\0'; + fingerprint[0] = '\0'; } } @@ -593,7 +593,7 @@ MaybeLocal GetFingerprintDigest( char fingerprint[EVP_MAX_MD_SIZE * 3 + 1]; if (X509_digest(cert, method, md, &md_size)) { - AddFingerprintDigest(md, md_size, &fingerprint); + AddFingerprintDigest(md, md_size, fingerprint); return OneByteString(env->isolate(), fingerprint); } return Undefined(env->isolate());