SubjectNames() action

Description
The SubjectNames action makes a test connection to a host and returns the set of subject names listed in the host's certificate. When a TLS-secured session to a host fails because of a name mismatch, this action is a simple way to discover a name to use with the acceptHostname resource or with the = host name field to allow the session to be established without turning off certificate validation completely.

Return values
SubjectNames returns a list of names, one per line. The first entry is the Common Name listed in the certificate's Subject entry. Subsequent entries, if any, come from the Alternate Names entry.

Examples
Simple example for an IBM host. c3270> SubjectNames(L:publichost.mycompany.com) myhost.mycompany.com prodhost6.mycompany.com

Note that this action can be used with any server that uses TLS: c3270> SubjectNames(A:L:www.github.com:443) github.com www.github.com

Version history
SubjectNames was added in x3270 4.1.