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

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

Issue 1494103003: RTCCertificate::Expires() and ::HasExpired() implemented (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nits 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 | « webrtc/base/rtccertificate_unittests.cc ('k') | no next file » | 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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Gets the name of the digest algorithm that was used to compute this 63 // Gets the name of the digest algorithm that was used to compute this
64 // certificate's signature. 64 // certificate's signature.
65 virtual bool GetSignatureDigestAlgorithm(std::string* algorithm) const = 0; 65 virtual bool GetSignatureDigestAlgorithm(std::string* algorithm) const = 0;
66 66
67 // Compute the digest of the certificate given algorithm 67 // Compute the digest of the certificate given algorithm
68 virtual bool ComputeDigest(const std::string& algorithm, 68 virtual bool ComputeDigest(const std::string& algorithm,
69 unsigned char* digest, 69 unsigned char* digest,
70 size_t size, 70 size_t size,
71 size_t* length) const = 0; 71 size_t* length) const = 0;
72 72
73 // Returns the time in seconds relative to epoch. 73 // Returns the time in seconds relative to epoch, 1970-01-01T00:00:00Z (UTC),
74 // or -1 if an expiration time could not be retrieved.
74 virtual int64_t CertificateExpirationTime() const = 0; 75 virtual int64_t CertificateExpirationTime() const = 0;
75 }; 76 };
76 77
77 // SSLCertChain is a simple wrapper for a vector of SSLCertificates. It serves 78 // SSLCertChain is a simple wrapper for a vector of SSLCertificates. It serves
78 // primarily to ensure proper memory management (especially deletion) of the 79 // primarily to ensure proper memory management (especially deletion) of the
79 // SSLCertificate pointers. 80 // SSLCertificate pointers.
80 class SSLCertChain { 81 class SSLCertChain {
81 public: 82 public:
82 // These constructors copy the provided SSLCertificate(s), so the caller 83 // These constructors copy the provided SSLCertificate(s), so the caller
83 // retains ownership. 84 // retains ownership.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // |s| is not 0-terminated; its char count is defined by |length|. 227 // |s| is not 0-terminated; its char count is defined by |length|.
227 int64_t ASN1TimeToSec(const unsigned char* s, size_t length, bool long_format); 228 int64_t ASN1TimeToSec(const unsigned char* s, size_t length, bool long_format);
228 229
229 extern const char kPemTypeCertificate[]; 230 extern const char kPemTypeCertificate[];
230 extern const char kPemTypeRsaPrivateKey[]; 231 extern const char kPemTypeRsaPrivateKey[];
231 extern const char kPemTypeEcPrivateKey[]; 232 extern const char kPemTypeEcPrivateKey[];
232 233
233 } // namespace rtc 234 } // namespace rtc
234 235
235 #endif // WEBRTC_BASE_SSLIDENTITY_H_ 236 #endif // WEBRTC_BASE_SSLIDENTITY_H_
OLDNEW
« no previous file with comments | « webrtc/base/rtccertificate_unittests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698