attempt to achieve consistent debugging output
This commit is contained in:
@@ -81,7 +81,7 @@ static status_t verify(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
* TODO: allow other hash algorithms and note it in "auth" */
|
||||
if (public->verify(public, SIGN_RSA_EMSA_PKCS1_SHA1, octets, auth_data))
|
||||
{
|
||||
DBG1(DBG_IKE, "authentication of %D with %N successful",
|
||||
DBG1(DBG_IKE, "authentication of '%D' with %N successful",
|
||||
other_id, auth_method_names, AUTH_RSA);
|
||||
status = SUCCESS;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ static status_t verify(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG1(DBG_IKE, "no trusted public key found for %D", other_id);
|
||||
DBG1(DBG_IKE, "no trusted public key found for '%D'", other_id);
|
||||
}
|
||||
chunk_free(&octets);
|
||||
return status;
|
||||
@@ -109,7 +109,7 @@ static status_t build(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
auth_info_t *auth;
|
||||
|
||||
my_id = this->ike_sa->get_my_id(this->ike_sa);
|
||||
DBG1(DBG_IKE, "authentication of %D (myself) with %N",
|
||||
DBG1(DBG_IKE, "authentication of '%D' (myself) with %N",
|
||||
my_id, auth_method_names, AUTH_RSA);
|
||||
|
||||
auth = this->ike_sa->get_my_auth(this->ike_sa);
|
||||
@@ -117,7 +117,7 @@ static status_t build(private_rsa_authenticator_t *this, chunk_t ike_sa_init,
|
||||
my_id, auth);
|
||||
if (private == NULL)
|
||||
{
|
||||
DBG1(DBG_IKE, "no RSA private key found for %D", my_id);
|
||||
DBG1(DBG_IKE, "no RSA private key found for '%D'", my_id);
|
||||
return NOT_FOUND;
|
||||
}
|
||||
prf = this->ike_sa->get_prf(this->ike_sa);
|
||||
|
||||
@@ -187,7 +187,7 @@ static status_t process_auth(private_ike_auth_t *this, message_t *message)
|
||||
|
||||
if (auth == NULL)
|
||||
{
|
||||
SIG(IKE_UP_FAILED, "authentication method %N used by %D not "
|
||||
SIG(IKE_UP_FAILED, "authentication method %N used by '%D' not "
|
||||
"supported", auth_method_names, auth_method,
|
||||
this->ike_sa->get_other_id(this->ike_sa));
|
||||
return NOT_SUPPORTED;
|
||||
@@ -228,7 +228,7 @@ static status_t process_id(private_ike_auth_t *this, message_t *message)
|
||||
req = this->ike_sa->get_other_id(this->ike_sa);
|
||||
if (!id->matches(id, req))
|
||||
{
|
||||
SIG(IKE_UP_FAILED, "peer ID %D unacceptable, %D required", id, req);
|
||||
SIG(IKE_UP_FAILED, "peer ID '%D' unacceptable, '%D' required", id, req);
|
||||
id->destroy(id);
|
||||
return FAILED;
|
||||
}
|
||||
@@ -316,12 +316,12 @@ static status_t build_auth_eap(private_ike_auth_t *this, message_t *message)
|
||||
if (!this->initiator)
|
||||
{
|
||||
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %D[%H]...[%H]%D",
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %H[%D]...[%D]%H",
|
||||
this->ike_sa->get_name(this->ike_sa),
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_my_host(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa));
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa));
|
||||
return SUCCESS;
|
||||
}
|
||||
return NEED_MORE;
|
||||
@@ -362,12 +362,12 @@ static status_t process_auth_eap(private_ike_auth_t *this, message_t *message)
|
||||
if (this->initiator)
|
||||
{
|
||||
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %D[%H]...[%H]%D",
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %H[%D]...[%D]%H",
|
||||
this->ike_sa->get_name(this->ike_sa),
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_my_host(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa));
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa));
|
||||
return SUCCESS;
|
||||
}
|
||||
return NEED_MORE;
|
||||
@@ -399,7 +399,7 @@ static status_t process_eap_i(private_ike_auth_t *this, message_t *message)
|
||||
return NEED_MORE;
|
||||
default:
|
||||
this->eap_payload = NULL;
|
||||
SIG(IKE_UP_FAILED, "failed to authenticate against %D using EAP",
|
||||
SIG(IKE_UP_FAILED, "failed to authenticate against '%D' using EAP",
|
||||
this->ike_sa->get_other_id(this->ike_sa));
|
||||
return FAILED;
|
||||
}
|
||||
@@ -562,7 +562,7 @@ static status_t build_r(private_ike_auth_t *this, message_t *message)
|
||||
config = this->ike_sa->get_peer_cfg(this->ike_sa);
|
||||
if (config == NULL)
|
||||
{
|
||||
SIG(IKE_UP_FAILED, "no matching config found for %D...%D",
|
||||
SIG(IKE_UP_FAILED, "no matching config found for '%D'...'%D'",
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa));
|
||||
message->add_notify(message, TRUE, AUTHENTICATION_FAILED, chunk_empty);
|
||||
@@ -580,12 +580,12 @@ static status_t build_r(private_ike_auth_t *this, message_t *message)
|
||||
if (this->peer_authenticated)
|
||||
{
|
||||
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %D[%H]...[%H]%D",
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %H[%D]...[%D]%H",
|
||||
this->ike_sa->get_name(this->ike_sa),
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_my_host(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa));
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -688,17 +688,17 @@ static status_t process_i(private_ike_auth_t *this, message_t *message)
|
||||
auth = this->ike_sa->get_other_auth(this->ike_sa);
|
||||
if (!auth->complies(auth, config->get_auth(config)))
|
||||
{
|
||||
SIG(IKE_UP_FAILED, "authorization of %D for config %s failed",
|
||||
SIG(IKE_UP_FAILED, "authorization of '%D' for config %s failed",
|
||||
this->ike_sa->get_other_id(this->ike_sa), config->get_name(config));
|
||||
return FAILED;
|
||||
}
|
||||
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %D[%H]...[%H]%D",
|
||||
SIG(IKE_UP_SUCCESS, "IKE_SA '%s' established between %H[%D]...[%D]%H",
|
||||
this->ike_sa->get_name(this->ike_sa),
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_my_host(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa));
|
||||
this->ike_sa->get_my_id(this->ike_sa),
|
||||
this->ike_sa->get_other_id(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ static void build_certs(private_ike_cert_post_t *this, message_t *message)
|
||||
{
|
||||
break;
|
||||
}
|
||||
DBG1(DBG_IKE, "sending end entity cert %D",
|
||||
DBG1(DBG_IKE, "sending end entity cert \"%D\"",
|
||||
cert->get_subject(cert));
|
||||
message->add_payload(message, (payload_t*)payload);
|
||||
|
||||
@@ -98,7 +98,7 @@ static void build_certs(private_ike_cert_post_t *this, message_t *message)
|
||||
payload = cert_payload_create_from_cert(cert);
|
||||
if (payload)
|
||||
{
|
||||
DBG1(DBG_IKE, "sending issuer cert %D",
|
||||
DBG1(DBG_IKE, "sending issuer cert \"%D\"",
|
||||
cert->get_subject(cert));
|
||||
message->add_payload(message, (payload_t*)payload);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ static void process_certreqs(private_ike_cert_pre_t *this, message_t *message)
|
||||
CERT_X509, KEY_ANY, id, TRUE);
|
||||
if (cert)
|
||||
{
|
||||
DBG1(DBG_IKE, "received cert request for %D",
|
||||
DBG1(DBG_IKE, "received cert request for \"%D\"",
|
||||
cert->get_subject(cert));
|
||||
auth->add_item(auth, AUTHN_CA_CERT, cert);
|
||||
cert->destroy(cert);
|
||||
@@ -133,14 +133,14 @@ static void process_certs(private_ike_cert_pre_t *this, message_t *message)
|
||||
if (first)
|
||||
{ /* the first certificate MUST be an end entity one */
|
||||
|
||||
DBG1(DBG_IKE, "received end entity cert %D",
|
||||
DBG1(DBG_IKE, "received end entity cert \"%D\"",
|
||||
cert->get_subject(cert));
|
||||
auth->add_item(auth, AUTHN_SUBJECT_CERT, cert);
|
||||
first = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG1(DBG_IKE, "received issuer cert %D",
|
||||
DBG1(DBG_IKE, "received issuer cert \"%D\"",
|
||||
cert->get_subject(cert));
|
||||
auth->add_item(auth, AUTHN_IM_CERT, cert);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ static void add_certreq_payload(message_t *message, certreq_payload_t **reqp,
|
||||
req = *reqp;
|
||||
keyid = public->get_id(public, ID_PUBKEY_INFO_SHA1);
|
||||
req->add_keyid(req, keyid->get_encoding(keyid));
|
||||
DBG1(DBG_IKE, "sending cert request for %D",
|
||||
DBG1(DBG_IKE, "sending cert request for \"%D\"",
|
||||
cert->get_subject(cert));
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user