remove spaces within tabs (\t( )+\t)
This commit is contained in:
@@ -570,7 +570,7 @@ static certificate_t *get_better_ocsp(private_credential_manager_t *this,
|
||||
case VALIDATION_REVOKED:
|
||||
/* subject has been revoked by a valid OCSP response */
|
||||
DBG1(DBG_CFG, "certificate was revoked on %T, reason: %N",
|
||||
&revocation, TRUE, crl_reason_names, reason);
|
||||
&revocation, TRUE, crl_reason_names, reason);
|
||||
revoked = TRUE;
|
||||
break;
|
||||
case VALIDATION_GOOD:
|
||||
|
||||
@@ -926,7 +926,7 @@ static char* get_string(private_message_t *this, char *buf, int len)
|
||||
while (enumerator->enumerate(enumerator, &payload))
|
||||
{
|
||||
written = snprintf(pos, len, " %N", payload_type_short_names,
|
||||
payload->get_type(payload));
|
||||
payload->get_type(payload));
|
||||
if (written >= len || written < 0)
|
||||
{
|
||||
return buf;
|
||||
@@ -937,7 +937,7 @@ static char* get_string(private_message_t *this, char *buf, int len)
|
||||
{
|
||||
notify_payload_t *notify = (notify_payload_t*)payload;
|
||||
written = snprintf(pos, len, "(%N)", notify_type_short_names,
|
||||
notify->get_notify_type(notify));
|
||||
notify->get_notify_type(notify));
|
||||
if (written >= len || written < 0)
|
||||
{
|
||||
return buf;
|
||||
|
||||
@@ -123,45 +123,45 @@ static status_t verify(private_configuration_attribute_t *this)
|
||||
case INTERNAL_IP4_NBNS:
|
||||
case INTERNAL_ADDRESS_EXPIRY:
|
||||
case INTERNAL_IP4_DHCP:
|
||||
if (this->attribute_length != 0 && this->attribute_length != 4)
|
||||
{
|
||||
if (this->attribute_length != 0 && this->attribute_length != 4)
|
||||
{
|
||||
failed = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INTERNAL_IP4_SUBNET:
|
||||
if (this->attribute_length != 0 && this->attribute_length != 8)
|
||||
{
|
||||
if (this->attribute_length != 0 && this->attribute_length != 8)
|
||||
{
|
||||
failed = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INTERNAL_IP6_ADDRESS:
|
||||
case INTERNAL_IP6_SUBNET:
|
||||
if (this->attribute_length != 0 && this->attribute_length != 17)
|
||||
{
|
||||
if (this->attribute_length != 0 && this->attribute_length != 17)
|
||||
{
|
||||
failed = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INTERNAL_IP6_DNS:
|
||||
case INTERNAL_IP6_NBNS:
|
||||
case INTERNAL_IP6_DHCP:
|
||||
if (this->attribute_length != 0 && this->attribute_length != 16)
|
||||
{
|
||||
if (this->attribute_length != 0 && this->attribute_length != 16)
|
||||
{
|
||||
failed = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SUPPORTED_ATTRIBUTES:
|
||||
if (this->attribute_length % 2)
|
||||
{
|
||||
if (this->attribute_length % 2)
|
||||
{
|
||||
failed = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case APPLICATION_VERSION:
|
||||
/* any length acceptable */
|
||||
break;
|
||||
/* any length acceptable */
|
||||
break;
|
||||
default:
|
||||
DBG1(DBG_ENC, "unknown attribute type %N",
|
||||
configuration_attribute_type_names, this->attribute_type);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (failed)
|
||||
|
||||
@@ -89,7 +89,7 @@ encoding_rule_t id_payload_encodings[] = {
|
||||
/* Length of the whole payload*/
|
||||
{ PAYLOAD_LENGTH, offsetof(private_id_payload_t, payload_length) },
|
||||
/* 1 Byte ID type*/
|
||||
{ U_INT_8, offsetof(private_id_payload_t, id_type) },
|
||||
{ U_INT_8, offsetof(private_id_payload_t, id_type) },
|
||||
/* 3 reserved bytes */
|
||||
{ RESERVED_BYTE, 0 },
|
||||
{ RESERVED_BYTE, 0 },
|
||||
|
||||
@@ -51,7 +51,7 @@ struct nonce_payload_t {
|
||||
/**
|
||||
* Set the nonce value.
|
||||
*
|
||||
* @param nonce chunk containing the nonce, will be cloned
|
||||
* @param nonce chunk containing the nonce, will be cloned
|
||||
*/
|
||||
void (*set_nonce) (nonce_payload_t *this, chunk_t nonce);
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ encoding_rule_t notify_payload_encodings[] = {
|
||||
/* Notify message type as 16 bit field*/
|
||||
{ U_INT_16, offsetof(private_notify_payload_t, notify_type) },
|
||||
/* SPI as variable length field*/
|
||||
{ SPI, offsetof(private_notify_payload_t, spi) },
|
||||
{ SPI, offsetof(private_notify_payload_t, spi) },
|
||||
/* Key Exchange Data is from variable size */
|
||||
{ NOTIFICATION_DATA, offsetof(private_notify_payload_t, notification_data) }
|
||||
};
|
||||
|
||||
@@ -1197,8 +1197,8 @@ static status_t peer_process_challenge(private_eap_aka_t *this,
|
||||
chunk_free(&this->k);
|
||||
if (load_key(this->peer, this->server, &this->k) != SUCCESS)
|
||||
{
|
||||
*out = build_aka_payload(this, EAP_RESPONSE, identifier,
|
||||
AKA_AUTHENTICATION_REJECT, AT_END);
|
||||
*out = build_aka_payload(this, EAP_RESPONSE, identifier,
|
||||
AKA_AUTHENTICATION_REJECT, AT_END);
|
||||
DBG3(DBG_IKE, "no shared key found for IDs '%Y' - '%Y' to authenticate "
|
||||
"with EAP-AKA, sending %N", this->peer, this->server,
|
||||
aka_subtype_names, AKA_AUTHENTICATION_REJECT);
|
||||
@@ -1230,8 +1230,8 @@ static status_t peer_process_challenge(private_eap_aka_t *this,
|
||||
f1(this, this->k, this->rand, sqn, amf, xmac.ptr);
|
||||
if (!chunk_equals(mac, xmac))
|
||||
{
|
||||
*out = build_aka_payload(this, EAP_RESPONSE, identifier,
|
||||
AKA_AUTHENTICATION_REJECT, AT_END);
|
||||
*out = build_aka_payload(this, EAP_RESPONSE, identifier,
|
||||
AKA_AUTHENTICATION_REJECT, AT_END);
|
||||
DBG1(DBG_IKE, "received MAC does not match XMAC, sending %N",
|
||||
aka_subtype_names, AKA_AUTHENTICATION_REJECT);
|
||||
DBG3(DBG_IKE, "MAC %B\nXMAC %B", &mac, &xmac);
|
||||
@@ -1258,9 +1258,9 @@ static status_t peer_process_challenge(private_eap_aka_t *this,
|
||||
memxor(aks.ptr, peer_sqn.ptr, aks.len);
|
||||
auts = chunk_cata("cc", aks, macs);
|
||||
|
||||
*out = build_aka_payload(this, EAP_RESPONSE, identifier,
|
||||
AKA_SYNCHRONIZATION_FAILURE,
|
||||
AT_AUTS, auts, AT_END);
|
||||
*out = build_aka_payload(this, EAP_RESPONSE, identifier,
|
||||
AKA_SYNCHRONIZATION_FAILURE,
|
||||
AT_AUTS, auts, AT_END);
|
||||
DBG1(DBG_IKE, "received SQN invalid, sending %N",
|
||||
aka_subtype_names, AKA_SYNCHRONIZATION_FAILURE);
|
||||
DBG3(DBG_IKE, "received SQN %B\ncurrent SQN %B", &sqn, &peer_sqn);
|
||||
@@ -1363,8 +1363,8 @@ static status_t peer_process_notification(private_eap_aka_t *this,
|
||||
if (attribute >= 0 && attribute <= 127)
|
||||
{
|
||||
DBG1(DBG_IKE, "ignoring non-skippable attribute %N in %N",
|
||||
aka_attribute_names, attribute, aka_subtype_names,
|
||||
AKA_NOTIFICATION);
|
||||
aka_attribute_names, attribute, aka_subtype_names,
|
||||
AKA_NOTIFICATION);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1035,9 +1035,9 @@ static status_t process_server_response(private_eap_mschapv2_t *this,
|
||||
/* FIXME: windows 7 always sends the username that is first entered in
|
||||
* the username box, even, if the user changes it during retries (probably
|
||||
* to keep consistent with the EAP-Identity).
|
||||
* thus, we could actually fail here, because retries do not make much
|
||||
* sense. on the other hand, an attacker could guess usernames, if the
|
||||
* error messages were different. */
|
||||
* thus, we could actually fail here, because retries do not make much
|
||||
* sense. on the other hand, an attacker could guess usernames, if the
|
||||
* error messages were different. */
|
||||
userid->destroy(userid);
|
||||
return process_server_retry(this, out);
|
||||
}
|
||||
|
||||
@@ -475,17 +475,17 @@ static status_t peer_process_start(private_eap_sim_t *this, eap_payload_t *in,
|
||||
if (code <= 32767) /* no success bit */
|
||||
{
|
||||
DBG1(DBG_IKE, "received %N error %d",
|
||||
sim_attribute_names, attribute, code);
|
||||
sim_attribute_names, attribute, code);
|
||||
*out = build_payload(this,
|
||||
in->get_identifier(in), SIM_CLIENT_ERROR,
|
||||
AT_CLIENT_ERROR_CODE, client_error_general,
|
||||
AT_CLIENT_ERROR_CODE, client_error_general,
|
||||
AT_END);
|
||||
return NEED_MORE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG1(DBG_IKE, "received %N code %d",
|
||||
sim_attribute_names, attribute, code);
|
||||
sim_attribute_names, attribute, code);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -623,17 +623,17 @@ static status_t peer_process_challenge(private_eap_sim_t *this,
|
||||
if (code <= 32767) /* no success bit */
|
||||
{
|
||||
DBG1(DBG_IKE, "received %N error %d",
|
||||
sim_attribute_names, attribute, code);
|
||||
sim_attribute_names, attribute, code);
|
||||
*out = build_payload(this,
|
||||
in->get_identifier(in), SIM_CLIENT_ERROR,
|
||||
AT_CLIENT_ERROR_CODE, client_error_general,
|
||||
AT_CLIENT_ERROR_CODE, client_error_general,
|
||||
AT_END);
|
||||
return NEED_MORE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG1(DBG_IKE, "received %N code %d",
|
||||
sim_attribute_names, attribute, code);
|
||||
sim_attribute_names, attribute, code);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -877,17 +877,17 @@ static status_t peer_process_notification(private_eap_sim_t *this,
|
||||
if (code <= 32767) /* no success bit */
|
||||
{
|
||||
DBG1(DBG_IKE, "received %N error %d",
|
||||
sim_attribute_names, attribute, code);
|
||||
sim_attribute_names, attribute, code);
|
||||
*out = build_payload(this,
|
||||
in->get_identifier(in), SIM_CLIENT_ERROR,
|
||||
AT_CLIENT_ERROR_CODE, client_error_general,
|
||||
AT_CLIENT_ERROR_CODE, client_error_general,
|
||||
AT_END);
|
||||
return NEED_MORE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG1(DBG_IKE, "received %N code %d",
|
||||
sim_attribute_names, attribute, code);
|
||||
sim_attribute_names, attribute, code);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -924,7 +924,7 @@ static status_t server_process_client_error(private_eap_sim_t *this,
|
||||
code = ntohs(*(u_int16_t*)data.ptr);
|
||||
}
|
||||
DBG1(DBG_IKE, "received %N error %d",
|
||||
sim_attribute_names, attribute, code);
|
||||
sim_attribute_names, attribute, code);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -784,7 +784,7 @@ static kernel_algorithm_t encryption_algs[] = {
|
||||
/* {ENCR_3IDEA, 0 }, */
|
||||
/* {ENCR_DES_IV32, 0 }, */
|
||||
{ENCR_NULL, SADB_EALG_NULL },
|
||||
{ENCR_AES_CBC, SADB_EALG_AESCBC },
|
||||
{ENCR_AES_CBC, SADB_EALG_AESCBC },
|
||||
/* {ENCR_AES_CTR, 0 }, */
|
||||
/* {ENCR_AES_CCM_ICV8, 0 }, */
|
||||
/* {ENCR_AES_CCM_ICV12, 0 }, */
|
||||
|
||||
@@ -172,7 +172,7 @@ static kernel_algorithm_t encryption_algs[] = {
|
||||
/* {ENCR_3IDEA, "***" }, */
|
||||
/* {ENCR_DES_IV32, "***" }, */
|
||||
{ENCR_NULL, "cipher_null" },
|
||||
{ENCR_AES_CBC, "aes" },
|
||||
{ENCR_AES_CBC, "aes" },
|
||||
{ENCR_AES_CTR, "rfc3686(ctr(aes))" },
|
||||
{ENCR_AES_CCM_ICV8, "rfc4309(ccm(aes))" },
|
||||
{ENCR_AES_CCM_ICV12, "rfc4309(ccm(aes))" },
|
||||
|
||||
@@ -1079,7 +1079,7 @@ static status_t del_ip(private_kernel_netlink_net_t *this, host_t *virtual_ip)
|
||||
if (addr->refcount == 1)
|
||||
{
|
||||
status = manage_ipaddr(this, RTM_DELADDR, 0,
|
||||
ifindex, virtual_ip);
|
||||
ifindex, virtual_ip);
|
||||
if (status == SUCCESS)
|
||||
{ /* wait until the address is really gone */
|
||||
while (get_vip_refcount(this, virtual_ip) > 0)
|
||||
|
||||
@@ -166,7 +166,7 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam
|
||||
this->rekey*5, this->rekey*3, /* jitter, overtime */
|
||||
TRUE, this->dpd, /* mobike, dpddelay */
|
||||
NULL, NULL, /* vip, pool */
|
||||
FALSE, med_cfg, /* mediation, med by */
|
||||
FALSE, med_cfg, /* mediation, med by */
|
||||
identification_create_from_encoding(ID_KEY_ID, other));
|
||||
|
||||
auth = auth_cfg_create();
|
||||
|
||||
@@ -93,7 +93,7 @@ static bool section_enumerator_enumerate(section_enumerator_t *this, ...)
|
||||
{
|
||||
value = va_arg(args, char**);
|
||||
if (value && uci_lookup(this->ctx, &element, this->package,
|
||||
this->current->name, this->keywords[i]) == UCI_OK)
|
||||
this->current->name, this->keywords[i]) == UCI_OK)
|
||||
{
|
||||
*value = uci_to_option(element)->value;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ static void execute(private_migrate_job_t *this)
|
||||
|
||||
if (child_sa->update(child_sa, this->local, this->remote,
|
||||
ike_sa->get_virtual_ip(ike_sa, TRUE),
|
||||
ike_sa->has_condition(ike_sa, COND_NAT_ANY)) == NOT_SUPPORTED)
|
||||
ike_sa->has_condition(ike_sa, COND_NAT_ANY)) == NOT_SUPPORTED)
|
||||
{
|
||||
ike_sa->rekey_child_sa(ike_sa, child_sa->get_protocol(child_sa),
|
||||
child_sa->get_spi(child_sa, TRUE));
|
||||
|
||||
@@ -718,7 +718,7 @@ static status_t update(private_child_sa_t *this, host_t *me, host_t *other,
|
||||
{
|
||||
if (charon->kernel_interface->update_sa(charon->kernel_interface,
|
||||
this->other_spi, this->protocol,
|
||||
this->ipcomp != IPCOMP_NONE ? this->other_cpi : 0,
|
||||
this->ipcomp != IPCOMP_NONE ? this->other_cpi : 0,
|
||||
this->my_addr, this->other_addr, me, other,
|
||||
this->encap, encap) == NOT_SUPPORTED)
|
||||
{
|
||||
|
||||
@@ -1718,7 +1718,7 @@ static void set_auth_lifetime(private_ike_sa_t *this, u_int32_t lifetime)
|
||||
DBG1(DBG_IKE, "received AUTH_LIFETIME of %ds, starting reauthentication",
|
||||
lifetime);
|
||||
charon->processor->queue_job(charon->processor,
|
||||
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE));
|
||||
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE));
|
||||
}
|
||||
else if (this->stats[STAT_REAUTH] == 0 ||
|
||||
this->stats[STAT_REAUTH] > reauth_time)
|
||||
@@ -1914,7 +1914,7 @@ static status_t inherit(private_ike_sa_t *this, private_ike_sa_t *other)
|
||||
|
||||
/* adopt all children */
|
||||
while (other->child_sas->remove_last(other->child_sas,
|
||||
(void**)&child_sa) == SUCCESS)
|
||||
(void**)&child_sa) == SUCCESS)
|
||||
{
|
||||
this->child_sas->insert_first(this->child_sas, (void*)child_sa);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ struct ike_sa_manager_t {
|
||||
* @return checked out/created IKE_SA
|
||||
*/
|
||||
ike_sa_t* (*checkout_by_config) (ike_sa_manager_t* this,
|
||||
peer_cfg_t *peer_cfg);
|
||||
peer_cfg_t *peer_cfg);
|
||||
|
||||
/**
|
||||
* Check for duplicates of the given IKE_SA.
|
||||
|
||||
@@ -892,7 +892,7 @@ static status_t process_message(private_task_manager_t *this, message_t *msg)
|
||||
host_t *me, *other;
|
||||
|
||||
DBG1(DBG_IKE, "received retransmit of request with ID %d, "
|
||||
"retransmitting response", mid);
|
||||
"retransmitting response", mid);
|
||||
clone = this->responding.packet->clone(this->responding.packet);
|
||||
me = msg->get_destination(msg);
|
||||
other = msg->get_source(msg);
|
||||
|
||||
@@ -253,7 +253,7 @@ static status_t process_i(private_child_rekey_t *this, message_t *message)
|
||||
this->child_sa->get_protocol(this->child_sa),
|
||||
this->child_sa->get_spi(this->child_sa, TRUE));
|
||||
DBG1(DBG_IKE, "CHILD_SA rekeying failed, "
|
||||
"trying again in %d seconds", retry);
|
||||
"trying again in %d seconds", retry);
|
||||
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, retry);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ struct child_rekey_t {
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param protocol protocol of CHILD_SA to rekey, PROTO_NONE as responder
|
||||
* @param spi inbound SPI of CHILD_SA to rekey
|
||||
* @return child_rekey task to handle by the task_manager
|
||||
* @return child_rekey task to handle by the task_manager
|
||||
*/
|
||||
child_rekey_t *child_rekey_create(ike_sa_t *ike_sa, protocol_id_t protocol,
|
||||
u_int32_t spi);
|
||||
|
||||
@@ -46,7 +46,7 @@ struct ike_auth_lifetime_t {
|
||||
*
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param initiator TRUE if taks is initiated by us
|
||||
* @return ike_auth_lifetime task to handle by the task_manager
|
||||
* @return ike_auth_lifetime task to handle by the task_manager
|
||||
*/
|
||||
ike_auth_lifetime_t *ike_auth_lifetime_create(ike_sa_t *ike_sa, bool initiator);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ struct ike_cert_post_t {
|
||||
*
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param initiator TRUE if thask is the original initator
|
||||
* @return ike_cert_post task to handle by the task_manager
|
||||
* @return ike_cert_post task to handle by the task_manager
|
||||
*/
|
||||
ike_cert_post_t *ike_cert_post_create(ike_sa_t *ike_sa, bool initiator);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ struct ike_cert_pre_t {
|
||||
*
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param initiator TRUE if thask is the original initator
|
||||
* @return ike_cert_pre task to handle by the task_manager
|
||||
* @return ike_cert_pre task to handle by the task_manager
|
||||
*/
|
||||
ike_cert_pre_t *ike_cert_pre_create(ike_sa_t *ike_sa, bool initiator);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ struct ike_config_t {
|
||||
*
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param initiator TRUE for initiator
|
||||
* @return ike_config task to handle by the task_manager
|
||||
* @return ike_config task to handle by the task_manager
|
||||
*/
|
||||
ike_config_t *ike_config_create(ike_sa_t *ike_sa, bool initiator);
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ struct ike_me_t {
|
||||
*
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param initiator TRUE if taks is initiated by us
|
||||
* @return ike_me task to handle by the task_manager
|
||||
* @return ike_me task to handle by the task_manager
|
||||
*/
|
||||
ike_me_t *ike_me_create(ike_sa_t *ike_sa, bool initiator);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ struct ike_mobike_t {
|
||||
*
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param initiator TRUE if taks is initiated by us
|
||||
* @return ike_mobike task to handle by the task_manager
|
||||
* @return ike_mobike task to handle by the task_manager
|
||||
*/
|
||||
ike_mobike_t *ike_mobike_create(ike_sa_t *ike_sa, bool initiator);
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
|
||||
job = (job_t*)rekey_ike_sa_job_create(
|
||||
this->ike_sa->get_id(this->ike_sa), FALSE);
|
||||
DBG1(DBG_IKE, "IKE_SA rekeying failed, "
|
||||
"trying again in %d seconds", retry);
|
||||
"trying again in %d seconds", retry);
|
||||
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, retry);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ struct ike_rekey_t {
|
||||
*
|
||||
* @param ike_sa IKE_SA this task works for
|
||||
* @param initiator TRUE for initiator, FALSE for responder
|
||||
* @return IKE_REKEY task to handle by the task_manager
|
||||
* @return IKE_REKEY task to handle by the task_manager
|
||||
*/
|
||||
ike_rekey_t *ike_rekey_create(ike_sa_t *ike_sa, bool initiator);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ enum hash_algorithm_t {
|
||||
/** not specified hash function */
|
||||
HASH_UNKNOWN = 0,
|
||||
/** preferred hash function, general purpose */
|
||||
HASH_PREFERRED = 1,
|
||||
HASH_PREFERRED = 1,
|
||||
HASH_MD2 = 2,
|
||||
HASH_MD4 = 3,
|
||||
HASH_MD5 = 4,
|
||||
|
||||
@@ -251,9 +251,9 @@ static const asn1Object_t signedDataObjects[] = {
|
||||
{ 1, "end loop", ASN1_EOC, ASN1_END }, /* 25 */
|
||||
{ 0, "exit", ASN1_EOC, ASN1_EXIT }
|
||||
};
|
||||
#define PKCS7_DIGEST_ALG 3
|
||||
#define PKCS7_DIGEST_ALG 3
|
||||
#define PKCS7_SIGNED_CONTENT_INFO 5
|
||||
#define PKCS7_SIGNED_CERT 7
|
||||
#define PKCS7_SIGNED_CERT 7
|
||||
#define PKCS7_SIGNER_INFO 13
|
||||
#define PKCS7_SIGNED_ISSUER 16
|
||||
#define PKCS7_SIGNED_SERIAL_NUMBER 17
|
||||
@@ -460,7 +460,7 @@ static const asn1Object_t envelopedDataObjects[] = {
|
||||
{ 2, "contentType", ASN1_OID, ASN1_BODY }, /* 12 */
|
||||
{ 2, "contentEncryptionAlgorithm", ASN1_EOC, ASN1_RAW }, /* 13 */
|
||||
{ 2, "encryptedContent", ASN1_CONTEXT_S_0, ASN1_BODY }, /* 14 */
|
||||
{ 0, "exit", ASN1_EOC, ASN1_EXIT }
|
||||
{ 0, "exit", ASN1_EOC, ASN1_EXIT }
|
||||
};
|
||||
#define PKCS7_ENVELOPED_VERSION 1
|
||||
#define PKCS7_RECIPIENT_INFO_VERSION 4
|
||||
@@ -554,7 +554,7 @@ static bool parse_envelopedData(private_pkcs7_t *this, chunk_t serialNumber,
|
||||
if (known_oid(object) != OID_PKCS7_DATA)
|
||||
{
|
||||
DBG1("encrypted content not of type pkcs7 data");
|
||||
goto end;
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
case PKCS7_CONTENT_ENC_ALGORITHM:
|
||||
@@ -792,7 +792,7 @@ bool build_envelopedData(private_pkcs7_t *this, x509_t *cert,
|
||||
in.ptr = malloc(in.len);
|
||||
|
||||
DBG2(" padding %d bytes of data to multiple block size of %d bytes",
|
||||
(int)this->data.len, (int)in.len);
|
||||
(int)this->data.len, (int)in.len);
|
||||
|
||||
/* copy data */
|
||||
memcpy(in.ptr, this->data.ptr, this->data.len);
|
||||
@@ -888,7 +888,7 @@ bool build_signedData(private_pkcs7_t *this, rsa_private_key_t *private_key,
|
||||
this->attributes->set_messageDigest(this->attributes,
|
||||
messageDigest);
|
||||
this->attributes->set_attribute(this->attributes,
|
||||
OID_PKCS9_SIGNING_TIME, signingTime);
|
||||
OID_PKCS9_SIGNING_TIME, signingTime);
|
||||
attributes = this->attributes->get_encoding(this->attributes);
|
||||
|
||||
free(messageDigest.ptr);
|
||||
|
||||
@@ -227,7 +227,7 @@ static void MD4Update(private_md4_hasher_t *this, u_int8_t *input, size_t inputL
|
||||
|
||||
for (i = partLen; i + 63 < inputLen; i += 64)
|
||||
{
|
||||
MD4Transform (this->state, &input[i]);
|
||||
MD4Transform (this->state, &input[i]);
|
||||
}
|
||||
index = 0;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ static u_char ASN1_authorityKeyIdentifier_oid_str[] = {
|
||||
};
|
||||
|
||||
static const chunk_t ASN1_authorityKeyIdentifier_oid =
|
||||
chunk_from_buf(ASN1_authorityKeyIdentifier_oid_str);
|
||||
chunk_from_buf(ASN1_authorityKeyIdentifier_oid_str);
|
||||
|
||||
static u_char ASN1_noRevAvail_ext_str[] = {
|
||||
0x30, 0x09,
|
||||
@@ -293,7 +293,7 @@ static const asn1Object_t acObjects[] =
|
||||
{ 3, "baseCertificateID", ASN1_CONTEXT_C_0, ASN1_OPT }, /* 21 */
|
||||
{ 4, "issuerSerial", ASN1_SEQUENCE, ASN1_NONE }, /* 22 */
|
||||
{ 5, "issuer", ASN1_SEQUENCE, ASN1_OBJ }, /* 23 */
|
||||
{ 5, "serial", ASN1_INTEGER, ASN1_BODY }, /* 24 */
|
||||
{ 5, "serial", ASN1_INTEGER, ASN1_BODY }, /* 24 */
|
||||
{ 5, "issuerUID", ASN1_BIT_STRING, ASN1_OPT |
|
||||
ASN1_BODY }, /* 25 */
|
||||
{ 5, "end opt", ASN1_EOC, ASN1_END }, /* 26 */
|
||||
@@ -301,7 +301,7 @@ static const asn1Object_t acObjects[] =
|
||||
{ 3, "objectDigestInfo", ASN1_CONTEXT_C_1, ASN1_OPT }, /* 28 */
|
||||
{ 4, "digestInfo", ASN1_SEQUENCE, ASN1_OBJ }, /* 29 */
|
||||
{ 5, "digestedObjectType", ASN1_ENUMERATED, ASN1_BODY }, /* 30 */
|
||||
{ 5, "otherObjectTypeID", ASN1_OID, ASN1_OPT |
|
||||
{ 5, "otherObjectTypeID", ASN1_OID, ASN1_OPT |
|
||||
ASN1_BODY }, /* 31 */
|
||||
{ 5, "end opt", ASN1_EOC, ASN1_END }, /* 32 */
|
||||
{ 5, "digestAlgorithm", ASN1_EOC, ASN1_RAW }, /* 33 */
|
||||
|
||||
@@ -291,10 +291,10 @@ static const asn1Object_t generalNameObjects[] = {
|
||||
{ 0, "end choice", ASN1_EOC, ASN1_END }, /* 17 */
|
||||
{ 0, "exit", ASN1_EOC, ASN1_EXIT }
|
||||
};
|
||||
#define GN_OBJ_OTHER_NAME 0
|
||||
#define GN_OBJ_RFC822_NAME 2
|
||||
#define GN_OBJ_DNS_NAME 4
|
||||
#define GN_OBJ_X400_ADDRESS 6
|
||||
#define GN_OBJ_OTHER_NAME 0
|
||||
#define GN_OBJ_RFC822_NAME 2
|
||||
#define GN_OBJ_DNS_NAME 4
|
||||
#define GN_OBJ_X400_ADDRESS 6
|
||||
#define GN_OBJ_DIRECTORY_NAME 8
|
||||
#define GN_OBJ_EDI_PARTY_NAME 10
|
||||
#define GN_OBJ_URI 12
|
||||
@@ -765,7 +765,7 @@ static bool parse_certificate(private_x509_cert_t *this)
|
||||
break;
|
||||
case OID_AUTHORITY_KEY_ID:
|
||||
this->authKeyIdentifier = x509_parse_authorityKeyIdentifier(object,
|
||||
level, &this->authKeySerialNumber);
|
||||
level, &this->authKeySerialNumber);
|
||||
break;
|
||||
case OID_AUTHORITY_INFO_ACCESS:
|
||||
parse_authorityInfoAccess(object, level, this);
|
||||
|
||||
@@ -150,7 +150,7 @@ static const asn1Object_t crlObjects[] = {
|
||||
{ 4, "userCertificate", ASN1_INTEGER, ASN1_BODY }, /* 10 */
|
||||
{ 4, "revocationDate", ASN1_EOC, ASN1_RAW }, /* 11 */
|
||||
{ 4, "crlEntryExtensions", ASN1_SEQUENCE, ASN1_OPT |
|
||||
ASN1_LOOP }, /* 12 */
|
||||
ASN1_LOOP }, /* 12 */
|
||||
{ 5, "extension", ASN1_SEQUENCE, ASN1_NONE }, /* 13 */
|
||||
{ 6, "extnID", ASN1_OID, ASN1_BODY }, /* 14 */
|
||||
{ 6, "critical", ASN1_BOOLEAN, ASN1_DEF |
|
||||
@@ -268,7 +268,7 @@ static bool parse(private_x509_crl_t *this)
|
||||
{
|
||||
|
||||
this->authKeyIdentifier = x509_parse_authorityKeyIdentifier(object,
|
||||
level, &this->authKeySerialNumber);
|
||||
level, &this->authKeySerialNumber);
|
||||
}
|
||||
else if (extn_oid == OID_CRL_NUMBER)
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ struct linked_list_t {
|
||||
/**
|
||||
* Returns the value of the first list item without removing it.
|
||||
*
|
||||
* @param this calling object
|
||||
* @param this calling object
|
||||
* @param item returned value of first item
|
||||
* @return SUCCESS, NOT_FOUND if list is empty
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ struct linked_list_t {
|
||||
/**
|
||||
* Removes the last item in the list and returns its value.
|
||||
*
|
||||
* @param this calling object
|
||||
* @param this calling object
|
||||
* @param item returned value of last item, or NULL
|
||||
* @return SUCCESS, NOT_FOUND if list is empty
|
||||
*/
|
||||
|
||||
+2
-2
@@ -272,7 +272,7 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 0: /* long option already handled */
|
||||
continue;
|
||||
continue;
|
||||
|
||||
case ':': /* diagnostic already printed by getopt_long */
|
||||
case '?': /* diagnostic already printed by getopt_long */
|
||||
@@ -303,7 +303,7 @@ int main(int argc, char **argv)
|
||||
status = 1;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
||||
case 'q': /* --quiet */
|
||||
|
||||
+2
-2
@@ -123,7 +123,7 @@ static const asn1Object_t acObjects[] =
|
||||
{ 3, "baseCertificateID", ASN1_CONTEXT_C_0, ASN1_OPT }, /* 21 */
|
||||
{ 4, "issuerSerial", ASN1_SEQUENCE, ASN1_NONE }, /* 22 */
|
||||
{ 5, "issuer", ASN1_SEQUENCE, ASN1_OBJ }, /* 23 */
|
||||
{ 5, "serial", ASN1_INTEGER, ASN1_BODY }, /* 24 */
|
||||
{ 5, "serial", ASN1_INTEGER, ASN1_BODY }, /* 24 */
|
||||
{ 5, "issuerUID", ASN1_BIT_STRING, ASN1_OPT |
|
||||
ASN1_BODY }, /* 25 */
|
||||
{ 5, "end opt", ASN1_EOC, ASN1_END }, /* 26 */
|
||||
@@ -131,7 +131,7 @@ static const asn1Object_t acObjects[] =
|
||||
{ 3, "objectDigestInfo", ASN1_CONTEXT_C_1, ASN1_OPT }, /* 28 */
|
||||
{ 4, "digestInfo", ASN1_SEQUENCE, ASN1_OBJ }, /* 29 */
|
||||
{ 5, "digestedObjectType", ASN1_ENUMERATED, ASN1_BODY }, /* 30 */
|
||||
{ 5, "otherObjectTypeID", ASN1_OID, ASN1_OPT |
|
||||
{ 5, "otherObjectTypeID", ASN1_OID, ASN1_OPT |
|
||||
ASN1_BODY }, /* 31 */
|
||||
{ 5, "end opt", ASN1_EOC, ASN1_END }, /* 32 */
|
||||
{ 5, "digestAlgorithm", ASN1_EOC, ASN1_RAW }, /* 33 */
|
||||
|
||||
@@ -397,7 +397,7 @@ static status_t alg_info_parse_str(struct alg_info *alg_info, char *alg_str)
|
||||
{
|
||||
case PROTO_IPSEC_ESP:
|
||||
alg_info_esp_add(alg_info, ealg, ealg_keysize,
|
||||
aalg, aalg_keysize);
|
||||
aalg, aalg_keysize);
|
||||
break;
|
||||
case PROTO_ISAKMP:
|
||||
alg_info_ike_add(alg_info, ealg, ealg_keysize,
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ static const asn1Object_t crlObjects[] = {
|
||||
{ 4, "userCertificate", ASN1_INTEGER, ASN1_BODY }, /* 10 */
|
||||
{ 4, "revocationDate", ASN1_EOC, ASN1_RAW }, /* 11 */
|
||||
{ 4, "crlEntryExtensions", ASN1_SEQUENCE, ASN1_OPT |
|
||||
ASN1_LOOP }, /* 12 */
|
||||
ASN1_LOOP }, /* 12 */
|
||||
{ 5, "extension", ASN1_SEQUENCE, ASN1_NONE }, /* 13 */
|
||||
{ 6, "extnID", ASN1_OID, ASN1_BODY }, /* 14 */
|
||||
{ 6, "critical", ASN1_BOOLEAN, ASN1_DEF |
|
||||
|
||||
+2
-2
@@ -942,8 +942,8 @@ static bool raw_eroute(const ip_address *this_host,
|
||||
const ip_subnet *this_client,
|
||||
const ip_address *that_host,
|
||||
const ip_subnet *that_client,
|
||||
ipsec_spi_t spi,
|
||||
unsigned int proto,
|
||||
ipsec_spi_t spi,
|
||||
unsigned int proto,
|
||||
unsigned int satype,
|
||||
unsigned int transport_proto,
|
||||
const struct pfkey_proto_info *proto_info,
|
||||
|
||||
+1
-1
@@ -1536,7 +1536,7 @@ void parse_ocsp(ocsp_location_t *location, chunk_t blob)
|
||||
single_response_t sres = empty_single_response;
|
||||
|
||||
if (!parse_ocsp_single_response(object,
|
||||
parser->get_level(parser)+1, &sres))
|
||||
parser->get_level(parser)+1, &sres))
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
|
||||
+1
-1
@@ -758,7 +758,7 @@ chunk_t pkcs7_build_envelopedData(chunk_t data, const x509cert_t *cert, int enc_
|
||||
in.ptr = malloc(in.len);
|
||||
|
||||
DBG2("padding %u bytes of data to multiple block size of %u bytes",
|
||||
data.len, in.len);
|
||||
data.len, in.len);
|
||||
|
||||
/* copy data */
|
||||
memcpy(in.ptr, data.ptr, data.len);
|
||||
|
||||
+1
-1
@@ -341,7 +341,7 @@ void init_vendorid(void)
|
||||
chunk_t vid_data = { (u_char *)vid->data, strlen(vid->data) };
|
||||
|
||||
/** VendorID is a string to hash with MD5 **/
|
||||
hasher->allocate_hash(hasher, vid_data, &vid->vid);
|
||||
hasher->allocate_hash(hasher, vid_data, &vid->vid);
|
||||
}
|
||||
|
||||
if (vid->descr == NULL)
|
||||
|
||||
+5
-5
@@ -137,10 +137,10 @@ static const asn1Object_t generalNameObjects[] = {
|
||||
{ 0, "end choice", ASN1_EOC, ASN1_END }, /* 17 */
|
||||
{ 0, "exit", ASN1_EOC, ASN1_EXIT }
|
||||
};
|
||||
#define GN_OBJ_OTHER_NAME 0
|
||||
#define GN_OBJ_RFC822_NAME 2
|
||||
#define GN_OBJ_DNS_NAME 4
|
||||
#define GN_OBJ_X400_ADDRESS 6
|
||||
#define GN_OBJ_OTHER_NAME 0
|
||||
#define GN_OBJ_RFC822_NAME 2
|
||||
#define GN_OBJ_DNS_NAME 4
|
||||
#define GN_OBJ_X400_ADDRESS 6
|
||||
#define GN_OBJ_DIRECTORY_NAME 8
|
||||
#define GN_OBJ_EDI_PARTY_NAME 10
|
||||
#define GN_OBJ_URI 12
|
||||
@@ -1595,7 +1595,7 @@ void parse_authorityKeyIdentifier(chunk_t blob, int level0,
|
||||
case AUTH_KEY_ID_CERT_ISSUER:
|
||||
{
|
||||
generalName_t * gn = parse_generalNames(object,
|
||||
parser->get_level(parser) + 1, TRUE);
|
||||
parser->get_level(parser) + 1, TRUE);
|
||||
|
||||
free_generalNames(gn, FALSE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user