diff options
author | Rob Austein <sra@hactrn.net> | 2013-07-24 06:14:05 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2013-07-24 06:14:05 +0000 |
commit | fd7ec4d81b47cd9c7d9a2f42163cb9000fdbd2a1 (patch) | |
tree | de5f060a79b7f6f7439acdf60882444d09ca0605 /rpkid/rpki | |
parent | 5ab5cc1c7c8c4c14473c6a06d47c03541c6fda3d (diff) |
Pickling support.
svn path=/trunk/; revision=5443
Diffstat (limited to 'rpkid/rpki')
-rw-r--r-- | rpkid/rpki/x509.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py index b4e504d2..a536cc97 100644 --- a/rpkid/rpki/x509.py +++ b/rpkid/rpki/x509.py @@ -518,6 +518,18 @@ class DER_object(object): except: # pylint: disable=W0702 return uri + def __getstate__(self): + """ + Pickling protocol -- pickle the DER encoding. + """ + return self.get_DER() + + def __setstate__(self, state): + """ + Pickling protocol -- unpickle the DER encoding. + """ + self.set(DER = state) + class X509(DER_object): """ X.509 certificates. |