Skip to content

Commit 90fead8

Browse files
use base64url encoding when reading TNAuthList from csr (#37)
Co-authored-by: Pawan Tripathi <[email protected]>
1 parent 67b558f commit 90fead8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

csr.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,11 @@ func createIdentifiersUsingCSR(csr *x509.CertificateRequest) ([]acme.Identifier,
290290
// Extract TNAuthList Identifier
291291
if ext.Id.Equal(oidExtensionTNAuthList) {
292292
ids = append(ids, acme.Identifier{
293-
Type: "TNAuthList",
294-
Value: base64.StdEncoding.EncodeToString(ext.Value),
293+
Type: "TNAuthList",
294+
// https://www.rfc-editor.org/rfc/rfc9448.html#section-3-2
295+
// The TNAuthlist value will be base64url encoded
296+
// with no padding characters.
297+
Value: base64.RawURLEncoding.EncodeToString(ext.Value),
295298
})
296299
}
297300
if ext.Id.Equal(oidExtensionSubjectAltName) {

0 commit comments

Comments
 (0)