Replies: 4 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.
-
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.
-
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.
-
Don't use it, use this: https://go-acme.github.io/lego/usage/library/index.html
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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