[PATCH 2/7] cert: Add cert.c for certificate types and routines