X509Certificate

X509Certificate is a class for managing X509 certificates alone

class DIRAC.Core.Security.X509Certificate.X509Certificate(x509Obj=None)

Bases: object

__init__(x509Obj=None)

x.__init__(…) initializes x; see help(type(x)) for signature

generateProxyRequest(bitStrength=1024, limited=False)

Generate a proxy request Return S_OK( X509Request ) / S_ERROR

getDIRACGroup(ignoreDefault=False)

Get the dirac group if present

getExtensions()

Get a decoded list of extensions

getIssuerDN()

Get issuer DN Return: S_OK( string )/S_ERROR

getIssuerNameObject()

Get issuer name object Return: S_OK( X509Name )/S_ERROR

getNotAfterDate()

Get not after date of a certificate Return: S_OK( datetime )/S_ERROR

getNotBeforeDate()

Get not before date of a certificate Return: S_OK( datetime )/S_ERROR

getPublicKey()

Get the public key of the certificate

getRemainingSecs()

Get remaining lifetime in secs

getSerialNumber()

Get certificate serial number Return: S_OK( serial )/S_ERROR

getSubjectDN()

Get subject DN Return: S_OK( string )/S_ERROR

getSubjectNameObject()

Get subject name object Return: S_OK( X509Name )/S_ERROR

getVOMSData()

Has voms extensions

hasExpired()

Check if a certificate file/proxy is still valid Return: S_OK( True/False )/S_ERROR

hasVOMSExtensions()

Has voms extensions

load(certificate)

Load a x509 certificate either from a file or from a string

loadFromFile(certLocation)

Load a x509 cert from a pem file Return : S_OK / S_ERROR

loadFromString(pemData)

Load a x509 cert from a string containing the pem data Return : S_OK / S_ERROR

setCertificate(x509Obj)