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

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

Issue 1468273004: Provide method for returning certificate expiration timestamp. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Windows fixes Created 5 years 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 | « no previous file | webrtc/base/opensslidentity.h » ('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
(...skipping 27 matching lines...) Expand all
38 return new FakeSSLCertificate(*this); 38 return new FakeSSLCertificate(*this);
39 } 39 }
40 virtual std::string ToPEMString() const { 40 virtual std::string ToPEMString() const {
41 return data_; 41 return data_;
42 } 42 }
43 virtual void ToDER(Buffer* der_buffer) const { 43 virtual void ToDER(Buffer* der_buffer) const {
44 std::string der_string; 44 std::string der_string;
45 VERIFY(SSLIdentity::PemToDer(kPemTypeCertificate, data_, &der_string)); 45 VERIFY(SSLIdentity::PemToDer(kPemTypeCertificate, data_, &der_string));
46 der_buffer->SetData(der_string.c_str(), der_string.size()); 46 der_buffer->SetData(der_string.c_str(), der_string.size());
47 } 47 }
48 int64_t CertificateExpirationTime() const override { return -1; }
48 void set_digest_algorithm(const std::string& algorithm) { 49 void set_digest_algorithm(const std::string& algorithm) {
49 digest_algorithm_ = algorithm; 50 digest_algorithm_ = algorithm;
50 } 51 }
51 virtual bool GetSignatureDigestAlgorithm(std::string* algorithm) const { 52 virtual bool GetSignatureDigestAlgorithm(std::string* algorithm) const {
52 *algorithm = digest_algorithm_; 53 *algorithm = digest_algorithm_;
53 return true; 54 return true;
54 } 55 }
55 virtual bool ComputeDigest(const std::string& algorithm, 56 virtual bool ComputeDigest(const std::string& algorithm,
56 unsigned char* digest, 57 unsigned char* digest,
57 size_t size, 58 size_t size,
(...skipping 30 matching lines...) Expand all
88 return new FakeSSLIdentity(*this); 89 return new FakeSSLIdentity(*this);
89 } 90 }
90 virtual const FakeSSLCertificate& certificate() const { return cert_; } 91 virtual const FakeSSLCertificate& certificate() const { return cert_; }
91 private: 92 private:
92 FakeSSLCertificate cert_; 93 FakeSSLCertificate cert_;
93 }; 94 };
94 95
95 } // namespace rtc 96 } // namespace rtc
96 97
97 #endif // WEBRTC_BASE_FAKESSLIDENTITY_H_ 98 #endif // WEBRTC_BASE_FAKESSLIDENTITY_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/base/opensslidentity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698