Move the certificate and key loading functions to apps.c, so they can