factorisation of ssl certificates handling