mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Write directory_urls in provider if write indices.
This commit is contained in:
parent
4c0785c060
commit
8af0aeea46
2 changed files with 23 additions and 0 deletions
|
|
@ -298,6 +298,17 @@ func createProviderMetadata(c *config, wellknownCSAF string) error {
|
|||
pm := csaf.NewProviderMetadataDomain(c.CanonicalURLPrefix, c.modelTLPs())
|
||||
c.ProviderMetaData.apply(pm)
|
||||
|
||||
// We have directory based distributions.
|
||||
if c.WriteIndices {
|
||||
// Every TLP as a distribution?
|
||||
for _, t := range c.TLPs {
|
||||
if t != tlpCSAF {
|
||||
pm.AddDirectoryDistribution(
|
||||
c.CanonicalURLPrefix + "/.well-known/csaf/" + string(t))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
key, err := loadCryptoKeyFromFile(c.OpenPGPPublicKey)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot load public key: %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue