Improved handling of CA certs