Fixed conftests after extending CERT payload.
authorTobias Brunner <tobias@strongswan.org>
Wed, 23 Nov 2011 11:11:49 +0000 (12:11 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 20 Mar 2012 16:30:50 +0000 (17:30 +0100)
src/conftest/hooks/ike_auth_fill.c
src/conftest/hooks/pretend_auth.c
src/libcharon/encoding/payloads/cert_payload.c

index 052a4be..ac26d1b 100644 (file)
@@ -108,7 +108,7 @@ METHOD(listener_t, message, bool,
                        diff = this->bytes - size - CERT_PAYLOAD_HEADER_LENGTH;
                        data = chunk_alloc(diff);
                        memset(data.ptr, 0x12, data.len);
-                       pld = cert_payload_create_custom(201, data);
+                       pld = cert_payload_create_custom(201, data, CERTIFICATE);
                        message->add_payload(message, &pld->payload_interface);
                        DBG1(DBG_CFG, "inserting %d dummy bytes certificate payload", diff);
                }
index f91b6bf..560864d 100644 (file)
@@ -154,7 +154,7 @@ static void build_certs(private_pretend_auth_t *this,
        cert = auth->get(auth, AUTH_RULE_SUBJECT_CERT);
        if (cert)
        {
-               payload = cert_payload_create_from_cert(cert);
+               payload = cert_payload_create_from_cert(cert, CERTIFICATE);
                if (payload)
                {
                        DBG1(DBG_IKE, "pretending end entity cert \"%Y\"",
@@ -167,7 +167,7 @@ static void build_certs(private_pretend_auth_t *this,
        {
                if (type == AUTH_RULE_IM_CERT)
                {
-                       payload = cert_payload_create_from_cert(cert);
+                       payload = cert_payload_create_from_cert(cert, CERTIFICATE);
                        if (payload)
                        {
                                DBG1(DBG_IKE, "pretending issuer cert \"%Y\"",
index cf97e96..af726ad 100644 (file)
@@ -332,7 +332,8 @@ cert_payload_t *cert_payload_create_from_cert(certificate_t *cert, payload_type_
 /*
  * Described in header
  */
-cert_payload_t *cert_payload_create_from_hash_and_url(chunk_t hash, char *url, payload_type_t type)
+cert_payload_t *cert_payload_create_from_hash_and_url(chunk_t hash, char *url,
+                                                                                                         payload_type_t type)
 {
        private_cert_payload_t *this = (private_cert_payload_t*)cert_payload_create(type);
 
@@ -345,7 +346,8 @@ cert_payload_t *cert_payload_create_from_hash_and_url(chunk_t hash, char *url, p
 /*
  * Described in header
  */
-cert_payload_t *cert_payload_create_custom(cert_encoding_t encoding, chunk_t data, payload_type_t type)
+cert_payload_t *cert_payload_create_custom(cert_encoding_t encoding,
+                                                                                  chunk_t data, payload_type_t type)
 {
        private_cert_payload_t *this = (private_cert_payload_t*)cert_payload_create(type);