Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dkumor/acmewrapper
/ functions
Functions
40 in github.com/dkumor/acmewrapper
⨍
Functions
40
◇
Types & classes
5
↓ 16 callers
Function
New
New generates an AcmeWrapper given a configuration
acmewrapper.go:155
↓ 14 callers
Method
Printf
(format string, v ...interface{})
acmewrapper.go:15
↓ 6 callers
Method
CertNeedsUpdate
CertNeedsUpdate returns whether the current certificate either does not exist, or is <X days from expiration, where X is set up in config, or does not
cert.go:74
↓ 6 callers
Method
GetCertificate
GetCertificate returns the current TLS certificate
acmewrapper.go:71
↓ 6 callers
Function
logf
(s string, v ...interface{})
acmewrapper.go:21
↓ 4 callers
Method
loadFile
(path string)
rw.go:12
↓ 4 callers
Method
saveFile
(path string, contents []byte)
rw.go:29
↓ 3 callers
Method
Renew
Renew generates a new certificate
renew.go:53
↓ 2 callers
Method
GetEmail
GetEmail returns the user email (if any) NOTE: NOT threadsafe
acmewrapper.go:54
↓ 2 callers
Method
GetPrivateKey
GetPrivateKey returns the private key for the given user. NOTE: NOT threadsafe
acmewrapper.go:66
↓ 2 callers
Method
GetRegistration
GetRegistration returns the registration currently being used NOTE: NOT threadsafe
acmewrapper.go:60
↓ 2 callers
Method
TLSConfig
TLSConfig returns a TLS configuration that will automatically work with the golang ssl listener. This sets it up so that the server automatically uses
acmewrapper.go:114
↓ 2 callers
Function
getCertError
(errmap map[string]error)
renew.go:34
↓ 2 callers
Method
initACME
initACME initailizes the acme client - it does everything from reading/writing the user private key and registration files, to ensuring that the user
acme.go:47
↓ 2 callers
Function
stringInSlice
http://stackoverflow.com/questions/15323767/does-golang-have-if-x-in-construct-similar-to-python
renew.go:12
↓ 1 callers
Method
AcmeDisabled
AcmeDisabled allows to enable/disable acme-based certificate. Note that it is assumed that this function is only called during server runtime (ie, you
acmewrapper.go:130
↓ 1 callers
Method
AddSNI
AddSNI adds a domain name and certificate pair to the AcmeWrapper. Whenever a request is for the passed domain, its associated certifcate is returned.
acmewrapper.go:79
↓ 1 callers
Method
RemSNI
RemSNI removes a domain name and certificate pair from the AcmeWrapper. It is assumed that they were added using AddSNI.
acmewrapper.go:88
↓ 1 callers
Method
SetNewCert
SetNewCert loads a new TLS key/cert from the given files. Running it with the same filenames as existing cert will reload them
acmewrapper.go:142
↓ 1 callers
Function
arraySubset
checks if a is a subset of b
cert.go:59
↓ 1 callers
Function
backgroundExpirationChecker
backgroundExpirationChecker is exactly that - it runs in the background and ensures that messages regarding certificate expiration as well as any rene
renew.go:115
↓ 1 callers
Function
generateKey
generateKey generates a key to use for registration in acme
acme.go:17
↓ 1 callers
Method
loadPrivateKey
loadPrivateKey reads a key from file This code copied from caddy: https://github.com/mholt/caddy/blob/master/caddy/https/crypto.go
rwkey.go:43
↓ 1 callers
Method
loadX509KeyPair
AcmeWrapper version of LoadX509KeyPair reads and parses a public/private key pair from a pair of files. The files must contain PEM encoded data. Pulle
rwkey.go:60
↓ 1 callers
Method
savePrivateKey
savePrivateKey is used to write the given key to file This code copied from caddy: https://github.com/mholt/caddy/blob/master/caddy/https/crypto.go
rwkey.go:17
↓ 1 callers
Function
tlsCert
(crt acme.CertificateResource)
cert.go:53
↓ 1 callers
Method
writeCert
writeCert takes an acme CertificateResource (as returned from the acme.RenewCertificate and the acme.ObtainCertificate functions), and writes the cert
cert.go:17
Method
CleanUp
CleanUp removes the challenge domain from SNI. Part of acme.ChallengeProvider interface
challengeprovider.go:33
Method
Present
Present sets up the challenge domain thru SNI. Part of acme.ChallengeProvider interface
challengeprovider.go:13
Method
TLSConfigGetCertificate
TLSConfigGetCertificate is the main function used in the ACME wrapper. This is set in tls.Config to the GetCertificate property. Note that Certificate
acmewrapper.go:98
Function
TOSAgree
TOSAgree always agrees to the terms of service. This should only be really used if you realize that you could be selling your soul without being notif
configuration.go:29
Function
TOSDecline
TOSDecline always declines to the terms of service. This can be usd for testing, when you want to make sure that ACME is really off, or that the user
configuration.go:35
Function
TestCert
(t *testing.T)
cert_test.go:15
Function
TestDomainChange
We now test to make sure that if the domain is changed, the cert is changed
cert_test.go:135
Function
TestMain
(m *testing.M)
setup_test.go:14
Function
TestSaveLoadCallback
(t *testing.T)
rw_callback_test.go:10
Function
TestUser
(t *testing.T)
acme_test.go:56
Function
TestUserErrors
(t *testing.T)
acme_test.go:11
Function
arraysMatch
checks if the two arrays of strings contain the same elements
renew.go:22
Function
main
()
example/example.go:31