lecertcore

package module
v0.0.0-...-1343f50 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 16 Imported by: 0

README

le-cert-core

Go

le-cert-core is a simple ACME (Let's Encrypt) client library written in pure Go.

This project began as a personal journey to deeply understand the ACME protocol, as defined in RFC 8555. I had previously developed an ACME client using the official golang.org/x/crypto/acme package, but wanted to explore the protocol at a lower level. To achieve that, I built this implementation completely from scratch — including custom JWS (JSON Web Signature) handling — without relying on any third-party libraries or existing ACME implementations.

You can find a sample client in the example/ folder — the main.go file demonstrates how to use this library to register an account, complete a challenge, and request a certificate.

License

This project is open source and available under the MIT License.

Documentation

Index

Constants

View Source
const Prod string = "https://acme-v02.api.letsencrypt.org/directory"
View Source
const Stag string = "https://acme-staging-v02.api.letsencrypt.org/directory"

Variables

This section is empty.

Functions

func CreateCsr

func CreateCsr(name string, dom []string) (*csrDer, error)

func CreateKeys

func CreateKeys() keys

Creates Private and Public keys

func GetDir

func GetDir(url string) (*directory, error)

makes gets requests to the acme server use "Stag" for staging url and "Prod" for production url).

func GetOrderResp

func GetOrderResp() *orderResp

func JwsPayload

func JwsPayload(pload any, pbkey ecdsa.PrivateKey, nonce string, url string, kid string) ([]byte, error)

func Loadkeys

func Loadkeys(filename string) (keys, error)

Loads keys from pem files

func NewAccount

func NewAccount(mailaddr string, tos bool) *account

creates a new account

func NewOrder

func NewOrder(domains []string) order

func ThumbPrint

func ThumbPrint(pbkey ecdsa.PublicKey) string

Generates Thumbprint of Jwk

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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