File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,6 +128,32 @@ describe('http API', () => {
128128 result . should . include . keys ( [ 'presentation' , 'verified' ] ) ;
129129 result . verified . should . equal ( true ) ;
130130 } ) ;
131+
132+ it ( 'fails to verify a VCB barcode containing an enveloped VP' +
133+ 'with a VC with a bad signature' , async ( ) => {
134+ let err ;
135+ let result ;
136+ try {
137+ const response = await httpClient . post ( url , {
138+ agent : httpsAgent ,
139+ json : {
140+ barcode : {
141+ data : mockData . badSignatureVcbPresentationText ,
142+ format : 'qr_code'
143+ }
144+ }
145+ } ) ;
146+ result = response . data ;
147+ } catch ( e ) {
148+ err = e ;
149+ }
150+ assertNoError ( err ) ;
151+ should . exist ( result ) ;
152+ result . should . include . keys ( [ 'presentation' , 'verified' , 'error' ] ) ;
153+ result . verified . should . equal ( false ) ;
154+ result . presentation . should . be . an ( 'object' ) ;
155+ result . error . should . be . an ( 'object' ) ;
156+ } ) ;
131157 } ) ;
132158
133159 describe ( '(legacy) verify a VCB' , ( ) => {
You can’t perform that action at this time.
0 commit comments