@@ -91,6 +91,7 @@ impl<'a, 'b> ParsedJWE<'a, 'b> {
91
91
#[ cfg( test) ]
92
92
mod tests {
93
93
use serde_json:: json;
94
+ use std:: borrow:: Cow ;
94
95
95
96
use crate :: {
96
97
error:: ErrorKind ,
@@ -158,7 +159,7 @@ mod tests {
158
159
tag : "6ylC_iAs4JvDQzXeY6MuYQ" ,
159
160
} ,
160
161
protected : ProtectedHeader {
161
- typ : Some ( "application/didcomm-encrypted+json" ) ,
162
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
162
163
alg : jwe:: envelope:: Algorithm :: EcdhEsA256kw ,
163
164
enc : EncAlgorithm :: Xc20P ,
164
165
skid : None ,
@@ -235,7 +236,7 @@ mod tests {
235
236
tag : "6ylC_iAs4JvDQzXeY6MuYQ" ,
236
237
} ,
237
238
protected : ProtectedHeader {
238
- typ : Some ( "application/didcomm-encrypted+json" ) ,
239
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
239
240
alg : jwe:: envelope:: Algorithm :: EcdhEsA256kw ,
240
241
enc : EncAlgorithm :: Xc20P ,
241
242
skid : None ,
@@ -311,7 +312,7 @@ mod tests {
311
312
tag : "6ylC_iAs4JvDQzXeY6MuYQ" ,
312
313
} ,
313
314
protected : ProtectedHeader {
314
- typ : Some ( "application/didcomm-encrypted+json" ) ,
315
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
315
316
alg : jwe:: envelope:: Algorithm :: EcdhEsA256kw ,
316
317
enc : EncAlgorithm :: Xc20P ,
317
318
skid : None ,
@@ -387,7 +388,7 @@ mod tests {
387
388
tag : "uYeo7IsZjN7AnvBjUZE5lNryNENbf6_zew_VC-d4b3U" ,
388
389
} ,
389
390
protected : ProtectedHeader {
390
- typ : Some ( "application/didcomm-encrypted+json" ) ,
391
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
391
392
alg : jwe:: envelope:: Algorithm :: Ecdh1puA256kw ,
392
393
enc : EncAlgorithm :: A256cbcHs512 ,
393
394
skid : Some ( "did:example:alice#key-x25519-1" ) ,
@@ -464,7 +465,7 @@ mod tests {
464
465
tag : "uYeo7IsZjN7AnvBjUZE5lNryNENbf6_zew_VC-d4b3U" ,
465
466
} ,
466
467
protected : ProtectedHeader {
467
- typ : Some ( "application/didcomm-encrypted+json" ) ,
468
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
468
469
alg : jwe:: envelope:: Algorithm :: Ecdh1puA256kw ,
469
470
enc : EncAlgorithm :: A256cbcHs512 ,
470
471
skid : Some ( "did:example:alice#key-x25519-1" ) ,
@@ -540,7 +541,7 @@ mod tests {
540
541
tag : "uYeo7IsZjN7AnvBjUZE5lNryNENbf6_zew_VC-d4b3U" ,
541
542
} ,
542
543
protected : ProtectedHeader {
543
- typ : Some ( "application/didcomm-encrypted+json" ) ,
544
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
544
545
alg : jwe:: envelope:: Algorithm :: Ecdh1puA256kw ,
545
546
enc : EncAlgorithm :: A256cbcHs512 ,
546
547
skid : Some ( "did:example:alice#key-x25519-1" ) ,
@@ -965,7 +966,7 @@ mod tests {
965
966
tag : "6ylC_iAs4JvDQzXeY6MuYQ" ,
966
967
} ,
967
968
protected : ProtectedHeader {
968
- typ : Some ( "application/didcomm-encrypted+json" ) ,
969
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
969
970
alg : jwe:: envelope:: Algorithm :: EcdhEsA256kw ,
970
971
enc : EncAlgorithm :: Xc20P ,
971
972
skid : None ,
@@ -1044,7 +1045,7 @@ mod tests {
1044
1045
tag : "uYeo7IsZjN7AnvBjUZE5lNryNENbf6_zew_VC-d4b3U" ,
1045
1046
} ,
1046
1047
protected : ProtectedHeader {
1047
- typ : Some ( "application/didcomm-encrypted+json" ) ,
1048
+ typ : Some ( Cow :: Borrowed ( "application/didcomm-encrypted+json" ) ) ,
1048
1049
alg : jwe:: envelope:: Algorithm :: Ecdh1puA256kw ,
1049
1050
enc : EncAlgorithm :: A256cbcHs512 ,
1050
1051
skid : Some ( "did:example:alice#key-x25519-1" ) ,
0 commit comments