Skip to content
This repository was archived by the owner on Feb 9, 2024. It is now read-only.

Commit 77f91b9

Browse files
committed
Don't encode EAB HMAC
Most providers already encode it
1 parent 5b5ac32 commit 77f91b9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

acmeclient.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package certmagic
1717
import (
1818
"context"
1919
"crypto/tls"
20-
"encoding/base64"
2120
"fmt"
2221
"log"
2322
weakrand "math/rand"
@@ -168,7 +167,7 @@ func (am *ACMEManager) newACMEClient(useTestCA, interactive bool) (*acmeClient,
168167
reg, err = client.Registration.RegisterWithExternalAccountBinding(registration.RegisterEABOptions{
169168
TermsOfServiceAgreed: am.Agreed,
170169
Kid: am.ExternalAccount.KeyID,
171-
HmacEncoded: base64.StdEncoding.EncodeToString(am.ExternalAccount.HMAC),
170+
HmacEncoded: am.ExternalAccount.HMAC,
172171
})
173172
} else {
174173
reg, err = client.Registration.Register(registration.RegisterOptions{

acmemanager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ func (am *ACMEManager) Revoke(ctx context.Context, cert CertificateResource) err
336336
// binding an external account to an ACME account.
337337
type ExternalAccountBinding struct {
338338
KeyID string
339-
HMAC []byte
339+
HMAC string
340340
}
341341

342342
// DefaultACME specifies the default settings

0 commit comments

Comments
 (0)