bettercap: github.com/bettercap/bettercap/tls Index | Files

package tls

import "github.com/bettercap/bettercap/tls"

Package tls contains code for TLS certificate generation and signing.

Index

Package Files

cert.go doc.go sign.go

Variables

var (
    DefaultLegitConfig = CertConfig{
        Bits:               4096,
        Country:            "US",
        Locality:           "",
        Organization:       "bettercap devteam",
        OrganizationalUnit: "https://bettercap.org/",
        CommonName:         "bettercap",
    }
    DefaultSpoofConfig = CertConfig{
        Bits:               4096,
        Country:            "US",
        Locality:           "Scottsdale",
        Organization:       "GoDaddy.com, Inc.",
        OrganizationalUnit: "https://certs.godaddy.com/repository/",
        CommonName:         "Go Daddy Secure Certificate Authority - G2",
    }
)

func CertConfigFromModule Uses

func CertConfigFromModule(prefix string, m session.SessionModule) (err error, cfg CertConfig)

func CertConfigToModule Uses

func CertConfigToModule(prefix string, m *session.SessionModule, defaults CertConfig)

func CreateCertificate Uses

func CreateCertificate(cfg CertConfig) (error, *rsa.PrivateKey, []byte)

func Generate Uses

func Generate(cfg CertConfig, certPath string, keyPath string) error

func SignCertificateForHost Uses

func SignCertificateForHost(ca *tls.Certificate, host string, port int) (cert *tls.Certificate, err error)

type CertConfig Uses

type CertConfig struct {
    Bits               int
    Country            string
    Locality           string
    Organization       string
    OrganizationalUnit string
    CommonName         string
}

Package tls imports 14 packages (graph) and is imported by 3 packages. Updated 2018-08-21. Refresh now. Tools for package owners.