read cert from file