@@ -20,6 +20,7 @@ import (
20
20
"crypto/rand"
21
21
"crypto/x509"
22
22
"encoding/asn1"
23
+ "encoding/base64"
23
24
"errors"
24
25
"fmt"
25
26
"net"
@@ -196,6 +197,7 @@ var (
196
197
oidExtensionSubjectAltName = []int {2 , 5 , 29 , 17 }
197
198
oidPermanentIdentifier = []int {1 , 3 , 6 , 1 , 5 , 5 , 7 , 8 , 3 }
198
199
oidHardwareModuleName = []int {1 , 3 , 6 , 1 , 5 , 5 , 7 , 8 , 4 }
200
+ oidExtensionTNAuthList = []int {1 , 3 , 6 , 1 , 5 , 5 , 7 , 1 , 26 } // TNAuthListIdentifier is defined in RFC9448
199
201
)
200
202
201
203
// RFC 5280 - https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.6
@@ -282,9 +284,16 @@ func createIdentifiersUsingCSR(csr *x509.CertificateRequest) ([]acme.Identifier,
282
284
})
283
285
}
284
286
285
- // Extract permanent identifiers and hardware module values.
287
+ // Extract TNAuthList, permanent identifiers and hardware module values.
286
288
// This block will ignore errors.
287
289
for _ , ext := range csr .Extensions {
290
+ // Extract TNAuthList Identifier
291
+ if ext .Id .Equal (oidExtensionTNAuthList ) {
292
+ ids = append (ids , acme.Identifier {
293
+ Type : "TNAuthList" ,
294
+ Value : base64 .StdEncoding .EncodeToString (ext .Value ),
295
+ })
296
+ }
288
297
if ext .Id .Equal (oidExtensionSubjectAltName ) {
289
298
err := forEachSAN (ext .Value , func (tag int , data []byte ) error {
290
299
var on otherName
0 commit comments