[tor-commits] [tor/master] Extract the common code in add_*_cert to a helper.