OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 /** | 7 /** |
8 * SecureSocket provides a secure (SSL or TLS) client connection to a server. | 8 * SecureSocket provides a secure (SSL or TLS) client connection to a server. |
9 * The certificate provided by the server is checked | 9 * The certificate provided by the server is checked |
10 * using the certificate database (optionally) provided in initialize(). | 10 * using the certificate database (optionally) provided in initialize(). |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 * X509Certificate represents an SSL certificate, with accessors to | 91 * X509Certificate represents an SSL certificate, with accessors to |
92 * get the fields of the certificate. | 92 * get the fields of the certificate. |
93 */ | 93 */ |
94 class X509Certificate { | 94 class X509Certificate { |
95 X509Certificate(this.subject, | 95 X509Certificate(this.subject, |
96 this.issuer, | 96 this.issuer, |
97 this.startValidity, | 97 this.startValidity, |
98 this.endValidity); | 98 this.endValidity); |
99 final String subject; | 99 final String subject; |
100 final String issuer; | 100 final String issuer; |
101 final Date startValidity; | 101 final DateTime startValidity; |
102 final Date endValidity; | 102 final DateTime endValidity; |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 class _SecureSocket implements SecureSocket { | 106 class _SecureSocket implements SecureSocket { |
107 // Status states | 107 // Status states |
108 static final int NOT_CONNECTED = 200; | 108 static final int NOT_CONNECTED = 200; |
109 static final int HANDSHAKE = 201; | 109 static final int HANDSHAKE = 201; |
110 static final int CONNECTED = 202; | 110 static final int CONNECTED = 202; |
111 static final int CLOSED = 203; | 111 static final int CLOSED = 203; |
112 | 112 |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 void destroy(); | 677 void destroy(); |
678 void handshake(); | 678 void handshake(); |
679 void init(); | 679 void init(); |
680 X509Certificate get peerCertificate; | 680 X509Certificate get peerCertificate; |
681 int processBuffer(int bufferIndex); | 681 int processBuffer(int bufferIndex); |
682 void registerBadCertificateCallback(Function callback); | 682 void registerBadCertificateCallback(Function callback); |
683 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler); | 683 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler); |
684 | 684 |
685 List<_ExternalBuffer> get buffers; | 685 List<_ExternalBuffer> get buffers; |
686 } | 686 } |
OLD | NEW |