mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Improve Texts "PGP key" -> "public OpenPGP key"
This commit is contained in:
parent
bfa5e787a2
commit
1c5664d8cb
2 changed files with 10 additions and 10 deletions
|
|
@ -112,7 +112,7 @@ func buildReporters() []reporter {
|
||||||
&directoryListingsReporter{baseReporter{num: 14, description: "Directory listings"}},
|
&directoryListingsReporter{baseReporter{num: 14, description: "Directory listings"}},
|
||||||
&integrityReporter{baseReporter{num: 18, description: "Integrity"}},
|
&integrityReporter{baseReporter{num: 18, description: "Integrity"}},
|
||||||
&signaturesReporter{baseReporter{num: 19, description: "Signatures"}},
|
&signaturesReporter{baseReporter{num: 19, description: "Signatures"}},
|
||||||
&publicPGPKeyReporter{baseReporter{num: 20, description: "Public PGP Key"}},
|
&publicPGPKeyReporter{baseReporter{num: 20, description: "Public OpenPGP Key"}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -913,18 +913,18 @@ func (p *processor) checkPGPKeys(domain string) error {
|
||||||
|
|
||||||
src, err := p.expr.Eval("$.pgp_keys", p.pmd)
|
src, err := p.expr.Eval("$.pgp_keys", p.pmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.badPGP("No PGP keys found: %v.", err)
|
p.badPGP("No public OpenPGP keys found: %v.", err)
|
||||||
return errContinue
|
return errContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
var keys []csaf.PGPKey
|
var keys []csaf.PGPKey
|
||||||
if err := util.ReMarshalJSON(&keys, src); err != nil {
|
if err := util.ReMarshalJSON(&keys, src); err != nil {
|
||||||
p.badPGP("PGP keys invalid: %v.", err)
|
p.badPGP("Invalid public OpenPGP keys: %v.", err)
|
||||||
return errContinue
|
return errContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(keys) == 0 {
|
if len(keys) == 0 {
|
||||||
p.badPGP("No PGP keys found.")
|
p.badPGP("No public OpenPGP keys found.")
|
||||||
return errContinue
|
return errContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -954,11 +954,11 @@ func (p *processor) checkPGPKeys(domain string) error {
|
||||||
|
|
||||||
res, err := client.Get(u)
|
res, err := client.Get(u)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.badPGP("Fetching PGP key %s failed: %v.", u, err)
|
p.badPGP("Fetching public OpenPGP key %s failed: %v.", u, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if res.StatusCode != http.StatusOK {
|
if res.StatusCode != http.StatusOK {
|
||||||
p.badPGP("Fetching PGP key %s status code: %d (%s)",
|
p.badPGP("Fetching public OpenPGP key %s status code: %d (%s)",
|
||||||
u, res.StatusCode, res.Status)
|
u, res.StatusCode, res.Status)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
@ -969,24 +969,24 @@ func (p *processor) checkPGPKeys(domain string) error {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.badPGP("Reading PGP key %s failed: %v", u, err)
|
p.badPGP("Reading public OpenPGP key %s failed: %v", u, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if ckey.GetFingerprint() != string(key.Fingerprint) {
|
if ckey.GetFingerprint() != string(key.Fingerprint) {
|
||||||
p.badPGP("Fingerprint of PGP key %s do not match remotely loaded.", u)
|
p.badPGP("Fingerprint of public OpenPGP key %s does not match remotely loaded.", u)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
keyring, err := crypto.NewKeyRing(ckey)
|
keyring, err := crypto.NewKeyRing(ckey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.badPGP("Creating key ring for %s failed: %v.", u, err)
|
p.badPGP("Creating store for public OpenPGP key %s failed: %v.", u, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
p.keys = append(p.keys, keyring)
|
p.keys = append(p.keys, keyring)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(p.keys) == 0 {
|
if len(p.keys) == 0 {
|
||||||
p.badPGP("No PGP keys loaded.")
|
p.badPGP("No OpenPGP keys loaded.")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue