Index: net/socket/nss_ssl_util.h |
diff --git a/net/socket/nss_ssl_util.h b/net/socket/nss_ssl_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a6676ddbbe009fd2b853012976da3f1db4db261b |
--- /dev/null |
+++ b/net/socket/nss_ssl_util.h |
@@ -0,0 +1,39 @@ |
+// 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. |
+ |
+#ifndef NET_SOCKET_NSS_SSL_UTIL_H_ |
+#define NEt_SOCKET_NSS_SSL_UTIL_H_ |
+ |
+#include <certt.h> |
+#include <keyt.h> |
+#include <nspr.h> |
+#include <nss.h> |
wtc
2010/12/17 18:08:04
I believe this file only needs to include <nspr.h>
Alpha Left Google
2010/12/17 20:31:12
Done.
|
+ |
+namespace net { |
+ |
+class BoundNetLog; |
+ |
+// Initalize NSS SSL library. |
+void EnsureNSSSSLInit(); |
+ |
+// Log a failed NSS funcion call. |
+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 NSS error code to network error code. |
+int MapNSSError(PRErrorCode err); |
+ |
+// Map handshake error to network error code. |
+int MapHandshakeError(PRErrorCode err); |
wtc
2010/12/17 18:08:04
Nit: since this function is in the top-level net n
Alpha Left Google
2010/12/17 20:09:57
Done.
|
+ |
+} // namespace net |
+ |
+#endif // NET_SOCKET_NSS_SSL_UTIL_H_ |