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

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

Issue 1689873003: Fix PEM error checking (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unused field from SSLFilter 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 | « runtime/bin/secure_socket.cc ('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 391708a933c652ec72718e5eb262f868fa63bed4..91de8dceea933d179b5cb6c82a8bf43419bdeb96 100644
--- a/tests/standalone/io/security_context_argument_test.dart
+++ b/tests/standalone/io/security_context_argument_test.dart
@@ -35,6 +35,13 @@ void testUsePrivateKeyArguments() {
localFile('certificates/server_key.pem'), password: 3),
argumentOrTypeError);
+ // Empty data.
+ Expect.throws(() => c.usePrivateKeyBytes([], password: 'dartdart'),
+ tlsException);
+ Expect.throws(() => c.setTrustedCertificatesBytes([]), tlsException);
+ Expect.throws(() => c.useCertificateChainBytes([]), tlsException);
+ Expect.throws(() => c.setClientAuthoritiesBytes([]), argumentError);
+
// Malformed PEM certs.
Expect.throws(() => c.usePrivateKeySync(
localFile('certificates/client1_key_malformed.pem'),
« no previous file with comments | « runtime/bin/secure_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698