Commit e390d16958004bf868165fe2dcf350b7ad54bc2f

Authored by perry.werneck@gmail.com
1 parent 249d32fd

Incluindo tooltip com estado da conexão SSL

po/pt_BR.po
... ... @@ -5,7 +5,7 @@ msgid ""
5 5 msgstr ""
6 6 "Project-Id-Version: pw3270 5.0\n"
7 7 "Report-Msgid-Bugs-To: \n"
8   -"POT-Creation-Date: 2013-01-03 17:05-0200\n"
  8 +"POT-Creation-Date: 2013-01-04 16:52-0200\n"
9 9 "PO-Revision-Date: 2012-12-26 10:36-0200\n"
10 10 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n"
11 11 "Language-Team: Português <>\n"
... ... @@ -103,7 +103,7 @@ msgstr &quot;Alerta 3270&quot;
103 103 msgid "3270 screen"
104 104 msgstr "Tela 3270"
105 105  
106   -#: dialog.c:476
  106 +#: dialog.c:711
107 107 #, c-format
108 108 msgid "3270 terminal emulator for GTK %d.%d"
109 109 msgstr "Emulador 3270 para GTK+ %d.%d"
... ... @@ -144,6 +144,14 @@ msgstr &quot;&quot;
144 144 "<b>Estado da conexão:</b> %s\n"
145 145 "<b>Mensagem de alerta:</b> %s"
146 146  
  147 +#: dialog.c:753
  148 +msgid ""
  149 +"<b>Identity not verified</b>\n"
  150 +"The connection is insecure"
  151 +msgstr ""
  152 +"<b>Identity not verified</b>\n"
  153 +"The connection is insecure"
  154 +
147 155 #: main.c:279
148 156 msgid ""
149 157 "<b>Valid options:</b>\n"
... ... @@ -160,10 +168,22 @@ msgstr &quot;&lt;menuitem&gt; deve estar dentro de &lt;menu&gt;&quot;
160 168 msgid "<separator> should be inside a <menu> or <toolbar>"
161 169 msgstr "<separator> só é válido dentro de <menu> ou <toolbar>"
162 170  
  171 +#: dialog.c:226
  172 +msgid ""
  173 +"A CA certificate is invalid. Either it is not a CA or its extensions are not "
  174 +"consistent with the supplied purpose."
  175 +msgstr ""
  176 +"A CA certificate is invalid. Either it is not a CA or its extensions are not "
  177 +"consistent with the supplied purpose."
  178 +
163 179 #: filetransfer.c:386
164 180 msgid "Aborting"
165 181 msgstr "Abortando"
166 182  
  183 +#: dialog.c:800
  184 +msgid "About security"
  185 +msgstr "About security"
  186 +
167 187 #: paste.c:300
168 188 msgid "Action failed"
169 189 msgstr "Ação falhou"
... ... @@ -180,6 +200,10 @@ msgstr &quot;Adicionar/Remover _CR no final da linha&quot;
180 200 msgid "Alert sound"
181 201 msgstr "Aviso sonoro"
182 202  
  203 +#: dialog.c:184
  204 +msgid "An error occurred trying to allocate memory. This should never happen."
  205 +msgstr "An error occurred trying to allocate memory. This should never happen."
  206 +
183 207 #: main.c:246 main.c:248
184 208 msgid "Application name"
185 209 msgstr "Nome da aplicação"
... ... @@ -193,6 +217,14 @@ msgstr &quot;Attn&quot;
193 217 msgid "Attribute \"%s\" is invalid or undefined"
194 218 msgstr "Atributo \"%s\" é invalido ou indefinido"
195 219  
  220 +#: dialog.c:274
  221 +msgid "Authority and issuer serial number mismatch"
  222 +msgstr "Authority and issuer serial number mismatch"
  223 +
  224 +#: dialog.c:267
  225 +msgid "Authority and subject key identifier mismatch"
  226 +msgstr "Authority and subject key identifier mismatch"
  227 +
196 228 #: ui/00default.xml:349
197 229 msgid "Auto-Reconnect"
198 230 msgstr "Reconectar automaticamente"
... ... @@ -234,7 +266,7 @@ msgstr &quot;Azul&quot;
234 266 msgid "Bold"
235 267 msgstr "Negrito"
236 268  
237   -#: dialog.c:483
  269 +#: dialog.c:718
238 270 msgid "Brazilian Public Software Portal"
239 271 msgstr "Portal do Software Público Brasileiro"
240 272  
... ... @@ -246,7 +278,19 @@ msgstr &quot;Break&quot;
246 278 msgid "Broken pipe"
247 279 msgstr "Conexão interrompida"
248 280  
249   -#: dialog.c:103
  281 +#: dialog.c:148
  282 +msgid "CRL has expired"
  283 +msgstr "CRL has expired"
  284 +
  285 +#: dialog.c:141
  286 +msgid "CRL is not yet valid"
  287 +msgstr "CRL is not yet valid"
  288 +
  289 +#: dialog.c:120
  290 +msgid "CRL signature failure"
  291 +msgstr "CRL signature failure"
  292 +
  293 +#: dialog.c:338
250 294 msgid "C_haracter Coding:"
251 295 msgstr "C_odificação de caracteres:"
252 296  
... ... @@ -290,7 +334,7 @@ msgstr &quot;Não foi possível obter o tamanho do arquivo&quot;
290 334 msgid "Can't load %s"
291 335 msgstr "Não foi possível carregar %s"
292 336  
293   -#: dialog.c:355
  337 +#: dialog.c:590
294 338 msgid "Can't load file"
295 339 msgstr "Não foi possível carregar arquivo"
296 340  
... ... @@ -311,7 +355,7 @@ msgstr &quot;Incapaz de processar arquivos de descrição de UI em %s&quot;
311 355 msgid "Can't parse unnamed element"
312 356 msgstr "Incapaz de processar elemento sem nome"
313 357  
314   -#: dialog.c:333
  358 +#: dialog.c:568
315 359 #, c-format
316 360 msgid ""
317 361 "Can't save copy to file\n"
... ... @@ -320,11 +364,11 @@ msgstr &quot;&quot;
320 364 "Não foi possível salvar cópia para o arquivo\n"
321 365 "%s"
322 366  
323   -#: dialog.c:199
  367 +#: dialog.c:434
324 368 msgid "Can't save file"
325 369 msgstr "Não foi possível salvar arquivo"
326 370  
327   -#: dialog.c:308
  371 +#: dialog.c:543
328 372 #, c-format
329 373 msgid ""
330 374 "Can't save screen to file\n"
... ... @@ -333,7 +377,7 @@ msgstr &quot;&quot;
333 377 "Não foi possível salvar a tela no arquivo\n"
334 378 "%s"
335 379  
336   -#: dialog.c:322
  380 +#: dialog.c:557
337 381 #, c-format
338 382 msgid ""
339 383 "Can't save selection to file\n"
... ... @@ -381,6 +425,32 @@ msgstr &quot;Não encontrei codificação \&quot;%s\&quot;, usando defaults&quot;
381 425 msgid "Cannot parse %s \"%s\", entry %d"
382 426 msgstr "Impossível interpretar %s \"%s\", entrada %d"
383 427  
  428 +#: dialog.c:134
  429 +msgid "Certificate has expired"
  430 +msgstr "Certificate has expired"
  431 +
  432 +#: dialog.c:127
  433 +msgid "Certificate is not yet valid"
  434 +msgstr "Certificate is not yet valid"
  435 +
  436 +#: dialog.c:246
  437 +#, fuzzy
  438 +msgid "Certificate not trusted"
  439 +msgstr "%s: Tabulação verticao não suportada"
  440 +
  441 +#: dialog.c:253
  442 +#, fuzzy
  443 +msgid "Certificate rejected"
  444 +msgstr "Tipo de dispositivo rejeitado"
  445 +
  446 +#: dialog.c:218
  447 +msgid "Certificate revoked"
  448 +msgstr "Certificate revoked"
  449 +
  450 +#: dialog.c:113
  451 +msgid "Certificate signature failure"
  452 +msgstr "Certificate signature failure"
  453 +
384 454 #: v3270/selection.c:399
385 455 msgid "Charset error"
386 456 msgstr "Erro de codificação de caracteres"
... ... @@ -442,7 +512,7 @@ msgstr &quot;Cursor mira&quot;
442 512 msgid "Cross hair cursor"
443 513 msgstr "Cursor mira"
444 514  
445   -#: dialog.c:120
  515 +#: dialog.c:355
446 516 #, c-format
447 517 msgid "Current (%s)"
448 518 msgstr "Atual (%s)"
... ... @@ -580,7 +650,7 @@ msgstr &quot;Erro em fcntl(%s) ao ativar o modo não blocante&quot;
580 650 msgid "Error in ioctl(%s) when setting no blocking mode"
581 651 msgstr "Erro em ioctl(%s) ao ativar o modo não blocante"
582 652  
583   -#: dialog.c:353
  653 +#: dialog.c:588
584 654 #, c-format
585 655 msgid "Error loading %s"
586 656 msgstr "Erro lendo %s"
... ... @@ -622,6 +692,22 @@ msgstr &quot;Transferência de arquivos já está ativa nesta sessão&quot;
622 692 msgid "Fixed"
623 693 msgstr "Fixo"
624 694  
  695 +#: dialog.c:169
  696 +msgid "Format error in CRL's lastUpdate field"
  697 +msgstr "Format error in CRL's lastUpdate field"
  698 +
  699 +#: dialog.c:176
  700 +msgid "Format error in CRL's nextUpdate field"
  701 +msgstr "Format error in CRL's nextUpdate field"
  702 +
  703 +#: dialog.c:162
  704 +msgid "Format error in certificate's notAfter field"
  705 +msgstr "Format error in certificate's notAfter field"
  706 +
  707 +#: dialog.c:155
  708 +msgid "Format error in certificate's notBefore field"
  709 +msgstr "Format error in certificate's notBefore field"
  710 +
625 711 #: ui/00default.xml:343
626 712 msgid "Full Screen"
627 713 msgstr "Tela cheia"
... ... @@ -744,6 +830,11 @@ msgstr &quot;Intensificado/Desprotegido&quot;
744 830 msgid "Invalid (empty) hostname"
745 831 msgstr "Nome do host é invalido (vazio)"
746 832  
  833 +#: dialog.c:225
  834 +#, fuzzy
  835 +msgid "Invalid CA certificate"
  836 +msgstr "Ação recortar inválida"
  837 +
747 838 #: charset.c:321
748 839 #, c-format
749 840 msgid "Invalid CGCSGID '%s', ignoring"
... ... @@ -775,6 +866,10 @@ msgstr &quot;Tipo de proxy invalido &#39;%.*s&#39;&quot;
775 866 msgid "Keep selected"
776 867 msgstr "Manter selecionado"
777 868  
  869 +#: dialog.c:281
  870 +msgid "Key usage does not include certificate signing"
  871 +msgstr "Key usage does not include certificate signing"
  872 +
778 873 #: paste.c:302
779 874 msgid "Keyboard is locked"
780 875 msgstr "Teclado está bloqueado"
... ... @@ -795,7 +890,7 @@ msgstr &quot;Cores diversas&quot;
795 890 msgid "Missing ']'"
796 891 msgstr "Faltando ']'"
797 892  
798   -#: window.c:325
  893 +#: window.c:331
799 894 #, c-format
800 895 msgid "Model %d (%s)"
801 896 msgstr "Modelo %d (%s)"
... ... @@ -840,6 +935,14 @@ msgstr &quot;Erro ao iniciar a rede&quot;
840 935 msgid "Next field"
841 936 msgstr "Próximo campo"
842 937  
  938 +#: dialog.c:212
  939 +msgid ""
  940 +"No signatures could be verified because the chain contains only one "
  941 +"certificate and it is not self signed."
  942 +msgstr ""
  943 +"No signatures could be verified because the chain contains only one "
  944 +"certificate and it is not self signed."
  945 +
843 946 #: colors.c:412
844 947 msgid "Normal/Protected"
845 948 msgstr "Normal/Protegido"
... ... @@ -902,6 +1005,10 @@ msgstr &quot;Other (TSO)&quot;
902 1005 msgid "Other (VM/CMS)"
903 1006 msgstr "Other (VM/CMS)"
904 1007  
  1008 +#: dialog.c:183
  1009 +msgid "Out of memory"
  1010 +msgstr "Out of memory"
  1011 +
905 1012 #: ui/10keypad.xml:138
906 1013 msgid "PA1"
907 1014 msgstr "PA1"
... ... @@ -1035,7 +1142,7 @@ msgstr &quot;Colar próximo&quot;
1035 1142 msgid "Paste text file"
1036 1143 msgstr "Colar arquivo texto"
1037 1144  
1038   -#: dialog.c:390
  1145 +#: dialog.c:625
1039 1146 msgid "Paste text file contents"
1040 1147 msgstr "Colar conteúdo de arquivo texto"
1041 1148  
... ... @@ -1043,6 +1150,10 @@ msgstr &quot;Colar conteúdo de arquivo texto&quot;
1043 1150 msgid "Paste with left margin"
1044 1151 msgstr "Colar com margem esquerda"
1045 1152  
  1153 +#: dialog.c:232
  1154 +msgid "Path length constraint exceeded"
  1155 +msgstr "Path length constraint exceeded"
  1156 +
1046 1157 #: main.c:249
1047 1158 msgid "Path to application data files"
1048 1159 msgstr "Path to application data files"
... ... @@ -1372,7 +1483,7 @@ msgstr &quot;&quot;
1372 1483 msgid "Save copy"
1373 1484 msgstr "Salvar cópia"
1374 1485  
1375   -#: dialog.c:332
  1486 +#: dialog.c:567
1376 1487 msgid "Save copy to file"
1377 1488 msgstr "Salvar cópia para arquivo"
1378 1489  
... ... @@ -1380,7 +1491,7 @@ msgstr &quot;Salvar cópia para arquivo&quot;
1380 1491 msgid "Save screen"
1381 1492 msgstr "Salvar tela"
1382 1493  
1383   -#: dialog.c:307
  1494 +#: dialog.c:542
1384 1495 msgid "Save screen to file"
1385 1496 msgstr "Salvar tela para arquivo"
1386 1497  
... ... @@ -1388,7 +1499,7 @@ msgstr &quot;Salvar tela para arquivo&quot;
1388 1499 msgid "Save selected"
1389 1500 msgstr "Salvar seleção"
1390 1501  
1391   -#: dialog.c:321
  1502 +#: dialog.c:556
1392 1503 msgid "Save selection to file"
1393 1504 msgstr "Salvar seleção para arquivo"
1394 1505  
... ... @@ -1408,6 +1519,11 @@ msgstr &quot;Scripts&quot;
1408 1519 msgid "Secondary space:"
1409 1520 msgstr "Secondary space:"
1410 1521  
  1522 +#: dialog.c:71
  1523 +#, fuzzy
  1524 +msgid "Secure connection was successful."
  1525 +msgstr "Conexão _Segura"
  1526 +
1411 1527 #: ui/00default.xml:296
1412 1528 msgid "Select Field"
1413 1529 msgstr "Selecionar campo"
... ... @@ -1444,6 +1560,14 @@ msgstr &quot;Fundo da seleção&quot;
1444 1560 msgid "Selection foreground"
1445 1561 msgstr "Frente da seleção"
1446 1562  
  1563 +#: dialog.c:190
  1564 +msgid "Self signed certificate"
  1565 +msgstr "Self signed certificate"
  1566 +
  1567 +#: dialog.c:197
  1568 +msgid "Self signed certificate in certificate chain"
  1569 +msgstr "Self signed certificate in certificate chain"
  1570 +
1447 1571 #: ui/00default.xml:277
1448 1572 msgid "Send file"
1449 1573 msgstr "Enviar arquivo"
... ... @@ -1504,6 +1628,10 @@ msgstr &quot;Espaço no nome da LU&quot;
1504 1628 msgid "Spee_d"
1505 1629 msgstr "Veloci_dade"
1506 1630  
  1631 +#: dialog.c:260
  1632 +msgid "Subject issuer mismatch"
  1633 +msgstr "Subject issuer mismatch"
  1634 +
1507 1635 #: hostdialog.c:198
1508 1636 msgid "System _type:"
1509 1637 msgstr "Tipo de servidor:"
... ... @@ -1528,15 +1656,186 @@ msgstr &quot;Cores do terminal&quot;
1528 1656 msgid "Text before '['"
1529 1657 msgstr "Texto antes de '['"
1530 1658  
1531   -#: dialog.c:223
  1659 +#: dialog.c:149
  1660 +msgid "The CRL has expired."
  1661 +msgstr "The CRL has expired."
  1662 +
  1663 +#: dialog.c:142
  1664 +msgid "The CRL is not yet valid."
  1665 +msgstr "The CRL is not yet valid."
  1666 +
  1667 +#: dialog.c:170
  1668 +msgid "The CRL lastUpdate field contains an invalid time."
  1669 +msgstr "The CRL lastUpdate field contains an invalid time."
  1670 +
  1671 +#: dialog.c:177
  1672 +msgid "The CRL nextUpdate field contains an invalid time."
  1673 +msgstr "The CRL nextUpdate field contains an invalid time."
  1674 +
  1675 +#: dialog.c:86
  1676 +msgid "The CRL of a certificate could not be found."
  1677 +msgstr "The CRL of a certificate could not be found."
  1678 +
  1679 +#: dialog.c:100
  1680 +msgid ""
  1681 +"The CRL signature could not be decrypted: this means that the actual "
  1682 +"signature value could not be determined rather than it not matching the "
  1683 +"expected value. Unused."
  1684 +msgstr ""
  1685 +"The CRL signature could not be decrypted: this means that the actual "
  1686 +"signature value could not be determined rather than it not matching the "
  1687 +"expected value. Unused."
  1688 +
  1689 +#: dialog.c:233
  1690 +msgid "The basicConstraints pathlength parameter has been exceeded."
  1691 +msgstr "The basicConstraints pathlength parameter has been exceeded."
  1692 +
  1693 +#: dialog.c:198
  1694 +msgid ""
  1695 +"The certificate chain could be built up using the untrusted certificates but "
  1696 +"the root could not be found locally."
  1697 +msgstr ""
  1698 +"The certificate chain could be built up using the untrusted certificates but "
  1699 +"the root could not be found locally."
  1700 +
  1701 +#: dialog.c:219
  1702 +msgid "The certificate has been revoked."
  1703 +msgstr "The certificate has been revoked."
  1704 +
  1705 +#: dialog.c:135
  1706 +msgid ""
  1707 +"The certificate has expired: that is the notAfter date is before the current "
  1708 +"time."
  1709 +msgstr ""
  1710 +"The certificate has expired: that is the notAfter date is before the current "
  1711 +"time."
  1712 +
  1713 +#: dialog.c:128
  1714 +msgid ""
  1715 +"The certificate is not yet valid: the notBefore date is after the current "
  1716 +"time."
  1717 +msgstr ""
  1718 +"The certificate is not yet valid: the notBefore date is after the current "
  1719 +"time."
  1720 +
  1721 +#: dialog.c:163
  1722 +msgid "The certificate notAfter field contains an invalid time."
  1723 +msgstr "The certificate notAfter field contains an invalid time."
  1724 +
  1725 +#: dialog.c:156
  1726 +msgid "The certificate notBefore field contains an invalid time."
  1727 +msgstr "The certificate notBefore field contains an invalid time."
  1728 +
  1729 +#: dialog.c:93
  1730 +msgid ""
  1731 +"The certificate signature could not be decrypted. This means that the actual "
  1732 +"signature value could not be determined rather than it not matching the "
  1733 +"expected value, this is only meaningful for RSA keys."
  1734 +msgstr ""
  1735 +"The certificate signature could not be decrypted. This means that the actual "
  1736 +"signature value could not be determined rather than it not matching the "
  1737 +"expected value, this is only meaningful for RSA keys."
  1738 +
  1739 +#: dialog.c:275
  1740 +msgid ""
  1741 +"The current candidate issuer certificate was rejected because its issuer "
  1742 +"name and serial number was present and did not match the authority key "
  1743 +"identifier of the current certificate. Only displayed when the -"
  1744 +"issuer_checks option is set."
  1745 +msgstr ""
  1746 +"The current candidate issuer certificate was rejected because its issuer "
  1747 +"name and serial number was present and did not match the authority key "
  1748 +"identifier of the current certificate. Only displayed when the -"
  1749 +"issuer_checks option is set."
  1750 +
  1751 +#: dialog.c:282
  1752 +msgid ""
  1753 +"The current candidate issuer certificate was rejected because its keyUsage "
  1754 +"extension does not permit certificate signing."
  1755 +msgstr ""
  1756 +"The current candidate issuer certificate was rejected because its keyUsage "
  1757 +"extension does not permit certificate signing."
  1758 +
  1759 +#: dialog.c:268
  1760 +msgid ""
  1761 +"The current candidate issuer certificate was rejected because its subject "
  1762 +"key identifier was present and did not match the authority key identifier "
  1763 +"current certificate. Only displayed when the -issuer_checks option is set."
  1764 +msgstr ""
  1765 +"The current candidate issuer certificate was rejected because its subject "
  1766 +"key identifier was present and did not match the authority key identifier "
  1767 +"current certificate. Only displayed when the -issuer_checks option is set."
  1768 +
  1769 +#: dialog.c:261
  1770 +msgid ""
  1771 +"The current candidate issuer certificate was rejected because its subject "
  1772 +"name did not match the issuer name of the current certificate. Only "
  1773 +"displayed when the -issuer_checks option is set."
  1774 +msgstr ""
  1775 +"The current candidate issuer certificate was rejected because its subject "
  1776 +"name did not match the issuer name of the current certificate. Only "
  1777 +"displayed when the -issuer_checks option is set."
  1778 +
  1779 +#: dialog.c:458
1532 1780 msgid "The file already exists. Replace it?"
1533 1781 msgstr "O arquivo já existe, substituir?"
1534 1782  
  1783 +#: dialog.c:205
  1784 +msgid ""
  1785 +"The issuer certificate could not be found: this occurs if the issuer "
  1786 +"certificate of an untrusted certificate cannot be found."
  1787 +msgstr ""
  1788 +"The issuer certificate could not be found: this occurs if the issuer "
  1789 +"certificate of an untrusted certificate cannot be found."
  1790 +
  1791 +#: dialog.c:79
  1792 +msgid ""
  1793 +"The issuer certificate of a looked up certificate could not be found. This "
  1794 +"normally means the list of trusted certificates is not complete."
  1795 +msgstr ""
  1796 +"The issuer certificate of a looked up certificate could not be found. This "
  1797 +"normally means the list of trusted certificates is not complete."
  1798 +
  1799 +#: dialog.c:191
  1800 +msgid ""
  1801 +"The passed certificate is self signed and the same certificate cannot be "
  1802 +"found in the list of trusted certificates."
  1803 +msgstr ""
  1804 +"The passed certificate is self signed and the same certificate cannot be "
  1805 +"found in the list of trusted certificates."
  1806 +
  1807 +#: dialog.c:107
  1808 +msgid ""
  1809 +"The public key in the certificate SubjectPublicKeyInfo could not be read."
  1810 +msgstr ""
  1811 +"The public key in the certificate SubjectPublicKeyInfo could not be read."
  1812 +
1535 1813 #: ft.c:216
1536 1814 msgid "The remote file name is invalid"
1537 1815 msgstr "O nome do arquivo remoto não é válido"
1538 1816  
1539   -#: dialog.c:430
  1817 +#: dialog.c:254
  1818 +msgid "The root CA is marked to reject the specified purpose."
  1819 +msgstr "The root CA is marked to reject the specified purpose."
  1820 +
  1821 +#: dialog.c:247
  1822 +msgid "The root CA is not marked as trusted for the specified purpose."
  1823 +msgstr "The root CA is not marked as trusted for the specified purpose."
  1824 +
  1825 +#: dialog.c:114 dialog.c:121
  1826 +#, fuzzy
  1827 +msgid "The signature of the certificate is invalid."
  1828 +msgstr "O nome do arquivo remoto não é válido"
  1829 +
  1830 +#: dialog.c:240
  1831 +msgid "The supplied certificate cannot be used for the specified purpose."
  1832 +msgstr "The supplied certificate cannot be used for the specified purpose."
  1833 +
  1834 +#: dialog.c:72
  1835 +msgid "This connection is secure and signed."
  1836 +msgstr "This connection is secure and signed."
  1837 +
  1838 +#: dialog.c:665
1540 1839 msgid ""
1541 1840 "This program is free software; you can redistribute it and/or modify it "
1542 1841 "under the terms of the GNU General Public License as published by the Free "
... ... @@ -1612,7 +1911,7 @@ msgstr &quot;Erro de transmissão&quot;
1612 1911 msgid "Turquoise"
1613 1912 msgstr "Turquesa"
1614 1913  
1615   -#: dialog.c:44
  1914 +#: dialog.c:50
1616 1915 msgid "UTF-8"
1617 1916 msgstr "UTF-8"
1618 1917  
... ... @@ -1624,6 +1923,30 @@ msgstr &quot;Servidor enviou código de abertura DFT desconhecido&quot;
1624 1923 msgid "Unable to connect to secure hosts"
1625 1924 msgstr "Não é possível conectar em servidores seguros"
1626 1925  
  1926 +#: dialog.c:106
  1927 +msgid "Unable to decode issuer public key"
  1928 +msgstr "Unable to decode issuer public key"
  1929 +
  1930 +#: dialog.c:99
  1931 +msgid "Unable to decrypt CRL's signature"
  1932 +msgstr "Unable to decrypt CRL's signature"
  1933 +
  1934 +#: dialog.c:92
  1935 +msgid "Unable to decrypt certificate's signature"
  1936 +msgstr "Unable to decrypt certificate's signature"
  1937 +
  1938 +#: dialog.c:85
  1939 +msgid "Unable to get certificate CRL"
  1940 +msgstr "Unable to get certificate CRL"
  1941 +
  1942 +#: dialog.c:78
  1943 +msgid "Unable to get issuer certificate"
  1944 +msgstr "Unable to get issuer certificate"
  1945 +
  1946 +#: dialog.c:204
  1947 +msgid "Unable to get local issuer certificate"
  1948 +msgstr "Unable to get local issuer certificate"
  1949 +
1627 1950 #: paste.c:301
1628 1951 msgid "Unable to paste text"
1629 1952 msgstr "Incapaz de colar texto"
... ... @@ -1632,10 +1955,19 @@ msgstr &quot;Incapaz de colar texto&quot;
1632 1955 msgid "Unable to send file-transfer request"
1633 1956 msgstr "Não foi possível enviar a requisição de transferência de arquivo"
1634 1957  
  1958 +#: dialog.c:211
  1959 +msgid "Unable to verify the first certificate"
  1960 +msgstr "Unable to verify the first certificate"
  1961 +
1635 1962 #: filetransfer.c:774
1636 1963 msgid "Undefined"
1637 1964 msgstr "Indefinido"
1638 1965  
  1966 +#: dialog.c:760
  1967 +#, fuzzy
  1968 +msgid "Unexpected SSL error"
  1969 +msgstr "Erro inesperado"
  1970 +
1639 1971 #: uiparser/menubar.c:48 uiparser/toolbar.c:64 uiparser/popup.c:51
1640 1972 #, c-format
1641 1973 msgid "Unexpected action attribute in <%s>"
... ... @@ -1670,7 +2002,7 @@ msgstr &quot;Valor de attributo inesperado ou inválido: \&quot;%s\&quot;&quot;
1670 2002 msgid "Unexpected or invalid color value \"%s\""
1671 2003 msgstr "Valor de cor inválido ou inesperado: \"%s\""
1672 2004  
1673   -#: v3270/widget.c:803
  2005 +#: v3270/widget.c:816
1674 2006 msgid ""
1675 2007 "Unexpected signature in H3270 object, possible version mismatch in lib3270"
1676 2008 msgstr ""
... ... @@ -1738,6 +2070,11 @@ msgstr &quot;Número de porta ou serviço desconhecido: %s&quot;
1738 2070 msgid "Unsupported RPQ term"
1739 2071 msgstr "Unsupported RPQ term"
1740 2072  
  2073 +#: dialog.c:239
  2074 +#, fuzzy
  2075 +msgid "Unsupported certificate purpose"
  2076 +msgstr "Unsupported socks 4 proxy"
  2077 +
1741 2078 #: telnet.c:547
1742 2079 msgid "Unsupported passthru host session"
1743 2080 msgstr "Unsupported passthru host session"
... ... @@ -1754,7 +2091,7 @@ msgstr &quot;Usar teclas +/- para navegar por campos&quot;
1754 2091 msgid "Variable"
1755 2092 msgstr "Variável"
1756 2093  
1757   -#: dialog.c:470
  2094 +#: dialog.c:705
1758 2095 #, c-format
1759 2096 msgid "Version %s - Revision %s"
1760 2097 msgstr "Versão %s - Revisão %s"
... ... @@ -1779,7 +2116,7 @@ msgstr &quot;Aguardando resposta do pedido de download&quot;
1779 2116 msgid "Waiting for PUT response"
1780 2117 msgstr "Aguardando resposta do pedido de upload"
1781 2118  
1782   -#: dialog.c:45
  2119 +#: dialog.c:51
1783 2120 msgid "Western Europe (ISO 8859-1)"
1784 2121 msgstr "Europa ocidental (ISO 8859-1)"
1785 2122  
... ... @@ -1791,51 +2128,51 @@ msgstr &quot;Branco&quot;
1791 2128 msgid "Window"
1792 2129 msgstr "Janela"
1793 2130  
1794   -#: dialog.c:46
  2131 +#: dialog.c:52
1795 2132 msgid "Windows Western languages (CP1252)"
1796 2133 msgstr "Windows ocidental (CP1252)"
1797 2134  
1798   -#: v3270/oia.c:420 v3270/oia.c:444 v3270/oia.c:448
  2135 +#: v3270/oia.c:415 v3270/oia.c:439 v3270/oia.c:443
1799 2136 msgid "X"
1800 2137 msgstr "X"
1801 2138  
1802   -#: v3270/oia.c:424
  2139 +#: v3270/oia.c:419
1803 2140 msgid "X -f"
1804 2141 msgstr "X -f"
1805 2142  
1806   -#: v3270/oia.c:456
  2143 +#: v3270/oia.c:451
1807 2144 msgid "X Connecting"
1808 2145 msgstr "X Conectando"
1809 2146  
1810   -#: v3270/oia.c:440
  2147 +#: v3270/oia.c:435
1811 2148 msgid "X Inhibit"
1812 2149 msgstr "X Inibido"
1813 2150  
1814   -#: v3270/oia.c:416
  2151 +#: v3270/oia.c:411
1815 2152 msgid "X Not Connected"
1816 2153 msgstr "X Desconectado"
1817 2154  
1818   -#: v3270/oia.c:432
  2155 +#: v3270/oia.c:427
1819 2156 msgid "X Numeric"
1820 2157 msgstr "X Numérico"
1821 2158  
1822   -#: v3270/oia.c:436
  2159 +#: v3270/oia.c:431
1823 2160 msgid "X Overflow"
1824 2161 msgstr "X Estouro"
1825 2162  
1826   -#: v3270/oia.c:428
  2163 +#: v3270/oia.c:423
1827 2164 msgid "X Protected"
1828 2165 msgstr "X Protegido"
1829 2166  
1830   -#: v3270/oia.c:452
  2167 +#: v3270/oia.c:447
1831 2168 msgid "X Resolving"
1832 2169 msgstr "X Resolvendo"
1833 2170  
1834   -#: v3270/oia.c:404
  2171 +#: v3270/oia.c:399
1835 2172 msgid "X System"
1836 2173 msgstr "X Sistema"
1837 2174  
1838   -#: v3270/oia.c:408
  2175 +#: v3270/oia.c:403
1839 2176 msgid "X Wait"
1840 2177 msgstr "X Aguarde"
1841 2178  
... ... @@ -1965,7 +2302,7 @@ msgstr &quot;setsockopt(%s)&quot;
1965 2302 msgid "socket"
1966 2303 msgstr "socket"
1967 2304  
1968   -#: dialog.c:486
  2305 +#: dialog.c:721
1969 2306 msgid "translator-credits"
1970 2307 msgstr "translator-credits"
1971 2308  
... ...
pw3270.cbp
... ... @@ -351,6 +351,9 @@
351 351 <Option compilerVar="CC" />
352 352 </Unit>
353 353 <Unit filename="src/pw3270/v3270/private.h" />
  354 + <Unit filename="src/pw3270/v3270/security.c">
  355 + <Option compilerVar="CC" />
  356 + </Unit>
354 357 <Unit filename="src/pw3270/v3270/selection.c">
355 358 <Option compilerVar="CC" />
356 359 </Unit>
... ...
src/include/pw3270/v3270.h
... ... @@ -199,8 +199,14 @@
199 199 // Keyboard & Mouse special actions
200 200 LIB3270_EXPORT gboolean v3270_set_keyboard_action(GtkWidget *widget, const gchar *key_name, GtkAction *action);
201 201 LIB3270_EXPORT void v3270_set_scroll_action(GtkWidget *widget, GdkScrollDirection direction, GtkAction *action);
202   -
203 202  
204   -G_END_DECLS
  203 + // SSL & Security
  204 + LIB3270_EXPORT const gchar * v3270_get_ssl_status_icon(GtkWidget *widget);
  205 + LIB3270_EXPORT const gchar * v3270_get_ssl_status_text(GtkWidget *widget);
  206 + LIB3270_EXPORT const gchar * v3270_get_ssl_status_message(GtkWidget *widget);
  207 + LIB3270_EXPORT void v3270_popup_security_dialog(GtkWidget *widget);
  208 +
  209 +
  210 + G_END_DECLS
205 211  
206 212 #endif // V3270_H_INCLUDED
... ...
src/pw3270/Makefile.in
... ... @@ -59,7 +59,7 @@ include uiparser/sources.mak
59 59 APP_SOURCES= main.c @APP_GUI_SRC@
60 60  
61 61 LIB_SOURCES= window.c actions.c fonts.c dialog.c hostdialog.c print.c colors.c \
62   - filetransfer.c tools.c plugin.c macros.c\
  62 + filetransfer.c tools.c plugin.c macros.c \
63 63 $(foreach SRC, $(UI_PARSER_SRC), uiparser/$(SRC)) \
64 64 $(foreach SRC, $(V3270_SRC), v3270/$(SRC)) \
65 65 $(foreach SRC, $(COMMON_SRC), common/$(SRC))
... ...
src/pw3270/dialog.c
... ... @@ -55,235 +55,6 @@
55 55 };
56 56  
57 57  
58   - static const struct _sslerror
59   - {
60   - long id;
61   - const gchar * icon;
62   - const gchar * title;
63   - const gchar * text;
64   - }
65   - sslerror[] =
66   - {
67   - // http://www.openssl.org/docs/apps/verify.html
68   - {
69   - X509_V_OK,
70   - GTK_STOCK_DIALOG_AUTHENTICATION,
71   - N_( "Secure connection was successful." ),
72   - N_( "This connection is secure and signed." )
73   - },
74   -
75   - {
76   - X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
77   - GTK_STOCK_DIALOG_ERROR,
78   - N_( "Unable to get issuer certificate" ),
79   - N_( "The issuer certificate of a looked up certificate could not be found. This normally means the list of trusted certificates is not complete." ),
80   - },
81   -
82   - {
83   - X509_V_ERR_UNABLE_TO_GET_CRL,
84   - GTK_STOCK_DIALOG_ERROR,
85   - N_( "Unable to get certificate CRL" ),
86   - N_( "The CRL of a certificate could not be found." ),
87   - },
88   -
89   - {
90   - X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,
91   - GTK_STOCK_DIALOG_ERROR,
92   - N_( "Unable to decrypt certificate's signature" ),
93   - N_( "The certificate signature could not be decrypted. This means that the actual signature value could not be determined rather than it not matching the expected value, this is only meaningful for RSA keys." ),
94   - },
95   -
96   - {
97   - X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,
98   - GTK_STOCK_DIALOG_ERROR,
99   - N_( "Unable to decrypt CRL's signature" ),
100   - N_( "The CRL signature could not be decrypted: this means that the actual signature value could not be determined rather than it not matching the expected value. Unused." ),
101   - },
102   -
103   - {
104   - X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
105   - GTK_STOCK_DIALOG_ERROR,
106   - N_( "Unable to decode issuer public key" ),
107   - N_( "The public key in the certificate SubjectPublicKeyInfo could not be read." ),
108   - },
109   -
110   - {
111   - X509_V_ERR_CERT_SIGNATURE_FAILURE,
112   - GTK_STOCK_DIALOG_ERROR,
113   - N_( "Certificate signature failure" ),
114   - N_( "The signature of the certificate is invalid." ),
115   - },
116   -
117   - {
118   - X509_V_ERR_CRL_SIGNATURE_FAILURE,
119   - GTK_STOCK_DIALOG_ERROR,
120   - N_( "CRL signature failure" ),
121   - N_( "The signature of the certificate is invalid." ),
122   - },
123   -
124   - {
125   - X509_V_ERR_CERT_NOT_YET_VALID,
126   - GTK_STOCK_DIALOG_WARNING,
127   - N_( "Certificate is not yet valid" ),
128   - N_( "The certificate is not yet valid: the notBefore date is after the current time." ),
129   - },
130   -
131   - {
132   - X509_V_ERR_CERT_HAS_EXPIRED,
133   - GTK_STOCK_DIALOG_ERROR,
134   - N_( "Certificate has expired" ),
135   - N_( "The certificate has expired: that is the notAfter date is before the current time." ),
136   - },
137   -
138   - {
139   - X509_V_ERR_CRL_NOT_YET_VALID,
140   - GTK_STOCK_DIALOG_WARNING,
141   - N_( "CRL is not yet valid" ),
142   - N_( "The CRL is not yet valid." ),
143   - },
144   -
145   - {
146   - X509_V_ERR_CRL_HAS_EXPIRED,
147   - GTK_STOCK_DIALOG_ERROR,
148   - N_( "CRL has expired" ),
149   - N_( "The CRL has expired." ),
150   - },
151   -
152   - {
153   - X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD,
154   - GTK_STOCK_DIALOG_ERROR,
155   - N_( "Format error in certificate's notBefore field" ),
156   - N_( "The certificate notBefore field contains an invalid time." ),
157   - },
158   -
159   - {
160   - X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD,
161   - GTK_STOCK_DIALOG_ERROR,
162   - N_( "Format error in certificate's notAfter field" ),
163   - N_( "The certificate notAfter field contains an invalid time." ),
164   - },
165   -
166   - {
167   - X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,
168   - GTK_STOCK_DIALOG_ERROR,
169   - N_( "Format error in CRL's lastUpdate field" ),
170   - N_( "The CRL lastUpdate field contains an invalid time." ),
171   - },
172   -
173   - {
174   - X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD,
175   - GTK_STOCK_DIALOG_ERROR,
176   - N_( "Format error in CRL's nextUpdate field" ),
177   - N_( "The CRL nextUpdate field contains an invalid time." ),
178   - },
179   -
180   - {
181   - X509_V_ERR_OUT_OF_MEM,
182   - GTK_STOCK_DIALOG_ERROR,
183   - N_( "Out of memory" ),
184   - N_( "An error occurred trying to allocate memory. This should never happen." ),
185   - },
186   -
187   - {
188   - X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
189   - GTK_STOCK_DIALOG_WARNING,
190   - N_( "Self signed certificate" ),
191   - N_( "The passed certificate is self signed and the same certificate cannot be found in the list of trusted certificates." ),
192   - },
193   -
194   - {
195   - X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
196   - GTK_STOCK_DIALOG_WARNING,
197   - N_( "Self signed certificate in certificate chain" ),
198   - N_( "The certificate chain could be built up using the untrusted certificates but the root could not be found locally." ),
199   - },
200   -
201   - {
202   - X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
203   - GTK_STOCK_DIALOG_WARNING,
204   - N_( "Unable to get local issuer certificate" ),
205   - N_( "The issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found." ),
206   - },
207   -
208   - {
209   - X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
210   - GTK_STOCK_DIALOG_ERROR,
211   - N_( "Unable to verify the first certificate" ),
212   - N_( "No signatures could be verified because the chain contains only one certificate and it is not self signed." ),
213   - },
214   -
215   - {
216   - X509_V_ERR_CERT_REVOKED,
217   - GTK_STOCK_DIALOG_ERROR,
218   - N_( "Certificate revoked" ),
219   - N_( "The certificate has been revoked." ),
220   - },
221   -
222   - {
223   - X509_V_ERR_INVALID_CA,
224   - GTK_STOCK_DIALOG_ERROR,
225   - N_( "Invalid CA certificate" ),
226   - N_( "A CA certificate is invalid. Either it is not a CA or its extensions are not consistent with the supplied purpose." ),
227   - },
228   -
229   - {
230   - X509_V_ERR_PATH_LENGTH_EXCEEDED,
231   - GTK_STOCK_DIALOG_ERROR,
232   - N_( "Path length constraint exceeded" ),
233   - N_( "The basicConstraints pathlength parameter has been exceeded." ),
234   - },
235   -
236   - {
237   - X509_V_ERR_INVALID_PURPOSE,
238   - GTK_STOCK_DIALOG_ERROR,
239   - N_( "Unsupported certificate purpose" ),
240   - N_( "The supplied certificate cannot be used for the specified purpose." ),
241   - },
242   -
243   - {
244   - X509_V_ERR_CERT_UNTRUSTED,
245   - GTK_STOCK_DIALOG_WARNING,
246   - N_( "Certificate not trusted" ),
247   - N_( "The root CA is not marked as trusted for the specified purpose." ),
248   - },
249   -
250   - {
251   - X509_V_ERR_CERT_REJECTED,
252   - GTK_STOCK_DIALOG_ERROR,
253   - N_( "Certificate rejected" ),
254   - N_( "The root CA is marked to reject the specified purpose." ),
255   - },
256   -
257   - {
258   - X509_V_ERR_SUBJECT_ISSUER_MISMATCH,
259   - GTK_STOCK_DIALOG_ERROR,
260   - N_( "Subject issuer mismatch" ),
261   - N_( "The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate. Only displayed when the -issuer_checks option is set." ),
262   - },
263   -
264   - {
265   - X509_V_ERR_AKID_SKID_MISMATCH,
266   - GTK_STOCK_DIALOG_ERROR,
267   - N_( "Authority and subject key identifier mismatch" ),
268   - N_( "The current candidate issuer certificate was rejected because its subject key identifier was present and did not match the authority key identifier current certificate. Only displayed when the -issuer_checks option is set." ),
269   - },
270   -
271   - {
272   - X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,
273   - GTK_STOCK_DIALOG_ERROR,
274   - N_( "Authority and issuer serial number mismatch" ),
275   - N_( "The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate. Only displayed when the -issuer_checks option is set." ),
276   - },
277   -
278   - {
279   - X509_V_ERR_KEYUSAGE_NO_CERTSIGN,
280   - GTK_STOCK_DIALOG_ERROR,
281   - N_( "Key usage does not include certificate signing" ),
282   - N_( "The current candidate issuer certificate was rejected because its keyUsage extension does not permit certificate signing." ),
283   - }
284   -
285   - };
286   -
287 58 /*--[ Implement ]------------------------------------------------------------------------------------*/
288 59  
289 60  
... ... @@ -727,9 +498,10 @@
727 498 g_free(info);
728 499 }
729 500  
  501 +/*
730 502 G_GNUC_INTERNAL void run_security_dialog(GtkWidget *widget)
731 503 {
732   - GtkWidget * dialog;
  504 + GtkWidget * dialog;
733 505 H3270 * hSession = pw3270_get_session(widget);
734 506  
735 507 trace("%s(%p)",__FUNCTION__,widget);
... ... @@ -804,3 +576,4 @@
804 576 gtk_widget_destroy(GTK_WIDGET(dialog));
805 577  
806 578 }
  579 +*/
... ...
src/pw3270/v3270/private.h
... ... @@ -38,12 +38,11 @@
38 38 #include <glib/gi18n.h>
39 39  
40 40 #ifndef V3270_H_INCLUDED
41   - #include <lib3270/v3270.h>
  41 + #include <pw3270/v3270.h>
42 42 #endif
43 43  
44 44 G_BEGIN_DECLS
45 45  
46   -
47 46 struct _v3270Class
48 47 {
49 48 GtkWidgetClass parent_class;
... ... @@ -121,6 +120,14 @@ G_BEGIN_DECLS
121 120 guint top;
122 121 };
123 122  
  123 + struct v3270_ssl_status_msg
  124 + {
  125 + long id;
  126 + const gchar * icon;
  127 + const gchar * text;
  128 + const gchar * message;
  129 + };
  130 +
124 131 /*--[ Widget data ]----------------------------------------------------------------------------------*/
125 132  
126 133 struct _v3270
... ... @@ -201,6 +208,7 @@ G_BEGIN_DECLS
201 208 G_GNUC_INTERNAL guint v3270_widget_signal[LAST_SIGNAL];
202 209 G_GNUC_INTERNAL GdkCursor * v3270_cursor[V3270_CURSOR_COUNT];
203 210  
  211 +
204 212 /*--[ Prototipes ]-----------------------------------------------------------------------------------*/
205 213  
206 214 const GtkWidgetClass * v3270_get_parent_class(void);
... ... @@ -270,4 +278,7 @@ void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event);
270 278 gint v3270_get_offset_at_point(v3270 *widget, gint x, gint y);
271 279 gboolean v3270_scroll_event(GtkWidget *widget, GdkEventScroll *event);
272 280  
  281 +G_GNUC_INTERNAL const struct v3270_ssl_status_msg * v3270_get_ssl_status_msg(GtkWidget *widget);
  282 +
  283 +
273 284 G_END_DECLS
... ...
src/pw3270/v3270/security.c 0 → 100644
... ... @@ -0,0 +1,424 @@
  1 +/*
  2 + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
  3 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
  4 + * aplicativos mainframe. Registro no INPI sob o nome G3270.
  5 + *
  6 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  7 + *
  8 + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
  9 + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
  10 + * Free Software Foundation.
  11 + *
  12 + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
  13 + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
  14 + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
  15 + * obter mais detalhes.
  16 + *
  17 + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
  18 + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
  19 + * St, Fifth Floor, Boston, MA 02110-1301 USA
  20 + *
  21 + * Este programa está nomeado como secoruty.c e possui - linhas de código.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + */
  29 +
  30 + #include <gtk/gtk.h>
  31 + #include "private.h"
  32 +
  33 + #if defined(HAVE_LIBSSL)
  34 + #include <openssl/ssl.h>
  35 + #include <openssl/err.h>
  36 + #endif
  37 +
  38 +
  39 +/*--[ Globals ]--------------------------------------------------------------------------------------*/
  40 +
  41 + static const struct v3270_ssl_status_msg ssl_status_msg[] =
  42 + {
  43 + // http://www.openssl.org/docs/apps/verify.html
  44 + {
  45 + X509_V_OK,
  46 + GTK_STOCK_DIALOG_AUTHENTICATION,
  47 + N_( "Secure connection was successful." ),
  48 + N_( "This connection is secure and signed." )
  49 + },
  50 +
  51 + {
  52 + X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,
  53 + GTK_STOCK_DIALOG_ERROR,
  54 + N_( "Unable to get issuer certificate" ),
  55 + N_( "The issuer certificate of a looked up certificate could not be found. This normally means the list of trusted certificates is not complete." ),
  56 + },
  57 +
  58 + {
  59 + X509_V_ERR_UNABLE_TO_GET_CRL,
  60 + GTK_STOCK_DIALOG_ERROR,
  61 + N_( "Unable to get certificate CRL" ),
  62 + N_( "The CRL of a certificate could not be found." ),
  63 + },
  64 +
  65 + {
  66 + X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,
  67 + GTK_STOCK_DIALOG_ERROR,
  68 + N_( "Unable to decrypt certificate's signature" ),
  69 + N_( "The certificate signature could not be decrypted. This means that the actual signature value could not be determined rather than it not matching the expected value, this is only meaningful for RSA keys." ),
  70 + },
  71 +
  72 + {
  73 + X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,
  74 + GTK_STOCK_DIALOG_ERROR,
  75 + N_( "Unable to decrypt CRL's signature" ),
  76 + N_( "The CRL signature could not be decrypted: this means that the actual signature value could not be determined rather than it not matching the expected value. Unused." ),
  77 + },
  78 +
  79 + {
  80 + X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
  81 + GTK_STOCK_DIALOG_ERROR,
  82 + N_( "Unable to decode issuer public key" ),
  83 + N_( "The public key in the certificate SubjectPublicKeyInfo could not be read." ),
  84 + },
  85 +
  86 + {
  87 + X509_V_ERR_CERT_SIGNATURE_FAILURE,
  88 + GTK_STOCK_DIALOG_ERROR,
  89 + N_( "Certificate signature failure" ),
  90 + N_( "The signature of the certificate is invalid." ),
  91 + },
  92 +
  93 + {
  94 + X509_V_ERR_CRL_SIGNATURE_FAILURE,
  95 + GTK_STOCK_DIALOG_ERROR,
  96 + N_( "CRL signature failure" ),
  97 + N_( "The signature of the certificate is invalid." ),
  98 + },
  99 +
  100 + {
  101 + X509_V_ERR_CERT_NOT_YET_VALID,
  102 + GTK_STOCK_DIALOG_WARNING,
  103 + N_( "Certificate is not yet valid" ),
  104 + N_( "The certificate is not yet valid: the notBefore date is after the current time." ),
  105 + },
  106 +
  107 + {
  108 + X509_V_ERR_CERT_HAS_EXPIRED,
  109 + GTK_STOCK_DIALOG_ERROR,
  110 + N_( "Certificate has expired" ),
  111 + N_( "The certificate has expired: that is the notAfter date is before the current time." ),
  112 + },
  113 +
  114 + {
  115 + X509_V_ERR_CRL_NOT_YET_VALID,
  116 + GTK_STOCK_DIALOG_WARNING,
  117 + N_( "CRL is not yet valid" ),
  118 + N_( "The CRL is not yet valid." ),
  119 + },
  120 +
  121 + {
  122 + X509_V_ERR_CRL_HAS_EXPIRED,
  123 + GTK_STOCK_DIALOG_ERROR,
  124 + N_( "CRL has expired" ),
  125 + N_( "The CRL has expired." ),
  126 + },
  127 +
  128 + {
  129 + X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD,
  130 + GTK_STOCK_DIALOG_ERROR,
  131 + N_( "Format error in certificate's notBefore field" ),
  132 + N_( "The certificate notBefore field contains an invalid time." ),
  133 + },
  134 +
  135 + {
  136 + X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD,
  137 + GTK_STOCK_DIALOG_ERROR,
  138 + N_( "Format error in certificate's notAfter field" ),
  139 + N_( "The certificate notAfter field contains an invalid time." ),
  140 + },
  141 +
  142 + {
  143 + X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,
  144 + GTK_STOCK_DIALOG_ERROR,
  145 + N_( "Format error in CRL's lastUpdate field" ),
  146 + N_( "The CRL lastUpdate field contains an invalid time." ),
  147 + },
  148 +
  149 + {
  150 + X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD,
  151 + GTK_STOCK_DIALOG_ERROR,
  152 + N_( "Format error in CRL's nextUpdate field" ),
  153 + N_( "The CRL nextUpdate field contains an invalid time." ),
  154 + },
  155 +
  156 + {
  157 + X509_V_ERR_OUT_OF_MEM,
  158 + GTK_STOCK_DIALOG_ERROR,
  159 + N_( "Out of memory" ),
  160 + N_( "An error occurred trying to allocate memory. This should never happen." ),
  161 + },
  162 +
  163 + {
  164 + X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
  165 + GTK_STOCK_DIALOG_WARNING,
  166 + N_( "Self signed certificate" ),
  167 + N_( "The passed certificate is self signed and the same certificate cannot be found in the list of trusted certificates." ),
  168 + },
  169 +
  170 + {
  171 + X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,
  172 + GTK_STOCK_DIALOG_WARNING,
  173 + N_( "Self signed certificate in certificate chain" ),
  174 + N_( "The certificate chain could be built up using the untrusted certificates but the root could not be found locally." ),
  175 + },
  176 +
  177 + {
  178 + X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
  179 + GTK_STOCK_DIALOG_WARNING,
  180 + N_( "Unable to get local issuer certificate" ),
  181 + N_( "The issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found." ),
  182 + },
  183 +
  184 + {
  185 + X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,
  186 + GTK_STOCK_DIALOG_ERROR,
  187 + N_( "Unable to verify the first certificate" ),
  188 + N_( "No signatures could be verified because the chain contains only one certificate and it is not self signed." ),
  189 + },
  190 +
  191 + {
  192 + X509_V_ERR_CERT_REVOKED,
  193 + GTK_STOCK_DIALOG_ERROR,
  194 + N_( "Certificate revoked" ),
  195 + N_( "The certificate has been revoked." ),
  196 + },
  197 +
  198 + {
  199 + X509_V_ERR_INVALID_CA,
  200 + GTK_STOCK_DIALOG_ERROR,
  201 + N_( "Invalid CA certificate" ),
  202 + N_( "A CA certificate is invalid. Either it is not a CA or its extensions are not consistent with the supplied purpose." ),
  203 + },
  204 +
  205 + {
  206 + X509_V_ERR_PATH_LENGTH_EXCEEDED,
  207 + GTK_STOCK_DIALOG_ERROR,
  208 + N_( "Path length constraint exceeded" ),
  209 + N_( "The basicConstraints pathlength parameter has been exceeded." ),
  210 + },
  211 +
  212 + {
  213 + X509_V_ERR_INVALID_PURPOSE,
  214 + GTK_STOCK_DIALOG_ERROR,
  215 + N_( "Unsupported certificate purpose" ),
  216 + N_( "The supplied certificate cannot be used for the specified purpose." ),
  217 + },
  218 +
  219 + {
  220 + X509_V_ERR_CERT_UNTRUSTED,
  221 + GTK_STOCK_DIALOG_WARNING,
  222 + N_( "Certificate not trusted" ),
  223 + N_( "The root CA is not marked as trusted for the specified purpose." ),
  224 + },
  225 +
  226 + {
  227 + X509_V_ERR_CERT_REJECTED,
  228 + GTK_STOCK_DIALOG_ERROR,
  229 + N_( "Certificate rejected" ),
  230 + N_( "The root CA is marked to reject the specified purpose." ),
  231 + },
  232 +
  233 + {
  234 + X509_V_ERR_SUBJECT_ISSUER_MISMATCH,
  235 + GTK_STOCK_DIALOG_ERROR,
  236 + N_( "Subject issuer mismatch" ),
  237 + N_( "The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate. Only displayed when the -issuer_checks option is set." ),
  238 + },
  239 +
  240 + {
  241 + X509_V_ERR_AKID_SKID_MISMATCH,
  242 + GTK_STOCK_DIALOG_ERROR,
  243 + N_( "Authority and subject key identifier mismatch" ),
  244 + N_( "The current candidate issuer certificate was rejected because its subject key identifier was present and did not match the authority key identifier current certificate. Only displayed when the -issuer_checks option is set." ),
  245 + },
  246 +
  247 + {
  248 + X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,
  249 + GTK_STOCK_DIALOG_ERROR,
  250 + N_( "Authority and issuer serial number mismatch" ),
  251 + N_( "The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate. Only displayed when the -issuer_checks option is set." ),
  252 + },
  253 +
  254 + {
  255 + X509_V_ERR_KEYUSAGE_NO_CERTSIGN,
  256 + GTK_STOCK_DIALOG_ERROR,
  257 + N_( "Key usage does not include certificate signing" ),
  258 + N_( "The current candidate issuer certificate was rejected because its keyUsage extension does not permit certificate signing." ),
  259 + },
  260 +
  261 + {
  262 + 0,
  263 + NULL,
  264 + NULL,
  265 + NULL
  266 + }
  267 +
  268 + };
  269 +
  270 +/*--[ Implement ]------------------------------------------------------------------------------------*/
  271 +
  272 + G_GNUC_INTERNAL const struct v3270_ssl_status_msg * v3270_get_ssl_status_msg(GtkWidget *widget)
  273 + {
  274 +#ifdef HAVE_LIBSSL
  275 + int f;
  276 + long id = lib3270_get_SSL_verify_result(GTK_V3270(widget)->host);
  277 +
  278 + for(f=0;ssl_status_msg[f].text;f++)
  279 + {
  280 + if(ssl_status_msg[f].id == id)
  281 + return ssl_status_msg+f;
  282 + }
  283 +#endif // HAVE_LIBSSL
  284 + return NULL;
  285 + }
  286 +
  287 + LIB3270_EXPORT const gchar * v3270_get_ssl_status_icon(GtkWidget *widget)
  288 + {
  289 + g_return_val_if_fail(GTK_IS_V3270(widget),"");
  290 +
  291 + if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE)
  292 + return GTK_STOCK_DIALOG_INFO;
  293 +
  294 +
  295 +#ifdef HAVE_LIBSSL
  296 + if(lib3270_get_secure(GTK_V3270(widget)->host) != LIB3270_SSL_UNSECURE)
  297 + {
  298 + const struct v3270_ssl_status_msg *info = v3270_get_ssl_status_msg(widget);
  299 + if(info)
  300 + return info->icon;
  301 + }
  302 +#endif // HAVE_LIBSSL
  303 +
  304 + return GTK_STOCK_DIALOG_ERROR;
  305 +
  306 + }
  307 +
  308 + LIB3270_EXPORT const gchar * v3270_get_ssl_status_text(GtkWidget *widget)
  309 + {
  310 + g_return_val_if_fail(GTK_IS_V3270(widget),"");
  311 +
  312 + if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE)
  313 + return v3270_get_host(widget);
  314 +
  315 +#ifdef HAVE_LIBSSL
  316 + if(lib3270_get_secure(GTK_V3270(widget)->host) != LIB3270_SSL_UNSECURE)
  317 + {
  318 + const struct v3270_ssl_status_msg *info = v3270_get_ssl_status_msg(widget);
  319 + if(info)
  320 + return info->text;
  321 + }
  322 +#endif // HAVE_LIBSSL
  323 + return v3270_get_host(widget);
  324 + }
  325 +
  326 + LIB3270_EXPORT const gchar * v3270_get_ssl_status_message(GtkWidget *widget)
  327 + {
  328 + g_return_val_if_fail(GTK_IS_V3270(widget),"");
  329 +
  330 + if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE)
  331 + return _( "The connection is insecure" );
  332 +
  333 +#ifdef HAVE_LIBSSL
  334 + if(lib3270_get_secure(GTK_V3270(widget)->host) != LIB3270_SSL_UNSECURE)
  335 + {
  336 + const struct v3270_ssl_status_msg *info = v3270_get_ssl_status_msg(widget);
  337 + if(info)
  338 + return info->message;
  339 + }
  340 +#endif // HAVE_LIBSSL
  341 +
  342 + return _( "Unexpected or unknown security status");
  343 + }
  344 +
  345 + LIB3270_EXPORT void v3270_popup_security_dialog(GtkWidget *widget)
  346 + {
  347 + GtkWidget * dialog;
  348 +
  349 + g_return_if_fail(GTK_IS_V3270(widget));
  350 +
  351 + gdk_window_set_cursor(gtk_widget_get_window(widget),v3270_cursor[GTK_V3270(widget)->pointer]);
  352 +
  353 +
  354 +#ifdef HAVE_LIBSSL
  355 + if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE)
  356 +#endif // HAVE_LIBSSL
  357 + {
  358 + // Connection is insecure, show simple dialog with host and info
  359 +
  360 + dialog = gtk_message_dialog_new(
  361 + GTK_WINDOW(gtk_widget_get_toplevel(widget)),
  362 + GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
  363 + GTK_MESSAGE_INFO,
  364 + GTK_BUTTONS_CLOSE,
  365 + v3270_get_host(widget)
  366 + );
  367 +
  368 + gtk_message_dialog_format_secondary_markup(
  369 + GTK_MESSAGE_DIALOG(dialog),
  370 + "%s", _( "<b>Identity not verified</b>\nThe connection is insecure" ));
  371 +
  372 + }
  373 +#ifdef HAVE_LIBSSL
  374 + else
  375 + {
  376 + long id = lib3270_get_SSL_verify_result(GTK_V3270(widget)->host);
  377 + const gchar * title = N_( "Unexpected SSL error");
  378 + const gchar * text = NULL;
  379 + const gchar * icon = GTK_STOCK_DIALOG_ERROR;
  380 + int f;
  381 +
  382 + for(f=0;ssl_status_msg[f].text;f++)
  383 + {
  384 + if(ssl_status_msg[f].id == id)
  385 + {
  386 + title = ssl_status_msg[f].text;
  387 + icon = ssl_status_msg[f].icon;
  388 + text = ssl_status_msg[f].message;
  389 + break;
  390 + }
  391 + }
  392 +
  393 + dialog = gtk_message_dialog_new(
  394 + GTK_WINDOW(gtk_widget_get_toplevel(widget)),
  395 + GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
  396 + GTK_MESSAGE_OTHER,
  397 + GTK_BUTTONS_CLOSE,
  398 + "%s",gettext(title)
  399 + );
  400 +
  401 + gtk_message_dialog_set_image(GTK_MESSAGE_DIALOG(dialog),gtk_image_new_from_stock(icon,GTK_ICON_SIZE_DIALOG));
  402 +
  403 + if(text)
  404 + {
  405 + gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(dialog),text);
  406 + }
  407 + else
  408 + {
  409 + gchar *str = g_strdup_printf( _( "Unexpected SSL error <b>%ld</b>" ),id);
  410 + gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(dialog),text);
  411 + g_free(str);
  412 + }
  413 +
  414 + }
  415 +#endif // HAVE_LIBSSL
  416 +
  417 + gtk_window_set_title(GTK_WINDOW(dialog),_("About security"));
  418 +
  419 + gtk_widget_show_all(GTK_WIDGET(dialog));
  420 + gtk_dialog_run(GTK_DIALOG(dialog));
  421 + gtk_widget_destroy(GTK_WIDGET(dialog));
  422 +
  423 +
  424 + }
... ...
src/pw3270/v3270/sources.mak
... ... @@ -26,5 +26,6 @@
26 26 # kraucer@bb.com.br (Kraucer Fernandes Mazuco)
27 27 #
28 28  
29   -V3270_SRC=marshal.c widget.c oia.c iocallback.c keyboard.c draw.c mouse.c selection.c accessible.c
  29 +V3270_SRC=marshal.c widget.c oia.c iocallback.c keyboard.c draw.c mouse.c selection.c \
  30 + accessible.c security.c
30 31  
... ...
src/pw3270/v3270/widget.c
... ... @@ -273,6 +273,57 @@ void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type , const gchar *t
273 273 trace("%s ends",__FUNCTION__);
274 274 }
275 275  
  276 +gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_tooltip, GtkTooltip *tooltip)
  277 +{
  278 +/*
  279 + if(!lib3270_connected(GTK_V3270(widget)->host))
  280 + {
  281 + gtk_tooltip_set_text(tooltip,_( "Disconnected" ) );
  282 + return TRUE;
  283 + }
  284 +*/
  285 +
  286 + if(y >= GTK_V3270(widget)->oia_rect->y)
  287 + {
  288 + GdkRectangle *rect = GTK_V3270(widget)->oia_rect;
  289 +
  290 + if(x >= rect[V3270_OIA_SSL].x && x <= (rect[V3270_OIA_SSL].x + rect[V3270_OIA_SSL].width))
  291 + {
  292 + if(!lib3270_connected(GTK_V3270(widget)->host))
  293 + {
  294 + gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DISCONNECT,GTK_ICON_SIZE_MENU);
  295 + gtk_tooltip_set_markup(tooltip,_( "<b>Disconnected from host</b>\nNo security info" ) );
  296 + }
  297 + else if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE)
  298 + {
  299 + gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_INFO,GTK_ICON_SIZE_MENU);
  300 + gtk_tooltip_set_markup(tooltip,_( "Connection is insecure" ) );
  301 + }
  302 + else
  303 + {
  304 + const struct v3270_ssl_status_msg *msg = v3270_get_ssl_status_msg(widget);
  305 +
  306 + if(msg)
  307 + {
  308 + gtk_tooltip_set_icon_from_stock(tooltip,msg->icon,GTK_ICON_SIZE_MENU);
  309 + gtk_tooltip_set_markup(tooltip,msg->text);
  310 + }
  311 + else
  312 + {
  313 + gchar *text = g_strdup_printf(_("<b>Unexpected SSL status %ld</b>\nSecurity status is undefined"),lib3270_get_SSL_verify_result(GTK_V3270(widget)->host));
  314 + gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DIALOG_ERROR,GTK_ICON_SIZE_MENU);
  315 + gtk_tooltip_set_markup(tooltip,text);
  316 + g_free(text);
  317 + }
  318 + }
  319 +
  320 + return TRUE;
  321 + }
  322 +
  323 + }
  324 + return FALSE;
  325 +}
  326 +
276 327 static void v3270_class_init(v3270Class *klass)
277 328 {
278 329 GObjectClass * gobject_class = G_OBJECT_CLASS(klass);
... ... @@ -295,6 +346,7 @@ static void v3270_class_init(v3270Class *klass)
295 346 widget_class->motion_notify_event = v3270_motion_notify_event;
296 347 widget_class->popup_menu = v3270_popup_menu;
297 348 widget_class->scroll_event = v3270_scroll_event;
  349 + widget_class->query_tooltip = v3270_query_tooltip;
298 350  
299 351 /* Accessibility support */
300 352 widget_class->get_accessible = v3270_get_accessible;
... ... @@ -851,8 +903,9 @@ static void v3270_init(v3270 *widget)
851 903 GTK_WIDGET_SET_FLAGS(GTK_WIDGET(widget),(GTK_CAN_DEFAULT|GTK_CAN_FOCUS));
852 904 #endif // GTK(2,18)
853 905  
854   - // Setup events
  906 + // Setup widget
855 907 gtk_widget_add_events(GTK_WIDGET(widget),GDK_KEY_PRESS_MASK|GDK_KEY_RELEASE_MASK|GDK_BUTTON_PRESS_MASK|GDK_BUTTON_MOTION_MASK|GDK_BUTTON_RELEASE_MASK|GDK_POINTER_MOTION_MASK|GDK_ENTER_NOTIFY_MASK|GDK_SCROLL_MASK);
  908 + gtk_widget_set_has_tooltip(GTK_WIDGET(widget),TRUE);
856 909  
857 910 trace("%s",__FUNCTION__);
858 911 }
... ...
src/pw3270/window.c
... ... @@ -486,7 +486,7 @@
486 486  
487 487 if(field == V3270_OIA_SSL)
488 488 {
489   - run_security_dialog(window);
  489 + v3270_popup_security_dialog(widget);
490 490 trace("%s: Show SSL connection info dialog",__FUNCTION__);
491 491 return TRUE;
492 492 }
... ...