SubjectNames() action

From The x3270 Wiki

New in 4.1

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.

An entry containing an asterisk * character is a wild-card; any value will match it. But note that wild-card entries cannot be used as an acceptHostname.


Simple example for an IBM host.

c3270> SubjectNames(

Note that this action can be used with any server that uses TLS:

c3270> SubjectNames(

See also

TlsSubjectNames query