out.writeObject(pkcs12Ordering);
}
else
{
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
ASN1OutputStream aOut = new ASN1OutputStream(bOut);
Enumeration e = this.getBagAttributeKeys();
while (e.hasMoreElements())
{
DEREncodable oid = (DEREncodable)e.nextElement();
aOut.writeObject(oid);
aOut.writeObject(pkcs12Attributes.get(oid));
}
out.writeObject(bOut.toByteArray());
}