Only set current certificate to valid values.

When setting the current certificate check that it has a corresponding
private key.
1 file changed