-
- Downloads
trust store: fix bad pointer access
gnutls_x509_trust_list_add_cas makes the trust list take ownership
of the certificate. The certificate is then destroyed by
gnutls_x509_trust_list_remove_cas.
At this point using existing shared_ptr<Certificate> pointing to this
structure will cause use of freed memory (bad pointer access).
To fix this we use new dht::crypto::Certificate method getCopy(),
that returns a raw gnutls certificate structure copy, to provide
to the trust list or any other APIs taking ownership of the object.
Change-Id: I6152ce0de5e463df01cfda0b18ef5c40a1739c2a
Tuleap: #1548
Reviewed-by:
Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Loading
Please register or sign in to comment