title: What are bag attributes and how can i generate them?
body: <p>while converting some certificates from keystore to openssl/pem I noticed for the first time that there are "Bag Attributes" prepended to the certs.</p>
  
  <p>The look like this:</p>
  
  <pre><code>Bag Attributes
      friendlyName: CN=PositiveSSL CA,O=Comodo CA Limited,L=Salford,ST=Greater Manchester,C=GB
  subject=/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=PositiveSSL CA
  issuer=/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST    Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
  </code></pre>
  
  <p>Do they serve any function?</p>
  
  <p>I noticed that I like them because they make my chain-files (a concatenation of certificates) more clear. Sadly the ca certs I download don't have them.</p>
  
  <p>So how do I generate them?</p>