mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Compare fingerprints case-insensitive
This commit is contained in:
parent
1e3f5ee1c4
commit
922e468d99
2 changed files with 2 additions and 2 deletions
|
|
@ -996,7 +996,7 @@ func (p *processor) checkPGPKeys(domain string) error {
|
||||||
continue
|
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)
|
p.badPGPs.error("Fingerprint of public OpenPGP key %s does not match remotely loaded.", u)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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.
|
// If there is no such key it is append to the list of keys.
|
||||||
func (pmd *ProviderMetadata) SetPGP(fingerprint, url string) {
|
func (pmd *ProviderMetadata) SetPGP(fingerprint, url string) {
|
||||||
for i := range pmd.PGPKeys {
|
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
|
pmd.PGPKeys[i].URL = &url
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue