ikev2: Fix handling of more than one hash-and-URL certificate payloads
authorTobias Brunner <tobias@strongswan.org>
Thu, 4 Dec 2014 10:32:22 +0000 (11:32 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 4 Dec 2014 10:33:38 +0000 (11:33 +0100)
src/libcharon/sa/ikev2/tasks/ike_cert_pre.c

index 0dac975..ca17494 100644 (file)
@@ -229,12 +229,12 @@ static void process_x509(cert_payload_t *payload, auth_cfg_t *auth,
                        return;
                }
                url = strdup(url);
-               if (first)
+               if (*first)
                {       /* first URL is for an end entity certificate */
                        DBG1(DBG_IKE, "received hash-and-url for end entity cert \"%s\"",
                                 url);
                        auth->add(auth, AUTH_HELPER_SUBJECT_HASH_URL, url);
-                       first = FALSE;
+                       *first = FALSE;
                }
                else
                {