Create cert from text function