Added support for additional hook if a cert is expired and set an option in config which determines if application should return or not if an expired cert is found