ssl

package
v1.10.21-lts Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: GPL-3.0 Imports: 35 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) UseDns

func (c *AcmeClient) UseDns(dnsType DnsType, params string, websiteSSL model.WebsiteSSL) 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"`
	Region    string `json:"region"`
	ClientID  string `json:"clientID"`
	Password  string `json:"password"`
}

type DnsType

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

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