Skip to content

Commit a41992d

Browse files
authored
src: simplify arg type of AddFingerprintDigest
PR-URL: #42101 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 1ce42ec commit a41992d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/crypto/crypto_common.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -435,20 +435,20 @@ MaybeLocal<Object> GetLastIssuedCert(
435435
void AddFingerprintDigest(
436436
const unsigned char* md,
437437
unsigned int md_size,
438-
char (*fingerprint)[3 * EVP_MAX_MD_SIZE + 1]) {
438+
char fingerprint[3 * EVP_MAX_MD_SIZE + 1]) {
439439
unsigned int i;
440440
const char hex[] = "0123456789ABCDEF";
441441

442442
for (i = 0; i < md_size; i++) {
443-
(*fingerprint)[3*i] = hex[(md[i] & 0xf0) >> 4];
444-
(*fingerprint)[(3*i)+1] = hex[(md[i] & 0x0f)];
445-
(*fingerprint)[(3*i)+2] = ':';
443+
fingerprint[3*i] = hex[(md[i] & 0xf0) >> 4];
444+
fingerprint[(3*i)+1] = hex[(md[i] & 0x0f)];
445+
fingerprint[(3*i)+2] = ':';
446446
}
447447

448448
if (md_size > 0) {
449-
(*fingerprint)[(3*(md_size-1))+2] = '\0';
449+
fingerprint[(3*(md_size-1))+2] = '\0';
450450
} else {
451-
(*fingerprint)[0] = '\0';
451+
fingerprint[0] = '\0';
452452
}
453453
}
454454

@@ -597,7 +597,7 @@ MaybeLocal<Value> GetFingerprintDigest(
597597
char fingerprint[EVP_MAX_MD_SIZE * 3 + 1];
598598

599599
if (X509_digest(cert, method, md, &md_size)) {
600-
AddFingerprintDigest(md, md_size, &fingerprint);
600+
AddFingerprintDigest(md, md_size, fingerprint);
601601
return OneByteString(env->isolate(), fingerprint);
602602
}
603603
return Undefined(env->isolate());

0 commit comments

Comments
 (0)