Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: net/socket/nss_ssl_util.h

Issue 494913002: Include better OpenSSL error information in NetLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: inline pod ctor Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/net.gypi ('k') | net/socket/nss_ssl_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is only included in ssl_client_socket_nss.cc and 5 // This file is only included in ssl_client_socket_nss.cc and
6 // ssl_server_socket_nss.cc to share common functions of NSS. 6 // ssl_server_socket_nss.cc to share common functions of NSS.
7 7
8 #ifndef NET_SOCKET_NSS_SSL_UTIL_H_ 8 #ifndef NET_SOCKET_NSS_SSL_UTIL_H_
9 #define NET_SOCKET_NSS_SSL_UTIL_H_ 9 #define NET_SOCKET_NSS_SSL_UTIL_H_
10 10
11 #include <prerror.h> 11 #include <prerror.h>
12 #include <prio.h> 12 #include <prio.h>
13 13
14 #include "net/base/net_export.h" 14 #include "net/base/net_export.h"
15 #include "net/base/net_log.h"
15 16
16 namespace net { 17 namespace net {
17 18
18 class BoundNetLog; 19 class BoundNetLog;
19 20
20 // Initalize NSS SSL library. 21 // Initalize NSS SSL library.
21 NET_EXPORT void EnsureNSSSSLInit(); 22 NET_EXPORT void EnsureNSSSSLInit();
22 23
23 // Log a failed NSS funcion call. 24 // Log a failed NSS funcion call.
24 void LogFailedNSSFunction(const BoundNetLog& net_log, 25 void LogFailedNSSFunction(const BoundNetLog& net_log,
25 const char* function, 26 const char* function,
26 const char* param); 27 const char* param);
27 28
28 // Map network error code to NSS error code. 29 // Map network error code to NSS error code.
29 PRErrorCode MapErrorToNSS(int result); 30 PRErrorCode MapErrorToNSS(int result);
30 31
31 // GetNSSModelSocket returns either NULL, or an NSS socket that can be passed 32 // GetNSSModelSocket returns either NULL, or an NSS socket that can be passed
32 // to |SSL_ImportFD| in order to inherit some default options. 33 // to |SSL_ImportFD| in order to inherit some default options.
33 PRFileDesc* GetNSSModelSocket(); 34 PRFileDesc* GetNSSModelSocket();
34 35
35 // Map NSS error code to network error code. 36 // Map NSS error code to network error code.
36 int MapNSSError(PRErrorCode err); 37 int MapNSSError(PRErrorCode err);
37 38
39 // Creates a NetLog callback for an SSL error.
40 NetLog::ParametersCallback CreateNetLogSSLErrorCallback(int net_error,
41 int ssl_lib_error);
42
43
38 } // namespace net 44 } // namespace net
39 45
40 #endif // NET_SOCKET_NSS_SSL_UTIL_H_ 46 #endif // NET_SOCKET_NSS_SSL_UTIL_H_
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/socket/nss_ssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698