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

Class Extensions

source code

object --+    
         |    
      dict --+
             |
            Extensions

Represents x.509 (v3) custom extensions.

Instance Methods [hide private]
new empty dictionary

__init__(self, x509)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
Extensions
ltrim(self, n)
Left trim n parts.
source code
str
get(self, oid, default=None)
Get the value of an extension by oid.
source code
(OID, value)
find(self, oid, limit=0)
Find all extensions matching the oid.
source code
Extensions
branch(self, root)
Find a subtree by matching the oid.
source code
 
__ext(self, x509) source code
 
__parse(self, x509) source code
 
__str__(self)
str(x)
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, clear, copy, fromkeys, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  pattern = re.compile('([0-9]+\.)+[0-9]+:')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, x509)
(Constructor)

source code 

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

Parameters:
  • x509 (X509) - A certificate object.
Returns:
new empty dictionary

Overrides: object.__init__

ltrim(self, n)

source code 

Left trim n parts.

Parameters:
  • n (int) - The number of parts to trim.
Returns: Extensions
The trimmed OID

get(self, oid, default=None)

source code 

Get the value of an extension by oid. Note: The oid may contain (*) wildcards.

Parameters:
  • oid (str|OID) - An OID that may contain (*) wildcards.
Returns: str
The value of the first extension matched.
Overrides: dict.get

find(self, oid, limit=0)

source code 

Find all extensions matching the oid. Note: The oid may contain (*) wildcards.

Parameters:
  • oid (str|OID) - An OID that may contain (*) wildcards.
  • limit (int) - Limit the number returned, 0=unlimited
Returns: (OID, value)
A list of matching items.

See Also: OID.match()

branch(self, root)

source code 

Find a subtree by matching the oid.

Parameters:
  • root (str|OID) - An OID that may contain (*) wildcards.
Returns: Extensions
A subtree.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)