# 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:33+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: Portuguese <trans-pt@lists.fedoraproject.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. Tag: programlisting
#, no-c-format
msgid ""
"\n"
"// Obtain the server certificate chain.  The server certificate\n"
"// itself is stored in the first element of the array.\n"
"unsigned certslen = 0;\n"
"const gnutls_datum_t *const certs =\n"
"  gnutls_certificate_get_peers(session, &amp;certslen);\n"
"if (certs == NULL || certslen == 0) {\n"
"  fprintf(stderr, \"error: could not obtain peer certificate\n"
"\");\n"
"  exit(1);\n"
"}\n"
"\n"
"// Validate the certificate chain.\n"
"unsigned status = (unsigned)-1;\n"
"ret = gnutls_certificate_verify_peers2(session, &amp;status);\n"
"if (ret != GNUTLS_E_SUCCESS) {\n"
"  fprintf(stderr, \"error: gnutls_certificate_verify_peers2: %s\n"
"\",\n"
"\t    gnutls_strerror(ret));\n"
"  exit(1);\n"
"}\n"
"if (status != 0 &amp;&amp; !certificate_validity_override(certs[0])) {\n"
"  gnutls_datum_t msg;\n"
"#if GNUTLS_VERSION_AT_LEAST_3_1_4\n"
"  int type = gnutls_certificate_type_get (session);\n"
"  ret = gnutls_certificate_verification_status_print(status, type, &amp;out, 0);\n"
"#else\n"
"  ret = -1;\n"
"#endif\n"
"  if (ret == 0) {\n"
"    fprintf(stderr, \"error: %s\n"
"\", msg.data);\n"
"    gnutls_free(msg.data);\n"
"    exit(1);\n"
"  } else {\n"
"    fprintf(stderr, \"error: certificate validation failed with code 0x%x\n"
"\",\n"
"\t      status);\n"
"    exit(1);\n"
"  }\n"
"}\n"
msgstr ""
