SA support tip: How to list all of the certificates with their expiration dates (179 Views)
Reply
HP Expert
molinabro1
Posts: 499
Registered: ‎05-09-2007
Message 1 of 3 (179 Views)
Accepted Solution

SA support tip: How to list all of the certificates with their expiration dates

[ Edited ]

Have you ever wanted to list all SA certificates along with their expiration dates?  With this command you can do it:

 

 

 

find /var/opt/opsware/crypto/ \( -name "*.crt" -o -name "*.srv" -o -name "*.pem" -o -name "*.pk12" \) -exec bash -c "in=\$0;md5=\$( md5sum \$in| awk '{print \$1}');expire=\$( openssl x509 -in \$in -noout -enddate | awk -F= '{print \$2}' ); echo \$in,\$md5,\$expire" {} \;

 

 

Try it out, it´s pretty neat!

 

KM about this:

 

http://support.openview.hp.com/selfsolve/document/KM00511757



Ed Molina
HP Cloud Solution Support Engineer

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution. Also, if you liked this post please consider providing Kudos on the left side.
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,703
Registered: ‎03-06-2006
Message 2 of 3 (162 Views)

Re: SA support tip: How to list all of the certificates with their expiration dates

Your example is missing find's trailing ";" as in: ... {} \;

 

(You can correct your example by using Post Options > Edit Reply.)

Please use plain text.
HP Expert
molinabro1
Posts: 499
Registered: ‎05-09-2007
Message 3 of 3 (155 Views)

Re: SA support tip: How to list all of the certificates with their expiration dates

Hello! I appreciate the observation, I fixed it now, thanks!



Ed Molina
HP Cloud Solution Support Engineer

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution. Also, if you liked this post please consider providing Kudos on the left side.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation