Skip to content

Commit 382ffda

Browse files
tniessensxa
authored andcommitted
src: simplify arg type of AddFingerprintDigest
PR-URL: #42101 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 07de4ed commit 382ffda

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/crypto/crypto_common.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -431,20 +431,20 @@ MaybeLocal<Object> GetLastIssuedCert(
431431
void AddFingerprintDigest(
432432
const unsigned char* md,
433433
unsigned int md_size,
434-
char (*fingerprint)[3 * EVP_MAX_MD_SIZE + 1]) {
434+
char fingerprint[3 * EVP_MAX_MD_SIZE + 1]) {
435435
unsigned int i;
436436
const char hex[] = "0123456789ABCDEF";
437437

438438
for (i = 0; i < md_size; i++) {
439-
(*fingerprint)[3*i] = hex[(md[i] & 0xf0) >> 4];
440-
(*fingerprint)[(3*i)+1] = hex[(md[i] & 0x0f)];
441-
(*fingerprint)[(3*i)+2] = ':';
439+
fingerprint[3*i] = hex[(md[i] & 0xf0) >> 4];
440+
fingerprint[(3*i)+1] = hex[(md[i] & 0x0f)];
441+
fingerprint[(3*i)+2] = ':';
442442
}
443443

444444
if (md_size > 0) {
445-
(*fingerprint)[(3*(md_size-1))+2] = '\0';
445+
fingerprint[(3*(md_size-1))+2] = '\0';
446446
} else {
447-
(*fingerprint)[0] = '\0';
447+
fingerprint[0] = '\0';
448448
}
449449
}
450450

@@ -593,7 +593,7 @@ MaybeLocal<Value> GetFingerprintDigest(
593593
char fingerprint[EVP_MAX_MD_SIZE * 3 + 1];
594594

595595
if (X509_digest(cert, method, md, &md_size)) {
596-
AddFingerprintDigest(md, md_size, &fingerprint);
596+
AddFingerprintDigest(md, md_size, fingerprint);
597597
return OneByteString(env->isolate(), fingerprint);
598598
}
599599
return Undefined(env->isolate());

0 commit comments

Comments
 (0)