diff options
Diffstat (limited to 'rpkid/rpki/x509.py')
-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. |