For better forward-security support, add functions