Quicktip: How to check VCSA internal certificates

How to check the expiry date of VCSA internal certificates.

  • ssh into your VCSA
  • switch to the bash shell
  • run the following command
1for store in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list | grep -v TRUSTED_ROOT_CRLS); do /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $store --text | grep -ie "Alias"; /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $store --text | grep -ie "Not After" | awk -F 'Not After : ' '{ print $2}'; done;

Example output:

 1root@vcsa [ ~ ]# for store in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list | grep -v TRUSTED_ROOT_CRLS); do /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $store --text | grep -ie "Alias"; /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $store --text | grep -ie "Not After" | awk -F 'Not After : ' '{ print $2}'; done;
 2Alias :	__MACHINE_CERT
 3Jun  1 20:33:01 2024 GMT
 4Alias :	4622795223089e749cd0ec3df2b2769f4e79a276
 5May 27 08:33:00 2032 GMT
 6Alias :	machine
 7May 27 08:33:00 2032 GMT
 8Alias :	vsphere-webclient
 9May 27 08:33:00 2032 GMT
10Alias :	vpxd
11May 27 08:33:00 2032 GMT
12Alias :	vpxd-extension
13May 27 08:33:00 2032 GMT
14Alias :	hvc
15May 27 08:33:00 2032 GMT
16Alias :	data-encipherment
17May 27 08:33:00 2032 GMT
18Alias :	sms_self_signed
19Jun  2 08:46:41 2032 GMT
20Alias :	wcp
21May 27 08:33:00 2032 GMT
22root@vcsa [ ~ ]#

Unixtime:

 1root@vcsa [ ~ ]# for store in $(/usr/lib/vmware-vmafd/bin/vecs-cli store list | grep -v TRUSTED_ROOT_CRLS); do /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $store --text | grep -ie "Alias"; /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store $store --text | grep -ie "Not After" | awk -F 'Not After : ' '{ print $2}' | { read gmt ; date -d "$gmt" +"%s"; }; done;
 2Alias :	__MACHINE_CERT
 31717273981
 4Alias :	4622795223089e749cd0ec3df2b2769f4e79a276
 51969259580
 6Alias :	machine
 71969259580
 8Alias :	vsphere-webclient
 91969259580
10Alias :	vpxd
111969259580
12Alias :	vpxd-extension
131969259580
14Alias :	hvc
151969259580
16Alias :	data-encipherment
171969259580
181658188800
19Alias :	sms_self_signed
201969778801
21Alias :	wcp
221969259580
23root@vcsa [ ~ ]#