| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 void destroy(); | 674 void destroy(); |
| 675 void handshake(); | 675 void handshake(); |
| 676 void init(); | 676 void init(); |
| 677 X509Certificate get peerCertificate; | 677 X509Certificate get peerCertificate; |
| 678 int processBuffer(int bufferIndex); | 678 int processBuffer(int bufferIndex); |
| 679 void registerBadCertificateCallback(Function callback); | 679 void registerBadCertificateCallback(Function callback); |
| 680 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler); | 680 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler); |
| 681 | 681 |
| 682 List<_ExternalBuffer> get buffers; | 682 List<_ExternalBuffer> get buffers; |
| 683 } | 683 } |
| OLD | NEW |