diff options
Diffstat (limited to 'src/components/include/security_manager/ssl_context.h')
-rw-r--r-- | src/components/include/security_manager/ssl_context.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/include/security_manager/ssl_context.h b/src/components/include/security_manager/ssl_context.h index 86997edbd9..9d66e1af2f 100644 --- a/src/components/include/security_manager/ssl_context.h +++ b/src/components/include/security_manager/ssl_context.h @@ -81,10 +81,11 @@ class SSLContext { HandshakeContext(const custom_str::CustomString& exp_sn, const custom_str::CustomString& exp_cn) - : expected_sn(exp_sn), expected_cn(exp_cn) {} + : expected_sn(exp_sn), expected_cn(exp_cn), system_time(time(NULL)) {} custom_str::CustomString expected_sn; custom_str::CustomString expected_cn; + time_t system_time; }; virtual HandshakeResult StartHandshake(const uint8_t** const out_data, @@ -103,6 +104,14 @@ class SSLContext { size_t* out_data_size) = 0; virtual bool IsInitCompleted() const = 0; virtual bool IsHandshakePending() const = 0; + /** + * @brief GetCertificateDueDate gets certificate expiration date + * @param due_date - certificate expiration time to be received + * @return True if certificate expiration date received + * otherwise False + */ + virtual bool GetCertificateDueDate(time_t& due_date) const = 0; + virtual bool HasCertificate() const = 0; virtual size_t get_max_block_size(size_t mtu) const = 0; virtual std::string LastError() const = 0; |