diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-04-19 13:20:35 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-04-19 13:48:51 +0200 |
commit | 2653c0851308cae4d394d75b89d1e427eadda49d (patch) | |
tree | 338db67dc80e6f533b556cffa7a52ca6a0b0a77d /src | |
parent | f36a6ebd303d47b76c129e900847aec02b5ea764 (diff) | |
download | strongswan-2653c0851308cae4d394d75b89d1e427eadda49d.tar.bz2 strongswan-2653c0851308cae4d394d75b89d1e427eadda49d.tar.xz |
pluto: Make sure connection name is null-terminated during DPD restart.
Diffstat (limited to 'src')
-rw-r--r-- | src/pluto/ipsec_doi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pluto/ipsec_doi.c b/src/pluto/ipsec_doi.c index 7ec547b0c..76c6b4a02 100644 --- a/src/pluto/ipsec_doi.c +++ b/src/pluto/ipsec_doi.c @@ -2196,9 +2196,9 @@ static void decode_cert(struct msg_digest *md) cert_t x509cert = cert_empty; x509cert.cert = lib->creds->create(lib->creds, - CRED_CERTIFICATE, CERT_X509, - BUILD_BLOB_ASN1_DER, blob, - BUILD_END); + CRED_CERTIFICATE, CERT_X509, + BUILD_BLOB_ASN1_DER, blob, + BUILD_END); if (x509cert.cert) { if (verify_x509cert(&x509cert, strict_crl_policy, &valid_until)) @@ -3824,7 +3824,7 @@ main_id_and_auth(struct msg_digest *md case XAUTHInitRSA: case XAUTHRespRSA: r = check_signature(KEY_RSA, peer, st, hash, - &md->chain[ISAKMP_NEXT_SIG]->pbs, + &md->chain[ISAKMP_NEXT_SIG]->pbs, #ifdef USE_KEYRR kc == NULL ? NULL : kc->ac.keys_from_dns, #endif /* USE_KEYRR */ @@ -5851,6 +5851,7 @@ dpd_timeout(struct state *st) /* caching the connection name before deletion */ strncpy(cname, c->name, BUF_LEN); + cname[BUF_LEN-1] = '\0'; if (c->kind == CK_INSTANCE) { |