...

Source file src/github.com/sigstore/rekor/pkg/pki/pki.go

Documentation: github.com/sigstore/rekor/pkg/pki

     1  //
     2  // Copyright 2021 The Sigstore Authors.
     3  //
     4  // Licensed under the Apache License, Version 2.0 (the "License");
     5  // you may not use this file except in compliance with the License.
     6  // You may obtain a copy of the License at
     7  //
     8  //     http://www.apache.org/licenses/LICENSE-2.0
     9  //
    10  // Unless required by applicable law or agreed to in writing, software
    11  // distributed under the License is distributed on an "AS IS" BASIS,
    12  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  // See the License for the specific language governing permissions and
    14  // limitations under the License.
    15  
    16  package pki
    17  
    18  import (
    19  	"io"
    20  
    21  	"github.com/sigstore/rekor/pkg/pki/identity"
    22  	sigsig "github.com/sigstore/sigstore/pkg/signature"
    23  )
    24  
    25  // PublicKey Generic object representing a public key (regardless of format & algorithm)
    26  type PublicKey interface {
    27  	CanonicalValue() ([]byte, error)
    28  	// Deprecated: EmailAddresses() will be deprecated in favor of Subjects() which will
    29  	// also return Subject URIs present in public keys.
    30  	EmailAddresses() []string
    31  	Subjects() []string
    32  	// Identities returns a list of typed keys and certificates.
    33  	Identities() ([]identity.Identity, error)
    34  }
    35  
    36  // Signature Generic object representing a signature (regardless of format & algorithm)
    37  type Signature interface {
    38  	CanonicalValue() ([]byte, error)
    39  	Verify(r io.Reader, k interface{}, opts ...sigsig.VerifyOption) error
    40  }
    41  

View as plain text