| 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 #include "bin/secure_socket.h" | 5 #include "bin/secure_socket.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 int64_t start_epoch_ms = start_validity / PR_USEC_PER_MSEC; | 237 int64_t start_epoch_ms = start_validity / PR_USEC_PER_MSEC; |
| 238 int64_t end_epoch_ms = end_validity / PR_USEC_PER_MSEC; | 238 int64_t end_epoch_ms = end_validity / PR_USEC_PER_MSEC; |
| 239 Dart_Handle subject_name_object = | 239 Dart_Handle subject_name_object = |
| 240 DartUtils::NewString(certificate->subjectName); | 240 DartUtils::NewString(certificate->subjectName); |
| 241 Dart_Handle issuer_name_object = | 241 Dart_Handle issuer_name_object = |
| 242 DartUtils::NewString(certificate->issuerName); | 242 DartUtils::NewString(certificate->issuerName); |
| 243 Dart_Handle start_epoch_ms_int = Dart_NewInteger(start_epoch_ms); | 243 Dart_Handle start_epoch_ms_int = Dart_NewInteger(start_epoch_ms); |
| 244 Dart_Handle end_epoch_ms_int = Dart_NewInteger(end_epoch_ms); | 244 Dart_Handle end_epoch_ms_int = Dart_NewInteger(end_epoch_ms); |
| 245 | 245 |
| 246 Dart_Handle date_class = | 246 Dart_Handle date_class = |
| 247 DartUtils::GetDartClass(DartUtils::kCoreLibURL, "Date"); | 247 DartUtils::GetDartClass(DartUtils::kCoreLibURL, "DateTime"); |
| 248 Dart_Handle from_milliseconds = | 248 Dart_Handle from_milliseconds = |
| 249 DartUtils::NewString("fromMillisecondsSinceEpoch"); | 249 DartUtils::NewString("fromMillisecondsSinceEpoch"); |
| 250 | 250 |
| 251 Dart_Handle start_validity_date = | 251 Dart_Handle start_validity_date = |
| 252 Dart_New(date_class, from_milliseconds, 1, &start_epoch_ms_int); | 252 Dart_New(date_class, from_milliseconds, 1, &start_epoch_ms_int); |
| 253 Dart_Handle end_validity_date = | 253 Dart_Handle end_validity_date = |
| 254 Dart_New(date_class, from_milliseconds, 1, &end_epoch_ms_int); | 254 Dart_New(date_class, from_milliseconds, 1, &end_epoch_ms_int); |
| 255 | 255 |
| 256 Dart_Handle x509_class = | 256 Dart_Handle x509_class = |
| 257 DartUtils::GetDartClass(DartUtils::kIOLibURL, "X509Certificate"); | 257 DartUtils::GetDartClass(DartUtils::kIOLibURL, "X509Certificate"); |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 if (PR_WOULD_BLOCK_ERROR != pr_error) { | 658 if (PR_WOULD_BLOCK_ERROR != pr_error) { |
| 659 ThrowPRException("Error reading plaintext from SSLFilter"); | 659 ThrowPRException("Error reading plaintext from SSLFilter"); |
| 660 } | 660 } |
| 661 bytes_processed = 0; | 661 bytes_processed = 0; |
| 662 } | 662 } |
| 663 break; | 663 break; |
| 664 } | 664 } |
| 665 } | 665 } |
| 666 return bytes_processed; | 666 return bytes_processed; |
| 667 } | 667 } |
| OLD | NEW |