I need to add TLS 1.2 to the C# ServicePointManager:SecurityProtocol property.
This is the c# code looks rather simple:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
But I need to do from the ABL. How would I translate this in ABL code?
Maybe I don't see the obvious but I can only set the property to exactly one value:
assign ServicePointManager:SecurityProtocol = SecurityProtocolType:Tls11.
Thanks in Advance and Best Regards, Richard.
Thanks for your swift reply. We are running on 11.3.1 and are planning to upgrade to the newest version of OpenEdge (11.6?) Q2 next year.
Thanks to all that have answered. This is the code I've come up with and works without a fuzz:
define variable enumHelper1 as class System.Enum no-undo.
define variable enumHelper2 as class System.Enum no-undo.
assign enumHelper1 = Progress.Util.EnumHelper:or ( SecurityProtocolType:Tls, SecurityProtocolType:Tls11 ).
assign enumHelper2 = Progress.Util.EnumHelper:or ( cast ( enumHelper1, SecurityProtocolType ), SecurityProtocolType:Tls12 ).
assign ServicePointManager:SecurityProtocol = cast ( enumHelper2, SecurityProtocolType ).
Of course this works only with .NET 4.5 ( TLS 1.2 support ) ...