Security fix: modify the certificates storage into ListHashSet from HashSet to keep the chain order.