Easy CA management
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
526 B

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. import os
  4. import json
  5. from paths import *
  6. __doc__= """
  7. Module of classes to handle certificate requests
  8. """
  9. class Certificate(object):
  10. def __init__(self, cert_id):
  11. self.cert_id = cert_id
  12. def __repr__(self):
  13. return ( "%s %s" % ( str(self.__class__.__name__), str(self.cert_id) ) )
  14. def __bool__(self):
  15. return os.path.exists(self.path)
  16. @property
  17. def path(self):
  18. return os.path.join(OUTPUT_PATH, self.cert_id + '-cert.pub')