How do I repackage certificates into pkcs #7 certificate using bouncy castle?
问题 I have root, intermediate and end entity certificates and, I want to package it in pkcs # 7 format using bouncy castle. How can I do it? 回答1: At the very first, you have to read latest RFC on PKCS#7/CMS. Please click on this RFC Link to read. Now to fulfill your objective, use bouncycastle. You need to generate CMSSignedData data. For that, you need to prepare private key and Certificate chain. Here, I am going to assume, you already have those. Now prepare CMSProcessableByteArray.