Fix for test of ca cert does not exit correctly