Certificate chain generator compatible with most Android versions