X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Ftrust%2Fgid.py;h=bab4357e0d7f24a78a80cb9af444b766acafa75c;hb=8ebb53ace5f9319da63a67fc644486e58a94b18f;hp=4f482707a40547e643eb6e085b6cfef3b44e50a9;hpb=3353d88a6b96e2bc33d1dcec16d15d845d7df40b;p=sfa.git diff --git a/sfa/trust/gid.py b/sfa/trust/gid.py index 4f482707..bab4357e 100644 --- a/sfa/trust/gid.py +++ b/sfa/trust/gid.py @@ -66,11 +66,6 @@ def create_uuid(): class GID(Certificate): - uuid = None - hrn = None - urn = None - email = None # for adding to the SubjectAltName - ## # Create a new GID object # @@ -80,9 +75,13 @@ class GID(Certificate): # @param filename If filename!=None, load the GID from a file # @param lifeDays life of GID in days - default is 1825==5 years - def __init__(self, create=False, subject=None, string=None, filename=None, uuid=None, hrn=None, urn=None, lifeDays=1825): - + def __init__(self, create=False, subject=None, string=None, filename=None, uuid=None, hrn=None, urn=None, lifeDays=1825, email=None): + self.uuid = None + self.hrn = None + self.urn = None + self.email = None # for adding to the SubjectAltName Certificate.__init__(self, lifeDays, create, subject, string, filename) + if subject: logger.debug("Creating GID for subject: %s" % subject) if uuid: @@ -93,6 +92,8 @@ class GID(Certificate): if urn: self.urn = urn self.hrn, type = urn_to_hrn(urn) + if email: + self.set_email(email) def set_uuid(self, uuid): if isinstance(uuid, str):