add support for ACME compliant certificate authorities

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-05-27 07:39:55 +02:00
parent 302f83c7a4
commit 7c724e18fe
23 changed files with 1401 additions and 234 deletions

32
acme/account.go Normal file
View File

@@ -0,0 +1,32 @@
package acme
import (
"crypto"
"github.com/go-acme/lego/v4/registration"
)
type account struct {
Email string `json:"email"`
Registration *registration.Resource `json:"registration"`
key crypto.PrivateKey
}
/** Implementation of the registration.User interface **/
// GetEmail returns the email address for the account.
func (a *account) GetEmail() string {
return a.Email
}
// GetRegistration returns the server registration.
func (a *account) GetRegistration() *registration.Resource {
return a.Registration
}
// GetPrivateKey returns the private account key.
func (a *account) GetPrivateKey() crypto.PrivateKey {
return a.key
}
/** End **/