I would like to filter out all common names of certificates in the current folder to troubleshoot which certificates are trusted.
CodePudding user response:
Common name can be filtered using the following command:
$ openssl x509 -noout -subject -in /etc/ssl/glusterfs.pem
Looping over files in the current folder can be achieved with:
$ for f in *; do echo "Processing $f file..."; done
To display common names for all certificates in current folder:
$ for f in *; do openssl x509 -noout -subject -in $f; done