diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-01-02 13:33:08 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-01-02 13:54:00 +0100 |
commit | b964f07bdc3e6f89a70d5cbd13061f84fc19d312 (patch) | |
tree | 9e02696ac58d70d3734737c2eb961d2de3f1bd8e | |
parent | f656e069183b51c72e458b6290c143f9c8d5704d (diff) | |
download | gnutls-b964f07bdc3e6f89a70d5cbd13061f84fc19d312.tar.gz |
unified PKCS#11 debug messages
-rw-r--r-- | lib/pkcs11.c | 22 | ||||
-rw-r--r-- | lib/pkcs11_privkey.c | 4 | ||||
-rw-r--r-- | lib/pkcs11_secret.c | 2 | ||||
-rw-r--r-- | lib/pkcs11_write.c | 16 |
4 files changed, 22 insertions, 22 deletions
diff --git a/lib/pkcs11.c b/lib/pkcs11.c index f83feb31fd..d40bc409c8 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -1473,7 +1473,7 @@ find_obj_url(struct pkcs11_session_info *sinfo, a_vals); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pk11: FindObjectsInit failed.\n"); + _gnutls_debug_log("p11: FindObjectsInit failed.\n"); ret = pkcs11_rv_to_err(rv); goto cleanup; } @@ -1526,7 +1526,7 @@ find_obj_url(struct pkcs11_session_info *sinfo, break; } else { _gnutls_debug_log - ("pk11: Skipped cert, missing attrs.\n"); + ("p11: Skipped cert, missing attrs.\n"); } } @@ -1957,7 +1957,7 @@ retrieve_pin(struct pin_info_st *pin_info, struct p11_kit_uri *info, /* Check if a pinfile is specified, and use that if possible */ pinfile = p11_kit_uri_get_pinfile(info); if (pinfile != NULL) { - _gnutls_debug_log("pk11: Using pinfile to retrieve PIN\n"); + _gnutls_debug_log("p11: Using pinfile to retrieve PIN\n"); ret = retrieve_pin_from_source(pinfile, token_info, attempts, user_type, pin); @@ -1975,7 +1975,7 @@ retrieve_pin(struct pin_info_st *pin_info, struct p11_kit_uri *info, if (ret < 0) { gnutls_assert(); _gnutls_debug_log - ("pk11: No suitable pin callback but login required.\n"); + ("p11: No suitable pin callback but login required.\n"); } return ret; @@ -1995,7 +1995,7 @@ pkcs11_login(struct pkcs11_session_info *sinfo, user_type = (so == 0) ? CKU_USER : CKU_SO; if (so == 0 && (tokinfo->tinfo.flags & CKF_LOGIN_REQUIRED) == 0) { gnutls_assert(); - _gnutls_debug_log("pk11: No login required.\n"); + _gnutls_debug_log("p11: No login required.\n"); return 0; } @@ -2012,7 +2012,7 @@ pkcs11_login(struct pkcs11_session_info *sinfo, } else { gnutls_assert(); _gnutls_debug_log - ("pk11: Protected login failed.\n"); + ("p11: Protected login failed.\n"); ret = GNUTLS_E_PKCS11_ERROR; goto cleanup; } @@ -2042,7 +2042,7 @@ pkcs11_login(struct pkcs11_session_info *sinfo, &tinfo) != CKR_OK) { gnutls_assert(); _gnutls_debug_log - ("pk11: GetTokenInfo failed\n"); + ("p11: GetTokenInfo failed\n"); ret = GNUTLS_E_PKCS11_ERROR; goto cleanup; } @@ -2066,7 +2066,7 @@ pkcs11_login(struct pkcs11_session_info *sinfo, } while (rv == CKR_PIN_INCORRECT); - _gnutls_debug_log("pk11: Login result = %lu\n", rv); + _gnutls_debug_log("p11: Login result = %lu\n", rv); ret = (rv == CKR_OK @@ -2354,7 +2354,7 @@ find_objs(struct pkcs11_session_info *sinfo, tot_values); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pk11: FindObjectsInit failed.\n"); + _gnutls_debug_log("p11: FindObjectsInit failed.\n"); return pkcs11_rv_to_err(rv); } @@ -2968,7 +2968,7 @@ find_issuer(struct pkcs11_session_info *sinfo, if (rv != CKR_OK) { gnutls_assert(); _gnutls_debug_log - ("pk11: FindObjectsInit failed.\n"); + ("p11: FindObjectsInit failed.\n"); ret = pkcs11_rv_to_err(rv); goto cleanup; } @@ -3012,7 +3012,7 @@ find_issuer(struct pkcs11_session_info *sinfo, break; } else { _gnutls_debug_log - ("pk11: Skipped cert, missing attrs.\n"); + ("p11: Skipped cert, missing attrs.\n"); } } diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c index 7a0aa38912..fad30764b7 100644 --- a/lib/pkcs11_privkey.c +++ b/lib/pkcs11_privkey.c @@ -149,7 +149,7 @@ find_object(struct pkcs11_session_info *sinfo, attr_count); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pk11: FindObjectsInit failed.\n"); + _gnutls_debug_log("p11: FindObjectsInit failed.\n"); ret = pkcs11_rv_to_err(rv); goto fail; } @@ -749,7 +749,7 @@ gnutls_pkcs11_privkey_generate2(const char *url, gnutls_pk_algorithm_t pk, a_val, p, p_val, &pub, &priv); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", pkcs11_strerror(rv)); + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); ret = pkcs11_rv_to_err(rv); goto cleanup; } diff --git a/lib/pkcs11_secret.c b/lib/pkcs11_secret.c index 3d01912420..2fc847b485 100644 --- a/lib/pkcs11_secret.c +++ b/lib/pkcs11_secret.c @@ -130,7 +130,7 @@ gnutls_pkcs11_copy_secret_key(const char *token_url, gnutls_datum_t * key, rv = pkcs11_create_object(sinfo.module, sinfo.pks, a, a_val, &obj); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", pkcs11_strerror(rv)); + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); ret = pkcs11_rv_to_err(rv); goto cleanup; } diff --git a/lib/pkcs11_write.c b/lib/pkcs11_write.c index 6f2173c022..844bbb94bc 100644 --- a/lib/pkcs11_write.c +++ b/lib/pkcs11_write.c @@ -174,7 +174,7 @@ gnutls_pkcs11_copy_x509_crt(const char *token_url, rv = pkcs11_create_object(sinfo.module, sinfo.pks, a, a_val, &obj); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", pkcs11_strerror(rv)); + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); ret = pkcs11_rv_to_err(rv); goto cleanup; } @@ -459,7 +459,7 @@ gnutls_pkcs11_copy_x509_privkey(const char *token_url, rv = pkcs11_create_object(sinfo.module, sinfo.pks, a, a_val, &obj); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", pkcs11_strerror(rv)); + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); ret = pkcs11_rv_to_err(rv); goto cleanup; } @@ -582,7 +582,7 @@ delete_obj_url(struct pkcs11_session_info *sinfo, a_vals); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pk11: FindObjectsInit failed.\n"); + _gnutls_debug_log("p11: FindObjectsInit failed.\n"); ret = pkcs11_rv_to_err(rv); goto cleanup; } @@ -593,7 +593,7 @@ delete_obj_url(struct pkcs11_session_info *sinfo, rv = pkcs11_destroy_object(sinfo->module, sinfo->pks, obj); if (rv != CKR_OK) { _gnutls_debug_log - ("pkcs11: Cannot destroy object: %s\n", + ("p11: Cannot destroy object: %s\n", pkcs11_strerror(rv)); } else { find_data->deleted++; @@ -705,7 +705,7 @@ gnutls_pkcs11_token_init(const char *token_url, strlen(so_pin), (uint8_t *) flabel); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", pkcs11_strerror(rv)); + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); return pkcs11_rv_to_err(rv); } @@ -765,7 +765,7 @@ gnutls_pkcs11_token_set_pin(const char *token_url, (uint8_t *) newpin, strlen(newpin)); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); ret = pkcs11_rv_to_err(rv); goto finish; @@ -776,7 +776,7 @@ gnutls_pkcs11_token_set_pin(const char *token_url, newpin, strlen(newpin)); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); ret = pkcs11_rv_to_err(rv); goto finish; @@ -832,7 +832,7 @@ gnutls_pkcs11_token_get_random(const char *token_url, rv = _gnutls_pkcs11_get_random(sinfo.module, sinfo.pks, rnddata, len); if (rv != CKR_OK) { gnutls_assert(); - _gnutls_debug_log("pkcs11: %s\n", pkcs11_strerror(rv)); + _gnutls_debug_log("p11: %s\n", pkcs11_strerror(rv)); ret = pkcs11_rv_to_err(rv); goto finish; } |