Skip to content

Commit becd33d

Browse files
committed
fix: x5chain must be a CBOR byte string if a single certificate is specified
1 parent 471dd1f commit becd33d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mdoc/model/Document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export class Document {
216216
const protectedHeader: ProtectedHeaders = { alg: params.alg };
217217
const unprotectedHeader: UnprotectedHeaders = {
218218
kid: params.kid ?? issuerPrivateKeyJWK.kid,
219-
x5chain: issuerCertificateChain,
219+
x5chain: issuerCertificateChain.length === 1 ? issuerCertificateChain[0] : issuerCertificateChain,
220220
};
221221

222222
const issuerAuth = await IssuerAuth.sign(

0 commit comments

Comments
 (0)