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

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

Issue 2877023002: Move webrtc/{base => rtc_base} (Closed)
Patch Set: update presubmit.py and DEPS include rules Created 3 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
« no previous file with comments | « webrtc/base/ssladapter_unittest.cc ('k') | webrtc/base/sslfingerprint.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 /* 1 /*
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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
11 #ifndef WEBRTC_BASE_SSLFINGERPRINT_H_ 11 #ifndef WEBRTC_BASE_SSLFINGERPRINT_H_
12 #define WEBRTC_BASE_SSLFINGERPRINT_H_ 12 #define WEBRTC_BASE_SSLFINGERPRINT_H_
13 13
14 #include <string>
15 14
16 #include "webrtc/base/basictypes.h" 15 // This header is deprecated and is just left here temporarily during
17 #include "webrtc/base/copyonwritebuffer.h" 16 // refactoring. See https://bugs.webrtc.org/7634 for more details.
18 #include "webrtc/base/rtccertificate.h" 17 #include "webrtc/rtc_base/sslfingerprint.h"
19 #include "webrtc/base/sslidentity.h"
20
21 namespace rtc {
22
23 class SSLCertificate;
24
25 struct SSLFingerprint {
26 static SSLFingerprint* Create(const std::string& algorithm,
27 const rtc::SSLIdentity* identity);
28
29 static SSLFingerprint* Create(const std::string& algorithm,
30 const rtc::SSLCertificate* cert);
31
32 static SSLFingerprint* CreateFromRfc4572(const std::string& algorithm,
33 const std::string& fingerprint);
34
35 // Creates a fingerprint from a certificate, using the same digest algorithm
36 // as the certificate's signature.
37 static SSLFingerprint* CreateFromCertificate(const RTCCertificate* cert);
38
39 SSLFingerprint(const std::string& algorithm,
40 const uint8_t* digest_in,
41 size_t digest_len);
42
43 SSLFingerprint(const SSLFingerprint& from);
44
45 bool operator==(const SSLFingerprint& other) const;
46
47 std::string GetRfc4572Fingerprint() const;
48
49 std::string ToString() const;
50
51 std::string algorithm;
52 rtc::CopyOnWriteBuffer digest;
53 };
54
55 } // namespace rtc
56 18
57 #endif // WEBRTC_BASE_SSLFINGERPRINT_H_ 19 #endif // WEBRTC_BASE_SSLFINGERPRINT_H_
OLDNEW
« no previous file with comments | « webrtc/base/ssladapter_unittest.cc ('k') | webrtc/base/sslfingerprint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698