| 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 20 matching lines...) Expand all Loading... |
| 31 #include "platform/utils.h" | 31 #include "platform/utils.h" |
| 32 | 32 |
| 33 #include "include/dart_api.h" | 33 #include "include/dart_api.h" |
| 34 | 34 |
| 35 | 35 |
| 36 namespace dart { | 36 namespace dart { |
| 37 namespace bin { | 37 namespace bin { |
| 38 | 38 |
| 39 bool SSLFilter::library_initialized_ = false; | 39 bool SSLFilter::library_initialized_ = false; |
| 40 // To protect library initialization. | 40 // To protect library initialization. |
| 41 dart::Mutex* SSLFilter::mutex_ = new dart::Mutex(); | 41 Mutex* SSLFilter::mutex_ = new Mutex(); |
| 42 // The password is needed when creating secure server sockets. It can | 42 // The password is needed when creating secure server sockets. It can |
| 43 // be null if only secure client sockets are used. | 43 // be null if only secure client sockets are used. |
| 44 const char* SSLFilter::password_ = NULL; | 44 const char* SSLFilter::password_ = NULL; |
| 45 | 45 |
| 46 static const int kSSLFilterNativeFieldIndex = 0; | 46 static const int kSSLFilterNativeFieldIndex = 0; |
| 47 | 47 |
| 48 | 48 |
| 49 /* Handle an error reported from the NSS library. */ | 49 /* Handle an error reported from the NSS library. */ |
| 50 static void ThrowPRException(const char* exception_type, | 50 static void ThrowPRException(const char* exception_type, |
| 51 const char* message, | 51 const char* message, |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 } | 957 } |
| 958 if (bytes_processed > 0) { | 958 if (bytes_processed > 0) { |
| 959 memio_PutWriteResult(secret, bytes_processed); | 959 memio_PutWriteResult(secret, bytes_processed); |
| 960 } | 960 } |
| 961 } | 961 } |
| 962 return bytes_processed; | 962 return bytes_processed; |
| 963 } | 963 } |
| 964 | 964 |
| 965 } // namespace bin | 965 } // namespace bin |
| 966 } // namespace dart | 966 } // namespace dart |
| OLD | NEW |