Hi guys.
At work we have lots of certificates to sign/encrypt/decrypt different kinds of documents/data and lately there's been a few occasions where we almost forgot to renew them before they expired.
I am currently working on a small monitoring tool, that will notify us of certificates expiring soon.
Trouble is, I only have limited C++ experience and it dates quite a few years back.
Anyway, I have text file that lists all the certificates along with their renewal and expiration date. What I want to do is parse this file, discard the first 5 lines, store each line in a data structure (could be a vector or a dynamic array or a struct) then re-parse every item to extract the NAME, RENEWAL START DATE and CERTIFICATE EXPIRY.
The columns are space separated (it doesn't show in the forum) with exactly the same number on each line. Eg:
HSM1:****[2]HumanPwd[4]Signing[6]06 Apr 2011[5]15 Jul 2011[5]cn=***,o=***,o=***
I realize it's a quite a lot of questions, but it's been a few days and I keep banging my head against the wall..
Profile Name Profile Certificate Certificate Certificate User DN
Password Type Renewal Start Private Key
Policy Date (GMT) Expiry (GMT)
------------------------------------------------------------------------------------------------------------------
HSM1: **** HumanPwd Signing 06 Apr 2011 15 Jul 2011 cn=***,o=***,o=***
HSM1: **** AppliPwd Signing 29 Aug 2011 07 Dec 2011 cn=***,o=***,o=***
HSM1: **** AppliPwd Signing 29 Aug 2011 07 Dec 2011 cn=***,o=***,o=***
HSM1: **** HumanPwd Encryption 05 Oct 2011 13 Jan 2012 cn=***,o=***,o=***
HSM1: **** HumanPwd Encryption 12 Jan 2012 21 Apr 2012 cn=***,o=***,o=***