From: Nalin Dahyabhai Date: Wed, 3 Jul 2013 21:11:09 +0000 (-0400) Subject: Add the error to some PKINIT NSS debug messages X-Git-Tag: krb5-1.12-alpha1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb051a93f31c274cec6c9788558911a0c6b5ddc8;p=thirdparty%2Fkrb5.git Add the error to some PKINIT NSS debug messages --- diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c index 20ac6eb67c..bb9d6739fb 100644 --- a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c @@ -2731,8 +2731,9 @@ crypto_load_files(krb5_context context, return SECFailure; cobj->obj = PK11_CreateGenericObject(slot, attrs, n_attrs, permanent); if (cobj->obj == NULL) { - pkiDebug("%s: error loading %scertificate \"%s\"\n", - __FUNCTION__, cert_mark_trusted ? "CA " : "", certfile); + pkiDebug("%s: error loading %scertificate \"%s\": %s\n", + __FUNCTION__, cert_mark_trusted ? "CA " : "", certfile, + PORT_ErrorToName(PORT_GetError())); status = SECFailure; } else { pkiDebug("%s: loaded %scertificate \"%s\"\n", @@ -3102,9 +3103,9 @@ crypto_load_certs(krb5_context context, idopts->key_filename, NULL, PR_TRUE, PR_FALSE, id_cryptoctx); if (status != SECSuccess) { - pkiDebug("%s: error loading files \"%s\" and \"%s\"\n", + pkiDebug("%s: error loading files \"%s\" and \"%s\": %s\n", __FUNCTION__, idopts->cert_filename, - idopts->key_filename); + idopts->key_filename, PORT_ErrorToName(PORT_GetError())); return defer_id_prompts ? 0 : ENOMEM; } return 0; @@ -3116,8 +3117,9 @@ crypto_load_certs(krb5_context context, req_cryptoctx, idopts->cert_filename, id_cryptoctx); if (status != SECSuccess) { - pkiDebug("%s: error loading NSS certdb \"%s\"\n", - __FUNCTION__, idopts->cert_filename); + pkiDebug("%s: error loading NSS certdb \"%s\": %s\n", + __FUNCTION__, idopts->cert_filename, + PORT_ErrorToName(PORT_GetError())); return ENOMEM; } return 0; @@ -3130,8 +3132,9 @@ crypto_load_certs(krb5_context context, idopts->cert_filename, PR_TRUE, PR_FALSE, PR_FALSE, id_cryptoctx); if (status != SECSuccess) { - pkiDebug("%s: error loading directory \"%s\"\n", - __FUNCTION__, idopts->cert_filename); + pkiDebug("%s: error loading directory \"%s\": %s\n", + __FUNCTION__, idopts->cert_filename, + PORT_ErrorToName(PORT_GetError())); return defer_id_prompts ? 0 : ENOMEM; } return 0; @@ -3142,8 +3145,9 @@ crypto_load_certs(krb5_context context, plg_cryptoctx, req_cryptoctx, idopts, id_cryptoctx); if (status != SECSuccess) { - pkiDebug("%s: error loading module \"%s\"\n", - __FUNCTION__, idopts->p11_module_name); + pkiDebug("%s: error loading module \"%s\": %s\n", + __FUNCTION__, idopts->p11_module_name, + PORT_ErrorToName(PORT_GetError())); return ENOMEM; } return 0;