give more meaningful error if presented with wrong certificate type by server