A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-September/074451.html below:

[Python-Dev] frozenset C API?

[Python-Dev] frozenset C API?"Martin v. Löwis" martin at v.loewis.de
Wed Sep 5 19:24:35 CEST 2007
> There's a field on the X509_NAME_ENTRY struct which gives the level.
> OK, I can make it a tuple (list of RDNs) of tuples (one for each RDN)
> of tuples (one for each attribute in the RDN).  And maybe add a
> flatten function to the ssl.py module :-).
> 

See my other proposal as well. As nobody actually uses multi-valued
RDNs, an option would be to make single tuple for each RDN, containing
all attributes, with alternatingly type and value. Then, a single-valued
RDN would turn out as a key-value pair (two-tuple), a multi-valued RDN
would have a length of 2*number-of-attributes.

As for accessor functions, I'd then rather see a get_attr_by_type,
returning a list of all values of attributes of that type, across
all RDNs in the DN (empty if no attribute was found). People would then
do

x = get_attr_by_type(subj, ssl.commonName)
if len(x) != 1:
   unsupported_certificate()
CN = x[0]

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4