Certificates can now be pickled.

Added reduce method for Abstract class, so pickle can figure out how to create instances of classes generated by implicit/explicit.
On Wed Nov 12 2014 at 4:18:07 PM laiqu <notifications@github.com> wrote:

> In python/ct/crypto/cert_test.py:
>
> > @@ -656,6 +657,12 @@ def test_indefinite_encoding(self):
> >          self.assertTrue("VeriSign Class 1 CA" in issuer)
> >
> >
> > +class PickleTest(CertificateTest):
> > +    def cert_from_pem_file(self, filename, strict=True):
> > +        c = cert.Certificate.from_pem_file(
> > +            self.get_file(filename), strict_der=strict)
> > +        return pickle.loads(pickle.dumps(c))
>
> Well I could just compare their *dict*, and they appear to be the same.
>

You could also compare their DER encodings.


> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/certificate-transparency/pull/236/files#r20229484>
> .
>