From fea4c84b0b83db9a534d29cad4772c9a9ecbdbbe Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Sun, 5 Jun 2016 19:52:56 -0700 Subject: [PATCH] Changing PGP Key Fingerprint to use KeyIdShortString --- scans/pgp_content_scan.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scans/pgp_content_scan.go b/scans/pgp_content_scan.go index bf9a10f..7d4ff1f 100644 --- a/scans/pgp_content_scan.go +++ b/scans/pgp_content_scan.go @@ -1,7 +1,6 @@ package scans import ( - "fmt" "github.com/s-rah/onionscan/report" "golang.org/x/crypto/openpgp" "log" @@ -31,10 +30,8 @@ func (cs *PGPContentScan) ScanContent(content string, report *report.OnionScanRe for identity = range keys[0].Identities { break } - var fingerprint string - fingerprint = fmt.Sprintf("%X", keys[0].Subkeys[0].PublicKey.Fingerprint) - log.Printf("\tFound PGP Key fingerprint: %s belonging to %s", fingerprint, identity) + log.Printf("\tFound PGP Key fingerprint: %s belonging to %s", keys[0].Subkeys[0].PublicKey.KeyIdShortString(), identity) - report.AddPGPKey(keyString, identity, fingerprint) + report.AddPGPKey(keyString, identity, keys[0].Subkeys[0].PublicKey.KeyIdShortString()) } }