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

Side by Side Diff: webrtc/base/sslstreamadapterhelper.h

Issue 1802013002: A bunch of interfaces: Return scoped_ptr<SSLCertificate> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 23 matching lines...) Expand all
34 void SetServerRole(SSLRole role = SSL_SERVER) override; 34 void SetServerRole(SSLRole role = SSL_SERVER) override;
35 void SetMode(SSLMode mode) override; 35 void SetMode(SSLMode mode) override;
36 void SetMaxProtocolVersion(SSLProtocolVersion version) override; 36 void SetMaxProtocolVersion(SSLProtocolVersion version) override;
37 37
38 int StartSSLWithServer(const char* server_name) override; 38 int StartSSLWithServer(const char* server_name) override;
39 int StartSSLWithPeer() override; 39 int StartSSLWithPeer() override;
40 40
41 bool SetPeerCertificateDigest(const std::string& digest_alg, 41 bool SetPeerCertificateDigest(const std::string& digest_alg,
42 const unsigned char* digest_val, 42 const unsigned char* digest_val,
43 size_t digest_len) override; 43 size_t digest_len) override;
44 bool GetPeerCertificate(SSLCertificate** cert) const override; 44 rtc::scoped_ptr<SSLCertificate> GetPeerCertificate() const override;
45 StreamState GetState() const override; 45 StreamState GetState() const override;
46 void Close() override; 46 void Close() override;
47 47
48 protected: 48 protected:
49 // Internal helper methods 49 // Internal helper methods
50 // The following method returns 0 on success and a negative 50 // The following method returns 0 on success and a negative
51 // error code on failure. The error code may be either -1 or 51 // error code on failure. The error code may be either -1 or
52 // from the impl on some other error cases, so it can't really be 52 // from the impl on some other error cases, so it can't really be
53 // interpreted unfortunately. 53 // interpreted unfortunately.
54 54
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 private: 108 private:
109 // Go from state SSL_NONE to either SSL_CONNECTING or SSL_WAIT, 109 // Go from state SSL_NONE to either SSL_CONNECTING or SSL_WAIT,
110 // depending on whether the underlying stream is already open or 110 // depending on whether the underlying stream is already open or
111 // not. Returns 0 on success and a negative value on error. 111 // not. Returns 0 on success and a negative value on error.
112 int StartSSL(); 112 int StartSSL();
113 }; 113 };
114 114
115 } // namespace rtc 115 } // namespace rtc
116 116
117 #endif // WEBRTC_BASE_SSLSTREAMADAPTERHELPER_H_ 117 #endif // WEBRTC_BASE_SSLSTREAMADAPTERHELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698