diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd90838..3cae47f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added Collection extensions for setting and adding ranges of items
- Added a method for getting the total number of seconds in a date
- Added extensions to raise events with common event args using the data directly
+ - Added property to IcdEnvironment to determine whether SSL communication is enabled
### Changed
- Repeater changed to use configured callbacks instead of a dumb event
diff --git a/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs b/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs
index df8795f..3259f2b 100644
--- a/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs
+++ b/ICD.Common.Utils/IcdEnvironment.SimplSharp.cs
@@ -128,6 +128,39 @@ namespace ICD.Common.Utils
}
}
+ ///
+ /// Gets the SSL state of the processor.
+ ///
+ [PublicAPI]
+ public static bool SslEnabled
+ {
+ get
+ {
+ const CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET param =
+ CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_SSL_OFF_STATUS;
+ const EthernetAdapterType type = EthernetAdapterType.EthernetLANAdapter;
+
+ try
+ {
+ short id = CrestronEthernetHelper.GetAdapterdIdForSpecifiedAdapterType(type);
+ if (id >= InitialParametersClass.NumberOfEthernetInterfaces)
+ return false;
+
+ string status = CrestronEthernetHelper.GetEthernetParameter(param, id);
+
+ if (!string.IsNullOrEmpty(status) && !status.Equals(INVALID_VALUE))
+ // GET_SSL_OFF_STATUS return OFF for SSL is Enabled and ON for SSL is disabled
+ return status == "OFF";
+
+ return false;
+ }
+ catch (ArgumentException)
+ {
+ return false;
+ }
+ }
+ }
+
///
/// Gets the hostname of the processor.
///
diff --git a/ICD.Common.Utils/IcdEnvironment.Standard.cs b/ICD.Common.Utils/IcdEnvironment.Standard.cs
index c735ca8..fcccc2e 100644
--- a/ICD.Common.Utils/IcdEnvironment.Standard.cs
+++ b/ICD.Common.Utils/IcdEnvironment.Standard.cs
@@ -73,6 +73,15 @@ namespace ICD.Common.Utils
}
}
+ ///
+ /// Exists for parity with SimplSharp processors which have the ability to enable/disable SSL communication.
+ ///
+ [PublicAPI]
+ public static bool SslEnabled
+ {
+ get { return true; }
+ }
+
///
/// Gets the hostname of the processor.
///