You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dateKeys-dart/test/cms_test.dart

35 lines
1.2 KiB

// The differential of the CMS reader against the Go reference on the part
// of the cases that test/vectors/cms_vectors.g.dart holds: it reads no
// file, so it also runs compiled to JavaScript, where the BigInt of ECDSA
// and RSA, the integers of the lengths and the times of DER, and the
// microseconds of an accuracy must be exact too. The part is small: a
// signature of P-521 or RSA-4096 takes long compiled to JavaScript.
library;
import 'dart:convert';
import 'package:test/test.dart';
import 'cms_support.dart';
import 'vectors/cms_vectors.g.dart';
void main() {
Json parse(String text) => jsonDecode(text) as Json;
group('ECDSA', () => ecdsaTests(parse(cmsEcdsaJson)));
group('RSA', () => rsaTests(parse(cmsRsaJson)));
group('certificates', () => certTests(parse(cmsCertsJson)));
group(
'signatures',
() => signatureTests(parse(cmsSignaturesJson), const ['form']),
);
group(
'algorithms',
() =>
signatureTests(parse(cmsAlgorithmsJson), const ['algorithms', 'keys']),
);
group('tokens', () => tokenTests(parse(cmsTokensJson)));
group('mutations', () => mutationTests(parse(cmsMutationsJson)));
group('corpus', () => corpusTests(parse(cmsCorpusJson)));
}

Powered by TurnKey Linux.