Skip to content

Commit

Permalink
Merge pull request #59 from akakou/hotfix/email-miss
Browse files Browse the repository at this point in the history
fix: bug email cannot readed
  • Loading branch information
akakou authored May 6, 2024
2 parents a8228cb + dff0e53 commit 7d28120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions ta/acme.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ func (u *MyUser) GetPrivateKey() crypto.PrivateKey {
return u.key
}

var email = "[email protected]"

func IssueCertificate(key crypto.PrivateKey, domain string) *certificate.Resource {
func IssueCertificate(key crypto.PrivateKey, domain, email string) *certificate.Resource {
// Create a user. New accounts need an email and private key to start.
privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion ta/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
const CERT_DIER_CACHE = "./tmp/ra-webs.cache"

func (ap *TA) TLSConfig() (*tls.Config, error) {
cert := IssueCertificate(ap.privateKey, ap.config.Domain)
cert := IssueCertificate(ap.privateKey, ap.config.Domain, ap.config.Email)

return &tls.Config{
GetCertificate: func(hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
Expand Down

0 comments on commit 7d28120

Please sign in to comment.