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

Fix provider-metadata.json

This commit is contained in:
koplas 2024-09-16 20:23:22 +02:00
parent 714735d74a
commit 989e3667ba
2 changed files with 11 additions and 10 deletions

View file

@ -23,9 +23,9 @@ import (
)
type ProviderParams struct {
url string
enableSha256 bool
enableSha512 bool
URL string
EnableSha256 bool
EnableSha512 bool
}
func ProviderHandler(params *ProviderParams, directoryProvider bool) http.HandlerFunc {
@ -88,14 +88,15 @@ func TestShaMarking(t *testing.T) {
tt.Parallel()
serverURL := ""
params := ProviderParams{
url: "",
enableSha256: true,
enableSha512: true,
URL: "",
EnableSha256: true,
EnableSha512: true,
}
server := httptest.NewTLSServer(ProviderHandler(&params, test.directoryProvider))
defer server.Close()
serverURL = server.URL
params.URL = server.URL
hClient := server.Client()
client := util.Client(hClient)

View file

@ -1,5 +1,5 @@
{
"canonical_url": "/provider-metadata.json",
"canonical_url": "{{.URL}}/provider-metadata.json",
"distributions": [
{
"rolie": {
@ -7,20 +7,20 @@
{
"summary": "TLP:WHITE advisories",
"tlp_label": "WHITE",
"url": "/white/white-feed.json"
"url": "{{.URL}}/white/white-feed.json"
}
]
}
}
],
"last_updated": "2020-00-00T00:00:00Z",
"last_updated": "2020-01-01T00:00:00Z",
"list_on_CSAF_aggregators": true,
"metadata_version": "2.0",
"mirror_on_CSAF_aggregators": true,
"public_openpgp_keys": [
{
"fingerprint": "A8914CA2F11139C6A69A0018FB3CD9B15DE61596",
"url": "/openpgp/pubkey.asc"
"url": "{{.URL}}/openpgp/pubkey.asc"
}
],
"publisher": {