1. Use flag to get peer or root certificate. 2. Refine PubKey format.