# AUTHOR <EMAIL@ADDRESS>, YEAR.
# 
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Defensive Coding Guide\n"
"POT-Creation-Date: 2013-03-12T03:19:44\n"
"PO-Revision-Date: 2013-03-19 15:31+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: Tibetan <trans-bo@lists.fedoraproject.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bo\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. Tag: programlisting
#, no-c-format
msgid ""
"\n"
"def check_host_name(peercert, name):\n"
"    \"\"\"Simple certificate/host name checker.  Returns True if the\n"
"    certificate matches, False otherwise.  Does not support\n"
"    wildcards.\"\"\"\n"
"    # Check that the peer has supplied a certificate.\n"
"    # None/{} is not acceptable.\n"
"    if not peercert:\n"
"        return False\n"
"    if peercert.has_key(\"subjectAltName\"):\n"
"        for typ, val in peercert[\"subjectAltName\"]:\n"
"            if typ == \"DNS\" and val == name:\n"
"                return True\n"
"    else:\n"
"        # Only check the subject DN if there is no subject alternative\n"
"        # name.\n"
"        cn = None\n"
"        for attr, val in peercert[\"subject\"]:\n"
"            # Use most-specific (last) commonName attribute.\n"
"            if attr == \"commonName\":\n"
"                cn = val\n"
"        if cn is not None:\n"
"            return cn == name\n"
"    return False\n"
msgstr ""
