Skip to content
  • Sébastien Blin's avatar
    tls_session: fix verifyOcsp potential crashes · ef39a26f
    Sébastien Blin authored and Adrien Béraud's avatar Adrien Béraud committed
    verifyOcsp takes a callback with arguments passed by reference.
    However, if the method finishes (verifyCertificateWrapper) cert
    will be destroyed and references potentially invalidated.
    So, instead of waiting on a condition variable use a future to
    be sure that the cert is used before destruction.
    The callback is always called by sendOcspRequest with a similar
    timeout so also remove the useless timeout.
    
    Change-Id: If1a8eba70e13d2d613b758ad24629efa4fe57bb3
    GitLab: #577
    ef39a26f