Skip to content

Commit 340d4ce

Browse files
docs(notation): add comment as to why trustStore is implemented within the package
Signed-off-by: Jason <[email protected]>
1 parent 158184e commit 340d4ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/oci/notation/notation.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ type NotationVerifier struct {
127127
logger logr.Logger
128128
}
129129

130+
var _ truststore.X509TrustStore = &trustStore{}
131+
132+
// trustStore is used by notation-go/verifier to retrieve the root certificate for notary.
133+
// The default behaviour is to read the certificate from disk and return it as a byte slice.
134+
// The reason for implementing the interface here is to avoid reading the certificate from disk
135+
// as the certificate is already available in memory.
130136
type trustStore struct {
131137
cert []byte
132138
}

0 commit comments

Comments
 (0)