· May 5, 2019

How to Create SSL Configuration Programmatically?

Hi Community!

How do you create SSL Configuration for InterSystems IRIS programmatically? E.g. for installation or deployment case?

E.g. if I need to create a very simple "default" SSL client configuration to let HTPPS Get requests to an arbitrary server?

Discussion (5)2
Log in or sign up to continue
ClassMethod GetSSLConfiguration(host) As %String
  IF '##class(Security.SSLConfigs).Exists(host) {
    DO ##class(Security.SSLConfigs).Create(host)
  QUIT host

Set tRequest = ##class(%Net.HttpRequest).%New()
Set tRequest.Server = ""
Set tRequest.Https = 1
Set tRequest.SSLConfiguration = ..GetSSLConfiguration(tRequest.Server)