obcca

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2016 License: Apache-2.0 Imports: 39 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Trace is a trace logger.
	Trace *log.Logger
	// Info is an info logger.
	Info *log.Logger
	// Warning is a warning logger.
	Warning *log.Logger
	// Error is an error logger.
	Error *log.Logger
	// Panic is a panic logger.
	Panic *log.Logger
)
View Source
var (
	// ECertSubjectRole is the ASN1 object identifier of the subject's role.
	//
	ECertSubjectRole = asn1.ObjectIdentifier{2, 1, 3, 4, 5, 6, 7}
)
View Source
var (
	// TCertEncTCertIndex is the ASN1 object identifier of the TCert index.
	//
	TCertEncTCertIndex = asn1.ObjectIdentifier{1, 2, 3, 4, 5, 6, 7}
)

Functions

func CBCDecrypt

func CBCDecrypt(key, src []byte) ([]byte, error)

CBCDecrypt performs an AES CBC decryption.

func CBCEncrypt

func CBCEncrypt(key, s []byte) ([]byte, error)

CBCEncrypt performs an AES CBC encryption.

func GetConfigInt

func GetConfigInt(name string) int

GetConfigInt returns a configuration integer value for a given identifier. Environment variables have preference over entries in the yaml file, whereby 'name' is converted to

"OBCCA_" + strings.Replace(strings.ToUpper('name'), ".", "_")

for environment variables.

func GetConfigString

func GetConfigString(name string) string

GetConfigString returns a configuration string value for a given identifier. Environment variables have preference over entries in the yaml file, whereby 'name' is converted to

"OBCCA_" + strings.Replace(strings.ToUpper('name'), ".", "_")

for environment variables.

func LogInit

func LogInit(trace, info, warning, error, panic io.Writer)

LogInit initializes the various loggers.

func PKCS5Pad

func PKCS5Pad(src []byte) []byte

PKCS5Pad adds a PKCS5 padding.

func PKCS5Unpad

func PKCS5Unpad(src []byte) []byte

PKCS5Unpad removes a PKCS5 padding.

Types

type CA

type CA struct {
	// contains filtered or unexported fields
}

CA is the base certificate authority.

func NewCA

func NewCA(name string) *CA

NewCA sets up a new CA.

func (*CA) Close

func (ca *CA) Close()

Close closes down the CA.

type ECA

type ECA struct {
	*CA
	// contains filtered or unexported fields
}

ECA is the enrollment certificate authority.

func NewECA

func NewECA() *ECA

NewECA sets up a new ECA.

func (*ECA) Start

func (eca *ECA) Start(srv *grpc.Server)

Start starts the ECA.

type ECAA

type ECAA struct {
	// contains filtered or unexported fields
}

ECAA serves the administrator GRPC interface of the ECA.

func (*ECAA) PublishCRL

func (ecaa *ECAA) PublishCRL(context.Context, *pb.ECertCRLReq) (*pb.CAStatus, error)

PublishCRL requests the creation of a certificate revocation list from the ECA. Not yet implemented.

func (*ECAA) ReadUserSet

func (ecaa *ECAA) ReadUserSet(ctx context.Context, in *pb.ReadUserSetReq) (*pb.UserSet, error)

ReadUserSet returns a list of users matching the parameters set in the read request.

func (*ECAA) RegisterUser

func (ecaa *ECAA) RegisterUser(ctx context.Context, in *pb.RegisterUserReq) (*pb.Token, error)

RegisterUser registers a new user with the ECA. If the user had been registered before an error is returned.

func (*ECAA) RevokeCertificate

func (ecaa *ECAA) RevokeCertificate(context.Context, *pb.ECertRevokeReq) (*pb.CAStatus, error)

RevokeCertificate revokes a certificate from the ECA. Not yet implemented.

type ECAP

type ECAP struct {
	// contains filtered or unexported fields
}

ECAP serves the public GRPC interface of the ECA.

func (*ECAP) CreateCertificatePair

func (ecap *ECAP) CreateCertificatePair(ctx context.Context, in *pb.ECertCreateReq) (*pb.ECertCreateResp, error)

CreateCertificatePair requests the creation of a new enrollment certificate pair by the ECA.

func (*ECAP) ReadCACertificate

func (ecap *ECAP) ReadCACertificate(ctx context.Context, in *pb.Empty) (*pb.Cert, error)

ReadCACertificate reads the certificate of the ECA.

func (*ECAP) ReadCertificateByHash

func (ecap *ECAP) ReadCertificateByHash(ctx context.Context, hash *pb.Hash) (*pb.Cert, error)

ReadCertificateByHash reads a single enrollment certificate by hash from the ECA.

func (*ECAP) ReadCertificatePair

func (ecap *ECAP) ReadCertificatePair(ctx context.Context, in *pb.ECertReadReq) (*pb.CertPair, error)

ReadCertificatePair reads an enrollment certificate pair from the ECA.

func (*ECAP) RevokeCertificatePair

func (ecap *ECAP) RevokeCertificatePair(context.Context, *pb.ECertRevokeReq) (*pb.CAStatus, error)

RevokeCertificatePair revokes a certificate pair from the ECA. Not yet implemented.

type TCA

type TCA struct {
	*CA
	// contains filtered or unexported fields
}

TCA is the transaction certificate authority.

func NewTCA

func NewTCA(eca *ECA) *TCA

NewTCA sets up a new TCA.

func (*TCA) Start

func (tca *TCA) Start(srv *grpc.Server)

Start starts the TCA.

type TCAA

type TCAA struct {
	// contains filtered or unexported fields
}

TCAA serves the administrator GRPC interface of the TCA.

func (*TCAA) PublishCRL

func (tcaa *TCAA) PublishCRL(context.Context, *pb.TCertCRLReq) (*pb.CAStatus, error)

PublishCRL requests the creation of a certificate revocation list from the TCA. Not yet implemented.

func (*TCAA) ReadCertificateSets

func (tcaa *TCAA) ReadCertificateSets(ctx context.Context, in *pb.TCertReadSetsReq) (*pb.CertSets, error)

ReadCertificateSets returns all certificates matching the filter criteria of the request.

func (*TCAA) RevokeCertificate

func (tcaa *TCAA) RevokeCertificate(context.Context, *pb.TCertRevokeReq) (*pb.CAStatus, error)

RevokeCertificate revokes a certificate from the TCA. Not yet implemented.

func (*TCAA) RevokeCertificateSet

func (tcaa *TCAA) RevokeCertificateSet(context.Context, *pb.TCertRevokeSetReq) (*pb.CAStatus, error)

RevokeCertificateSet revokes a certificate set from the TCA. Not yet implemented.

type TCAP

type TCAP struct {
	// contains filtered or unexported fields
}

TCAP serves the public GRPC interface of the TCA.

func (*TCAP) CreateCertificate

func (tcap *TCAP) CreateCertificate(ctx context.Context, in *pb.TCertCreateReq) (*pb.TCertCreateResp, error)

CreateCertificate requests the creation of a new transaction certificate by the TCA.

func (*TCAP) CreateCertificateSet

func (tcap *TCAP) CreateCertificateSet(ctx context.Context, in *pb.TCertCreateSetReq) (*pb.TCertCreateSetResp, error)

CreateCertificateSet requests the creation of a new transaction certificate set by the TCA.

func (*TCAP) ReadCACertificate

func (tcap *TCAP) ReadCACertificate(ctx context.Context, in *pb.Empty) (*pb.Cert, error)

ReadCACertificate reads the certificate of the TCA.

func (*TCAP) ReadCertificate

func (tcap *TCAP) ReadCertificate(ctx context.Context, in *pb.TCertReadReq) (*pb.Cert, error)

ReadCertificate reads a transaction certificate from the TCA.

func (*TCAP) ReadCertificateSet

func (tcap *TCAP) ReadCertificateSet(ctx context.Context, in *pb.TCertReadSetReq) (*pb.CertSet, error)

ReadCertificateSet reads a transaction certificate set from the TCA. Not yet implemented.

func (*TCAP) RevokeCertificate

func (tcap *TCAP) RevokeCertificate(context.Context, *pb.TCertRevokeReq) (*pb.CAStatus, error)

RevokeCertificate revokes a certificate from the TCA. Not yet implemented.

func (*TCAP) RevokeCertificateSet

func (tcap *TCAP) RevokeCertificateSet(context.Context, *pb.TCertRevokeSetReq) (*pb.CAStatus, error)

RevokeCertificateSet revokes a certificate set from the TCA. Not yet implemented.

type TLSCA

type TLSCA struct {
	*CA
	// contains filtered or unexported fields
}

TLSCA is the tls certificate authority.

func NewTLSCA

func NewTLSCA(eca *ECA) *TLSCA

NewTLSCA sets up a new TLSCA.

func (*TLSCA) Start

func (tlsca *TLSCA) Start(srv *grpc.Server)

Start starts the TLSCA.

type TLSCAA

type TLSCAA struct {
	// contains filtered or unexported fields
}

TLSCAA serves the administrator GRPC interface of the TLS.

func (*TLSCAA) RevokeCertificate

func (tlscaa *TLSCAA) RevokeCertificate(context.Context, *pb.TLSCertRevokeReq) (*pb.CAStatus, error)

RevokeCertificate revokes a certificate from the TLSCA. Not yet implemented.

type TLSCAP

type TLSCAP struct {
	// contains filtered or unexported fields
}

TLSCAP serves the public GRPC interface of the TLSCA.

func (*TLSCAP) CreateCertificate

func (tlscap *TLSCAP) CreateCertificate(ctx context.Context, in *pb.TLSCertCreateReq) (*pb.TLSCertCreateResp, error)

CreateCertificate requests the creation of a new enrollment certificate by the TLSCA.

func (*TLSCAP) ReadCACertificate

func (tlscap *TLSCAP) ReadCACertificate(ctx context.Context, in *pb.Empty) (*pb.Cert, error)

ReadCACertificate reads the certificate of the TLSCA.

func (*TLSCAP) ReadCertificate

func (tlscap *TLSCAP) ReadCertificate(ctx context.Context, in *pb.TLSCertReadReq) (*pb.Cert, error)

ReadCertificate reads an enrollment certificate from the TLSCA.

func (*TLSCAP) RevokeCertificate

func (tlscap *TLSCAP) RevokeCertificate(context.Context, *pb.TLSCertRevokeReq) (*pb.CAStatus, error)

RevokeCertificate revokes a certificate from the TLSCA. Not yet implemented.

Jump to

Keyboard shortcuts

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