Fix chain building for key p12/jks download