grpc

package
v0.0.0-...-2fd2f9e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package wrappers wraps the GRPC calls in the core interfaces.

Package wrappers wraps the GRPC calls in the core interfaces.

Package wrappers wraps the GRPC calls in the core interfaces.

Package wrappers wraps the GRPC calls in the core interfaces.

Package wrappers wraps the GRPC calls in the core interfaces.

Index

Constants

This section is empty.

Variables

View Source
var CodedError = grpc.Errorf

CodedError is a alias required to appease go vet

View Source
var ErrMissingParameters = CodedError(codes.FailedPrecondition, "required RPC parameter was missing")

Functions

func AuthzToPB

func AuthzToPB(authz core.Authorization) (*corepb.Authorization, error)

func ChallengeToPB

func ChallengeToPB(challenge core.Challenge) (*corepb.Challenge, error)

func ClientSetup

func ClientSetup(c *cmd.GRPCClientConfig, tls *tls.Config, stats metrics.Scope) (*grpc.ClientConn, error)

ClientSetup creates a gRPC TransportCredentials that presents a client certificate and validates the the server certificate based on the provided *tls.Config. It dials the remote service and returns a grpc.ClientConn if successful.

func NewServer

func NewServer(c *cmd.GRPCServerConfig, tls *tls.Config, stats metrics.Scope) (*grpc.Server, net.Listener, error)

NewServer creates a gRPC server that uses the provided *tls.Config, and verifies that clients present a certificate that (a) is signed by one of the configured ClientCAs, and (b) contains at least one subjectAlternativeName matching the accepted list from GRPCServerConfig.

func NewValidationAuthorityGRPCClient

func NewValidationAuthorityGRPCClient(cc *ggrpc.ClientConn) core.ValidationAuthority

func PBToAuthz

func PBToAuthz(pb *corepb.Authorization) (core.Authorization, error)

func RegisterValidationAuthorityGRPCServer

func RegisterValidationAuthorityGRPCServer(s *ggrpc.Server, impl core.ValidationAuthority) error

Types

type CertificateAuthorityClientWrapper

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

CertificateAuthorityClientWrapper is the gRPC version of a core.CertificateAuthority client. It composites a CertificateAuthorityClient and OCSPGeneratorClient, either of which may be nil if the calling code doesn't intend to use the relevant functions. Once we've fully moved to gRPC, calling code will do away with this wrapper and directly instantiate exactly the type of client it needs.

func (CertificateAuthorityClientWrapper) GenerateOCSP

func (CertificateAuthorityClientWrapper) IssueCertificate

func (CertificateAuthorityClientWrapper) IssueCertificateForPrecertificate

func (CertificateAuthorityClientWrapper) IssuePrecertificate

type CertificateAuthorityServerWrapper

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

CertificateAuthorityServerWrapper is the gRPC version of a core.CertificateAuthority server

func (*CertificateAuthorityServerWrapper) GenerateOCSP

func (*CertificateAuthorityServerWrapper) IssueCertificate

func (*CertificateAuthorityServerWrapper) IssueCertificateForPrecertificate

func (*CertificateAuthorityServerWrapper) IssuePrecertificate

type PublisherClientWrapper

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

PublisherClientWrapper is a wrapper needed to satisfy the interfaces in core/interfaces.go

func NewPublisherClientWrapper

func NewPublisherClientWrapper(inner pubPB.PublisherClient) *PublisherClientWrapper

NewPublisherClientWrapper returns an initialized PublisherClientWrapper

func (*PublisherClientWrapper) SubmitToCT

func (pc *PublisherClientWrapper) SubmitToCT(ctx context.Context, der []byte) error

SubmitToCT makes a call to the gRPC version of the publisher

func (*PublisherClientWrapper) SubmitToSingleCT

func (pc *PublisherClientWrapper) SubmitToSingleCT(ctx context.Context, logURL, logPublicKey string, der []byte) error

SubmitToSingleCT makes a call to the gRPC version of the publisher to send the provided certificate to the log specified by log URI and public key

type PublisherServerWrapper

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

PublisherServerWrapper is the gRPC version of a core.Publisher

func NewPublisherServerWrapper

func NewPublisherServerWrapper(inner *publisher.Impl) *PublisherServerWrapper

NewPublisherServerWrapper returns an initialized PublisherServerWrapper

func (*PublisherServerWrapper) SubmitToCT

func (pub *PublisherServerWrapper) SubmitToCT(ctx context.Context, request *pubPB.Request) (*pubPB.Empty, error)

SubmitToCT calls the same method on the wrapped publisher.Impl since their interfaces are different

func (*PublisherServerWrapper) SubmitToSingleCT

func (pub *PublisherServerWrapper) SubmitToSingleCT(ctx context.Context, request *pubPB.Request) (*pubPB.Empty, error)

type RegistrationAuthorityClientWrapper

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

RegistrationAuthorityClientWrapper is the gRPC version of a core.RegistrationAuthority client

func (RegistrationAuthorityClientWrapper) AdministrativelyRevokeCertificate

func (rac RegistrationAuthorityClientWrapper) AdministrativelyRevokeCertificate(ctx context.Context, cert x509.Certificate, code revocation.Reason, adminName string) error

func (RegistrationAuthorityClientWrapper) DeactivateAuthorization

func (rac RegistrationAuthorityClientWrapper) DeactivateAuthorization(ctx context.Context, auth core.Authorization) error

func (RegistrationAuthorityClientWrapper) DeactivateRegistration

func (rac RegistrationAuthorityClientWrapper) DeactivateRegistration(ctx context.Context, reg core.Registration) error

func (*RegistrationAuthorityClientWrapper) FinalizeOrder

func (RegistrationAuthorityClientWrapper) NewAuthorization

func (RegistrationAuthorityClientWrapper) NewCertificate

func (*RegistrationAuthorityClientWrapper) NewOrder

func (RegistrationAuthorityClientWrapper) NewRegistration

func (RegistrationAuthorityClientWrapper) RevokeCertificateWithReg

func (rac RegistrationAuthorityClientWrapper) RevokeCertificateWithReg(ctx context.Context, cert x509.Certificate, code revocation.Reason, regID int64) error

func (RegistrationAuthorityClientWrapper) UpdateAuthorization

func (rac RegistrationAuthorityClientWrapper) UpdateAuthorization(ctx context.Context, authz core.Authorization, challengeIndex int, chall core.Challenge) (core.Authorization, error)

func (RegistrationAuthorityClientWrapper) UpdateRegistration

func (rac RegistrationAuthorityClientWrapper) UpdateRegistration(ctx context.Context, base, updates core.Registration) (core.Registration, error)

type RegistrationAuthorityServerWrapper

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

RegistrationAuthorityServerWrapper is the gRPC version of a core.RegistrationAuthority server

func (*RegistrationAuthorityServerWrapper) AdministrativelyRevokeCertificate

func (ras *RegistrationAuthorityServerWrapper) AdministrativelyRevokeCertificate(ctx context.Context, request *rapb.AdministrativelyRevokeCertificateRequest) (*corepb.Empty, error)

func (*RegistrationAuthorityServerWrapper) DeactivateAuthorization

func (ras *RegistrationAuthorityServerWrapper) DeactivateAuthorization(ctx context.Context, request *corepb.Authorization) (*corepb.Empty, error)

func (*RegistrationAuthorityServerWrapper) DeactivateRegistration

func (ras *RegistrationAuthorityServerWrapper) DeactivateRegistration(ctx context.Context, request *corepb.Registration) (*corepb.Empty, error)

func (*RegistrationAuthorityServerWrapper) FinalizeOrder

func (*RegistrationAuthorityServerWrapper) NewAuthorization

func (*RegistrationAuthorityServerWrapper) NewCertificate

func (*RegistrationAuthorityServerWrapper) NewOrder

func (*RegistrationAuthorityServerWrapper) NewRegistration

func (*RegistrationAuthorityServerWrapper) RevokeCertificateWithReg

func (*RegistrationAuthorityServerWrapper) UpdateAuthorization

func (*RegistrationAuthorityServerWrapper) UpdateRegistration

type StorageAuthorityClientWrapper

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

StorageAuthorityClientWrapper is the gRPC version of a core.StorageAuthority client

func (StorageAuthorityClientWrapper) AddCertificate

func (sac StorageAuthorityClientWrapper) AddCertificate(ctx context.Context, der []byte, regID int64, ocspResponse []byte) (string, error)

func (StorageAuthorityClientWrapper) AddPendingAuthorizations

func (StorageAuthorityClientWrapper) AddSCTReceipt

func (StorageAuthorityClientWrapper) CountCertificatesByExactNames

func (sac StorageAuthorityClientWrapper) CountCertificatesByExactNames(ctx context.Context, domains []string, earliest, latest time.Time) ([]*sapb.CountByNames_MapElement, error)

func (StorageAuthorityClientWrapper) CountCertificatesByNames

func (sac StorageAuthorityClientWrapper) CountCertificatesByNames(ctx context.Context, domains []string, earliest, latest time.Time) ([]*sapb.CountByNames_MapElement, error)

func (StorageAuthorityClientWrapper) CountCertificatesRange

func (sac StorageAuthorityClientWrapper) CountCertificatesRange(ctx context.Context, earliest, latest time.Time) (int64, error)

func (StorageAuthorityClientWrapper) CountFQDNSets

func (sac StorageAuthorityClientWrapper) CountFQDNSets(ctx context.Context, window time.Duration, domains []string) (int64, error)

func (StorageAuthorityClientWrapper) CountInvalidAuthorizations

func (sac StorageAuthorityClientWrapper) CountInvalidAuthorizations(ctx context.Context, request *sapb.CountInvalidAuthorizationsRequest) (*sapb.Count, error)

func (StorageAuthorityClientWrapper) CountPendingAuthorizations

func (sac StorageAuthorityClientWrapper) CountPendingAuthorizations(ctx context.Context, regID int64) (int, error)

func (StorageAuthorityClientWrapper) CountRegistrationsByIP

func (sac StorageAuthorityClientWrapper) CountRegistrationsByIP(ctx context.Context, ip net.IP, earliest, latest time.Time) (int, error)

func (StorageAuthorityClientWrapper) CountRegistrationsByIPRange

func (sac StorageAuthorityClientWrapper) CountRegistrationsByIPRange(ctx context.Context, ip net.IP, earliest, latest time.Time) (int, error)

func (StorageAuthorityClientWrapper) DeactivateAuthorization

func (sac StorageAuthorityClientWrapper) DeactivateAuthorization(ctx context.Context, id string) error

func (StorageAuthorityClientWrapper) DeactivateRegistration

func (sac StorageAuthorityClientWrapper) DeactivateRegistration(ctx context.Context, id int64) error

func (StorageAuthorityClientWrapper) FQDNSetExists

func (sac StorageAuthorityClientWrapper) FQDNSetExists(ctx context.Context, domains []string) (bool, error)

func (StorageAuthorityClientWrapper) FinalizeAuthorization

func (sac StorageAuthorityClientWrapper) FinalizeAuthorization(ctx context.Context, authz core.Authorization) error

func (StorageAuthorityClientWrapper) FinalizeOrder

func (sac StorageAuthorityClientWrapper) FinalizeOrder(ctx context.Context, order *corepb.Order) error

func (StorageAuthorityClientWrapper) GetAuthorization

func (sac StorageAuthorityClientWrapper) GetAuthorization(ctx context.Context, authID string) (core.Authorization, error)

func (StorageAuthorityClientWrapper) GetAuthorizations

func (StorageAuthorityClientWrapper) GetCertificate

func (sac StorageAuthorityClientWrapper) GetCertificate(ctx context.Context, serial string) (core.Certificate, error)

func (StorageAuthorityClientWrapper) GetCertificateStatus

func (sac StorageAuthorityClientWrapper) GetCertificateStatus(ctx context.Context, serial string) (core.CertificateStatus, error)

func (StorageAuthorityClientWrapper) GetOrder

func (StorageAuthorityClientWrapper) GetOrderAuthorizations

func (StorageAuthorityClientWrapper) GetPendingAuthorization

func (StorageAuthorityClientWrapper) GetRegistration

func (sac StorageAuthorityClientWrapper) GetRegistration(ctx context.Context, regID int64) (core.Registration, error)

func (StorageAuthorityClientWrapper) GetRegistrationByKey

func (sac StorageAuthorityClientWrapper) GetRegistrationByKey(ctx context.Context, key *jose.JSONWebKey) (core.Registration, error)

func (StorageAuthorityClientWrapper) GetSCTReceipt

func (sac StorageAuthorityClientWrapper) GetSCTReceipt(ctx context.Context, serial, logID string) (core.SignedCertificateTimestamp, error)

func (StorageAuthorityClientWrapper) GetValidAuthorizations

func (sac StorageAuthorityClientWrapper) GetValidAuthorizations(ctx context.Context, regID int64, domains []string, now time.Time) (map[string]*core.Authorization, error)

func (StorageAuthorityClientWrapper) MarkCertificateRevoked

func (sac StorageAuthorityClientWrapper) MarkCertificateRevoked(ctx context.Context, serial string, reasonCode revocation.Reason) error

func (StorageAuthorityClientWrapper) NewOrder

func (sas StorageAuthorityClientWrapper) NewOrder(ctx context.Context, request *corepb.Order) (*corepb.Order, error)

func (StorageAuthorityClientWrapper) NewPendingAuthorization

func (sac StorageAuthorityClientWrapper) NewPendingAuthorization(ctx context.Context, authz core.Authorization) (core.Authorization, error)

func (StorageAuthorityClientWrapper) NewRegistration

func (StorageAuthorityClientWrapper) RevokeAuthorizationsByDomain

func (sac StorageAuthorityClientWrapper) RevokeAuthorizationsByDomain(ctx context.Context, domain core.AcmeIdentifier) (int64, int64, error)

func (StorageAuthorityClientWrapper) SetOrderProcessing

func (sac StorageAuthorityClientWrapper) SetOrderProcessing(ctx context.Context, order *corepb.Order) error

func (StorageAuthorityClientWrapper) UpdatePendingAuthorization

func (sac StorageAuthorityClientWrapper) UpdatePendingAuthorization(ctx context.Context, authz core.Authorization) error

func (StorageAuthorityClientWrapper) UpdateRegistration

func (sac StorageAuthorityClientWrapper) UpdateRegistration(ctx context.Context, reg core.Registration) error

type StorageAuthorityServerWrapper

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

StorageAuthorityServerWrapper is the gRPC version of a core.ServerAuthority server

func (StorageAuthorityServerWrapper) AddCertificate

func (StorageAuthorityServerWrapper) AddPendingAuthorizations

func (StorageAuthorityServerWrapper) AddSCTReceipt

func (StorageAuthorityServerWrapper) CountCertificatesByExactNames

func (sas StorageAuthorityServerWrapper) CountCertificatesByExactNames(ctx context.Context, request *sapb.CountCertificatesByNamesRequest) (*sapb.CountByNames, error)

func (StorageAuthorityServerWrapper) CountCertificatesByNames

func (StorageAuthorityServerWrapper) CountCertificatesRange

func (sas StorageAuthorityServerWrapper) CountCertificatesRange(ctx context.Context, request *sapb.Range) (*sapb.Count, error)

func (StorageAuthorityServerWrapper) CountFQDNSets

func (StorageAuthorityServerWrapper) CountInvalidAuthorizations

func (sas StorageAuthorityServerWrapper) CountInvalidAuthorizations(ctx context.Context, request *sapb.CountInvalidAuthorizationsRequest) (*sapb.Count, error)

func (StorageAuthorityServerWrapper) CountPendingAuthorizations

func (sas StorageAuthorityServerWrapper) CountPendingAuthorizations(ctx context.Context, request *sapb.RegistrationID) (*sapb.Count, error)

func (StorageAuthorityServerWrapper) CountRegistrationsByIP

func (sas StorageAuthorityServerWrapper) CountRegistrationsByIP(ctx context.Context, request *sapb.CountRegistrationsByIPRequest) (*sapb.Count, error)

func (StorageAuthorityServerWrapper) CountRegistrationsByIPRange

func (sas StorageAuthorityServerWrapper) CountRegistrationsByIPRange(ctx context.Context, request *sapb.CountRegistrationsByIPRequest) (*sapb.Count, error)

func (StorageAuthorityServerWrapper) DeactivateAuthorization

func (sas StorageAuthorityServerWrapper) DeactivateAuthorization(ctx context.Context, request *sapb.AuthorizationID) (*corepb.Empty, error)

func (StorageAuthorityServerWrapper) DeactivateRegistration

func (sas StorageAuthorityServerWrapper) DeactivateRegistration(ctx context.Context, request *sapb.RegistrationID) (*corepb.Empty, error)

func (StorageAuthorityServerWrapper) FQDNSetExists

func (StorageAuthorityServerWrapper) FinalizeAuthorization

func (sas StorageAuthorityServerWrapper) FinalizeAuthorization(ctx context.Context, request *corepb.Authorization) (*corepb.Empty, error)

func (StorageAuthorityServerWrapper) FinalizeOrder

func (sas StorageAuthorityServerWrapper) FinalizeOrder(ctx context.Context, order *corepb.Order) (*corepb.Empty, error)

func (StorageAuthorityServerWrapper) GetAuthorization

func (StorageAuthorityServerWrapper) GetAuthorizations

func (StorageAuthorityServerWrapper) GetCertificate

func (sas StorageAuthorityServerWrapper) GetCertificate(ctx context.Context, request *sapb.Serial) (*corepb.Certificate, error)

func (StorageAuthorityServerWrapper) GetCertificateStatus

func (sas StorageAuthorityServerWrapper) GetCertificateStatus(ctx context.Context, request *sapb.Serial) (*sapb.CertificateStatus, error)

func (StorageAuthorityServerWrapper) GetOrder

func (StorageAuthorityServerWrapper) GetOrderAuthorizations

func (StorageAuthorityServerWrapper) GetPendingAuthorization

func (StorageAuthorityServerWrapper) GetRegistration

func (StorageAuthorityServerWrapper) GetRegistrationByKey

func (sas StorageAuthorityServerWrapper) GetRegistrationByKey(ctx context.Context, request *sapb.JSONWebKey) (*corepb.Registration, error)

func (StorageAuthorityServerWrapper) GetSCTReceipt

func (StorageAuthorityServerWrapper) GetValidAuthorizations

func (StorageAuthorityServerWrapper) MarkCertificateRevoked

func (sas StorageAuthorityServerWrapper) MarkCertificateRevoked(ctx context.Context, request *sapb.MarkCertificateRevokedRequest) (*corepb.Empty, error)

func (StorageAuthorityServerWrapper) NewOrder

func (sas StorageAuthorityServerWrapper) NewOrder(ctx context.Context, request *corepb.Order) (*corepb.Order, error)

func (StorageAuthorityServerWrapper) NewPendingAuthorization

func (sas StorageAuthorityServerWrapper) NewPendingAuthorization(ctx context.Context, request *corepb.Authorization) (*corepb.Authorization, error)

func (StorageAuthorityServerWrapper) NewRegistration

func (StorageAuthorityServerWrapper) RevokeAuthorizationsByDomain

func (StorageAuthorityServerWrapper) SetOrderProcessing

func (sas StorageAuthorityServerWrapper) SetOrderProcessing(ctx context.Context, order *corepb.Order) (*corepb.Empty, error)

func (StorageAuthorityServerWrapper) UpdatePendingAuthorization

func (sas StorageAuthorityServerWrapper) UpdatePendingAuthorization(ctx context.Context, request *corepb.Authorization) (*corepb.Empty, error)

func (StorageAuthorityServerWrapper) UpdateRegistration

func (sas StorageAuthorityServerWrapper) UpdateRegistration(ctx context.Context, request *corepb.Registration) (*corepb.Empty, error)

type ValidationAuthorityGRPCClient

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

func (ValidationAuthorityGRPCClient) IsSafeDomain

IsSafeDomain returns true if the domain given is determined to be safe by an third-party safe browsing API.

func (ValidationAuthorityGRPCClient) PerformValidation

func (vac ValidationAuthorityGRPCClient) PerformValidation(ctx context.Context, domain string, challenge core.Challenge, authz core.Authorization) ([]core.ValidationRecord, error)

PerformValidation has the VA revalidate the specified challenge and returns the updated Challenge object.

type ValidationAuthorityGRPCServer

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

func (*ValidationAuthorityGRPCServer) IsSafeDomain

func (*ValidationAuthorityGRPCServer) PerformValidation

Directories

Path Synopsis
Package test_proto is a generated protocol buffer package.
Package test_proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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