certs

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 17 Imported by: 1

Documentation

Overview

Package certs implements a certificate signing authority implementation to sign MITM'ed hosts certificates using a self-signed authority.

It has uses an LRU-based certificate caching implementation for caching the generated certificates for frequently accessed hosts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager implements a certificate signing authority for TLS Mitm.

func New

func New(options *Options) (*Manager, error)

New creates a new certificate manager signing client instance

func (*Manager) Get

func (m *Manager) Get(host string) (*tls.Certificate, error)

Get returns a certificate for the current host.

func (*Manager) GetCA

func (m *Manager) GetCA() (tls.Certificate, []byte)

GetCA returns the CA certificate in PEM Encoded format.

func (*Manager) TLSConfigFromCA

func (m *Manager) TLSConfigFromCA() func(host string, ctx *goproxy.ProxyCtx) (*tls.Config, error)

TLSConfigFromCA generates a spoofed TLS certificate for a host

type Options

type Options struct {
	CacheSize int
	Directory string
}

Options contains the configuration options for certificate signing client.

Jump to

Keyboard shortcuts

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