Versions in this module Expand all Collapse all v1 v1.1.2 Mar 3, 2020 Changes in this version + const AddChainName + const AddPreChainName + const CertificateQuotaUserPrefix + const GetEntriesName + const GetEntryAndProofName + const GetProofByHashName + const GetRootsName + const GetSTHConsistencyName + const GetSTHName + var Entrypoints = []EntrypointName + var MaxGetEntriesAllowed int64 = 1000 + func GetCTLogID(pk crypto.PublicKey) ([sha256.Size]byte, error) + func IsPrecertificate(cert *x509.Certificate) (bool, error) + func LogConfigFromFile(filename string) ([]*configpb.LogConfig, error) + func MultiLogConfigFromFile(filename string) (*configpb.LogMultiConfig, error) + func ParseBodyAsJSONChain(r *http.Request) (ct.AddChainRequest, error) + func QuotaUserForCert(c *x509.Certificate) string + func ToMultiLogConfig(cfg []*configpb.LogConfig, beSpec string) *configpb.LogMultiConfig + func ValidateChain(rawChain [][]byte, validationOpts CertValidationOpts) ([]*x509.Certificate, error) + func ValidateLogConfigs(cfg []*configpb.LogConfig) error + type AppHandler struct + Handler func(context.Context, *logInfo, http.ResponseWriter, *http.Request) (int, error) + Info *logInfo + Method string + Name EntrypointName + func (a AppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type CertValidationOpts struct + func NewCertValidationOpts(trustedRoots *PEMCertPool, currentTime time.Time, rejectExpired bool, ...) CertValidationOpts + type DefaultMirrorSTHFactory struct + func (f DefaultMirrorSTHFactory) NewStorage(logID [sha256.Size]byte) (MirrorSTHStorage, error) + type DefaultMirrorSTHStorage struct + func (st DefaultMirrorSTHStorage) GetMirrorSTH(ctx context.Context, maxTreeSize int64) (*ct.SignedTreeHead, error) + type DefaultRequestLog struct + func (dlr *DefaultRequestLog) AddCertToChain(_ context.Context, cert *x509.Certificate) + func (dlr *DefaultRequestLog) AddDERToChain(_ context.Context, d []byte) + func (dlr *DefaultRequestLog) FirstAndSecond(_ context.Context, f, s int64) + func (dlr *DefaultRequestLog) IssueSCT(_ context.Context, sct []byte) + func (dlr *DefaultRequestLog) LeafHash(_ context.Context, lh []byte) + func (dlr *DefaultRequestLog) LeafIndex(_ context.Context, li int64) + func (dlr *DefaultRequestLog) LogPrefix(_ context.Context, p string) + func (dlr *DefaultRequestLog) Start(ctx context.Context) context.Context + func (dlr *DefaultRequestLog) StartAndEnd(_ context.Context, s, e int64) + func (dlr *DefaultRequestLog) Status(_ context.Context, s int) + func (dlr *DefaultRequestLog) TreeSize(_ context.Context, ts int64) + type EntrypointName string + type FrozenSTHGetter struct + func (sg *FrozenSTHGetter) GetSTH(ctx context.Context) (*ct.SignedTreeHead, error) + type Instance struct + Handlers PathHandlers + STHGetter STHGetter + func SetUpInstance(ctx context.Context, opts InstanceOptions) (*Instance, error) + func (i *Instance) RunUpdateSTH(ctx context.Context, period time.Duration) + type InstanceOptions struct + CertificateQuotaUser func(*x509.Certificate) string + Client trillian.TrillianLogClient + Deadline time.Duration + ErrorMapper func(error) (int, bool) + MaskInternalErrors bool + MetricFactory monitoring.MetricFactory + RemoteQuotaUser func(*http.Request) string + RequestLog RequestLog + STHStorage MirrorSTHStorage + Validated *ValidatedLogConfig + type LogBackendMap = map[string]*configpb.LogBackend + func BuildLogBackendMap(lbs *configpb.LogBackendSet) (LogBackendMap, error) + func ValidateLogMultiConfig(cfg *configpb.LogMultiConfig) (LogBackendMap, error) + type LogSTHGetter struct + func (sg *LogSTHGetter) GetSTH(ctx context.Context) (*ct.SignedTreeHead, error) + type MirrorSTHGetter struct + func (sg *MirrorSTHGetter) GetSTH(ctx context.Context) (*ct.SignedTreeHead, error) + type MirrorSTHStorage interface + GetMirrorSTH func(ctx context.Context, maxTreeSize int64) (*ct.SignedTreeHead, error) + type PEMCertPool struct + func NewPEMCertPool() *PEMCertPool + func (p *PEMCertPool) AddCert(cert *x509.Certificate) + func (p *PEMCertPool) AppendCertsFromPEM(pemCerts []byte) (ok bool) + func (p *PEMCertPool) AppendCertsFromPEMFile(pemFile string) error + func (p *PEMCertPool) CertPool() *x509.CertPool + func (p *PEMCertPool) Included(cert *x509.Certificate) bool + func (p *PEMCertPool) RawCertificates() []*x509.Certificate + func (p *PEMCertPool) Subjects() (res [][]byte) + type PathHandlers map[string]AppHandler + type RequestLog interface + AddCertToChain func(context.Context, *x509.Certificate) + AddDERToChain func(context.Context, []byte) + FirstAndSecond func(context.Context, int64, int64) + IssueSCT func(context.Context, []byte) + LeafHash func(context.Context, []byte) + LeafIndex func(context.Context, int64) + LogPrefix func(context.Context, string) + Start func(context.Context) context.Context + StartAndEnd func(context.Context, int64, int64) + Status func(context.Context, int) + TreeSize func(context.Context, int64) + type STHGetter interface + GetSTH func(ctx context.Context) (*ct.SignedTreeHead, error) + type SignatureCache struct + func (sc *SignatureCache) GetSignature(input []byte) (ct.DigitallySigned, bool) + func (sc *SignatureCache) SetSignature(input []byte, sig ct.DigitallySigned) + type ValidatedLogConfig struct + Config *configpb.LogConfig + FrozenSTH *ct.SignedTreeHead + KeyUsages []x509.ExtKeyUsage + NotAfterLimit *time.Time + NotAfterStart *time.Time + PrivKey ptypes.DynamicAny + PubKey crypto.PublicKey + func ValidateLogConfig(cfg *configpb.LogConfig) (*ValidatedLogConfig, error)