]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
handle case where subject = NULL but keyid is set
authorAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 20 Feb 2012 11:12:31 +0000 (12:12 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 20 Feb 2012 11:12:31 +0000 (12:12 +0100)
src/pluto/ca.c

index 175c0b022bfe446a1d5fc5e6f076326ce09f4b90..827b981216a2c86ea7efe1685f11385d1e05fcc0 100644 (file)
@@ -219,7 +219,8 @@ cert_t* get_authcert(identification_t *subject, chunk_t keyid,
                }
 
                /* compare the subjectDistinguishedNames */
-               if (!certificate->has_subject(certificate, subject))
+               if (!(subject && certificate->has_subject(certificate, subject)) &&
+                        (subject || !keyid.ptr))
                {
                        continue;
                }