type AVA
object --+
|
AVA
An object representing an AVA (attribute value assertion).
AVA(type, value)
RDN's (Relative Distinguished Name) are composed from AVA's.
An RDN is a sequence of AVA's.
An example of an AVA is "CN=www.redhat.com" where CN is the X500
directory abbrevation for "Common Name".
An AVA is composed of two items:
- type
- Specifies the attribute (e.g. CN). AVA types are specified by
predefined OID's (Object Identifiers). For example the OID of CN
is 2.5.4.3 ({joint-iso-itu-t(2) ds(5) attributeType(4) commonName(3)})
OID's in NSS are encapsulated in a SecItem as a DER encoded OID.
Because DER encoded OID's are less than ideal mechanisms by which
to specify an item NSS has mapped each OID to a integral enumerated
constant called an OID tag (i.e. SEC_OID_*). Many of the NSS API's
will accept an OID tag number instead of DER encoded OID in a SecItem.
One can easily convert between DER encoded OID's, tags, and their
string representation in dotted-decimal format. The enumerated OID
constants are the most efficient in most cases.
- value
- The value of the attribute (e.g. 'www.redhat.com').
Examples:
The AVA cn=www.redhat.com can be created in any of the follow ways:
ava = nss.AVA('cn', 'www.redhat.com')
ava = nss.AVA(nss.SEC_OID_AVA_COMMON_NAME, 'www.redhat.com')
ava = nss.AVA('2.5.4.3', 'www.redhat.com')
ava = nss.AVA('OID.2.5.4.3', 'www.redhat.com')
|
|
|
|
|
|
|
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
|
|
|
|
|
a new object with type S, a subtype of T
|
|
|
|
|
oid
The OID (e.g.
|
|
oid_tag
The OID tag enumerated constant (i.e.
|
|
value
The value of the AVA as a SecItem
|
|
value_str
The value of the AVA as a UTF-8 encoded string
|
__init__(...)
(Constructor)
|
|
x.__init__(...) initializes x; see help(type(x)) for signature
- Parameters:
- Overrides:
object.__init__
|
- Returns: a new object with type S, a subtype of T
- Overrides:
object.__new__
|
__repr__(x)
(Representation operator)
|
|
repr(x)
- Overrides:
object.__repr__
|
oid
The OID (e.g. type) of the AVA as a SecItem
|
oid_tag
The OID tag enumerated constant (i.e. SEC_OID_AVA_*) of the AVA's type
|