Question
· Sep 18, 2017

Read the SSL configuration table in CSP application

Hello,

I am working in a csp application where the user can configure a TCPS Service in a guide like manor.

So I want to be able to present a html <select> element, the values / text I want to present in this control should be the ID field from Security.SSLConfigs in the %SYS namespace.

How would I go about doing this? Can this be done?

Best regards,

Magnus

Discussion (4)0
Log in or sign up to continue

You can retrieve list of certificates in a way like this

ClassMethod SSLConfigs() As %String
{
  new $namespace
  set $namespace = "%SYS"
  
  set rs=##class(Security.SSLConfigs).ListNamesFunc()
  set result = ""
  while rs.%Next() {
    set result = result_$lb(rs.Name)
  }
  quit result
}

And result will be in $lb

USER>w $lts(##class(User.Test).SSLConfigs())
Amazon,Google,ISC.FeatureTracker.SSL.Config