load-tester: Fix crash if private key was not loaded successfully
authorTobias Brunner <tobias@strongswan.org>
Tue, 24 Sep 2013 07:24:59 +0000 (09:24 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 24 Sep 2013 07:27:12 +0000 (09:27 +0200)
Fixes #417.

src/libcharon/plugins/load_tester/load_tester_creds.c

index 946d620..028205b 100644 (file)
@@ -342,7 +342,7 @@ METHOD(credential_set_t, create_cert_enumerator, enumerator_t*,
        }
        enumerator->destroy(enumerator);
 
-       if (!trusted)
+       if (!trusted && this->private)
        {
                /* peer certificate, generate on demand */
                serial = htonl(++this->serial);