48 lines
1.5 KiB
Text
48 lines
1.5 KiB
Text
# 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:32+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"
|
|
"// Match the peer certificate against the host name.\n"
|
|
"// We can only obtain a set of DER-encoded certificates from the\n"
|
|
"// session object, so we have to re-parse the peer certificate into\n"
|
|
"// a certificate object.\n"
|
|
"gnutls_x509_crt_t cert;\n"
|
|
"ret = gnutls_x509_crt_init(&cert);\n"
|
|
"if (ret != GNUTLS_E_SUCCESS) {\n"
|
|
" fprintf(stderr, \"error: gnutls_x509_crt_init: %s\n"
|
|
"\",\n"
|
|
"\t gnutls_strerror(ret));\n"
|
|
" exit(1);\n"
|
|
"}\n"
|
|
"// The peer certificate is the first certificate in the list.\n"
|
|
"ret = gnutls_x509_crt_import(cert, certs, GNUTLS_X509_FMT_DER);\n"
|
|
"if (ret != GNUTLS_E_SUCCESS) {\n"
|
|
" fprintf(stderr, \"error: gnutls_x509_crt_import: %s\n"
|
|
"\",\n"
|
|
"\t gnutls_strerror(ret));\n"
|
|
" exit(1);\n"
|
|
"}\n"
|
|
"ret = gnutls_x509_crt_check_hostname(cert, host);\n"
|
|
"if (ret == 0 && !certificate_host_name_override(certs[0], host)) {\n"
|
|
" fprintf(stderr, \"error: host name does not match certificate\n"
|
|
"\");\n"
|
|
" exit(1);\n"
|
|
"}\n"
|
|
"gnutls_x509_crt_deinit(cert);\n"
|
|
msgstr ""
|