-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: refactor for supporting revoking on Windows.
- Loading branch information
1 parent
e825903
commit dc81a69
Showing
9 changed files
with
109 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
@Timeout(const Duration(seconds: 1800)) | ||
|
||
import 'package:basic_utils/basic_utils.dart'; | ||
import 'package:certaintls/windows_certificate_finder.dart'; | ||
import 'package:certaintls/windows_certificate_manager.dart'; | ||
import 'package:certaintls/x509certificate.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('X509CertificateData can be constructed from imcomplete data returned by CertUtil on Windows', () async { | ||
test( | ||
'X509CertificateData can be constructed from imcomplete data returned by CertUtil on Windows', | ||
() async { | ||
var subject = <String, String>{}; | ||
subject.putIfAbsent('2.5.4.3', () => 'A-Trust-Root-07'); | ||
subject.putIfAbsent('2.5.4.10', () => 'A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH'); | ||
subject.putIfAbsent( | ||
'2.5.4.10', | ||
() => | ||
'A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH'); | ||
subject.putIfAbsent('2.5.4.11', () => 'A-Trust-Root-07'); | ||
subject.putIfAbsent('2.5.4.6', () => 'AT'); | ||
X509CertificateData data = X509CertificateData( | ||
version: 3, | ||
sha256Thumbprint: '8AC552AD577E37AD2C6808D72AA331D6A96B4B3FEBFF34CE9BC0578E08055EC3', | ||
sha256Thumbprint: | ||
'8AC552AD577E37AD2C6808D72AA331D6A96B4B3FEBFF34CE9BC0578E08055EC3', | ||
subject: subject, | ||
); | ||
|
||
var finder = WindowsCertificateFinder(); | ||
var finder = WindowsCertificateManager(); | ||
var cert = X509Certificate(data: data); | ||
await finder.verify(cert); | ||
expect(cert.status, X509CertificateStatus.statusVerified); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters