I tested pretty carefully on the example data you gave me.
What does the header for your data actually look like?
The loop I gave you only stops when it finds a line whose very first character is a dash '-'
. If it doesn't find such a line, then it will scan through the entire file and your vector of certificates will never get filled.
If that is not the case, post back with the actual header for your file and any changes to the code you made.
Hope this helps.