diff options
author | Egbert Koening <e.kunig@home.nl> | 2010-10-15 11:09:24 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-10-15 11:09:38 +0200 |
commit | 4de8398f931e1777c685710c87ad412bcf6715c4 (patch) | |
tree | f6ab4feebf6a8736a810f59f4e0bbcef19f09162 /src/pluto/connections.c | |
parent | d3622166dd0ce4670e2a2a8967198ac50b77d2d3 (diff) | |
download | strongswan-4de8398f931e1777c685710c87ad412bcf6715c4.tar.bz2 strongswan-4de8398f931e1777c685710c87ad412bcf6715c4.tar.xz |
fix segfault when reading certificate from smartcard
Diffstat (limited to 'src/pluto/connections.c')
-rw-r--r-- | src/pluto/connections.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pluto/connections.c b/src/pluto/connections.c index 2a3421961..9f277e135 100644 --- a/src/pluto/connections.c +++ b/src/pluto/connections.c @@ -874,7 +874,8 @@ static void load_end_certificate(char *filename, struct end *dst) /* cache the certificate that was last retrieved from the smartcard */ if (dst->sc) { - if (!certificate->equals(certificate, dst->sc->last_cert->cert)) + if (!dst->sc->last_cert || + !certificate->equals(certificate, dst->sc->last_cert->cert)) { lock_certs_and_keys("load_end_certificates"); cert_release(dst->sc->last_cert); |