Fixed loading of private keys without password.
authorTobias Brunner <tobias@strongswan.org>
Wed, 4 Aug 2010 12:22:48 +0000 (14:22 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 4 Aug 2010 12:22:48 +0000 (14:22 +0200)
The chunk storing the password was not correctly initialized, resulting
in a segmentation fault when no password was specified in ipsec.secrets.

src/libcharon/plugins/stroke/stroke_cred.c

index 16fc844..8dd0bb0 100644 (file)
@@ -955,7 +955,7 @@ static bool load_private(private_stroke_cred_t *this, chunk_t line, int line_nr,
 {
        char path[PATH_MAX];
        chunk_t filename;
-       chunk_t secret;
+       chunk_t secret = chunk_empty;
        private_key_t *key;
 
        err_t ugh = extract_value(&filename, &line);