bettercap: Index | Files

package tls

import ""

Package tls contains code for TLS certificate generation and signing.


Package Files

cert.go doc.go sign.go


var (
    DefaultLegitConfig = CertConfig{
        Bits:               4096,
        Country:            "US",
        Locality:           "",
        Organization:       "bettercap devteam",
        OrganizationalUnit: "",
        CommonName:         "bettercap",
    DefaultSpoofConfig = CertConfig{
        Bits:               4096,
        Country:            "US",
        Locality:           "Scottsdale",
        Organization:       ", Inc.",
        OrganizationalUnit: "",
        CommonName:         "Go Daddy Secure Certificate Authority - G2",

func CertConfigToModule Uses

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

func CreateCertificate Uses

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

func Generate Uses

func Generate(cfg CertConfig, certPath string, keyPath string, ca bool) 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

func CertConfigFromModule Uses

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

Package tls imports 14 packages (graph) and is imported by 21 packages. Updated 2019-12-07. Refresh now. Tools for package owners.