Package pulp :: Package server :: Package auth :: Module certificate :: Class Certificate
[hide private]
[frames] | no frames]

Class Certificate

source code

object --+
         |
        Certificate

Represents and x.509 certificate.

Instance Methods [hide private]
 
__init__(self, content=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
update(self, content) source code
str
serialNumber(self)
Get the serial number
source code
dict
subject(self)
Get the certificate subject.
source code
DateRange
validRange(self)
Get the valid date range.
source code
boolean
valid(self)
Get whether the certificate is valid based on date.
source code
list
bogus(self)
Get whether the certificate contains bogus data or is otherwise unsuitable.
source code
Extensions
extensions(self)
Get custom extensions.
source code
Certificate
read(self, path)
Read a certificate file.
source code
 
write(self, path)
Write the certificate.
source code
 
delete(self)
Delete the file associated with this certificate.
source code
str
toPEM(self)
Get PEM representation of the certificate.
source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code
 
__cmp__(self, other) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Instance Variables [hide private]
Extensions __ext
A dictionary of extensions OID:value
X509 x509
The M2Crypto.X509 backing object.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, content=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • content (str) - The (optional) PEM encoded content.
Overrides: object.__init__

serialNumber(self)

source code 

Get the serial number

Returns: str
The x.509 serial number

subject(self)

source code 

Get the certificate subject. note: Missing NID mapping for UID added to patch openssl.

Returns: dict
A dictionary of subject fields.

validRange(self)

source code 

Get the valid date range.

Returns: DateRange
The valid date range.

valid(self)

source code 

Get whether the certificate is valid based on date.

Returns: boolean
True if valid.

bogus(self)

source code 

Get whether the certificate contains bogus data or is otherwise unsuitable. The certificate may be valid but still be considered bogus.

Returns: list
List of reasons if bogus

extensions(self)

source code 

Get custom extensions.

Returns: Extensions
An extensions object.

read(self, path)

source code 

Read a certificate file.

Parameters:
  • path (str) - The path to a .pem file.
Returns: Certificate
A certificate

write(self, path)

source code 

Write the certificate.

Parameters:
  • path (str) - The path to the .pem file.
Returns:
self

toPEM(self)

source code 

Get PEM representation of the certificate.

Returns: str
A PEM string

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)