diff options
author | Rob Austein <sra@hactrn.net> | 2007-11-14 06:28:26 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-11-14 06:28:26 +0000 |
commit | 4a599b7acabfedb7fab71aa428debb5b1ab64361 (patch) | |
tree | c249bb7dc71fceb44677b55b8cfcf221a01d7594 /scripts/rpki/x509.py | |
parent | 6250badbca17e4045d19406daff5e24b6ba66eca (diff) |
Clean up type conversions in and out of SQL.
svn path=/scripts/biz-certs/Bob-CA.srl; revision=1292
Diffstat (limited to 'scripts/rpki/x509.py')
-rw-r--r-- | scripts/rpki/x509.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/rpki/x509.py b/scripts/rpki/x509.py index e5539d83..488c1d73 100644 --- a/scripts/rpki/x509.py +++ b/scripts/rpki/x509.py @@ -174,6 +174,15 @@ class DER_object(object): pass return resources + @classmethod + def from_sql(cls, x): + """Convert from SQL storage format.""" + return cls(DER = x) + + def to_sql(self): + """Convert to SQL storage format.""" + return self.get_DER() + class X509(DER_object): """X.509 certificates. |