ssl

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyEC256   = certcrypto.EC256
	KeyEC384   = certcrypto.EC384
	KeyRSA2048 = certcrypto.RSA2048
	KeyRSA3072 = certcrypto.RSA3072
	KeyRSA4096 = certcrypto.RSA4096
)

Variables

This section is empty.

Functions

func GetPrivateKey

func GetPrivateKey(priKey crypto.PrivateKey, keyType KeyType) ([]byte, error)

Types

type AcmeClient

type AcmeClient struct {
	Config *lego.Config
	Client *lego.Client
	User   *AcmeUser
}

func NewAcmeClient

func NewAcmeClient(acmeAccount *model.WebsiteAcmeAccount) (*AcmeClient, error)

func NewRegisterClient

func NewRegisterClient(acmeAccount *model.WebsiteAcmeAccount) (*AcmeClient, error)

func (*AcmeClient) GetDNSResolve

func (c *AcmeClient) GetDNSResolve(domains []string) (map[string]Resolve, error)

func (*AcmeClient) ObtainSSL

func (c *AcmeClient) ObtainSSL(domains []string, privateKey crypto.PrivateKey) (certificate.Resource, error)

func (*AcmeClient) RenewSSL

func (c *AcmeClient) RenewSSL(certUrl string) (certificate.Resource, error)

func (*AcmeClient) UseDns

func (c *AcmeClient) UseDns(dnsType DnsType, params string, skipDNSCheck bool) error

func (*AcmeClient) UseHTTP

func (c *AcmeClient) UseHTTP(path string) error

func (*AcmeClient) UseManualDns

func (c *AcmeClient) UseManualDns() error

type AcmeUser

type AcmeUser struct {
	Email        string
	Registration *registration.Resource
	Key          crypto.PrivateKey
}

func (*AcmeUser) GetEmail

func (u *AcmeUser) GetEmail() string

func (*AcmeUser) GetPrivateKey

func (u *AcmeUser) GetPrivateKey() crypto.PrivateKey

func (*AcmeUser) GetRegistration

func (u *AcmeUser) GetRegistration() *registration.Resource

type DNSParam

type DNSParam struct {
	ID        string `json:"id"`
	Token     string `json:"token"`
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
	Email     string `json:"email"`
	APIkey    string `json:"apiKey"`
	APIUser   string `json:"apiUser"`
	APISecret string `json:"apiSecret"`
	SecretID  string `json:"secretID"`
}

type DnsType

type DnsType string
const (
	DnsPod       DnsType = "DnsPod"
	AliYun       DnsType = "AliYun"
	CloudFlare   DnsType = "CloudFlare"
	NameSilo     DnsType = "NameSilo"
	NameCheap    DnsType = "NameCheap"
	NameCom      DnsType = "NameCom"
	Godaddy      DnsType = "Godaddy"
	TencentCloud DnsType = "TencentCloud"
)

type KeyType added in v1.9.0

type KeyType = certcrypto.KeyType

type Resolve

type Resolve struct {
	Key   string
	Value string
	Err   string
}

Jump to

Keyboard shortcuts

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