cert

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 4 Imported by: 8

Documentation

Index

Constants

View Source
const (
	CommonSubjAminoRoute = "certificate/CommonSubject"
	QSCSubjAminoRoute    = "certificate/QSCSubject"
	QCPSubjAminoRoute    = "certificate/QCPSubject"
)

Variables

View Source
var Codec = amino.NewCodec()

Functions

func MakeCodec

func MakeCodec() *amino.Codec

func MustMarshalJson added in v0.6.0

func MustMarshalJson(obj interface{}) []byte

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

func VerityCrt

func VerityCrt(caPublicKeys []crypto.PubKey, crt Certificate) bool

Types

type Certificate

type Certificate struct {
	CSR       CertificateSigningRequest `json:"csr"`
	CA        Issuer                    `json:"ca"`
	Signature []byte                    `json:"signature"`
}

func (Certificate) PublicKey

func (crt Certificate) PublicKey() crypto.PubKey

type CertificateSigningRequest

type CertificateSigningRequest struct {
	Subj      Subject       `json:"subj"`
	IsCa      bool          `json:"is_ca"`
	NotBefore time.Time     `json:"not_before"`
	NotAfter  time.Time     `json:"not_after"`
	PublicKey crypto.PubKey `json:"public_key"`
}

type CommonSubject

type CommonSubject struct {
	CN string `json:"cn"`
}

type Issuer

type Issuer struct {
	Subj      Subject       `json:"subj"`
	PublicKey crypto.PubKey `json:"public_key"`
}

type QCPSubject

type QCPSubject struct {
	ChainId  string `json:"chain_id"`
	QCPChain string `json:"qcp_chain"`
}

type QSCSubject

type QSCSubject struct {
	ChainId string        `json:"chain_id"`
	Name    string        `json:"name"`
	Banker  crypto.PubKey `json:"banker"`
}

type Subject

type Subject interface{}

type TrustCrts

type TrustCrts struct {
	PublicKeys []crypto.PubKey `json:"public_keys"`
}

Jump to

Keyboard shortcuts

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