Certificate Generation problem