Skip to content

Commit 3d27c5c

Browse files
committed
Add experimental method to get account thumbprint
1 parent 56e23df commit 3d27c5c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

acme/account.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ func (a *Account) SetExternalAccountBinding(ctx context.Context, client *Client,
115115
return nil
116116
}
117117

118+
// Thumbprint returns the ACME account's thumbprint. The PrivateKey field
119+
// must be set so the public key can be derived for the thumbprint, or this
120+
// will panic.
121+
//
122+
// EXPERIMENTAL: Subject to change/removal.
123+
func (a *Account) Thumbprint() (string, error) {
124+
return jwkThumbprint(a.PrivateKey.Public())
125+
}
126+
118127
// NewAccount creates a new account on the ACME server.
119128
//
120129
// "A client creates a new account with the server by sending a POST

0 commit comments

Comments
 (0)