Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Unified Diff: tests/standalone/io/security_context_argument_test.dart

Issue 1687533002: Adds support for PKCS12 containers to SecurityContext (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/secure_socket_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/security_context_argument_test.dart
diff --git a/tests/standalone/io/security_context_argument_test.dart b/tests/standalone/io/security_context_argument_test.dart
index 60577b245751a89ed33953db6afaf957cdd86a22..391708a933c652ec72718e5eb262f868fa63bed4 100644
--- a/tests/standalone/io/security_context_argument_test.dart
+++ b/tests/standalone/io/security_context_argument_test.dart
@@ -34,6 +34,25 @@ void testUsePrivateKeyArguments() {
Expect.throws(() => c.usePrivateKeySync(
localFile('certificates/server_key.pem'), password: 3),
argumentOrTypeError);
+
+ // Malformed PEM certs.
+ Expect.throws(() => c.usePrivateKeySync(
+ localFile('certificates/client1_key_malformed.pem'),
+ password: "dartdart"),
+ tlsException);
+ Expect.throws(() => c.setTrustedCertificatesSync(
+ localFile('certificates/trusted_certs_malformed.pem')),
+ tlsException);
+ Expect.throws(() => c.useCertificateChainSync(
+ localFile('certificates/server_chain_malformed1.pem')),
+ tlsException);
+ Expect.throws(() => c.useCertificateChainSync(
+ localFile('certificates/server_chain_malformed2.pem')),
+ tlsException);
+ Expect.throws(() => c.setClientAuthoritiesSync(
+ localFile('certificates/client_authority_malformed.pem')),
+ argumentError);
+
c.usePrivateKeySync(
localFile('certificates/server_key.pem'), password: "dartdart");
}
« no previous file with comments | « tests/standalone/io/secure_socket_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698