Replies: 3 comments 1 reply
-
Hello, you should add: conf.Certificate = lego.CertificateConfig{
KeyType: certcrypto.EC256,
Timeout: time.Duration(30 * time.Second),
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @ldez Thank you for the suggestion, unfortunately I have just tried it and I get the same error message. My func NewClient(p LegoClientConfig) (*LegoClient, error) {
user := LegoUser{
Email: p.Email,
key: p.PrivateKey,
}
conf := lego.NewConfig(&user)
if p.CustomDir != "" {
conf.CADirURL = p.CustomDir
}
conf.Certificate = lego.CertificateConfig{
KeyType: certcrypto.EC256,
Timeout: time.Duration(30 * time.Second),
}
client, err := lego.NewClient(conf)
if err != nil {
return nil, err
}
if p.PDNSApi != "" && p.PDNSUrl != "" {
cli := &LegoClient{Client: client, LegoUser: &user}
err = cli.EnablePDNSResolver(p.PDNSApi, p.PDNSUrl)
if err != nil {
return nil, err
}
return cli, nil
}
return &LegoClient{Client: client, LegoUser: &user}, nil
} |
Beta Was this translation helpful? Give feedback.
1 reply
-
I thought maybe, but then with Go its hard to go wrong with key generation ? It was generated with key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) That's right, no ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the lego go library as part of a Go program I an writing
However I am seeing the following in my logs:
Could somebody point me in the right direction as to what I have forgotten to set which means lego is not sending a key ID ? Clearly I am not initialising the lego client correctly, but the docs are not clear.
My program stores a copy of the ACME registration data in a database, which I then feed back in when creating a new client:
NewClient()
returns a struct:Beta Was this translation helpful? Give feedback.
All reactions