ltm rule command X509 subject public keyΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



X509::subject_public_key
       Returns the subjectaXXs public key of an X509 certificate.

SYNOPSIS
       X509::subject_public_key (type | bits | curve_name)? CERTIFICATE

DESCRIPTION
       Returns the subjectaXXs public key of the specified X509 certificate.

       Syntax

       X509::subject_public_key 

	    * Returns the subjectaXXs public key of the specified X509 certificate.

       v11.5+

       X509::subject_public_key type 

	    * Returns the type of subject public key of the specified X509
	      certificate e.g. RSA, DSA or EC.

       X509::subject_public_key bits 

	    * Returns the size of subject public key in bits of the specified
	      X509 certificate e.g. 2048. Valid for public key type RSA and DSA
	      only. EC public key certificates are not supported by this command.

       X509::subject_public_key curve_name 

	    * Returns the curve-name of EC subject public key of the specified
	      X509 certificate. An error message will be show if the certificate
	      is not of type EC.

RETURN VALUE
VALID DURING
       ANY_EVENT

EXAMPLES
	when CLIENTSSL_CLIENTCERT {
	  set client_cert [SSL::cert 0]
	  log local0. "Cert subject - [X509::subject $client_cert]"
	  log local0. "Cert public key - [X509::subject_public_key $client_cert]"
	}


	when CLIENTSSL_CLIENTCERT {
	  set client_cert [SSL::cert 0]

	  log local0. "key - [X509::subject_public_key $client_cert]"
	  log local0. "key type - [X509::subject_public_key type $client_cert]"
	  log local0. "key bits - [X509::subject_public_key bits $client_cert]"
	  log local0. "key curve_name - [X509::subject_public_key curve_name $client_cert]"
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-9.0.0 --First introduced the command.  @BIGIP-11.5.0 --Added
       subcommands: type, bits, curve_name



BIG-IP				  2017-01-31			      iRule(1)