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

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

Issue 396803002: Implement TLS client auth in the OS X OpenSSL port. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DISALLOW_COPY_AND_ASSIGN Created 6 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_SOCKET_OPENSSL_SSL_UTIL_H_
6 #define NET_SOCKET_OPENSSL_SSL_UTIL_H_
7
8 namespace crypto {
9 class OpenSSLErrStackTracer;
10 }
11
12 namespace tracked_objects {
13 class Location;
14 }
15
16 namespace net {
17
18 // Puts a net error, |err|, on the error stack in OpenSSL. The file and line are
19 // extracted from |posted_from|. The function code of the error is left as 0.
20 void OpenSSLPutNetError(const tracked_objects::Location& posted_from, int err);
21
22 // Utility to construct the appropriate set & clear masks for use the OpenSSL
23 // options and mode configuration functions. (SSL_set_options etc)
24 struct SslSetClearMask {
25 SslSetClearMask();
26 void ConfigureFlag(long flag, bool state);
27
28 long set_mask;
29 long clear_mask;
30 };
31
32 // Converts an OpenSSL error code into a net error code, walking the OpenSSL
33 // error stack if needed. Note that |tracer| is not currently used in the
34 // implementation, but is passed in anyway as this ensures the caller will clear
35 // any residual codes left on the error stack.
36 int MapOpenSSLError(int err, const crypto::OpenSSLErrStackTracer& tracer);
37
38 } // namespace net
39
40 #endif // NET_SOCKET_OPENSSL_SSL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698