title: Extracting individual .cer certificate from a .p7b file in java
body: <p>I am new to Cryptography and so please excuse me if you think this is a basic question</p>
  
  <p>I have a .p7b file which I need to read and extract the individual public certificates i.e  the .cer files and store it in the key store. I need not worry about persisting in the key store as there is already a service which takes in the .cer file as <em>byte[]</em> and saves that.</p>
  
  <p>What i want to know is , how do i read the .p7b and extract the individual .cer file? I know that can be done via the openSSL commands, but i need to do the same in java. I need to also read the <em>Issued By</em> name as that will be used as a unique key to persist the certificate.</p>
  
  <p>Thanks in advance</p>