Index: net/socket/nss_common.h |
diff --git a/net/socket/nss_common.h b/net/socket/nss_common.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5ba97cf7e058380e2489de8fd459080c05bbb6c1 |
--- /dev/null |
+++ b/net/socket/nss_common.h |
@@ -0,0 +1,34 @@ |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// This file is only inclued in ssl_client_socket_nss.cc and |
+// ssl_server_socket_nss.cc to share common functions of NSS. |
wtc
2010/12/17 00:16:26
Nit: extra space at beginning of comment line.
Pl
Alpha Left Google
2010/12/17 08:30:43
Done.
|
+ |
+#include <certt.h> |
+#include <keyt.h> |
+#include <nspr.h> |
+#include <nss.h> |
+ |
+namespace net { |
+ |
+class BoundNetLog; |
+ |
+// Initalize NSS library. |
wtc
2010/12/17 00:16:26
NSS library => the NSS SSL library
Alpha Left Google
2010/12/17 08:30:43
Done.
|
+void EnsureNSSSSLInit(); |
+ |
+// Log a failing NSS funcion call. |
wtc
2010/12/17 00:16:26
Nit: failing => failed
Alpha Left Google
2010/12/17 08:30:43
Done.
|
+void LogFailedNSSFunction(const BoundNetLog& net_log, |
+ const char* function, |
+ const char* param); |
+ |
+// Map network error code to NSS error code. |
+PRErrorCode MapErrorToNSS(int result); |
+ |
+// Map NSPR error to network error code. |
+int MapNSPRError(PRErrorCode err); |
wtc
2010/12/17 00:16:26
It looks nicer to name this function MapNSSError,
Alpha Left Google
2010/12/17 08:30:43
Done.
|
+ |
+// Map handshake error to network error code. |
+int MapHandshakeError(PRErrorCode err); |
+ |
+} // namespace net |