How to check the expiry date and key length of a Certificate on NetScaler CLI

How to check the expiry date and key length of a Certificate on NetScaler CLI

book

Article ID: CTX212591

calendar_today

Updated On:

Description

How to check the expiry date and key length of a Certificate on NetScaler CLI 


Instructions

On NetScaler the certificates,key files and CSR will be located in /nsconfig/ssl.  You can navigate to this folder by logging into CLI and going to shell mode after which you can execute the below OpenSSL commands: 

To check the expiry date of a certificate,to whom it is issued and the issuer: 
openssl x509 -in <Certificate-name> -issuer -noout -subject -dates

To check the key size from a certificate,use the command: 
openssl x509 -in <Certificate-name> -text -noout | grep "Public-Key"

In case if the private key is available then you can use the command: 
openssl rsa -in <Private-key-name> -text -noout | grep "Private-Key"

Note: The characters that you grep for are case sensitive.