OLD | NEW |
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 Loading... |
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, 1970-01-01T00:00:00Z (UTC), | 73 // Returns the time in seconds relative to epoch. |
74 // or -1 if an expiration time could not be retrieved. | |
75 virtual int64_t CertificateExpirationTime() const = 0; | 74 virtual int64_t CertificateExpirationTime() const = 0; |
76 }; | 75 }; |
77 | 76 |
78 // SSLCertChain is a simple wrapper for a vector of SSLCertificates. It serves | 77 // SSLCertChain is a simple wrapper for a vector of SSLCertificates. It serves |
79 // primarily to ensure proper memory management (especially deletion) of the | 78 // primarily to ensure proper memory management (especially deletion) of the |
80 // SSLCertificate pointers. | 79 // SSLCertificate pointers. |
81 class SSLCertChain { | 80 class SSLCertChain { |
82 public: | 81 public: |
83 // These constructors copy the provided SSLCertificate(s), so the caller | 82 // These constructors copy the provided SSLCertificate(s), so the caller |
84 // retains ownership. | 83 // retains ownership. |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // |s| is not 0-terminated; its char count is defined by |length|. | 226 // |s| is not 0-terminated; its char count is defined by |length|. |
228 int64_t ASN1TimeToSec(const unsigned char* s, size_t length, bool long_format); | 227 int64_t ASN1TimeToSec(const unsigned char* s, size_t length, bool long_format); |
229 | 228 |
230 extern const char kPemTypeCertificate[]; | 229 extern const char kPemTypeCertificate[]; |
231 extern const char kPemTypeRsaPrivateKey[]; | 230 extern const char kPemTypeRsaPrivateKey[]; |
232 extern const char kPemTypeEcPrivateKey[]; | 231 extern const char kPemTypeEcPrivateKey[]; |
233 | 232 |
234 } // namespace rtc | 233 } // namespace rtc |
235 | 234 |
236 #endif // WEBRTC_BASE_SSLIDENTITY_H_ | 235 #endif // WEBRTC_BASE_SSLIDENTITY_H_ |
OLD | NEW |