Package nss :: Module nss :: Class PKCS12Decoder
[hide private]
[frames] | no frames]

Class PKCS12Decoder

object --+
         |
        PKCS12Decoder

PKCS12Decoder(file, password, slot=None)

:Parameters:
    file : file name or file object
        pkcs12 input data.

            * If string treat as file path to open and read.
            * If file object read from the file object.
    password : string
        The password protecting the PKCS12 contents
    slot : `PK11Slot` object
        The PK11 slot to use. If None defaults to internal
        slot, see `nss.get_internal_key_slot()`

Instance Methods [hide private]
 
__getitem__(x, y)
x[y]
 
__init__(file, password, slot=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__len__(x)
len(x)
a new object with type S, a subtype of T

__new__(T, S, ...)
 
__repr__(x)
repr(x)
 
__str__(x)
str(x)
 
database_import()
Import the contents of the `PKCS12Decoder` object into the current NSS database.
string)

format(level=0, indent=' ')
:Parameters: level : integer Initial indentation level, all subsequent indents are relative to this starting level.
[(level, string),...]

format_lines(level=0)
:Parameters: level : integer Initial indentation level, all subsequent indents are relative to this starting level.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(file, password, slot=None)
(Constructor)

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

Overrides: object.__init__

__new__(T, S, ...)

 


Returns:
a new object with type S, a subtype of T

Overrides: object.__new__

__repr__(x)
(Representation operator)

 
repr(x)

Overrides: object.__repr__

__str__(x)
(Informal representation operator)

 
str(x)

Overrides: object.__str__

database_import()

 
Import the contents of the `PKCS12Decoder` object into the current NSS database.

During import if the certificate(s) in the `PKCS12Decoder` object does
not have a nickname or there is a collision with an existing nickname
then a callback will be invoked to provide a new nickname. See
`pkcs12_set_nickname_collision_callback`.

format(level=0, indent=' ')

 
:Parameters:
    level : integer
        Initial indentation level, all subsequent indents are relative
        to this starting level.
    indent : string
        string replicated once for each indent level then prepended to output line

This is equivalent to:
indented_format(obj.format_lines()) on an object providing a format_lines() method.

Returns:
string)

format_lines(level=0)

 
:Parameters:
    level : integer
        Initial indentation level, all subsequent indents are relative
        to this starting level.

Formats the object into a sequence of lines with indent level
information.  The return value is a list where each list item is a
tuple.  The first item in the tuple is an integer
representing the indentation level for that line. Any remaining items
in the tuple are strings to be output on that line.

The output of this function can be formatted into a single string by
calling `indented_format()`, e.g.:

    print indented_format(obj.format_lines())

The reason this function returns a tuple as opposed to an single
indented string is to support other text formatting systems such as
GUI's with indentation controls.  See `indented_format()` for a
complete explanation.

Returns:
[(level, string),...]