819 строки
28 KiB
HTML
819 строки
28 KiB
HTML
<?xml version="1.0" encoding="ascii"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>nss.nss.DN</title>
|
|
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
|
<script type="text/javascript" src="epydoc.js"></script>
|
|
</head>
|
|
|
|
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
|
alink="#204080">
|
|
<!-- ==================== NAVIGATION BAR ==================== -->
|
|
<table class="navbar" border="0" width="100%" cellpadding="0"
|
|
bgcolor="#a0c0ff" cellspacing="0">
|
|
<tr valign="middle">
|
|
<!-- Home link -->
|
|
<th> <a
|
|
href="nss-module.html">Home</a> </th>
|
|
|
|
<!-- Tree link -->
|
|
<th> <a
|
|
href="module-tree.html">Trees</a> </th>
|
|
|
|
<!-- Index link -->
|
|
<th> <a
|
|
href="identifier-index.html">Indices</a> </th>
|
|
|
|
<!-- Help link -->
|
|
<th> <a
|
|
href="help.html">Help</a> </th>
|
|
|
|
<th class="navbar" width="100%"></th>
|
|
</tr>
|
|
</table>
|
|
<table width="100%" cellpadding="0" cellspacing="0">
|
|
<tr valign="top">
|
|
<td width="100%">
|
|
<span class="breadcrumbs">
|
|
<a href="nss-module.html">Package nss</a> ::
|
|
<a href="nss.nss-module.html">Module nss</a> ::
|
|
Class DN
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<table cellpadding="0" cellspacing="0">
|
|
<!-- hide/show private -->
|
|
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
|
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
|
<tr><td align="right"><span class="options"
|
|
>[<a href="frames.html" target="_top">frames</a
|
|
>] | <a href="nss.nss.DN-class.html"
|
|
target="_top">no frames</a>]</span></td></tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!-- ==================== TYPE DESCRIPTION ==================== -->
|
|
<h1 class="epydoc">type DN</h1><p class="nomargin-top"></p>
|
|
<pre class="base-tree">
|
|
object --+
|
|
|
|
|
<strong class="uidshort">DN</strong>
|
|
</pre>
|
|
|
|
<hr />
|
|
<p>An object representing an X501 Distinguished Name (e.g DN).</p>
|
|
<p>DN objects contain an ordered list of <a href="nss.nss.RDN-class.html" class="link">RDN</a> objects.</p>
|
|
<p>The DN object constructor may be invoked with a string
|
|
representing an X500 name. Zero or more <a href="nss.nss.RDN-class.html" class="link">RDN</a> objects, or you may
|
|
optionally pass a list or tuple of <a href="nss.nss.RDN-class.html" class="link">RDN</a> objects.</p>
|
|
<p>Examples:</p>
|
|
<pre class="rst-literal-block">
|
|
DN()
|
|
DN('CN=www.redhat.com,OU=Web Operations,O=Red Hat Inc,L=Raleigh,ST=North Carolina,C=US')
|
|
DN(rdn0, ...)
|
|
DN([rdn0, rdn1])
|
|
</pre>
|
|
<p><strong>The string representation of a Distinguished Name (DN) has reverse
|
|
ordering from it's sequential components.</strong></p>
|
|
<p>The ordering is a requirement of the relevant RFC's. When a
|
|
Distinguished Name is rendered as a string it is ordered from most
|
|
specific to least specific. However it's components (RDN's) as a
|
|
sequence are ordered from least specific to most specific.</p>
|
|
<p>DN objects contain an ordered list of <a href="nss.nss.RDN-class.html" class="link">RDN</a> objects. The
|
|
DN object has both sequence and mapping behaviors with respect to
|
|
the RDN's they contain. Thus you can index an RDN by position, by
|
|
name, or by SecItem (if it's an OID). You can iterate over the list,
|
|
get it's length or take a slice.</p>
|
|
<p>If you index by string the string may be either a canonical name for
|
|
the RDN type (e.g. 'cn') or the dotted-decimal notation for the OID
|
|
(e.g. 2.5.4.3). There may be multiple RDN's in a DN whose type matches
|
|
(e.g. OU=engineering, OU=boston). It is not common to have more than
|
|
one RDN in a DN with the same type. However because of the possiblity
|
|
of being multi-valued when indexing by type a list is always returned
|
|
containing the matching RDN's. Thus:</p>
|
|
<pre class="rst-literal-block">
|
|
dn = nss.DN('OU=engineering')
|
|
dn['ou']
|
|
returns [RDN('OU=engineering')
|
|
|
|
dn = nss.DN('OU=engineering, OU=boston')
|
|
dn['ou']
|
|
returns [RDN('OU=boston'), RDN('OU=engineering')]
|
|
Note the reverse ordering between string representation and RDN sequencing
|
|
</pre>
|
|
<p>Note, if you use properties to access the RDN values (e.g. name.common_name,
|
|
name.org_unit_name) the string value is returned or None if not found.
|
|
If the item was multi-valued then the most appropriate item will be selected
|
|
and returned as a string value.</p>
|
|
<p>Note it is not possible to index by oid tag
|
|
(e.g. nss.SEC_OID_AVA_COMMON_NAME) because oid tags are integers and
|
|
it's impossible to distinguish between an integer representing the
|
|
n'th member of the sequence and the integer representing the oid
|
|
tag. In this case positional indexing wins (e.g. rdn[0] means the
|
|
first element).</p>
|
|
<p>Examples:</p>
|
|
<pre class="rst-literal-block">
|
|
subject_name = 'CN=www.redhat.com,OU=Web Operations,O=Red Hat Inc,L=Raleigh,ST=North Carolina,C=US'
|
|
name = nss.DN(subject_name)
|
|
str(name)
|
|
returns 'CN=www.redhat.com,OU=Web Operations,O=Red Hat Inc,L=Raleigh,ST=North Carolina,C=US'
|
|
name[0]
|
|
returns an `RDN` object with the value C=US
|
|
name['cn']
|
|
returns a list comprised of an `RDN` object with the value CN=www.redhat.com
|
|
name['2.5.4.3']
|
|
returns a list comprised of an `RDN` object with the value CN=www.redhat.com
|
|
because 2.5.4.3 is the dotted-decimal OID for common name (i.e. cn)
|
|
name.common_name
|
|
returns the string www.redhat.com
|
|
common_name is easy shorthand property, it only retuns a single string
|
|
value or None, if it was multi-valued the most appropriate item is selected.
|
|
name.has_key('cn')
|
|
returns True because the DN has a common name RDN
|
|
name.has_key('2.5.4.3')
|
|
returns True because the DN has a common name RDN
|
|
because 2.5.4.3 is the dotted-decimal OID for common name (i.e. cn)
|
|
|
|
cn_rdn = nss.RDN(nss.AVA('cn', 'www.redhat.com'))
|
|
ou_rdn = nss.RDN(nss.AVA('ou', 'Web Operations'))
|
|
name = nss.DN(cn_rdn)
|
|
name
|
|
is a DN with one RDN (e.g. CN=www.redhat.com)
|
|
len(name)
|
|
returns 1 because there is one RDN in it
|
|
name.add_rdn(ou_rdn)
|
|
name
|
|
name is now a DN with two RDN's (e.g. OU=Web Operations,CN=www.redhat.com)
|
|
len(name)
|
|
returns 2 because there are now two RDN's in it
|
|
list(name)
|
|
returns a list with the two RDN's in it
|
|
name[:]
|
|
same as list(name)
|
|
for rdn in name:
|
|
iterate over each RDN in name
|
|
name = nss.DN(cn_rdn, ou_rdn)
|
|
This is an alternate way to build the above DN
|
|
</pre>
|
|
|
|
<!-- ==================== INSTANCE METHODS ==================== -->
|
|
<a name="section-InstanceMethods"></a>
|
|
<table class="summary" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr bgcolor="#70b0f0" class="table-header">
|
|
<td colspan="2" class="table-header">
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr valign="top">
|
|
<td align="left"><span class="table-header">Instance Methods</span></td>
|
|
<td align="right" valign="top"
|
|
><span class="options">[<a href="#section-InstanceMethods"
|
|
class="privatelink" onclick="toggle_private();"
|
|
>hide private</a>]</span></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__contains__"></a><span class="summary-sig-name">__contains__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
y in x</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__eq__"></a><span class="summary-sig-name">__eq__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
x==y</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__ge__"></a><span class="summary-sig-name">__ge__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
x>=y</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__getitem__"></a><span class="summary-sig-name">__getitem__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
x[y]</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__gt__"></a><span class="summary-sig-name">__gt__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
x>y</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a href="nss.nss.DN-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
|
|
x.__init__(...) initializes x; see help(type(x)) for signature</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__le__"></a><span class="summary-sig-name">__le__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
x<=y</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">x</span>)</span><br />
|
|
len(x)</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__lt__"></a><span class="summary-sig-name">__lt__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
x<y</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a name="__ne__"></a><span class="summary-sig-name">__ne__</span>(<span class="summary-sig-arg">x</span>,
|
|
<span class="summary-sig-arg">y</span>)</span><br />
|
|
x!=y</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type">a new object with type S, a subtype of T</span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a href="nss.nss.DN-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">T</span>,
|
|
<span class="summary-sig-arg">S</span>,
|
|
<span class="summary-sig-arg">...</span>)</span></td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a href="nss.nss.DN-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">x</span>)</span><br />
|
|
repr(x)</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a href="nss.nss.DN-class.html#add_rdn" class="summary-sig-name">add_rdn</a>(<span class="summary-sig-arg">rdn</span>)</span><br />
|
|
Adds a RDN to the name.</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type">bool</span>
|
|
</td><td class="summary">
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td><span class="summary-sig"><a href="nss.nss.DN-class.html#has_key" class="summary-sig-name">has_key</a>(<span class="summary-sig-arg">arg</span>)</span><br />
|
|
return True if Name has an AVA whose oid can be identified by arg.</td>
|
|
<td align="right" valign="top">
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!-- ==================== PROPERTIES ==================== -->
|
|
<a name="section-Properties"></a>
|
|
<table class="summary" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr bgcolor="#70b0f0" class="table-header">
|
|
<td colspan="2" class="table-header">
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr valign="top">
|
|
<td align="left"><span class="table-header">Properties</span></td>
|
|
<td align="right" valign="top"
|
|
><span class="options">[<a href="#section-Properties"
|
|
class="privatelink" onclick="toggle_private();"
|
|
>hide private</a>]</span></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#cert_uid" class="summary-name">cert_uid</a><br />
|
|
Returns the certificate uid member (i.e.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#common_name" class="summary-name">common_name</a><br />
|
|
Returns the common name member (i.e.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#country_name" class="summary-name">country_name</a><br />
|
|
Returns the country name member (i.e.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#dc_name" class="summary-name">dc_name</a><br />
|
|
Returns the domain component name member (i.e.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#email_address" class="summary-name">email_address</a><br />
|
|
Returns the email address member as a string.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#locality_name" class="summary-name">locality_name</a><br />
|
|
Returns the locality name member (i.e.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#org_name" class="summary-name">org_name</a><br />
|
|
Returns the organization name member (i.e.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#org_unit_name" class="summary-name">org_unit_name</a><br />
|
|
Returns the organizational unit name member (i.e.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" align="right" valign="top" class="summary">
|
|
<span class="summary-type"> </span>
|
|
</td><td class="summary">
|
|
<a href="nss.nss.DN-class.html#state_name" class="summary-name">state_name</a><br />
|
|
Returns the state name member (i.e.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!-- ==================== METHOD DETAILS ==================== -->
|
|
<a name="section-MethodDetails"></a>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr bgcolor="#70b0f0" class="table-header">
|
|
<td colspan="2" class="table-header">
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr valign="top">
|
|
<td align="left"><span class="table-header">Method Details</span></td>
|
|
<td align="right" valign="top"
|
|
><span class="options">[<a href="#section-MethodDetails"
|
|
class="privatelink" onclick="toggle_private();"
|
|
>hide private</a>]</span></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a name="__init__"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top"><td>
|
|
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">...</span>)</span>
|
|
<br /><em class="fname">(Constructor)</em>
|
|
</h3>
|
|
</td><td align="right" valign="top"
|
|
>
|
|
</td>
|
|
</tr></table>
|
|
|
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
<dl class="fields">
|
|
<dt>Overrides:
|
|
object.__init__
|
|
</dt>
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="__new__"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top"><td>
|
|
<h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">T</span>,
|
|
<span class="sig-arg">S</span>,
|
|
<span class="sig-arg">...</span>)</span>
|
|
</h3>
|
|
</td><td align="right" valign="top"
|
|
>
|
|
</td>
|
|
</tr></table>
|
|
|
|
|
|
<dl class="fields">
|
|
<dt>Returns: a new object with type S, a subtype of T</dt>
|
|
<dt>Overrides:
|
|
object.__new__
|
|
</dt>
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="__repr__"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top"><td>
|
|
<h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">x</span>)</span>
|
|
<br /><em class="fname">(Representation operator)</em>
|
|
</h3>
|
|
</td><td align="right" valign="top"
|
|
>
|
|
</td>
|
|
</tr></table>
|
|
|
|
repr(x)
|
|
<dl class="fields">
|
|
<dt>Overrides:
|
|
object.__repr__
|
|
</dt>
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="add_rdn"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top"><td>
|
|
<h3 class="epydoc"><span class="sig"><span class="sig-name">add_rdn</span>(<span class="sig-arg">rdn</span>)</span>
|
|
</h3>
|
|
</td><td align="right" valign="top"
|
|
>
|
|
</td>
|
|
</tr></table>
|
|
|
|
Adds a RDN to the name.
|
|
<dl class="fields">
|
|
<dt>Parameters:</dt>
|
|
<dd><ul class="nomargin-top">
|
|
<li><strong class="pname"><code>rdn</code></strong> (RDN object) - The rnd to add to the name</li>
|
|
</ul></dd>
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="has_key"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr valign="top"><td>
|
|
<h3 class="epydoc"><span class="sig"><span class="sig-name">has_key</span>(<span class="sig-arg">arg</span>)</span>
|
|
</h3>
|
|
</td><td align="right" valign="top"
|
|
>
|
|
</td>
|
|
</tr></table>
|
|
|
|
return True if Name has an AVA whose oid can be identified by arg.
|
|
<dl class="fields">
|
|
<dt>Parameters:</dt>
|
|
<dd><ul class="nomargin-top">
|
|
<li><strong class="pname"><code>arg</code></strong> (string or integer) - canonical name (e.g. 'cn') or oid dotted-decimal or
|
|
SEC_OID_* enumeration constant</li>
|
|
</ul></dd>
|
|
<dt>Returns: bool</dt>
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<br />
|
|
<!-- ==================== PROPERTY DETAILS ==================== -->
|
|
<a name="section-PropertyDetails"></a>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr bgcolor="#70b0f0" class="table-header">
|
|
<td colspan="2" class="table-header">
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr valign="top">
|
|
<td align="left"><span class="table-header">Property Details</span></td>
|
|
<td align="right" valign="top"
|
|
><span class="options">[<a href="#section-PropertyDetails"
|
|
class="privatelink" onclick="toggle_private();"
|
|
>hide private</a>]</span></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a name="cert_uid"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">cert_uid</h3>
|
|
Returns the certificate uid member (i.e. UID) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="common_name"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">common_name</h3>
|
|
Returns the common name member (i.e. CN) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="country_name"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">country_name</h3>
|
|
Returns the country name member (i.e. C) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="dc_name"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">dc_name</h3>
|
|
Returns the domain component name member (i.e. DC) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="email_address"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">email_address</h3>
|
|
Returns the email address member as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="locality_name"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">locality_name</h3>
|
|
Returns the locality name member (i.e. L) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="org_name"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">org_name</h3>
|
|
Returns the organization name member (i.e. O) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="org_unit_name"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">org_unit_name</h3>
|
|
Returns the organizational unit name member (i.e. OU) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<a name="state_name"></a>
|
|
<div>
|
|
<table class="details" border="1" cellpadding="3"
|
|
cellspacing="0" width="100%" bgcolor="white">
|
|
<tr><td>
|
|
<h3 class="epydoc">state_name</h3>
|
|
Returns the state name member (i.e. ST) as a string. Returns None if not found.
|
|
<dl class="fields">
|
|
</dl>
|
|
</td></tr></table>
|
|
</div>
|
|
<br />
|
|
<!-- ==================== NAVIGATION BAR ==================== -->
|
|
<table class="navbar" border="0" width="100%" cellpadding="0"
|
|
bgcolor="#a0c0ff" cellspacing="0">
|
|
<tr valign="middle">
|
|
<!-- Home link -->
|
|
<th> <a
|
|
href="nss-module.html">Home</a> </th>
|
|
|
|
<!-- Tree link -->
|
|
<th> <a
|
|
href="module-tree.html">Trees</a> </th>
|
|
|
|
<!-- Index link -->
|
|
<th> <a
|
|
href="identifier-index.html">Indices</a> </th>
|
|
|
|
<!-- Help link -->
|
|
<th> <a
|
|
href="help.html">Help</a> </th>
|
|
|
|
<th class="navbar" width="100%"></th>
|
|
</tr>
|
|
</table>
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
|
<tr>
|
|
<td align="left" class="footer">
|
|
Generated by Epydoc 3.0.1
|
|
</td>
|
|
<td align="right" class="footer">
|
|
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
|
>http://epydoc.sourceforge.net</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<script type="text/javascript">
|
|
<!--
|
|
// Private objects are initially displayed (because if
|
|
// javascript is turned off then we want them to be
|
|
// visible); but by default, we want to hide them. So hide
|
|
// them unless we have a cookie that says to show them.
|
|
checkCookie();
|
|
// -->
|
|
</script>
|
|
</body>
|
|
</html>
|