Boris Zbarsky wrote: > I'm looking into serializing and deserializing principals, and to do this > for certificate principals I would need to be able to save out an > nsNSSCertificate. This means saving a CERTCertificate, in addition to > various other things that I think I know how to save out. > > Is there a way to serialize and deserialize CERTCertificate objects?
A CERTCertificate contains several things: - a copy of the DER-encoded certificate (which is a serialization) - a decoded copy of the certificate, with different structure members for each element of the cert - the cert's "nickname" string (which is not part of the cert) - any trust flags associated with the cert - some clues about the PKCS#11 slot from which the cert (or its corresponding private key) came, if any. If all you need is to serialize the certificate itself, just copy the DER certificate. If you need any other those other things, then ... it's less clear how to do that. -- Nelson B _______________________________________________ dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto