summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2012-02-22 22:34:02 +0000
committerwtc%google.com <devnull@localhost>2012-02-22 22:34:02 +0000
commit0933ebf80c41be25cef3165ada0860b8b28ca870 (patch)
treea656b62483fb02ff1d3a70f818beb5c55f9c297c
parent19c6bd1e4a96bcc26262eb35fa76f1fe71f97dda (diff)
downloadnss-hg-0933ebf80c41be25cef3165ada0860b8b28ca870.tar.gz
Bug 729377: SEC_RegisterDefaultHttpClient and
CERT_RegisterAlternateOCSPAIAInfoCallBack should set the SEC_ERROR_NOT_INITIALIZED error (instead of SEC_ERROR_LIBRARY_FAILURE) if they are called before NSS is initialized. r=kaie.
-rw-r--r--security/nss/lib/certhigh/ocsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/nss/lib/certhigh/ocsp.c b/security/nss/lib/certhigh/ocsp.c
index 982f4ac70..df26ea290 100644
--- a/security/nss/lib/certhigh/ocsp.c
+++ b/security/nss/lib/certhigh/ocsp.c
@@ -296,7 +296,7 @@ SECStatus
SEC_RegisterDefaultHttpClient(const SEC_HttpClientFcn *fcnTable)
{
if (!OCSP_Global.monitor) {
- PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
+ PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
return SECFailure;
}
@@ -315,7 +315,7 @@ CERT_RegisterAlternateOCSPAIAInfoCallBack(
CERT_StringFromCertFcn old;
if (!OCSP_Global.monitor) {
- PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
+ PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
return SECFailure;
}
@@ -991,7 +991,7 @@ const SEC_HttpClientFcn *SEC_GetRegisteredHttpClient()
const SEC_HttpClientFcn *retval;
if (!OCSP_Global.monitor) {
- PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
+ PORT_SetError(SEC_ERROR_NOT_INITIALIZED);
return NULL;
}