certificate

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAcmeClient

func GetAcmeClient(email string, privateKey string, devMode bool) *lego.Client

GetAcmeClient Incoming an email ,a privatekey and a Boolean value that controls the opening of the test environment When this function is started for the first time, it will initialize the account-related configuration, After initializing the configuration, It will try to obtain an account based on the private key, if it fails, it will create an account based on the private key. This account will be used during the running of the program

func ObtainCertificateAli

func ObtainCertificateAli(client *lego.Client, domain string, accessKey string, accessSecret string) (string, string)

func ObtainCertificateGoDaddy

func ObtainCertificateGoDaddy(client *lego.Client, domain string, accessKey string, accessSecret string) (string, string)

func SaveCert

func SaveCert(path, filename string, cert *certificate.Resource)

Types

type Account

type Account struct {
	Email        string
	Registration *registration.Resource
	// contains filtered or unexported fields
}

func (*Account) GetEmail

func (a *Account) GetEmail() string

GetEmail returns the email address for the account.

func (*Account) GetPrivateKey

func (a *Account) GetPrivateKey() crypto.PrivateKey

GetPrivateKey returns the private RSA account key.

func (*Account) GetRegistration

func (a *Account) GetRegistration() *registration.Resource

GetRegistration returns the server registration.

type AliConf

type AliConf struct {
	Domains       []string // The domain names for which you want to apply for a certificate
	AccessKey     string   // Aliyun account's AccessKey, if this is not empty, Secret is required.
	Secret        string
	RAMRole       string // Use Ramrole to control aliyun account
	SecurityToken string // Optional
	Path          string // The path to store cert file
	Timeout       int    // Maximum waiting time for certificate application, in minutes
}

type GodaddyConf

type GodaddyConf struct {
	Domains   []string // The domain names for which you want to apply for a certificate
	APIKey    string   // GoDaddy account's API Key
	APISecret string
	Path      string // The path to store cert file
	Timeout   int    // Maximum waiting time for certificate application, in minutes
}

Jump to

Keyboard shortcuts

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