common

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCertificatesFromDir

func GetCertificatesFromDir(dir string) ([][]byte, error)

GetCertificatesFromDir returns the PEM-encoded certificates from the given directory.

func GetMSPIdentity

func GetMSPIdentity(entry string, mspID string) (view.Identity, error)

GetMSPIdentity returns the MSP identity from the passed entry formatted as <MSPConfigPath>:<MSPID>. If mspID is not empty, it will be used instead of the MSPID in the entry.

func ReadSingleCertificateFromFile

func ReadSingleCertificateFromFile(file string) ([]byte, error)

ReadSingleCertificateFromFile reads the passed file and checks that it contains only one certificate in the PEM format. It returns an error if the file contains more than one certificate.

func SetupIssuersAndAuditors

func SetupIssuersAndAuditors(pp PP, Auditors, Issuers []string) error

SetupIssuersAndAuditors sets up the issuers and auditors for the given public parameters

Types

type PP

type PP interface {
	// AddAuditor adds an auditor to the public parameters
	AddAuditor(raw view.Identity)
	// AddIssuer adds an issuer to the public parameters
	AddIssuer(raw view.Identity)
}

PP defines an interface shared by all public parameters

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL