mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
Merge branch 'chore/all-my-stuffs' of https://github.com/sharevb/it-tools into chore/all-my-stuffs
This commit is contained in:
commit
50b9e726a2
1 file changed
+16
-10
@@ -1,4 +1,5 @@
|
||||
import type {
|
||||
AlgorithmHashType,
|
||||
Certificate,
|
||||
Fingerprint,
|
||||
Key,
|
||||
@@ -170,16 +171,21 @@ export function getCertificateLabelValues(cert: Certificate) {
|
||||
})), null, 2),
|
||||
multiline: true,
|
||||
},
|
||||
{
|
||||
label: 'Fingerprint (sha256):',
|
||||
value: onErrorReturnErrorMessage(() => cert.fingerprint('sha256')),
|
||||
multiline: true,
|
||||
},
|
||||
{
|
||||
label: 'Fingerprint (sha512):',
|
||||
value: onErrorReturnErrorMessage(() => cert.fingerprint('sha512')),
|
||||
multiline: true,
|
||||
},
|
||||
...['sha1', 'sha256', 'sha512'].flatMap(algorithm =>
|
||||
[
|
||||
|
||||
{
|
||||
label: `Fingerprint (${algorithm}):`,
|
||||
value: onErrorReturnErrorMessage(() => cert.fingerprint(algorithm as AlgorithmHashType)),
|
||||
multiline: true,
|
||||
},
|
||||
{
|
||||
label: `Fingerprint HEX (${algorithm}):`,
|
||||
value: onErrorReturnErrorMessage(() => cert.fingerprint(algorithm as AlgorithmHashType).toString('hex')),
|
||||
multiline: true,
|
||||
},
|
||||
],
|
||||
),
|
||||
{
|
||||
label: 'Certificate (pem):',
|
||||
value: onErrorReturnErrorMessage(() => cert.toString('pem')),
|
||||
|
||||
Reference in new issue
Block a user