15
15
import 'package:webcrypto/webcrypto.dart' ;
16
16
import '../utils/utils.dart' ;
17
17
import '../utils/testrunner.dart' ;
18
- import '../utils/detected_runtime.dart' ;
19
18
20
19
final runner = TestRunner .asymmetric <EcdsaPrivateKey , EcdsaPublicKey >(
21
20
algorithm: 'ECDSA' ,
22
21
importPrivateRawKey: null , // not supported
23
22
exportPrivateRawKey: null ,
24
- // HACK: PKCS8 is not support for ECDH / ECDSA on firefox:
25
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1133698
26
- //
27
- // So filter away PKCS8 test data and functions when running on gecko.
28
- importPrivatePkcs8Key: nullOnFirefox ((keyData, keyImportParams) =>
29
- EcdsaPrivateKey .importPkcs8Key (keyData, curveFromJson (keyImportParams))),
30
- exportPrivatePkcs8Key: nullOnFirefox ((key) => key.exportPkcs8Key ()),
23
+ importPrivatePkcs8Key: (keyData, keyImportParams) =>
24
+ EcdsaPrivateKey .importPkcs8Key (keyData, curveFromJson (keyImportParams)),
25
+ exportPrivatePkcs8Key: (key) => key.exportPkcs8Key (),
31
26
importPrivateJsonWebKey: (jsonWebKeyData, keyImportParams) =>
32
27
EcdsaPrivateKey .importJsonWebKey (
33
28
jsonWebKeyData, curveFromJson (keyImportParams)),
@@ -53,10 +48,7 @@ final runner = TestRunner.asymmetric<EcdsaPrivateKey, EcdsaPublicKey>(
53
48
key.verifyBytes (signature, data, hashFromJson (verifyParams)),
54
49
verifyStream: (key, signature, data, verifyParams) =>
55
50
key.verifyStream (signature, data, hashFromJson (verifyParams)),
56
- testData: _testData.map ((c) => {
57
- ...c,
58
- 'privatePkcs8KeyData' : nullOnFirefox (c['privatePkcs8KeyData' ]),
59
- }),
51
+ testData: _testData,
60
52
);
61
53
62
54
void main () async {
0 commit comments