summaryrefslogtreecommitdiff
path: root/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h')
-rw-r--r--src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h b/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h
index 1e4699b77a..f20d3e4034 100644
--- a/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h
+++ b/src/components/security_manager/include/security_manager/crypto_manager_settings_impl.h
@@ -17,6 +17,7 @@ class CryptoManagerSettingsImpl : public CryptoManagerSettings {
return profile_.ssl_mode() == "SERVER" ? security_manager::SERVER
: security_manager::CLIENT;
}
+
Protocol security_manager_protocol_name() const OVERRIDE {
CREATE_LOGGERPTR_LOCAL(logger_, "SecurityManager")
@@ -33,33 +34,59 @@ class CryptoManagerSettingsImpl : public CryptoManagerSettings {
if (protocol_str == "SSLv3") {
return security_manager::SSLv3;
}
+ if (protocol_str == "DTLSv1.0") {
+ return security_manager::DTLSv1;
+ }
+
LOG4CXX_ERROR(
logger_,
"Unknown protocol: " << profile_.security_manager_protocol_name());
return static_cast<security_manager::Protocol>(-1);
}
+
bool verify_peer() const OVERRIDE {
return profile_.verify_peer();
}
+
const std::string& certificate_data() const OVERRIDE {
return certificate_data_;
}
+
const std::string& ciphers_list() const OVERRIDE {
return profile_.ciphers_list();
}
+
const std::string& ca_cert_path() const OVERRIDE {
return profile_.ca_cert_path();
}
+
+ const std::string& module_cert_path() const OVERRIDE {
+ return profile_.cert_path();
+ }
+
+ const std::string& module_key_path() const OVERRIDE {
+ return profile_.key_path();
+ }
+
size_t update_before_hours() const OVERRIDE {
return profile_.update_before_hours();
}
+
size_t maximum_payload_size() const OVERRIDE {
return profile_.maximum_payload_size();
}
+ const std::vector<int>& force_protected_service() const {
+ return profile_.force_protected_service();
+ }
+
+ const std::vector<int>& force_unprotected_service() const {
+ return profile_.force_unprotected_service();
+ }
+
private:
const profile::Profile& profile_;
const std::string certificate_data_;
};
-}
+} // namespace security_manager
#endif // SRC_COMPONENTS_SECURITY_MANAGER_INCLUDE_SECURITY_MANAGER_CRYPTO_MANAGER_SETTINGS_IMPL_H_