Forward port TLS fixes from CMSSW_7_2_X.