X509::subject_public_key_type

Description

Returns the subject’s public key type of the specified X509 certificate. The returned value can be either RSA, DSA, or unknown.

Syntax

X509::subject_public_key_type <X509 certificate>

X509::subject_public_key_type <X509 certificate>

  • Returns the subject’s public key type of the specified X509 certificate. The returned value can be either RSA, DSA, or unknown.

Examples

when CLIENTSSL_CLIENTCERT {
  set client_cert [SSL::cert 0]
  log local0. "Cert subject - [X509::subject $client_cert]"
  log local0. "Cert public key type - [X509::subject_public_key_type $client_cert]"
  if { [X509::subject_public_key_type $client_cert] equals "unknown" } {
    SSL::verify_result 50
  }
  set error_code [SSL::verify_result]
  log local0. "Cert verify result - [X509::verify_cert_error_string $error_code]"
}