WIP: Put only latest certificate in chain

Closed Kamil Trzcińśki requested to merge certificate-chain into master