@@ -92,6 +92,7 @@ export interface SignedDataVerifyErrorParams {
9292 signatureVerified ?: boolean | null ;
9393 signerCertificate ?: Certificate | null ;
9494 signerCertificateVerified ?: boolean | null ;
95+ certificatePath ?: Certificate [ ] ;
9596}
9697
9798export interface SignedDataVerifyResult {
@@ -105,14 +106,15 @@ export interface SignedDataVerifyResult {
105106 certificatePath : Certificate [ ] ;
106107}
107108
108- export class SignedDataVerifyError extends Error {
109+ export class SignedDataVerifyError extends Error implements SignedDataVerifyResult {
109110
110111 public date : Date ;
111112 public code : number ;
112113 public signatureVerified : boolean | null ;
113114 public signerCertificate : Certificate | null ;
114115 public signerCertificateVerified : boolean | null ;
115116 public timestampSerial : ArrayBuffer | null ;
117+ public certificatePath : Certificate [ ] ;
116118
117119 constructor ( {
118120 message,
@@ -122,6 +124,7 @@ export class SignedDataVerifyError extends Error {
122124 signerCertificate = null ,
123125 signerCertificateVerified = null ,
124126 timestampSerial = null ,
127+ certificatePath = [ ] ,
125128 } : SignedDataVerifyErrorParams ) {
126129 super ( message ) ;
127130 this . name = "SignedDataVerifyError" ;
@@ -132,6 +135,7 @@ export class SignedDataVerifyError extends Error {
132135 this . signatureVerified = signatureVerified ;
133136 this . signerCertificate = signerCertificate ;
134137 this . signerCertificateVerified = signerCertificateVerified ;
138+ this . certificatePath = certificatePath ;
135139
136140 }
137141}
@@ -666,7 +670,7 @@ export class SignedData extends PkiObject implements ISignedData {
666670 date : checkDate ,
667671 code : 15 ,
668672 message : "Error during verification: TSTInfo verification is failed" ,
669- signatureVerified : null ,
673+ signatureVerified : false ,
670674 signerCertificate : signerCert ,
671675 timestampSerial,
672676 signerCertificateVerified : true
0 commit comments