1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Compare fingerprints case-insensitive

This commit is contained in:
Sascha L. Teichmann 2022-06-09 16:30:20 +02:00 committed by GitHub
parent 1e3f5ee1c4
commit 922e468d99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -996,7 +996,7 @@ func (p *processor) checkPGPKeys(domain string) error {
continue
}
if ckey.GetFingerprint() != string(key.Fingerprint) {
if !strings.EqualFold(ckey.GetFingerprint(), string(key.Fingerprint)) {
p.badPGPs.error("Fingerprint of public OpenPGP key %s does not match remotely loaded.", u)
continue
}

View file

@ -581,7 +581,7 @@ func (pmd *ProviderMetadata) SetLastUpdated(t time.Time) {
// If there is no such key it is append to the list of keys.
func (pmd *ProviderMetadata) SetPGP(fingerprint, url string) {
for i := range pmd.PGPKeys {
if pmd.PGPKeys[i].Fingerprint == Fingerprint(fingerprint) {
if strings.EqualFold(string(pmd.PGPKeys[i].Fingerprint), fingerprint) {
pmd.PGPKeys[i].URL = &url
return
}