Ticket 47466 - Importing CA cert with existing name crashes security CGI
When a CA certificate is imported through the Console, but a CA certificate
with the same name already exists in the certdb, the security CGI crashes.
We are not checking the return value of CERT_ImportCerts(), which leads to
a NULL dereference.
This patch checks the return value of CERT_ImportCerts for an error, and
we return an appropriate error back to the caller. The functions we were
using to get the error text for NSS errors was returning garbage. We
need to use PR_ErrorToString() to get the proper error strings.