From 345cdc10837c4277a5ea823a46d7ff8ff03b8da6 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Sat, 20 Feb 2010 13:41:59 +0100 Subject: [PATCH] improve messages and usability - update german translation --- COPYRIGHT | 82 +-- changelog | 1 + lang/xca_de.ts | 1172 ++++++++++++++++++++++++--------------- lang/xca_es.ts | 997 ++++++++++++++++++++++----------- lib/Makefile | 4 +- lib/db.cpp | 2 +- lib/db_base.cpp | 14 +- lib/db_base.h | 2 +- lib/db_crl.cpp | 7 +- lib/db_key.cpp | 19 +- lib/db_temp.cpp | 5 +- lib/db_x509.cpp | 73 ++- lib/db_x509req.cpp | 7 +- lib/func.cpp | 16 +- lib/pkcs11.cpp | 6 +- lib/pki_base.cpp | 6 +- lib/pki_base.h | 1 + lib/pki_evp.cpp | 24 +- lib/pki_pkcs12.h | 37 +- lib/pki_scard.cpp | 36 +- lib/pki_temp.cpp | 7 +- lib/pki_x509.cpp | 37 +- lib/pki_x509.h | 43 +- ui/CaProperties.ui | 141 +++-- ui/CertExtend.ui | 415 ++++++-------- ui/CrlDetail.ui | 319 +++++------ ui/ExportDer.ui | 5 +- ui/ExportKey.ui | 3 - ui/ImportMulti.ui | 78 ++- ui/KeyDetail.ui | 7 +- ui/MainWindow.ui | 3 - ui/NewCrl.ui | 208 ++++--- ui/NewX509.ui | 164 +++--- ui/Options.ui | 14 +- ui/v3ext.ui | 131 +++-- widgets/CertDetail.cpp | 2 +- widgets/CertExtend.cpp | 54 +- widgets/CertExtend.h | 6 +- widgets/CrlDetail.cpp | 1 + widgets/ImportMulti.cpp | 14 +- widgets/KeyDetail.cpp | 8 +- widgets/MainWindow.cpp | 13 +- widgets/NewX509.cpp | 207 ++++--- widgets/NewX509.h | 4 +- widgets/NewX509_ext.cpp | 4 +- widgets/v3ext.cpp | 7 +- xca.pro | 3 +- 47 files changed, 2530 insertions(+), 1879 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 60474986..0c2fb3bf 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,41 +1,41 @@ - -Copyright (C) 2001 - 2009 Christian Hohnstaedt. - - All rights reserved. - - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - Neither the name of the author nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This program links to software with different licenses from: - - - http://www.openssl.org which includes cryptographic software - written by Eric Young (eay@cryptsoft.com)" - - - http://www.trolltech.com - - + +Copyright (C) 2001 - 2010 Christian Hohnstaedt. + + All rights reserved. + + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + - Neither the name of the author nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +This program links to software with different licenses from: + + - http://www.openssl.org which includes cryptographic software + written by Eric Young (eay@cryptsoft.com)" + + - http://www.trolltech.com + + diff --git a/changelog b/changelog index ec1e7e2f..fdc08179 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,5 @@ + * improve messages, usability and german translation * improve token support - token initializing - creating keys on a token diff --git a/lang/xca_de.ts b/lang/xca_de.ts index 0f3c87da..c2196871 100644 --- a/lang/xca_de.ts +++ b/lang/xca_de.ts @@ -1,5 +1,6 @@ - - + + + About @@ -9,14 +10,6 @@ CaProperties - - Dialog - - - - TextLabel - - CA properties CA Einstellungen @@ -31,7 +24,7 @@ Default template - + Standard Template OK @@ -54,7 +47,7 @@ Self signed - Selbst signiert + Selbstsigniert Not trusted @@ -138,11 +131,11 @@ The time since the certificate is valid - Wann die Gültigkeit des Zertifikats beginnt + Beginn der Zertifikatsgültigkeit The time until the certificate is valid - Wann die Gültigkeit des Zertifikats endet + Ablaufdatum des Zertifikats &Subject @@ -213,7 +206,39 @@ yyyy-MM-dd hh:mm - + dd.MM.yyyy hh:mm + + + Certificate renewal + Zertifikatsverlängerung + + + No well-defined expiration + Undefiniertes Ablaufdatum + + + The certificate will be earlier valid than the signer. This is probably not what you want. + Das Zertifikat is früher gültig als der Aussteller. Dies ist wahrscheinlich ungewollt. + + + Edit times + Zeiten einstellen + + + Abort rollout + Ausstellung abbrechen + + + Continue rollout + Ausstellung fortführen + + + Adjust date and continue + Datum anpassen und fortführen + + + The certificate will be longer valid than the signer. This is probably not what you want. + Das Zertifikat ist länger gültig als der Aussteller. Dies ist wahrscheinlich nicht gewollt. @@ -264,10 +289,6 @@ Unknown certificate Unbekanntes Zertifikat - - CrlDetail_UI - CrlDetail_UI - Details of the Revocation list Details der Rücknahmeliste @@ -320,14 +341,6 @@ 0 0 - - 1 - 1 - - - 2 - 2 - &OK &OK @@ -383,24 +396,13 @@ Save key as Schlüssel speichern als - - X509 Certificates ( *.cer *.crt *.p12 );;All files ( *.* ) - X509 Zertifikate ( *.cer *.crt *.p12 );;Alle Dateien ( *.* ) - X509 Certificates ( *.cer *.crt *.p12 );;All files ( * ) - + X509 Zertifikate ( *.cer *.crt *.p12 );;Alle Dateien ( * ) ExportDer - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export</p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export</p></body></html> - Filename Dateiname @@ -421,13 +423,13 @@ p, li { white-space: pre-wrap; } OK OK + + Export + Export + ExportKey - - ExportKey - ExportKey - Key export Schlüssel export @@ -488,13 +490,9 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselSave key as Schlüssel speichern als - - Private keys ( *.pem *.der *.pk8 );;All files ( *.* ) - Private Schlüssel ( *.pem *.der *.pk8 );;Alle Dateien ( *.* ) - Private keys ( *.pem *.der *.pk8 );;All files ( * ) - + Private Schlüssel ( *.pem *.der *.pk8 );;Alle Dateien ( * ) @@ -514,34 +512,14 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte Schlüssel ImportMulti - - The type of the Item is not recognized: - Unbekannter Typ: - - - OK - OK - Details Details - - Details of this item cannot be shown: - Details von diesem Typ können nicht angezeigt werden: - - - The type of the Item is not recognized - Unbekannter Typ - Error Fehler - - ImportMulti_UI - ImportMulti_UI - Import &All &Alle importieren @@ -558,6 +536,18 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte Schlüssel&Remove Entfe&rnen + + The type of the Item '%1' is not recognized + Unbekannter Typ bei '%1' + + + Details of the item '%1' cannot be shown + Details von '%1' können nicht angezeigt werden + + + The type of the item '%1' is not recognized + Unbekannter Typ bei '%1' + KeyDetail @@ -569,14 +559,6 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselAvailable Verfügbar - - KeyDetail - KeyDetail - - - Details of the RSA key - Details des RSA Schlüssels - Name Name @@ -613,16 +595,44 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselPublic key Öffentlicher Schlüssel - - Details of the DSA key - Details des DSA Schlüssels - Private key Privater Schlüssel - UNKNOWN Key + Security token + Smartcard + + + Manufacturer + Hersteller + + + Serial + Seriennummer + + + Key + Schlüssel + + + Token + Smartcard + + + Curve name + Kurvenname + + + Details of the %1 key + Details des %1 Schlüssels + + + Security token ID:%1 + Smartcard ID:%1 + + + Unknown key Unbekannter Schlüssel @@ -660,18 +670,10 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselCopy to Clipboard In die Zwischenablage - - no such option: - Es gib keine Option: - &Close DataBase Datenbank s&chliessen - - E&xit - &Beenden - &Content &Inhalt @@ -688,42 +690,6 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte Schlüssel&Help &Hilfe - - Open &DataBase - &Datenbank öffnen - - - Please enter the password to decrypt the private key. - Bitte geben sie das Passwort zur Entschlüsselung des privaten Schlüssels ein. - - - Please enter the password to decrypt the private key: ' - Passwort zur Entschlüsselung des privaten Schlüssels: ' - - - Please enter the default password - Bitte das Standard passwort eingeben - - - Please enter the password to protect the private key: ' - Das Passwort zur Verschlüsselung des privaten Schlüssels: ' - - - Please enter the database password for encrypting the key - Bitte geben sie das Datenbankpasswort zur Verschlüsselung des Schlüssels ein - - - Please enter the password protecting the PKCS#8 key - Bitte geben Sie das Passwort zur Verschlüsselung des PKCS#8 Schlüssels an - - - Please enter the export password for the private key - Bitte geben sie das Exportpasswort für den privaten Schlüssel ein - - - MainWindow - MainWindow - Private Keys Private Schlüssel @@ -752,10 +718,6 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte Schlüssel&Delete &Löschen - - Change password - Passwort ändern - Certificate signing requests Unterschriftsanfragen @@ -808,10 +770,6 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselNo deleted items found Keine gelöschten Einträge gefunden - - New &DataBase - Neue &Datenbank - &Dump DataBase &Datenbank ausgeben @@ -860,10 +818,6 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselDonations Spenden - - Database dump ( *.dump );;All files ( *.* ) - Datenbank dump ( *.dump );;Alle Dateien ( *.* ) - Import password Import Passwort @@ -884,41 +838,97 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselCancel Abbrechen - - Password missmatch - Passworte stimmen nicht überein - I&mport - + I&mport paste PEM file - + PEM datei (copy+paste) Database dump ( *.dump );;All files ( * ) - - - - Please enter the database password for decrypting the key - - - - Database file does not exist: - + Database dump ( *.dump );;All files ( * ) Import PEM data - + PEM daten importieren + + + No Security token found + Keine Smartcard gefunden + + + Please enter the SO PIN (PUK) of the token '%1' + Bitte die SO PIN (PUK) der Smartcard '%1' eingeben + + + The new label of the token '%1' + Die neue Bezeichnung der Smartcard '%1' + + + Please enter the new Pin for the token '%1' + Bitte die neue Pin der Smartcard '%1' eingeben + + + Please enter the new password to encrypt your private keys in the database-file + Bitte das neue Passwort zur Verschlüsselung der privaten Schlüssel in der Datenbank eingeben + + + Hex password must only contain the characters '0' - '9' and 'a' - 'f' and it must consist of an even number of characters + + + + Repeat + Wiederholen + + + &New DataBase + &Neue Datenbank + + + &Open DataBase + Datenbank &Öffnen + + + &Init Security token + Smartcard &initialisieren + + + C&hange DataBase password + Datenbankpasswort ändern + + + Exit + Beenden + + + Read Security token + Smartcard auslesen + + + You need to restart XCA to load the new library + XCA muss neu gestartet werden um die neue PKCS#11 DLL zu laden + + + Database file does not exist: '%1' + Die Datenbankdatei '%1' existiert nicht + + + Please enter the password to decrypt the private key: '%1' + Bitte das Passwort zur Entschlüsselung des privaten Schlüssels: '%1' eingeben + + + no such option: %1 + unbekannte option: %1 + + + %1 missmatch + Keine %1 übereinstimmung NewCrl - - Dialog - Dialog - Create CRL CRL erstellen @@ -961,7 +971,7 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte Schlüssel yyyy-MM-dd hh:mm - + dd.MM.yyyy hh:mm @@ -986,14 +996,6 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselKeysize Schlüssellänge - - RSA - RSA - - - DSA - DSA - Usually 1024 or 2048 bit keys are used Normalerweise werden 1024 oder 2048 bit Schlüssel verwendet @@ -1018,6 +1020,10 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselC&reate E&rstellen + + Curve + Kurve + NewX509 @@ -1025,10 +1031,6 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselTemplate Vorlage - - Dialog - Dialog - Create Erstellen @@ -1045,7 +1047,7 @@ PKCS#8 ist ein offizielles Austauschformat für Passwort gesicherte SchlüsselA certificate signing request can be signed, even if the private key of the request is not available. This is the intention of a CSR: Getting signed by a CA certificate, whoes certificate of course must be in the database Of course you need the private key of the CSR if you want to create a self-signed cert from it. - + Ein CSR (Signaturanfrage) kann unterschrieben werden, auch wenn der private Schlüssel des Requests nicht verfügbar ist. Dies ist die Aufgabe eines CSR. Show request @@ -1057,7 +1059,7 @@ Of course you need the private key of the CSR if you want to create a self-signe Copy extensions from the request - + Erweiterungen vom PKCS#10-request kopieren Signing @@ -1086,24 +1088,24 @@ Of course you need the private key of the CSR if you want to create a self-signe This list contains all certificates with the CA-flag set to true and whoes private key is present in the key-database. If this list is disabled, you only can create a self-signed certificate. - Diese Liste enthält alle Zertifikate mit dem CA-flag gesetzt und dessen privater Schlüssel verfügbar ist. + Diese Liste enthält alle Zertifikate mit dem CA-flag gesetzt und dessen privater Schlüssel verfügbar ist. Wenn diese Liste ausgeschaltet ist, kann nur ein selbst unterschriebenes Zertifikat erstellt werden. Signature algorithm - Signatur algorithmus + Signatur algorithmus Template for the new certificate - Vorlage für das neue Zertifikat + Vorlage für das neue Zertifikat All available templates - Alle verfügbaren Vorlagen + Alle verfügbaren Vorlagen This list contains all templates from the toplevel template Tab - + Diese Liste enthält alle Vorlagen Apply @@ -1117,10 +1119,6 @@ Wenn diese Liste ausgeschaltet ist, kann nur ein selbst unterschriebenes Zertifi Distinguished name Distinguished name - - Organisation - Firma - This name is only used internally and does not appear in the resulting certificate Dieser Name wird nur intern verwendet und erscheint nicht im Zertifikat @@ -1129,30 +1127,6 @@ Wenn diese Liste ausgeschaltet ist, kann nur ein selbst unterschriebenes Zertifi Must be exactly 2 letter of size (DE, UK) Muss exakt 2 Zeichen lang sein (DE,UK) - - Country code - Länder code - - - State or Province - Bundesland, Kreis - - - Locality - Ort - - - Organ. unit - Firmenabteilung - - - Common name - Üblicher Name - - - E-Mail address - E-Mail Adresse - Internal name Interner Name @@ -1177,10 +1151,6 @@ Wenn diese Liste ausgeschaltet ist, kann nur ein selbst unterschriebenes Zertifi Used keys too auch verwendete Schlüssel - - This funny button creates a key. Go figure. - Dieser lustige Knopf erstellt einen Schlüssel, stell Dir vor. - &Generate a new key &Erstelle einen neuen Schlüssel @@ -1329,7 +1299,7 @@ URI:http://www.my.com/my.crl, URI:http://www.oth.com/my.crl can be altered by the file "aia.txt" - Kann in der Datei "aia.txt" angepasst werden + Kann in der Datei "aia.txt" angepasst werden Edit @@ -1416,7 +1386,7 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld C&ritical - C&ritical + C&ritical Netscape @@ -1450,10 +1420,6 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld Object Signing CA Object Signing CA - - Great picture , heh ? - - CA Revocation URL @@ -1510,13 +1476,9 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld Create x509 Certificate Erstelle x509 Zertifikat - - Ok - OK - Abort rollout - + Ausstellung abbrechen The internal name and the common name are empty. @@ -1527,19 +1489,9 @@ Please set at least the internal name. There is no Key selected for signing. - - The following distinguished name entries are empty, -though you have declared them as mandatory in the options menu: - - - Continue rollout - - - - The validity dates are out of range (1950 - 2049) to create valid certificates. If you continue, your client may reject the certificate. - + Ausstellung fortführen The certificate will be out of date before it becomes valid. You most probably mixed up both dates. @@ -1551,11 +1503,11 @@ though you have declared them as mandatory in the options menu: yyyy-MM-dd hh:mm - + dd.MM.yyyy hh:mm Advanced - + Erweitert Validate @@ -1564,37 +1516,73 @@ though you have declared them as mandatory in the options menu: The verification of the Certificate request failed. The rollout should be aborted. - + Die Validierung des Requests ist fehlgeschlagen. Die Zertifikatserstellung sollte abgebrochen werden. Continue anyway - + Trotzdem fortfahren The certificate contains duplicated extensions. Check the validation on the advanced tab. - + Das Zertifikat enthält duplizierte Extensions. Bitte prüfen Sie die Validierung auf dem Erweitert Reiter. - Advanced Settings Error: + No well-defined expiration + Undefiniertes Ablaufdatum + + + Edit name + Namen editieren + + + Select key + Schlüssel auswählen + + + The following distinguished name entries are empty: +%1 +though you have declared them as mandatory in the options menu. + Die folgenden Subject-name Einträge sind leer: +%1, obwohl sie im Optionen-menu als notwendig deklariert wurden. + + + Edit subject + Subject editieren + + + Edit dates + Zeiten einstellen + + + The certificate will be earlier valid than the signer. This is probably not what you want. + Das Zertifikat is früher gültig als der Aussteller. Dies ist wahrscheinlich ungewollt. + + + Edit times + Zeiten einstellen + + + Adjust date and continue + Datum anpassen und fortführen + + + The certificate will be longer valid than the signer. This is probably not what you want. + Das Zertifikat ist länger gültig als der Aussteller. Dies ist wahrscheinlich nicht gewollt. + + + Edit extensions + Extensions editieren + + + Advanced Settings Error: %1 Options - - Dialog - Dialog - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">XCA Options</p></body></html> - <html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">XCA Optionen</p></body></html> - Mandatory subject entries - + Pflichtfelder im subject-name Add @@ -1620,22 +1608,42 @@ p, li { white-space: pre-wrap; } OK OK - - automatic detection (default) - Automatische Erkennung (Standard) - - - No BMP strings: only printable and T61 - Keine BMP Zeichenketten: Nur druckbare und T61 - - - PKIX recommendation in RFC2459 - PKIX Empfehlung aus RFC2459 - UTF8 strings only (RFC2459) Nur UTF8 Zeichenketten (RFC2459) + + PKCS#11 path: + PKCS#11 pfad: + + + ... + ... + + + Load + Laden + + + PKIX recommendation in RFC2459 (default) + + + + No BMP strings, only printable and T61 + + + + All strings + + + + Successfully loaded PKCS#11 library: + PKCS#11 datei erfolgreich geladen: + + + XCA Options + XCA Optionen + PassRead @@ -1651,6 +1659,14 @@ p, li { white-space: pre-wrap; } &OK &OK + + The password is parsed as 2-digit hex code. It must have an equal number of digits (0-9 and a-f) + Das Passwort wird als 2selliger hex-code interpretiert. Er muss eine gradstellige Anzahl der Ziffern 0-9 und a-f enthalten + + + Take as HEX string + Als HEX Zeichenkette interpretieren + PassWrite @@ -1670,6 +1686,14 @@ p, li { white-space: pre-wrap; } &OK &OK + + The password is parsed as 2-digit hex code. It must have an equal number of digits (0-9 and a-f) + Das Passwort wird als 2 stelliger hex-code interpretiert. Er muss eine grade Anzahl an Ziffern enthalten (0-9 und a-f) + + + Take as HEX string + Als HEX Zeichenkette interpretieren + QObject @@ -1705,10 +1729,6 @@ p, li { white-space: pre-wrap; } Import Certificate Revocation List Importiere Zertifikatsrücknahmeliste - - All files ( *.* ) - Alle Dateien (*.*) - PKI Keys ( *.pem *.der *.key );;PKCS#8 Keys ( *.p8 *.pk8 );; PKI Schlüssel ( *.pem *.der *.key );;PKCS#8 Schlüssel ( *.p8 *.pk8 );; @@ -1749,25 +1769,83 @@ p, li { white-space: pre-wrap; } Load PEM encoded file Lade PEM codierte Datei - - File open error: - Datei öffnen Fehler: - - - File corrupted: - Datei beschädigt: - - - Unknown PEM file: - Unbekanntee PEM Datei: - Invalid Ungültig All files ( * ) - + Alle Dateien ( * ) + + + Out of Memory + Speicherfehler + + + Undefined + Undefiniert + + + DB: Rename: '%1' already in use + DB: Rename: '%1' wird bereits verwendet + + + DB: Entry to rename not found: %1 + DB: Eintrag zur Umbenennung nicht gefunden: %1 + + + Do not overwrite + Nicht überschreiben + + + Overwrite + Überschreiben + + + PKCS#11 library ( *.dll );; + + + + PKCS#11 library ( *.dylib );; + + + + PKCS#11 library ( *.so );; + + + + Open PKCS#11 shared library + PKCS#11 library öffnen + + + Time difference too big +You must set it manually. + Zeitdifferenz zu gross. +Bitte die Zeiten manuell einstellen. + + + The file: '%1' already exists! + Die Datei '%1' existiert bereits! + + + Please enter the new SO Pin for the token: '%1' + Bitte die neue SO Pin der Smartcard: '%1' eingeben + + + Please enter the password to decrypt the private key. + Bitte geben sie das Passwort zur Entschlüsselung des privaten Schlüssels ein. + + + DB: Write error %1 - %2 + Datenbank: Schreibfehler %1 - %2 + + + Please enter the SO PIN (PUK) of the token %1 + Bitte die SO PIN (PUK) der Smartcard %1 eingeben + + + Please enter the PIN of the token %1 + Bitte die PIN der Smartcard %1 eingeben @@ -1821,6 +1899,29 @@ p, li { white-space: pre-wrap; } &OK + + SelectToken + + Select Token + Smartcard auswählen + + + Security token + Smartcard + + + Please select the security token + Bitte wählen Sie die Smartcard + + + &Cancel + &Abbrechen + + + &Store + &Speichern + + TrustState @@ -1852,27 +1953,8 @@ p, li { white-space: pre-wrap; } &OK - - db_base - - Delete - Löschen - - - Cancel - Abbrechen - - db_crl - - The revokation list already exists in the database as - Die CRL existiert bereits in der Datenbank als - - - and so it was not imported - und wird daher nicht importiert - Name Name @@ -1887,16 +1969,12 @@ p, li { white-space: pre-wrap; } No. revoked - + Anzahl Next update Nächstes Update - - Delete the revokation list(s) - Lösche Rücknahmeliste(n) - CRL ( *.pem *.der *.crl ) CRL ( *.pem *.der *.crl ) @@ -1921,45 +1999,29 @@ p, li { white-space: pre-wrap; } Delete Löschen + + Delete the revokation list '%1' ? + Die Sperrliste (CRL) '%1' löschen ? + + + Delete the %1 revokation lists: %2 ? + Die %1 Sperrlisten: %2 löschen ? + + + The revokation list already exists in the database as: +'%1' +and so it was not imported + Die Sperrliste existiert bereits in der Datenbank als: +'%1' +daher wurde ssie nicht importiert + db_key - - The key is already in the database as - Der Schlüssel befindet sich bereits in der Datenbank als - - - and is not going to be imported - und wird daher nicht importiert - - - The database already contains the public part of the imported key as - Die Datenbank enthält bereits den öffentlichen Teil des importierten Schlüssels unter - - - and will be completed by the new, private part of the key - und wird durch den importierten privaten Teil vervollständigt - - - Delete the key(s) - Löschen die Schlüssel - Key size too small ! Schlüsselgrösse zu klein ! - - You are sure to create a key of the size: - Sie wollen wirklich einen Schlüssel erstellen mit der Länge: - - - Cancel - Abbrechen - - - Create - Erstellen - New Key Neuer Schlüssel @@ -1992,24 +2054,86 @@ p, li { white-space: pre-wrap; } Reset password Password zurücksetzen + + No Security token found + Keine Smartcard gefunden + + + Shall the original key '%1' be replaced by the key on the token? +This will delete the key '%1' and make it unexportable + Soll der Originalschlüssel '%1' durch den Smartcard Schlüssel ersetzt werden? +Dies löscht den Schlüssel '%1' und macht ihn nicht-exportierbar + + + Change PIN + PIN ändern + + + Init PIN with SO PIN (PUK) + PIN mithilfe der SO PIN (PUK) initialisieren + + + Change SO PIN (PUK) + SO PIN (PUK) ändern + + + Store on Security token + Auf Smartcard speichern + + + Tried to change password of a smart card + + + + Tried to change PIN of a key + + + + Tried to init PIN of a key + + + + Tried to change SO PIN of a key + + + + Delete the key '%1' ? + Den Schlüssel '%1' löschen ? + + + Delete the %1 keys: %2 ? + Die %1 Schlüssel: %2 löschen ? + + + The key is already in the database as: +'%1' +and is not going to be imported + Der Schlüssel ist bereits in der Datenbank als: +'%1' +und wird daher nicht importiert + + + The database already contains the public part of the imported key as +'%1 +and will be completed by the new, private part of the key + Die Datenbank enthält schon den öffentlichen Schlüssel +'%1' +und wird duch den importierten, privaten Teil vervollständigt + + + You are sure to create a key of the size: %1 ? + Soll wirklich ein Schlüssel der Grösse %1 erstellt werden ? + db_temp - - Delete the Template(s) - Lösche Vorlage(n) - - - Bad template: - Schlechte Vorlage: - Nothing Nichts Preset Template values - + Vorlagenwerte voreinstellen copy @@ -2019,10 +2143,6 @@ p, li { white-space: pre-wrap; } Save template as Vorlage speichern als - - XCA templates ( *.xca);; All files ( *.* ) - XCA Vorlagen ( *.xca);; All Dateien ( *.* ) - New Template Neue Vorlage @@ -2060,24 +2180,24 @@ p, li { white-space: pre-wrap; } Unterschriftsanfrage erstellen - Delete the template(s) - + XCA templates ( *.xca);; All files ( * ) + XCA Vorlagen ( *.xca);; All files ( * ) - XCA templates ( *.xca);; All files ( * ) - + Delete the template '%1' ? + Die Vorlage '%1' löschen ? + + + Delete the %1 templates: %2 ? + Die %1 Vorlagen: %2 löschen ? + + + Bad template: %1 + Ungültige Vorlage %1 db_x509 - - The certificate already exists in the database as - Das Zertifikat befindet sich bereits in der Datenbank als - - - and so it was not imported - und wird daher nicht importiert - Internal name Interner Name @@ -2102,10 +2222,6 @@ p, li { white-space: pre-wrap; } Revocation Rücknahme - - Delete the certificates(s) - Lösche das Zertifikat - Plain View Einfache Ansicht @@ -2116,32 +2232,20 @@ p, li { white-space: pre-wrap; } Please enter the new hexadecimal secret number for the QA process. - + The two secret numbers don't match. - + The QA process has been terminated by the user. - + The key you selected for signing is not a private one. Der ausgewählte Schlüssel zum signieren ist nicht vollständig. - - The validity times for the certificate need to get adjusted to not exceed those of the signer - Die Gültigkeitsdaten des Zertifikats müssen angepasst werden um nicht die des Ausstellers zu überschreiten - - - Continue creation - Erstellen fortsetzen - - - Abort - Abbrechen - New Certificate Neues Zertifikat @@ -2222,33 +2326,53 @@ p, li { white-space: pre-wrap; } Revoke Rücknahme - - There was no key found for the Certificate: - Es wurde kein Schlüssel gefunden für das Zertifikat: - days Tage - Delete the certificate(s) - + Security token + Smartcard + + + Template + Vorlage + + + Delete from Security token + Von der Smartcard löschen + + + Delete the certificate '%1' ? + Das Zertifikat '%1' löschen ? + + + Delete the %1 certificates: %2 ? + Die %1 Zertifikate: %2 löschen ? + + + The certificate already exists in the database as: +'%1' +and so it was not imported + Das Zertifikat existiert bereits in der Datenbank als: +'%1' +und wurde daher nicht importiert + + + There was no key found for the Certificate: '%1' + Es wurde kein Schlüssel für das Zertifikat: '%1' gefunden + + + Not possible for smart card key: '%1' + Nicht möglich für den Smartcard Schlüssel '%1' + + + Not possible for the token-key Certificate '%1' + Nicht möglich für das Smartcard Zertifikat '%1' db_x509req - - The certificate signing request already exists in the database as - Die Unterschriftsanfrage befindet sich bereits in der Datenbank als - - - and thus was not stored - und wird daher nicht importiert - - - Delete the request(s) - Lösche Anfrage(n) - Certificate request ( *.pem *.der *.crl ) Unterschriftsanfrage ( *.pem *.der *.crl ) @@ -2285,6 +2409,60 @@ p, li { white-space: pre-wrap; } Delete Löschen + + Name + Name + + + Subject + Besitzer + + + Signed + Signiert + + + File + Datei + + + Template + Vorlage + + + Delete the %1 requests: %2 ? + Die %1 Requests: %2 löschen ? + + + The certificate signing request already exists in the database as +'%1' +and thus was not stored + Der Request existiert bereits in der Datenbank als +'%1' +und wurde daher nicht importiert + + + Delete the request '%1' ? + Den request '%1' löschen ? + + + + db_x509super + + The following extensions were not ported into the template + Die folgenden Extensions wurden nicht ins Template übertragen + + + + pass_info + + Password + Passwort + + + PIN + PIN + pki_base @@ -2293,8 +2471,8 @@ p, li { white-space: pre-wrap; } Fehler : - Out of memory - Nicht genügend Speicher + Error opening file: '%1': %2 + Öffnen der Datei %1 fehlgeschlagen: %2 @@ -2307,39 +2485,94 @@ p, li { white-space: pre-wrap; } unknown unbekannt + + Unable to load the revokation list in file %1. Tried PEM and DER formatted CRL. + Konnte die Sperrliste %1 nicht laden. Ist weder eine PEM noch eine DER formatierte CRL. + - pki_key + pki_evp Failed to decrypt the key (bad password) - + Konnte den Schlüssel nicht entschlüsseln. (Falsches Passwort) + + + Unable to load the private key in file %1. Tried PEM and DER private and public key types. + Konnte den privaten Schlüssel %1 nicht laden. Ist weder im PEM (private/public) noch im DER (private/public) Format. + + + Password input aborted + Passworteingabe abgebrochen Common - + Standard Private - Privat + Privat Bogus - + Nichts No password Kein Passwort - Password input aborted - + Please enter the database password for decrypting the key + Bitte das Datenbankpasswort zur Entschlüsselung eingeben + + + Please enter the password to protect the private key: '%1' + Bitte geben sie das Passwort zur Verschlüsselung des privaten Schlüssels: '%1' ein + + + Please enter the database password for encrypting the key + Bitte geben sie das Datenbankpasswort zur Verschlüsselung des Schlüssels ein + + + Please enter the password protecting the PKCS#8 key '%1' + Bitte das Passwort zum Schutz des PKCS#8 Schlüssels '%1' eingeben + + + Please enter the export password for the private key '%1' + Bitte das Passwort zum Schutz des privaten Schlüssels '%1' eingeben + + + + pki_key + + Common + Standard + + + Private + Privat + + + Bogus + Nichts + + + No password + Kein Passwort + + + Unknown + Unbekannt + + + PIN + PIN pki_multi Seek failed - + @@ -2357,23 +2590,81 @@ p, li { white-space: pre-wrap; } Kein Schlüssel or kein Zertifikat und kein PKCS#12 + + pki_pkcs7 + + Unable to load the PKCS#7 file %1. Tried PEM and DER format. + Konnte die PKCS#7 Datei %1 nicht laden. Ist weder im PEM noch im DER Format. + + + + pki_scard + + Delete the private key '%1' from the token? + Den privaten Schlüssel '%1' von der Smartcard löschen? + + + This Key is already on the token + Der Schlüssel ist bereits auf der SmartCard + + + Unable to find copied key on the token + Kann den eben kopierten Schlüssel auf der Smartcard nicht finden + + + Public Key missmatch. Please re-import card + Öffentlicher Schlüssel passt nicht. Bitte Smartcard neu importieren + + + Unable to find generated key on card + Kann den erstellten Schlüssel auf der Karte nicht finden + + + Token + Smartcard + + + Failed to find the key on the token + Konnte den Schlüssel auf der Smartcard nicht finden + + + Invalid Pin for the token + Ungültige Pin für die Smartcard + + + Please enter the new Pin for the token '%1' + Bitte die neue Pin der Smartcard '%1' eingeben + + + Please enter the SO PIN (PUK) of the token '%1' + Bitte die SO PIN (PUK) der Smartcard '%1' eingeben + + + Please insert card: %1 [%2] with Serial: %3 + Bitte die Smartcard: %1 [%2] mit Seriennummer: %3 einlegen + + + Wrong Size of scard: %1 + Grössenfehler beim laden der Karte: %1 + + pki_temp Wrong Size of template: - + Falsche Templategrösse: - Template file content error (too small) - + Template file content error (too small): %1 + Template zu klein: %1 - Template file content error (bad size) - + Template file content error (bad size): %1 + Templatefehler: ungültige Grösse: %1 - Template file content error (bad length) - + Template file content error (bad length) :%1 + Templatefile ungültig (länge): %1 @@ -2395,38 +2686,47 @@ p, li { white-space: pre-wrap; } Kein Schlüssel zum Unterschreiben! - CRL expires: - CRL Verfallsdatum: + Unable to load the certificate in file %1. Tried PEM and DER certificate. + Das Zertifikat aus der Datei %1 konnte nicht geladen werden. Ist weder PEM noch DER. + + + No associated security token + Keine zugehörige Smartcard + + + This certificate is already on the security token + Dieses Zertifikat ist bereits auf der Smartcard + + + CRL expires: %1 + CRL ungültig ab: %1 + + + Delete the certificate '%1' from the token '%2 (#%3)' ? + Das Zertifikat '%1' von der Smartcard '%2 (#%3)' löschen ? pki_x509req Signing key not valid (public key) - + Signaturschlüssel ungültig (public key) - no key/value pairs found in %1 - - + Unable to load the certificate request in file %1. Tried PEM, DER and SPKAC format. + Konnte die Zertifikatsanfrage aus der Datei %1 nicht laden. Versuchte Formate PEM, DER und SPKAC. - Unknown name tag %1 found in %2 - - + Signed + Signiert - No Netscape SPKAC structure found in %1 - - + Unhandled + Unbehandelt v3ext - - Form1 - - Add Hinzufügen @@ -2448,18 +2748,14 @@ p, li { white-space: pre-wrap; } Abbrechen - Validation failed: - Überprüfung fehlgeschlagen: - - - &OK - &OK + Validation failed: +'%1' + Überprüfung fehlgeschlagen: '%1' Validation successfull: -' - Überprüfung erfolgreich: -' +'%1' + Überprüfung erfolgreich: '%1' diff --git a/lang/xca_es.ts b/lang/xca_es.ts index 95a439c9..e69c3490 100644 --- a/lang/xca_es.ts +++ b/lang/xca_es.ts @@ -8,14 +8,6 @@ CaProperties - - Dialog - - - - TextLabel - - CA properties @@ -214,6 +206,38 @@ yyyy-MM-dd hh:mm + + Certificate renewal + + + + No well-defined expiration + + + + The certificate will be earlier valid than the signer. This is probably not what you want. + + + + Edit times + + + + Abort rollout + + + + Continue rollout + + + + Adjust date and continue + + + + The certificate will be longer valid than the signer. This is probably not what you want. + + CertView @@ -263,10 +287,6 @@ Unknown certificate - - CrlDetail_UI - - Details of the Revocation list @@ -319,14 +339,6 @@ 0 - - 1 - - - - 2 - - &OK @@ -389,13 +401,6 @@ ExportDer - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export</p></body></html> - - Filename @@ -416,13 +421,13 @@ p, li { white-space: pre-wrap; } OK + + Export + + ExportKey - - ExportKey - - Key export Exportar clave @@ -505,34 +510,14 @@ PKCS#8 es un formato estandar de intercambio de claves ImportMulti - - The type of the Item is not recognized: - - - - OK - - Details - - Details of this item cannot be shown: - - - - The type of the Item is not recognized - - Error - - ImportMulti_UI - - Import &All @@ -549,6 +534,18 @@ PKCS#8 es un formato estandar de intercambio de claves &Remove + + The type of the Item '%1' is not recognized + + + + Details of the item '%1' cannot be shown + + + + The type of the item '%1' is not recognized + + KeyDetail @@ -560,14 +557,6 @@ PKCS#8 es un formato estandar de intercambio de claves Not available - - KeyDetail - - - - Details of the RSA key - - Name Nombre @@ -604,16 +593,44 @@ PKCS#8 es un formato estandar de intercambio de claves Public key - - Details of the DSA key - - Private key - UNKNOWN Key + Security token + + + + Manufacturer + + + + Serial + + + + Key + + + + Token + + + + Curve name + + + + Details of the %1 key + + + + Security token ID:%1 + + + + Unknown key @@ -627,18 +644,10 @@ PKCS#8 es un formato estandar de intercambio de claves Password verify error, please try again Contraeña incorrecta, inténtelo de nuevo - - Open &DataBase - - &Close DataBase - - E&xit - - &Content @@ -655,10 +664,6 @@ PKCS#8 es un formato estandar de intercambio de claves &Help - - no such option: - - New Password @@ -683,34 +688,6 @@ PKCS#8 es un formato estandar de intercambio de claves Copy to Clipboard - - Please enter the password to decrypt the private key. - - - - Please enter the password to decrypt the private key: ' - - - - Please enter the password to protect the private key: ' - - - - Please enter the database password for encrypting the key - - - - Please enter the password protecting the PKCS#8 key - - - - Please enter the export password for the private key - - - - MainWindow - - Private Keys @@ -739,10 +716,6 @@ PKCS#8 es un formato estandar de intercambio de claves &Delete - - Change password - - Certificate signing requests @@ -795,10 +768,6 @@ PKCS#8 es un formato estandar de intercambio de claves No deleted items found - - New &DataBase - - &Dump DataBase @@ -867,10 +836,6 @@ PKCS#8 es un formato estandar de intercambio de claves Cancel Cancelar - - Password missmatch - - I&mport @@ -883,25 +848,85 @@ PKCS#8 es un formato estandar de intercambio de claves Database dump ( *.dump );;All files ( * ) - - Please enter the database password for decrypting the key - - - - Database file does not exist: - - Import PEM data + + No Security token found + + + + Please enter the SO PIN (PUK) of the token '%1' + + + + The new label of the token '%1' + + + + Please enter the new Pin for the token '%1' + + + + Please enter the new password to encrypt your private keys in the database-file + + + + Hex password must only contain the characters '0' - '9' and 'a' - 'f' and it must consist of an even number of characters + + + + Repeat + + + + &New DataBase + + + + &Open DataBase + + + + &Init Security token + + + + C&hange DataBase password + + + + Exit + + + + Read Security token + + + + You need to restart XCA to load the new library + + + + Database file does not exist: '%1' + + + + Please enter the password to decrypt the private key: '%1' + + + + no such option: %1 + + + + %1 missmatch + + NewCrl - - Dialog - - Create CRL @@ -969,14 +994,6 @@ PKCS#8 es un formato estandar de intercambio de claves Keysize Tamaño de clave - - RSA - - - - DSA - - Usually 1024 or 2048 bit keys are used @@ -1001,6 +1018,10 @@ PKCS#8 es un formato estandar de intercambio de claves C&reate + + Curve + + NewX509 @@ -1008,10 +1029,6 @@ PKCS#8 es un formato estandar de intercambio de claves Template - - Dialog - - Create @@ -1099,10 +1116,6 @@ If this list is disabled, you only can create a self-signed certificate.Distinguished name - - Organisation - Organización - This name is only used internally and does not appear in the resulting certificate @@ -1111,30 +1124,6 @@ If this list is disabled, you only can create a self-signed certificate.Must be exactly 2 letter of size (DE, UK) - - Country code - - - - State or Province - - - - Locality - - - - Organ. unit - - - - Common name - - - - E-Mail address - - Internal name @@ -1159,10 +1148,6 @@ If this list is disabled, you only can create a self-signed certificate.Used keys too - - This funny button creates a key. Go figure. - - &Generate a new key @@ -1432,10 +1417,6 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld Object Signing CA - - Great picture , heh ? - - CA Revocation URL @@ -1492,10 +1473,6 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld Create x509 Certificate - - Ok - - Abort rollout @@ -1509,20 +1486,10 @@ Please set at least the internal name. There is no Key selected for signing. - - The following distinguished name entries are empty, -though you have declared them as mandatory in the options menu: - - - Continue rollout - - The validity dates are out of range (1950 - 2049) to create valid certificates. If you continue, your client may reject the certificate. - - The certificate will be out of date before it becomes valid. You most probably mixed up both dates. @@ -1557,23 +1524,58 @@ The rollout should be aborted. - Advanced Settings Error: + No well-defined expiration + + + + Edit name + + + + Select key + + + + The following distinguished name entries are empty: +%1 +though you have declared them as mandatory in the options menu. + + + + Edit subject + + + + Edit dates + + + + The certificate will be earlier valid than the signer. This is probably not what you want. + + + + Edit times + + + + Adjust date and continue + + + + The certificate will be longer valid than the signer. This is probably not what you want. + + + + Edit extensions + + + + Advanced Settings Error: %1 Options - - Dialog - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">XCA Options</p></body></html> - - Mandatory subject entries @@ -1602,22 +1604,42 @@ p, li { white-space: pre-wrap; } OK - - automatic detection (default) - - - - No BMP strings: only printable and T61 - - - - PKIX recommendation in RFC2459 - - UTF8 strings only (RFC2459) + + PKCS#11 path: + + + + ... + ... + + + Load + + + + PKIX recommendation in RFC2459 (default) + + + + No BMP strings, only printable and T61 + + + + All strings + + + + Successfully loaded PKCS#11 library: + + + + XCA Options + + PassRead @@ -1633,6 +1655,14 @@ p, li { white-space: pre-wrap; } &OK + + The password is parsed as 2-digit hex code. It must have an equal number of digits (0-9 and a-f) + + + + Take as HEX string + + PassWrite @@ -1652,6 +1682,14 @@ p, li { white-space: pre-wrap; } &OK + + The password is parsed as 2-digit hex code. It must have an equal number of digits (0-9 and a-f) + + + + Take as HEX string + + QObject @@ -1735,6 +1773,75 @@ p, li { white-space: pre-wrap; } All files ( * ) + + Out of Memory + + + + Undefined + + + + DB: Rename: '%1' already in use + + + + DB: Entry to rename not found: %1 + + + + Do not overwrite + + + + Overwrite + + + + PKCS#11 library ( *.dll );; + + + + PKCS#11 library ( *.dylib );; + + + + PKCS#11 library ( *.so );; + + + + Open PKCS#11 shared library + + + + Time difference too big +You must set it manually. + + + + The file: '%1' already exists! + + + + Please enter the new SO Pin for the token: '%1' + + + + Please enter the password to decrypt the private key. + + + + DB: Write error %1 - %2 + + + + Please enter the SO PIN (PUK) of the token %1 + + + + Please enter the PIN of the token %1 + + ReqDetail @@ -1787,6 +1894,29 @@ p, li { white-space: pre-wrap; } + + SelectToken + + Select Token + + + + Security token + + + + Please select the security token + + + + &Cancel + + + + &Store + + + TrustState @@ -1818,27 +1948,8 @@ p, li { white-space: pre-wrap; } - - db_base - - Delete - - - - Cancel - Cancelar - - db_crl - - The revokation list already exists in the database as - - - - and so it was not imported - - Name Nombre @@ -1859,10 +1970,6 @@ p, li { white-space: pre-wrap; } Next update - - Delete the revokation list(s) - - CRL ( *.pem *.der *.crl ) @@ -1887,45 +1994,27 @@ p, li { white-space: pre-wrap; } Delete + + Delete the revokation list '%1' ? + + + + Delete the %1 revokation lists: %2 ? + + + + The revokation list already exists in the database as: +'%1' +and so it was not imported + + db_key - - The key is already in the database as - La clave ya aparece en la base de datos como - - - and is not going to be imported - y no va a ser importada - - - The database already contains the public part of the imported key as - La base de datos ya contiene la parte pública de la clave importada como - - - and will be completed by the new, private part of the key - y será completada por la nueva parte secreta de la clave - - - Delete the key(s) - - Key size too small ! - - You are sure to create a key of the size: - - - - Cancel - Cancelar - - - Create - - New Key Nueva clave @@ -1958,13 +2047,74 @@ p, li { white-space: pre-wrap; } Reset password + + No Security token found + + + + Shall the original key '%1' be replaced by the key on the token? +This will delete the key '%1' and make it unexportable + + + + Change PIN + + + + Init PIN with SO PIN (PUK) + + + + Change SO PIN (PUK) + + + + Store on Security token + + + + Tried to change password of a smart card + + + + Tried to change PIN of a key + + + + Tried to init PIN of a key + + + + Tried to change SO PIN of a key + + + + Delete the key '%1' ? + + + + Delete the %1 keys: %2 ? + + + + The key is already in the database as: +'%1' +and is not going to be imported + + + + The database already contains the public part of the imported key as +'%1 +and will be completed by the new, private part of the key + + + + You are sure to create a key of the size: %1 ? + + db_temp - - Bad template: - - Nothing @@ -2018,24 +2168,24 @@ p, li { white-space: pre-wrap; } - Delete the template(s) + XCA templates ( *.xca);; All files ( * ) - XCA templates ( *.xca);; All files ( * ) + Delete the template '%1' ? + + + + Delete the %1 templates: %2 ? + + + + Bad template: %1 db_x509 - - The certificate already exists in the database as - - - - and so it was not imported - - Internal name @@ -2084,18 +2234,6 @@ p, li { white-space: pre-wrap; } The key you selected for signing is not a private one. - - The validity times for the certificate need to get adjusted to not exceed those of the signer - - - - Continue creation - - - - Abort - - New Certificate @@ -2176,33 +2314,51 @@ p, li { white-space: pre-wrap; } Revoke - - There was no key found for the Certificate: - - days - Delete the certificate(s) + Security token + + + + Template + + + + Delete from Security token + + + + Delete the certificate '%1' ? + + + + Delete the %1 certificates: %2 ? + + + + The certificate already exists in the database as: +'%1' +and so it was not imported + + + + There was no key found for the Certificate: '%1' + + + + Not possible for smart card key: '%1' + + + + Not possible for the token-key Certificate '%1' db_x509req - - The certificate signing request already exists in the database as - - - - and thus was not stored - - - - Delete the request(s) - - Certificate request ( *.pem *.der *.crl ) @@ -2239,6 +2395,58 @@ p, li { white-space: pre-wrap; } Delete + + Name + Nombre + + + Subject + Sujeto + + + Signed + + + + File + + + + Template + + + + Delete the %1 requests: %2 ? + + + + The certificate signing request already exists in the database as +'%1' +and thus was not stored + + + + Delete the request '%1' ? + + + + + db_x509super + + The following extensions were not ported into the template + + + + + pass_info + + Password + Contraseña + + + PIN + + pki_base @@ -2247,7 +2455,7 @@ p, li { white-space: pre-wrap; } - Out of memory + Error opening file: '%1': %2 @@ -2261,13 +2469,25 @@ p, li { white-space: pre-wrap; } unknown + + Unable to load the revokation list in file %1. Tried PEM and DER formatted CRL. + + - pki_key + pki_evp Failed to decrypt the key (bad password) + + Unable to load the private key in file %1. Tried PEM and DER private and public key types. + + + + Password input aborted + + Common @@ -2285,7 +2505,50 @@ p, li { white-space: pre-wrap; } - Password input aborted + Please enter the database password for decrypting the key + + + + Please enter the password to protect the private key: '%1' + + + + Please enter the database password for encrypting the key + + + + Please enter the password protecting the PKCS#8 key '%1' + + + + Please enter the export password for the private key '%1' + + + + + pki_key + + Common + + + + Private + + + + Bogus + + + + No password + + + + Unknown + + + + PIN @@ -2311,6 +2574,64 @@ p, li { white-space: pre-wrap; } + + pki_pkcs7 + + Unable to load the PKCS#7 file %1. Tried PEM and DER format. + + + + + pki_scard + + Delete the private key '%1' from the token? + + + + This Key is already on the token + + + + Unable to find copied key on the token + + + + Public Key missmatch. Please re-import card + + + + Unable to find generated key on card + + + + Token + + + + Failed to find the key on the token + + + + Invalid Pin for the token + + + + Please enter the new Pin for the token '%1' + + + + Please enter the SO PIN (PUK) of the token '%1' + + + + Please insert card: %1 [%2] with Serial: %3 + + + + Wrong Size of scard: %1 + + + pki_temp @@ -2318,15 +2639,15 @@ p, li { white-space: pre-wrap; } - Template file content error (too small) + Template file content error (too small): %1 - Template file content error (bad size) + Template file content error (bad size): %1 - Template file content error (bad length) + Template file content error (bad length) :%1 @@ -2349,7 +2670,23 @@ p, li { white-space: pre-wrap; } - CRL expires: + Unable to load the certificate in file %1. Tried PEM and DER certificate. + + + + No associated security token + + + + This certificate is already on the security token + + + + CRL expires: %1 + + + + Delete the certificate '%1' from the token '%2 (#%3)' ? @@ -2360,27 +2697,20 @@ p, li { white-space: pre-wrap; } - no key/value pairs found in %1 - + Unable to load the certificate request in file %1. Tried PEM, DER and SPKAC format. - Unknown name tag %1 found in %2 - + Signed - No Netscape SPKAC structure found in %1 - + Unhandled v3ext - - Form1 - - Add @@ -2402,16 +2732,13 @@ p, li { white-space: pre-wrap; } Cancelar - Validation failed: - - - - &OK + Validation failed: +'%1' Validation successfull: -' +'%1' diff --git a/lib/Makefile b/lib/Makefile index 618d8684..7a2d9b09 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -3,11 +3,11 @@ ifeq ($(TOPDIR),) TOPDIR=.. endif -MOCNAMES=db_crl db_key db_temp db_x509 db_x509req db_x509super db_base +MOCNAMES=db_crl db_key db_temp db_x509 db_x509req db_x509super db_base pki_base NAMES=$(MOCNAMES) asn1int oid pki_pkcs7 x509rev asn1time \ pki_temp x509v3ext pki_x509 func pki_crl pki_x509req \ load_obj pki_key pki_x509super main pki_pkcs12 x509name db import \ - pki_multi pki_evp pki_scard pk11_attribute pki_base pkcs11 + pki_multi pki_evp pki_scard pk11_attribute pkcs11 OBJS=$(patsubst %, %.o, $(NAMES)) $(patsubst %, moc_%.o, $(MOCNAMES)) diff --git a/lib/db.cpp b/lib/db.cpp index 00b9cf79..40f43473 100644 --- a/lib/db.cpp +++ b/lib/db.cpp @@ -183,7 +183,7 @@ void db::rename(enum pki_type type, QString name, QString n) fileIOerr("write"); } if (ret != sizeof(head)) { - throw errorEx(QObject::tr("DB: Write error %1 - %1" + throw errorEx(QObject::tr("DB: Write error %1 - %2" ).arg(ret).arg(sizeof(head))); } } diff --git a/lib/db_base.cpp b/lib/db_base.cpp index ca6bfc88..12cdec49 100644 --- a/lib/db_base.cpp +++ b/lib/db_base.cpp @@ -127,7 +127,7 @@ void db_base::delete_ask() pki_base *pki = static_cast(currentIdx.internalPointer()); if (QMessageBox::information(mainwin, XCA_TITLE, - delete_txt + ": " + pki->getIntName() + " ?\n", + delete_txt.arg(pki->getIntName()), QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok) return; @@ -172,7 +172,8 @@ void db_base::deleteSelectedItems(XcaTreeView* view) { QModelIndexList indexes = view->getSelectedIndexes(); QModelIndex index; - QString items; + QString items, single, msg; + int count = 0; if (indexes.count() == 0) return; @@ -182,10 +183,15 @@ void db_base::deleteSelectedItems(XcaTreeView* view) continue; pki_base *pki = static_cast(index.internalPointer()); items += "'" + pki->getIntName() + "' "; + single = pki->getIntName(); + count++; } + if (count == 1) + msg = delete_txt.arg(single); + else + msg = delete_multi_txt.arg(count).arg(items); - if (QMessageBox::information(mainwin, XCA_TITLE, - delete_txt + ": " + items + " ?\n" , + if (QMessageBox::information(mainwin, XCA_TITLE, msg, QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok) return; diff --git a/lib/db_base.h b/lib/db_base.h index 3c907e48..1bc52d23 100644 --- a/lib/db_base.h +++ b/lib/db_base.h @@ -32,7 +32,7 @@ class db_base: public QAbstractItemModel Q_OBJECT protected: - QString dbName, delete_txt; + QString dbName, delete_txt, delete_multi_txt; QModelIndex currentIdx; void _writePKI(pki_base *pki, bool overwrite ); void _removePKI(pki_base *pki ); diff --git a/lib/db_crl.cpp b/lib/db_crl.cpp index aee08e5f..50362eaf 100644 --- a/lib/db_crl.cpp +++ b/lib/db_crl.cpp @@ -19,7 +19,8 @@ db_crl::db_crl(QString db, MainWindow *mw) { headertext << tr("Name") << tr("Signer") << tr("Common name") << tr("No. revoked") << tr("Next update"); - delete_txt = tr("Delete the revokation list(s)"); + delete_txt = tr("Delete the revokation list '%1' ?"); + delete_multi_txt = tr("Delete the %1 revokation lists: %2 ?"); view = mw->crlView; class_name = "crls"; pkitype[0] = revokation; @@ -91,9 +92,7 @@ pki_base *db_crl::insert(pki_base *item) pki_crl *oldcrl = (pki_crl *)getByReference(crl); if (oldcrl) { QMessageBox::information(mainwin, XCA_TITLE, - tr("The revokation list already exists in the database as") + - ":\n'" + oldcrl->getIntName() + - "'\n" + tr("and so it was not imported")); + tr("The revokation list already exists in the database as:\n'%1'\nand so it was not imported").arg(oldcrl->getIntName())); delete(crl); return oldcrl; } diff --git a/lib/db_key.cpp b/lib/db_key.cpp index 1eb69fa9..7da0b901 100644 --- a/lib/db_key.cpp +++ b/lib/db_key.cpp @@ -34,7 +34,8 @@ db_key::db_key(QString db, MainWindow *mw) { rootItem->setIntName("[key root]"); headertext << "Name" << "Type" << "Size" << "Use" << "Password"; - delete_txt = tr("Delete the key(s)"); + delete_txt = tr("Delete the key '%1' ?"); + delete_multi_txt = tr("Delete the %1 keys: %2 ?"); view = mw->keyView; class_name = "keys"; pkitype[0] = asym_key; @@ -93,17 +94,13 @@ pki_base* db_key::insert(pki_base *item) if (oldkey != NULL) { if ((oldkey->isPrivKey() && lkey->isPrivKey()) || lkey->isPubKey()){ QMessageBox::information(mainwin, XCA_TITLE, - tr("The key is already in the database as") +":\n'" + - oldkey->getIntName() + - "'\n" + tr("and is not going to be imported")); + tr("The key is already in the database as:\n'%1'\nand is not going to be imported").arg(oldkey->getIntName())); delete(lkey); return oldkey; } else { QMessageBox::information(mainwin, XCA_TITLE, - tr("The database already contains the public part of the imported key as") +":\n'" + - oldkey->getIntName() + - "'\n" + tr("and will be completed by the new, private part of the key")); + tr("The database already contains the public part of the imported key as\n'%1\nand will be completed by the new, private part of the key").arg(oldkey->getIntName())); lkey->setIntName(oldkey->getIntName()); currentIdx = index(oldkey->row(), 0, QModelIndex()); deletePKI(); @@ -141,10 +138,10 @@ void db_key::newItem(QString name) return; } if (ksize < 1024 || ksize > 8192) - if (!QMessageBox::warning(NULL, XCA_TITLE, - tr("You are sure to create a key of the size: ") - +QString::number(ksize) + " ?", tr("Cancel"), - tr("Create") )) + if (QMessageBox::warning(NULL, XCA_TITLE, + tr("You are sure to create a key of the size: %1 ?").arg(ksize), + QMessageBox::Yes | QMessageBox::No) != + QMessageBox::Yes) { delete dlg; return; diff --git a/lib/db_temp.cpp b/lib/db_temp.cpp index 576df9d1..f349e395 100644 --- a/lib/db_temp.cpp +++ b/lib/db_temp.cpp @@ -21,7 +21,8 @@ db_temp::db_temp(QString DBfile, MainWindow *mw) :db_base(DBfile, mw) { headertext << "Name" << "Type"; - delete_txt = tr("Delete the template(s)"); + delete_txt = tr("Delete the template '%1' ?"); + delete_multi_txt = tr("Delete the %1 templates: %2 ?"); view = mw->tempView; class_name = "templates"; pkitype[0] = tmpl; @@ -48,7 +49,7 @@ db_temp::db_temp(QString DBfile, MainWindow *mw) predefs->append(tmpl); } catch(errorEx &err) { QMessageBox::warning(mainwin, tr(XCA_TITLE), - tr("Bad template: ") + name); + tr("Bad template: %1").arg(name)); } } } diff --git a/lib/db_x509.cpp b/lib/db_x509.cpp index d10b0bb7..3b5b5a9c 100644 --- a/lib/db_x509.cpp +++ b/lib/db_x509.cpp @@ -30,7 +30,8 @@ db_x509::db_x509(QString DBfile, MainWindow *mw) headertext << tr("Internal name") << tr("Common name") << tr("Serial") << tr("not After") << tr("Trust state") << tr("Revocation"); - delete_txt = tr("Delete the certificate(s)"); + delete_txt = tr("Delete the certificate '%1' ?"); + delete_multi_txt =tr("Delete the %1 certificates: %2 ?"); view = mw->certView; class_name = "certificates"; pkitype[0] = x509; @@ -289,9 +290,7 @@ pki_base *db_x509::insert(pki_base *item) pki_x509 *oldcert = (pki_x509 *)getByReference(cert); if (oldcert) { QMessageBox::information(mainwin, XCA_TITLE, - tr("The certificate already exists in the database as") +":\n'" + - oldcert->getIntName() + - "'\n" + tr("and so it was not imported")); + tr("The certificate already exists in the database as:\n'%1'\nand so it was not imported").arg(oldcert->getIntName())); delete(cert); return oldcert; } @@ -459,7 +458,7 @@ void db_x509::newCert(NewX509 *dlg) break; else QMessageBox::warning(mainwin, XCA_TITLE, - tr("The two secret numbers don't match.")); + tr("The two secret numbers don't match.")); } delete dlg1; if (A!=B) @@ -497,14 +496,6 @@ void db_x509::newCert(NewX509 *dlg) cert->setNotAfter(a); - if (cert->resetTimes(signcert) > 0) { - if (QMessageBox::information(mainwin, XCA_TITLE, - tr("The validity times for the certificate need to get adjusted to not exceed those of the signer"), - tr("Continue creation"), tr("Abort") - )) - throw errorEx(""); - } - // STEP 4 handle extensions if (dlg->copyReqExtCB->isChecked() && dlg->fromReqCB->isChecked()) { extList el = req->getV3ext(); @@ -714,15 +705,15 @@ void db_x509::store() case 11: // Certificate and Key in PEM format for apache pki_evp *privkey = (pki_evp *)crt->getRefKey(); if (!privkey || privkey->isPubKey()) { - QMessageBox::warning(mainwin, tr(XCA_TITLE), - tr("There was no key found for the Certificate: ") + - crt->getIntName() ); + QMessageBox::warning(mainwin, XCA_TITLE, + tr("There was no key found for the Certificate: '%1'"). + arg(crt->getIntName())); return; } if (privkey->isToken()) { - QMessageBox::warning(mainwin, tr(XCA_TITLE), - tr("Not possible for smart card key:") + - crt->getIntName() ); + QMessageBox::warning(mainwin, XCA_TITLE, + tr("Not possible for smart card key: '%1'"). + arg(crt->getIntName())); return; } @@ -747,15 +738,14 @@ void db_x509::writePKCS12(pki_x509 *cert, QString s, bool chain) try { pki_evp *privkey = (pki_evp *)cert->getRefKey(); if (!privkey || privkey->isPubKey()) { - QMessageBox::warning(mainwin, tr(XCA_TITLE), - tr("There was no key found for the Certificate: ") + - cert->getIntName() ); + QMessageBox::warning(mainwin, XCA_TITLE, + tr("There was no key found for the Certificate: '%1'").arg(cert->getIntName())); return; } if (privkey->isToken()) { - QMessageBox::warning(mainwin, tr(XCA_TITLE), - tr("Not possible for a token-key for the Certificate: ") + - cert->getIntName() ); + QMessageBox::warning(mainwin, XCA_TITLE, + tr("Not possible for the token-key Certificate '%1'"). + arg(cert->getIntName())); return; } if (s.isEmpty()) @@ -912,7 +902,11 @@ void db_x509::deleteFromToken() if (!currentIdx.isValid()) return; pki_x509 *pki = static_cast(currentIdx.internalPointer()); - pki->deleteFromToken(); + try { + pki->deleteFromToken(); + } catch (errorEx &err) { + mainwin->Error(err); + } } void db_x509::setTrust() @@ -955,17 +949,18 @@ void db_x509::extendCert() a1time time; a1int serial; try { - CertExtend *dlg = new CertExtend(mainwin); - if (!dlg->exec()) { - delete dlg; - return; - } oldcert = static_cast(currentIdx.internalPointer()); if (!oldcert || !(signer = oldcert->getSigner()) || !(signkey = signer->getRefKey()) || signkey->isPubKey()) return; + + CertExtend *dlg = new CertExtend(mainwin, signer); + if (!dlg->exec()) { + delete dlg; + return; + } newcert = new pki_x509(oldcert); serial = signer->getIncCaSerial(); @@ -978,17 +973,15 @@ void db_x509::extendCert() // change date and serial newcert->setSerial(serial); newcert->setNotBefore(dlg->notBefore->getDate()); - newcert->setNotAfter(dlg->notAfter->getDate()); + a1time a; + if (dlg->noWellDefinedExpDate->isChecked()) + a.setUndefined(); + else + a = dlg->notAfter->getDate(); - if (newcert->resetTimes(signer) > 0) { - if (QMessageBox::information(mainwin, XCA_TITLE, - tr("The validity times for the certificate need to get adjusted to not exceed those of the signer"), - tr("Continue creation"), tr("Abort") - )) - throw errorEx(""); - } + newcert->setNotAfter(a); - // and finally sign the request + // and finally sign the cert newcert->sign(signkey, oldcert->getDigest()); insert(newcert); delete dlg; diff --git a/lib/db_x509req.cpp b/lib/db_x509req.cpp index b2ec9ed3..be3c687d 100644 --- a/lib/db_x509req.cpp +++ b/lib/db_x509req.cpp @@ -19,7 +19,8 @@ db_x509req::db_x509req(QString DBfile, MainWindow *mw) :db_x509super(DBfile, mw) { headertext << tr("Name") << tr("Subject") << tr("Signed"); - delete_txt = tr("Delete the request(s)"); + delete_txt = tr("Delete the request '%1' ?"); + delete_multi_txt = tr("Delete the %1 requests: %2 ?"); view = mw->reqView; class_name = "requests"; pkitype[0] = x509_req; @@ -38,9 +39,7 @@ pki_base *db_x509req::insert(pki_base *item) oldreq = (pki_x509req *)getByReference(req); if (oldreq) { QMessageBox::information(mainwin, XCA_TITLE, - tr("The certificate signing request already exists in the database as") +":\n'" + - oldreq->getIntName() + - "'\n" + tr("and thus was not stored")); + tr("The certificate signing request already exists in the database as\n'%1'\nand thus was not stored").arg(oldreq->getIntName())); delete(req); return oldreq; } diff --git a/lib/func.cpp b/lib/func.cpp index dab82cb6..9937584f 100644 --- a/lib/func.cpp +++ b/lib/func.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef WIN32 #include @@ -189,7 +190,7 @@ void applyTD(QWidget *parent, int number, int range, bool mnc, t /= SECONDS_PER_DAY; if (delta + t > 24850) { QMessageBox::warning(parent, XCA_TITLE, - "Time difference too big\nYou must set it manually." ); + QObject::tr("Time difference too big\nYou must set it manually.")); return; } nb->setDate(a.now(), midnight); @@ -267,11 +268,14 @@ QString changeFilenameSuffix(QString fn, const QStringList &suffixlist, bool mayWriteFile(const QString &fname) { if (QFile::exists(fname)) { - if (QMessageBox::information(NULL, XCA_TITLE, - QObject::tr("The file: ") + fname + - QObject::tr(" already exists"), - QObject::tr("Do not overwrite"), - QObject::tr("Overwrite")) != 1) + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + QObject::tr("The file: '%1' already exists!"). + arg(fname)); + msg.addButton(QMessageBox::Ok)->setText( + QObject::tr("Overwrite")); + msg.addButton(QMessageBox::Cancel)->setText( + QObject::tr("Do not overwrite")); + if (msg.exec() != QMessageBox::Ok) { return false; } diff --git a/lib/pkcs11.cpp b/lib/pkcs11.cpp index c7d5f778..d5d4bde6 100644 --- a/lib/pkcs11.cpp +++ b/lib/pkcs11.cpp @@ -166,10 +166,10 @@ QString pkcs11::tokenLogin(QString name, bool so, bool force) bool need_login; QString text = so ? - QObject::tr("Please enter the SO PIN (PUK) of the token: "): - QObject::tr("Please enter the PIN of the token: "); + QObject::tr("Please enter the SO PIN (PUK) of the token %1"): + QObject::tr("Please enter the PIN of the token %1"); - pass_info p(XCA_TITLE, text + name); + pass_info p(XCA_TITLE, text.arg(name)); p.setPin(); need_login = needsLogin(so); if (force || need_login) { diff --git a/lib/pki_base.cpp b/lib/pki_base.cpp index f3ced567..e19e13c9 100644 --- a/lib/pki_base.cpp +++ b/lib/pki_base.cpp @@ -37,7 +37,7 @@ enum pki_type pki_base::getType() pki_base::~pki_base(void) { while((childCount())) - delete takeFirst(); + delete takeFirst(); pki_counter--; } @@ -78,8 +78,8 @@ void pki_base::setIntName(const QString &d) void pki_base::fopen_error(const QString fname) { - QString txt = tr("Error opening file:") + " '" + fname + "' " + - strerror(errno); + QString txt = tr("Error opening file: '%1': %2").arg(fname). + arg(strerror(errno)); throw errorEx(txt, class_name); } diff --git a/lib/pki_base.h b/lib/pki_base.h index 9166f408..b14386fe 100644 --- a/lib/pki_base.h +++ b/lib/pki_base.h @@ -16,6 +16,7 @@ class pki_base : public QObject { + Q_OBJECT private: static int pki_counter; protected: diff --git a/lib/pki_evp.cpp b/lib/pki_evp.cpp index 40333ac4..188f3b9e 100644 --- a/lib/pki_evp.cpp +++ b/lib/pki_evp.cpp @@ -216,7 +216,7 @@ void pki_evp::fromPEM_BIO(BIO *bio, QString name) { EVP_PKEY *pkey; int pos; - pass_info p(XCA_TITLE, qApp->translate("MainWindow", + pass_info p(XCA_TITLE, QObject::tr( "Please enter the password to decrypt the private key.")); pos = BIO_tell(bio); pkey = PEM_read_bio_PrivateKey(bio, NULL, MainWindow::passRead, &p); @@ -264,8 +264,8 @@ static void search_ec_oid(EC_KEY *ec) void pki_evp::fload(const QString fname) { pass_info p(XCA_TITLE, qApp->translate("MainWindow", - "Please enter the password to decrypt the private key.") + - "\n'" + fname + "'"); + "Please enter the password to decrypt the private key: '%1'"). + arg(fname)); pem_password_cb *cb = MainWindow::passRead; FILE *fp = fopen(QString2filename(fname), "r"); EVP_PKEY *pkey; @@ -375,8 +375,7 @@ EVP_PKEY *pki_evp::decryptKey() const if (ownPass == ptPrivate) { int ret; pass_info pi(XCA_TITLE, qApp->translate("MainWindow", - "Please enter the password to decrypt the private key: '") + - getIntName() + "'"); + "Please enter the password to decrypt the private key: '%1'").arg(getIntName())); ret = MainWindow::passRead(ownPassBuf, MAX_PASS_LENGTH, 0, &pi); if (ret < 0) throw errorEx(tr("Password input aborted"), class_name); @@ -391,8 +390,7 @@ EVP_PKEY *pki_evp::decryptKey() const int ret; //printf("Passhash= '%s', new hash= '%s', passwd= '%s'\n", //CCHAR(passHash), CCHAR(md5passwd(ownPassBuf)), ownPassBuf); - pass_info p(XCA_TITLE, qApp->translate("MainWindow", - "Please enter the database password for decrypting the key")); + pass_info p(XCA_TITLE, tr("Please enter the database password for decrypting the key")); ret = MainWindow::passRead(ownPassBuf, MAX_PASS_LENGTH, 0, &p); if (ret < 0) throw errorEx(tr("Password input aborted"), class_name); @@ -484,9 +482,8 @@ void pki_evp::encryptKey(const char *password) /* This key has its own, private password */ if (ownPass == ptPrivate) { int ret; - pass_info p(XCA_TITLE, qApp->translate("MainWindow", - "Please enter the password to protect the private key: '") + - getIntName() + "'"); + pass_info p(XCA_TITLE, tr("Please enter the password to protect the private key: '%1'"). + arg(getIntName())); ret = MainWindow::passWrite(ownPassBuf, MAX_PASS_LENGTH, 0, &p); if (ret < 0) throw errorEx("Password input aborted", class_name); @@ -499,8 +496,7 @@ void pki_evp::encryptKey(const char *password) } else { int ret = 0; memcpy(ownPassBuf, passwd, MAX_PASS_LENGTH); - pass_info p(XCA_TITLE, qApp->translate("MainWindow", - "Please enter the database password for encrypting the key")); + pass_info p(XCA_TITLE, tr("Please enter the database password for encrypting the key")); while (md5passwd(ownPassBuf) != passHash && sha512passwd(ownPassBuf, passHash) != passHash ) { @@ -588,7 +584,7 @@ void pki_evp::writePKCS8(const QString fname, const EVP_CIPHER *enc, pem_password_cb *cb, bool pem) { EVP_PKEY *pkey; - pass_info p(XCA_TITLE, tr("Please enter the password protecting the PKCS#8 key") + " '" + getIntName() + "'"); + pass_info p(XCA_TITLE, tr("Please enter the password protecting the PKCS#8 key '%1'").arg(getIntName())); FILE *fp = fopen(QString2filename(fname), "w"); if (fp != NULL) { if (key) { @@ -623,7 +619,7 @@ void pki_evp::writeKey(const QString fname, const EVP_CIPHER *enc, pem_password_cb *cb, bool pem) { EVP_PKEY *pkey; - pass_info p(XCA_TITLE, tr("Please enter the export password for the private key") + " '" + getIntName() + "'"); + pass_info p(XCA_TITLE, tr("Please enter the export password for the private key '%1'").arg(getIntName())); if (isPubKey()) { writePublic(fname, pem); return; diff --git a/lib/pki_pkcs12.h b/lib/pki_pkcs12.h index 82c81e23..d1afcc64 100644 --- a/lib/pki_pkcs12.h +++ b/lib/pki_pkcs12.h @@ -20,27 +20,28 @@ class pki_pkcs12: public pki_base { - friend class pki_x509; - friend class pki_evp; + friend class pki_x509; + friend class pki_evp; - protected: - QString alias; - pki_x509 *cert; - pki_evp *key; - STACK_OF(X509) *certstack; - pem_password_cb *passcb; - public: + protected: + QString alias; + pki_x509 *cert; + pki_evp *key; + STACK_OF(X509) *certstack; + pem_password_cb *passcb; + public: - pki_pkcs12(const QString d, pki_x509 *acert, pki_evp *akey, pem_password_cb *cb); - pki_pkcs12(const QString fname, pem_password_cb *cb); + pki_pkcs12(const QString d, pki_x509 *acert, pki_evp *akey, + pem_password_cb *cb); + pki_pkcs12(const QString fname, pem_password_cb *cb); - ~pki_pkcs12(); - void addCaCert(pki_x509 *acert); - pki_key *getKey(); - pki_x509 *getCert(); - pki_x509 *getCa(int x); - int numCa(); // number of ca certs; - void writePKCS12(const QString fname); + ~pki_pkcs12(); + void addCaCert(pki_x509 *acert); + pki_key *getKey(); + pki_x509 *getCert(); + pki_x509 *getCa(int x); + int numCa(); // number of ca certs; + void writePKCS12(const QString fname); }; #endif diff --git a/lib/pki_scard.cpp b/lib/pki_scard.cpp index c62aede1..3e457a18 100644 --- a/lib/pki_scard.cpp +++ b/lib/pki_scard.cpp @@ -43,13 +43,13 @@ QPixmap *pki_scard::icon[1] = { NULL }; if (!ENGINE_ctrl_cmd_string(e, cmd, value, 0)) { \ ENGINE_free(e); \ if (!silent) { \ - log += tr("FAILED:") + msg; \ + log += QString("FAILED:") + msg; \ openssl_error(log); \ } \ ign_openssl_error(); \ return false; \ } \ - log += tr("SUCCESS:") +msg; \ + log += QString("SUCCESS:") +msg; \ } while(0); ENGINE *pki_scard::p11_engine = NULL; @@ -455,13 +455,12 @@ bool pki_scard::prepare_card(unsigned long *slot, bool verifyPubkey) const } if (i < p11_slots.count()) break; - QString msg = tr("Please insert card :'") + - card_manufacturer + " [" + card_label + - "] " + tr("with Serial: ") + card_serial; + QString msg = tr("Please insert card: %1 [%2] with Serial: %3"). + arg(card_manufacturer).arg(card_label).arg(card_serial); int r = QMessageBox::warning(NULL, XCA_TITLE, msg, - tr("&OK"), tr("Abort")); - if (r == 1) { + QMessageBox::Cancel | QMessageBox::Ok); + if (r == QMessageBox::Cancel) { return false; } } @@ -486,7 +485,7 @@ bool pki_scard::prepare_card(unsigned long *slot, bool verifyPubkey) const return true; if (!object_id.isEmpty()) QMessageBox::warning(NULL, XCA_TITLE, - tr("Public Key missmatch. Please re-import card"), tr("&OK")); + tr("Public Key missmatch. Please re-import card")); } return false; } @@ -580,7 +579,7 @@ void pki_scard::fromData(const unsigned char *p, db_header_t *head ) d2i_PUBKEY(&key, &p1, size - (p1-p)); if (p1-p != size) { - my_error(tr("Wrong Size of scard: ") + getIntName()); + my_error(tr("Wrong Size of scard: %1").arg(getIntName())); } } @@ -642,8 +641,8 @@ void pki_scard::changePin() pin = p11.tokenLogin(getIntName(), false, true); if (pin.isNull()) return; - pass_info p(XCA_TITLE, tr("Please enter the new Pin for the token: ") + - getIntName()); + pass_info p(XCA_TITLE, tr("Please enter the new Pin for the token '%1'"). + arg(getIntName())); p.setPin(); int newPinLen = MainWindow::passWrite(newPin, MAX_PASS_LENGTH, 0, &p); @@ -661,8 +660,8 @@ void pki_scard::initPin() unsigned long slot; pass_info p(XCA_TITLE, - pki_scard::tr("Please enter the SO PIN (PUK) of the token: ") + - getIntName()); + pki_scard::tr("Please enter the SO PIN (PUK) of the token '%1'"). + arg(getIntName())); p.setPin(); if (!prepare_card(&slot)) @@ -676,7 +675,7 @@ void pki_scard::initPin() p11.login((unsigned char*)soPin, soPinLen, true); } p.setDescription(qApp->translate("MainWindow", - "Please enter the new Pin for the token: ") +getIntName()); + "Please enter the new Pin for the token '%1'").arg(getIntName())); int newPinLen = MainWindow::passWrite(newPin, MAX_PASS_LENGTH, 0, &p); if (newPinLen != -1) { @@ -691,8 +690,8 @@ void pki_scard::changeSoPin() unsigned long slot; pass_info p(XCA_TITLE, - pki_scard::tr("Please enter the SO PIN (PUK) of the token: ") + - getIntName()); + pki_scard::tr("Please enter the SO PIN (PUK) of the token '%1'"). + arg(getIntName())); p.setPin(); if (!prepare_card(&slot)) @@ -705,8 +704,9 @@ void pki_scard::changeSoPin() p11.logout(); p11.login((unsigned char*)oldPin, oldPinLen, true); - p.setDescription(qApp->translate("MainWindow", - "Please enter the new SO Pin for the token: ") +getIntName()); + p.setDescription(QObject::tr( + "Please enter the new SO Pin for the token: '%1'"). + arg(getIntName())); int newPinLen = MainWindow::passWrite(newPin, MAX_PASS_LENGTH, 0, &p); if (newPinLen == -1) { diff --git a/lib/pki_temp.cpp b/lib/pki_temp.cpp index b07a37d6..eafe0222 100644 --- a/lib/pki_temp.cpp +++ b/lib/pki_temp.cpp @@ -397,7 +397,8 @@ void pki_temp::fload(QString fname) return; } if (fread(buf, 2*sizeof(int), 1, fp) != 1) - my_error(tr("Template file content error (too small) ") +fname); + my_error(tr("Template file content error (too small): %1"). + arg(fname)); size = db::intFromData(&p1); version = db::intFromData(&p1); @@ -407,7 +408,7 @@ void pki_temp::fload(QString fname) size = intFromData(&p1); if (size > 65535 || size <0) { fclose(fp); - my_error(tr("Template file content error (bad size) ") +fname); + my_error(tr("Template file content error (bad size): %1").arg(fname)); } oldimport = true; } else { @@ -418,7 +419,7 @@ void pki_temp::fload(QString fname) if ((s=fread(p, 1, size, fp)) != size) { OPENSSL_free(p); fclose(fp); - my_error(tr("Template file content error (bad length) ") + fname); + my_error(tr("Template file content error (bad length) :%1").arg(fname)); } } if (oldimport) { diff --git a/lib/pki_x509.cpp b/lib/pki_x509.cpp index 1468a045..ba83d26a 100644 --- a/lib/pki_x509.cpp +++ b/lib/pki_x509.cpp @@ -294,7 +294,7 @@ void pki_x509::deleteFromToken() QStringList info = p11.tokenInfo(slot); if (QMessageBox::question(NULL, XCA_TITLE, - tr("Delete the certificate '%1' from the token '%1 (#%2)' ?"). + tr("Delete the certificate '%1' from the token '%2 (#%3)' ?"). arg(getIntName()).arg(info[0]).arg(info[2]), QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { @@ -590,24 +590,6 @@ int pki_x509::checkDate() return ret; } -int pki_x509::resetTimes(pki_x509 *signer) -{ - int ret = 0; - if (!signer) return -1; - if (getNotAfter() > signer->getNotAfter()) { - // client cert is longer valid.... - setNotAfter(signer->getNotAfter()); - ret=1; - } - if (getNotBefore() < signer->getNotBefore()) { - // client cert is longer valid.... - setNotBefore(signer->getNotBefore()); - ret=2; - } - openssl_error(); - return ret; -} - extList pki_x509::getV3ext() { extList el; @@ -711,20 +693,6 @@ int pki_x509::calcEffTrust() return mytrust; } -a1int pki_x509::getIncCaSerial() { return caSerial++; } - -a1int pki_x509::getCaSerial() { return caSerial; } - -void pki_x509::setCaSerial(a1int s) { caSerial = s; } - -int pki_x509::getCrlDays() {return crlDays;} - -void pki_x509::setCrlDays(int s){if (s>0) crlDays = s;} - -QString pki_x509::getTemplate(){ return caTemplate; } - -void pki_x509::setTemplate(QString s) {if (s.length()>0) caTemplate = s; } - void pki_x509::setCrlExpiry(const a1time &time) { crlExpiry = time; @@ -759,7 +727,8 @@ QVariant pki_x509::column_data(int col) if (isRevoked()) return QVariant(getRevoked().toSortable()); else if (canSign()) - return QVariant(tr("CRL expires: ")+ crlExpiry.toSortable()); + return QVariant(tr("CRL expires: %1"). + arg(crlExpiry.toSortable())); } return QVariant(); diff --git a/lib/pki_x509.h b/lib/pki_x509.h index 30e16f44..8d905737 100644 --- a/lib/pki_x509.h +++ b/lib/pki_x509.h @@ -77,7 +77,10 @@ class pki_x509 : public pki_x509super int checkDate(); void addV3ext(const x509v3ext &e); void sign(pki_key *signkey, const EVP_MD *digest); - X509 *getCert(){ return cert;} + X509 *getCert() + { + return cert; + } int getTrust(); void setTrust(int t); int getEffTrust(); @@ -87,15 +90,37 @@ class pki_x509 : public pki_x509super a1time &getRevoked(); bool isRevoked(); int calcEffTrust(); - a1int getIncCaSerial(); - a1int getCaSerial(); - void setCaSerial(a1int s); - void setTemplate(QString s); - QString getTemplate(); - void setCrlDays(int s); - int getCrlDays(); + a1int getIncCaSerial() + { + return caSerial++; + } + a1int getCaSerial() + { + return caSerial; + } + void setCaSerial(a1int s) + { + caSerial = s; + } + void setTemplate(QString s) + { + if (s.length() > 0) + caTemplate = s; + } + QString getTemplate() + { + return caTemplate; + } + void setCrlDays(int s) + { + if (s > 0) + crlDays = s; + } + int getCrlDays() + { + return crlDays; + } void setCrlExpiry(const a1time &time); - int resetTimes(pki_x509 *signer); bool hasExtension(int nid); bool cmpIssuerAndSerial(pki_x509 *refcert); void updateView(); diff --git a/ui/CaProperties.ui b/ui/CaProperties.ui index eda6ba43..bdbe28db 100644 --- a/ui/CaProperties.ui +++ b/ui/CaProperties.ui @@ -1,10 +1,8 @@ - - - - + + CaProperties - - + + 0 0 @@ -12,33 +10,30 @@ 375 - - Dialog - - - - 9 - - + + 6 + + 9 + - - - 0 - - + + 6 + + 0 + - + Qt::Horizontal - + QSizePolicy::Expanding - + 20 20 @@ -47,27 +42,27 @@ - - + + 200 94 - + true - + Qt::Horizontal - + QSizePolicy::Expanding - + 20 20 @@ -79,10 +74,10 @@ - + Qt::Vertical - + 20 20 @@ -91,8 +86,8 @@ - - + + Arial 14 @@ -103,17 +98,14 @@ false - - TextLabel - - + Qt::Vertical - + 20 20 @@ -122,43 +114,43 @@ - - + + CA properties - - + + 9 - + 6 - - + + - - - + + + Next serial for signing - - + + - - - + + + Days until next CRL issuing - - + + - - - + + + Default template @@ -168,10 +160,10 @@ - + Qt::Vertical - + 20 40 @@ -180,19 +172,19 @@ - - - 0 - - + + 6 + + 0 + - + Qt::Horizontal - + 131 31 @@ -201,15 +193,15 @@ - - + + OK - - + + Cancel @@ -218,7 +210,6 @@ - @@ -227,11 +218,11 @@ CaProperties accept() - + 278 253 - + 96 254 @@ -243,11 +234,11 @@ CaProperties reject() - + 369 253 - + 179 282 diff --git a/ui/CertExtend.ui b/ui/CertExtend.ui index b7df8978..a996a296 100644 --- a/ui/CertExtend.ui +++ b/ui/CertExtend.ui @@ -1,116 +1,95 @@ - + + CertExtend - - + + 0 0 - 450 - 335 + 512 + 275 - + - - - 6 - - - 8 - - - 8 - - - 8 - - - 8 - + - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - + - - - Qt::Horizontal + + + + Arial + 14 + 50 + false + false + false + false + - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - 200 - 94 - - - - true + + Certificate renewal - + Qt::Horizontal - + QSizePolicy::Expanding - + - 20 + 78 20 + + + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + - - + + This will create a new certificate as a copy of the old one with a new serial number and adjusted validity values. - + true - + Qt::Vertical - + QSizePolicy::Expanding - + 368 16 @@ -119,102 +98,72 @@ - - + + 6 - - 0 - - - 0 - - - 0 - - + 0 - - + + Validity - - + + 6 - - 8 - - - 8 - - - 8 - - + 8 - - + + 0 - - 0 - - - 0 - - - 0 - - + 6 - - 6 - - - - + + + Not before - - - + + + Not after - - - - yyyy-MM-dd hh:mm - - - true - - - Qt::UTC - - + + + + yyyy-MM-dd hh:mm + + + true + + + Qt::UTC + + - - - - yyyy-MM-dd hh:mm - - - true - - - Qt::UTC - - + + + + yyyy-MM-dd hh:mm + + + true + + + Qt::UTC + + @@ -222,68 +171,51 @@ - - + + Time range - - - 8 - - - 8 - - - 8 - - - 8 - - - 6 - - - 6 - - - + + + + + + - + Days - + Months - + Years - - - + + + + Apply + + + + + + Midnight - - - - - - - - 0 - 0 - - - - Apply + + + + No well-defined expiration @@ -294,13 +226,13 @@ - + Qt::Vertical - + QSizePolicy::Expanding - + 368 16 @@ -309,47 +241,32 @@ - - + + 6 - - 0 - - - 0 - - - 0 - - + 0 - - - - 0 - 0 - - - + + &Cancel - + 276824131 - + Qt::Horizontal - + QSizePolicy::Expanding - + 20 20 @@ -358,14 +275,8 @@ - - - - 0 - 0 - - - + + Sans Serif 9 @@ -376,7 +287,7 @@ false - + &OK @@ -409,13 +320,13 @@ CertExtend accept() - - 322 - 307 + + 501 + 264 - + 222 - 302 + 274 @@ -425,13 +336,13 @@ CertExtend reject() - - 112 - 302 + + 89 + 264 - + 158 - 299 + 274 @@ -441,13 +352,45 @@ CertExtend applyTimeDiff() - - 306 - 249 + + 490 + 167 - + 380 - 281 + 274 + + + + + noWellDefinedExpDate + clicked(bool) + notAfter + setEnabled(bool) + + + 372 + 182 + + + 151 + 189 + + + + + noWellDefinedExpDate + clicked(bool) + notAfter + setDisabled(bool) + + + 407 + 185 + + + 188 + 188 diff --git a/ui/CrlDetail.ui b/ui/CrlDetail.ui index 77916656..182d5e09 100644 --- a/ui/CrlDetail.ui +++ b/ui/CrlDetail.ui @@ -1,7 +1,8 @@ - + + CrlDetail - - + + 0 0 @@ -9,27 +10,24 @@ 352 - - CrlDetail_UI - - - - 8 - - + + 6 + + 8 + - - - 0 - - + + 6 + + 0 + - - + + Arial 14 @@ -40,20 +38,20 @@ false - + Details of the Revocation list - + Qt::Horizontal - + QSizePolicy::Expanding - + 20 20 @@ -62,20 +60,20 @@ - - + + 95 40 - + 95 40 - + true @@ -83,30 +81,30 @@ - - - 0 + + + 3 - - + + &Status - - - 8 - - + + 6 + + 8 + - + Qt::Vertical - + QSizePolicy::Expanding - + 20 20 @@ -115,142 +113,138 @@ - - + + QFrame::Box - + QFrame::Sunken - - + + 8 - + 6 - - - - 0 - - + + + 6 + + 0 + - + - - - - 0 - 1 + + + 0 0 - + Version - - - - 1 - 1 + + + 0 0 - + QFrame::Panel - + QFrame::Sunken - - - + + + Signature - - - + + + Signed by - - - + + + Name - - - + + + The internal name of the CRL in the database - - + + - - + + issuing dates - - + + 8 - + 6 - - - + + + Next Update - - - + + + Last Update - - - + + + QFrame::Panel - + QFrame::Sunken - - - + + + QFrame::Panel - + QFrame::Sunken @@ -260,13 +254,13 @@ - + Qt::Vertical - + QSizePolicy::Expanding - + 20 20 @@ -276,88 +270,75 @@ - - + + &Issuer - - - 11 - - + + 6 + + 11 + - + - - + + &Extensions - - - 11 - - + + 6 + + 11 + - - + + false - + true - - + + &Revocation list - - - 11 - - + + 6 + + 11 + - - + + true - + QAbstractItemView::NoSelection - + false - + true - - 3 - - + 0 - - - 1 - - - - - 2 - - @@ -365,22 +346,22 @@ - - - 0 - - + + 6 + + 0 + - + Qt::Horizontal - + QSizePolicy::Expanding - + 81 40 @@ -389,26 +370,24 @@ - - - - 3 - 0 + + + 0 0 - + &OK - + Qt::Horizontal - + 40 20 @@ -419,8 +398,8 @@ - - + + 0 0 @@ -431,11 +410,6 @@ - - CopyLabel - QLabel -
widgets/clicklabel.h
-
ClickLabel QLabel @@ -447,6 +421,11 @@
widgets/distname.h
1
+ + CopyLabel + QLabel +
widgets/clicklabel.h
+
@@ -456,11 +435,11 @@ CrlDetail accept() - + 367 452 - + 520 428 diff --git a/ui/ExportDer.ui b/ui/ExportDer.ui index 15454b97..4354723f 100644 --- a/ui/ExportDer.ui +++ b/ui/ExportDer.ui @@ -42,10 +42,7 @@
- <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export</p></body></html> + Export
diff --git a/ui/ExportKey.ui b/ui/ExportKey.ui index 859840c4..59d939e0 100644 --- a/ui/ExportKey.ui +++ b/ui/ExportKey.ui @@ -10,9 +10,6 @@ 404
- - ExportKey - 6 diff --git a/ui/ImportMulti.ui b/ui/ImportMulti.ui index fb98b58f..0a9bb085 100644 --- a/ui/ImportMulti.ui +++ b/ui/ImportMulti.ui @@ -1,10 +1,8 @@ - - - - + + ImportMulti - - + + 0 0 @@ -12,78 +10,75 @@ 362 - - ImportMulti_UI - - - - 9 - - + + 6 + + 9 + - + - - + + QFrame::Box - + QFrame::Sunken - - - 9 - - + + 6 + + 9 + - - + + Import &All - - + + &Import - - + + &Done - - + + &Remove - - + + Details - + Qt::Vertical - + QSizePolicy::Expanding - + 204 21 @@ -92,14 +87,14 @@ - - + + 200 94 - + true @@ -109,7 +104,6 @@ - @@ -118,11 +112,11 @@ ImportMulti accept() - + 373 131 - + 287 358 diff --git a/ui/KeyDetail.ui b/ui/KeyDetail.ui index 7e68269d..b4c7a6df 100644 --- a/ui/KeyDetail.ui +++ b/ui/KeyDetail.ui @@ -10,9 +10,6 @@ 428 - - KeyDetail - @@ -335,12 +332,12 @@ - CopyLabel + ClickLabel QLabel
widgets/clicklabel.h
- ClickLabel + CopyLabel QLabel
widgets/clicklabel.h
diff --git a/ui/MainWindow.ui b/ui/MainWindow.ui index a8b79a4e..8adb990b 100644 --- a/ui/MainWindow.ui +++ b/ui/MainWindow.ui @@ -10,9 +10,6 @@ 511
- - MainWindow - diff --git a/ui/NewCrl.ui b/ui/NewCrl.ui index 5768f60c..7e9860e5 100644 --- a/ui/NewCrl.ui +++ b/ui/NewCrl.ui @@ -1,35 +1,33 @@ - + + NewCrl - - + + 0 0 - 316 - 354 + 358 + 325 - - Dialog - - - - 9 - - + + 6 + + 9 + - - - 0 - - + + 6 + + 0 + - - + + Arial 14 @@ -40,17 +38,17 @@ false - + Create CRL - + Qt::Horizontal - + 40 20 @@ -59,20 +57,20 @@ - - + + 95 40 - + 95 40 - + true @@ -81,10 +79,10 @@ - + Qt::Vertical - + 20 40 @@ -93,102 +91,102 @@ - - + + Dates - - + + 9 - + 6 - - - + + + next update - - - + + + last update - - - - yyyy-MM-dd hh:mm - - - true - - - Qt::UTC - - + + + + yyyy-MM-dd hh:mm + + + true + + + Qt::UTC + + - - - - yyyy-MM-dd hh:mm - - - true - - - Qt::UTC - - + + + + yyyy-MM-dd hh:mm + + + true + + + Qt::UTC + + - - - 0 - - + + 6 + + 0 + - - + + Hashing algorithm - + - - + + Extensions - - - 9 - - + + 6 + + 9 + - - + + Authority key identifier - - + + Subject alternative name @@ -198,10 +196,10 @@ - + Qt::Vertical - + 21 20 @@ -210,26 +208,26 @@ - - - 0 - - + + 6 + + 0 + - - + + Cancel - + Qt::Horizontal - + 21 21 @@ -238,8 +236,8 @@ - - + + OK @@ -249,17 +247,17 @@ - - hashBox - QComboBox -
widgets/hashBox.h
-
Validity QDateTimeEdit
widgets/validity.h
1
+ + hashBox + QComboBox +
widgets/hashBox.h
+
hashAlgo @@ -276,11 +274,11 @@ NewCrl accept() - + 224 332 - + 96 254 @@ -292,11 +290,11 @@ NewCrl reject() - + 305 332 - + 179 282 diff --git a/ui/NewX509.ui b/ui/NewX509.ui index 397a0c22..2f50757f 100644 --- a/ui/NewX509.ui +++ b/ui/NewX509.ui @@ -2,17 +2,6 @@ NewX509 - - - 0 - 0 - 553 - 599 - - - - Dialog - @@ -428,12 +417,9 @@ If this list is disabled, you only can create a self-signed certificate. - - - O - - - Organisation + + + organisationName @@ -465,22 +451,16 @@ If this list is disabled, you only can create a self-signed certificate.
- - - C - - - Country code + + + countryName - - - ST - - - State or Province + + + stateOrProvinceName @@ -488,42 +468,23 @@ If this list is disabled, you only can create a self-signed certificate.
- - - L - - - Locality + + + localityName - - - OU - - - Organ. unit - - - - - - - CN - - - Common name + + + organisationalUnitName - - - emailAddress - - - E-Mail address + + + emailAddress @@ -538,11 +499,21 @@ If this list is disabled, you only can create a self-signed certificate. Internal name
+ + description +
+ + + + commonName + + +
@@ -600,6 +571,24 @@ If this list is disabled, you only can create a self-signed certificate. 0
+ + false + + + true + + + true + + + true + + + true + + + false +
@@ -820,7 +809,7 @@ It also copies the issuer and serial number from the issuer certificate. Normall
- -1 + 6 0 @@ -1321,9 +1310,6 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld 107 - - Great picture , heh ? - true @@ -1515,7 +1501,7 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld - + 0 0 @@ -1541,7 +1527,7 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld - + 0 0 @@ -1637,8 +1623,8 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld reject() - 96 - 569 + 89 + 518 179 @@ -1646,5 +1632,53 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld + + okButton + clicked() + NewX509 + accept() + + + 771 + 520 + + + 304 + 543 + + + + + selfSignRB + clicked(bool) + serialNr + setEnabled(bool) + + + 268 + 289 + + + 324 + 287 + + + + + noWellDefinedExpDate + clicked(bool) + notAfter + setDisabled(bool) + + + 656 + 298 + + + 162 + 302 + + +
diff --git a/ui/Options.ui b/ui/Options.ui index ab2447a6..d4a130fd 100644 --- a/ui/Options.ui +++ b/ui/Options.ui @@ -10,9 +10,6 @@ 398 - - Dialog - @@ -28,10 +25,7 @@ - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">XCA Options</p></body></html> + XCA Options Qt::AlignCenter @@ -180,6 +174,12 @@ p, li { white-space: pre-wrap; } + + + 0 + 0 + + Load diff --git a/ui/v3ext.ui b/ui/v3ext.ui index 2a7e1da6..7fca5d7c 100644 --- a/ui/v3ext.ui +++ b/ui/v3ext.ui @@ -1,7 +1,8 @@ - + + v3ext - - + + 0 0 @@ -9,96 +10,90 @@ 232 - - Form1 - - - - 8 - - + + 6 + + 8 + - - - - - - 0 - - + + 6 + + 0 + - + - + - - - - - - - - - 0 - - + + 6 + + 0 + - - + + true - + QAbstractItemView::SingleSelection - + QAbstractItemView::SelectRows - + Qt::DotLine - + 0 + + true + + + true + - - - 0 - - + + 6 + + 0 + - - + + Add - - + + Delete - + Qt::Vertical - + 20 40 @@ -111,36 +106,36 @@ - - - 0 - - + + 6 + + 0 + - - + + Apply - - + + Validate - + Qt::Horizontal - + QSizePolicy::Expanding - + 20 20 @@ -149,16 +144,14 @@ - - - - 1 - 0 + + + 0 0 - + Cancel @@ -175,11 +168,11 @@ v3ext reject() - + 413 187 - + 227 150 diff --git a/widgets/CertDetail.cpp b/widgets/CertDetail.cpp index 1b069559..8a5e062d 100644 --- a/widgets/CertDetail.cpp +++ b/widgets/CertDetail.cpp @@ -112,6 +112,6 @@ void CertDetail::setCert(pki_x509 *cert) cert->openssl_error(); } catch (errorEx &err) { - QMessageBox::warning(this, tr(XCA_TITLE), err.getString()); + QMessageBox::warning(this, XCA_TITLE, err.getString()); } } diff --git a/widgets/CertExtend.cpp b/widgets/CertExtend.cpp index a8ce557b..dac0418d 100644 --- a/widgets/CertExtend.cpp +++ b/widgets/CertExtend.cpp @@ -16,9 +16,10 @@ #include #include #include +#include -CertExtend::CertExtend(QWidget *parent) +CertExtend::CertExtend(QWidget *parent, pki_x509 *s) :QDialog(parent) { setupUi(this); @@ -28,6 +29,7 @@ CertExtend::CertExtend(QWidget *parent) validNumber->setText("1"); validRange->setCurrentIndex(2); applyTimeDiff(); + signer = s; } void CertExtend::applyTimeDiff() @@ -35,3 +37,53 @@ void CertExtend::applyTimeDiff() applyTD(this, validNumber->text().toInt(), validRange->currentIndex(), midnightCB->isChecked(), notBefore, notAfter); } + +void CertExtend::accept() +{ + if (notBefore->getDate() < signer->getNotBefore()) { + QString text = tr("The certificate will be earlier valid than the signer. This is probably not what you want."); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + text, QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit times")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout")); + msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue")); + switch (msg.exec()) + { + case QMessageBox::Ok: + case QMessageBox::Cancel: + return; + case QMessageBox::Close: + reject(); + return; + case QMessageBox::Apply: + break; + case QMessageBox::Yes: + notBefore->setDate(signer->getNotBefore()); + } + } + if (notAfter->getDate() > signer->getNotAfter() && + !noWellDefinedExpDate->isChecked()) { + QString text = tr("The certificate will be longer valid than the signer. This is probably not what you want."); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + text, QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit times")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout")); + msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue")); + switch (msg.exec()) + { + case QMessageBox::Ok: + case QMessageBox::Cancel: + return; + case QMessageBox::Close: + reject(); + return; + case QMessageBox::Apply: + break; + case QMessageBox::Yes: + notAfter->setDate(signer->getNotAfter()); + } + } + QDialog::accept(); +} diff --git a/widgets/CertExtend.h b/widgets/CertExtend.h index eab5a743..cd9126f4 100644 --- a/widgets/CertExtend.h +++ b/widgets/CertExtend.h @@ -9,6 +9,7 @@ #define __CERTEXTEND_H #include "ui_CertExtend.h" +#include "lib/pki_x509.h" class pki_key; @@ -16,10 +17,13 @@ class CertExtend: public QDialog, public Ui::CertExtend { Q_OBJECT + pki_x509 *signer; + public: - CertExtend(QWidget *parent); + CertExtend(QWidget *parent, pki_x509 *s); public slots: void applyTimeDiff(); + void accept(); }; #endif diff --git a/widgets/CrlDetail.cpp b/widgets/CrlDetail.cpp index e508fbe9..1f4a0fc6 100644 --- a/widgets/CrlDetail.cpp +++ b/widgets/CrlDetail.cpp @@ -76,6 +76,7 @@ void CrlDetail::setCrl(pki_crl *crl) QTreeWidgetItem *current; revit = crl->getRev(i); rev = mw->certs->getByIssSerial(iss, revit.getSerial()); + certList->setColumnCount(3); current = new QTreeWidgetItem(certList); if (rev != NULL) { current->setText(0, rev->getIntName() ); diff --git a/widgets/ImportMulti.cpp b/widgets/ImportMulti.cpp index ced80828..89ae3b76 100644 --- a/widgets/ImportMulti.cpp +++ b/widgets/ImportMulti.cpp @@ -76,7 +76,8 @@ void ImportMulti::addItem(pki_base *pki) } else { QMessageBox::warning(this, XCA_TITLE, - tr("The type of the Item is not recognized: ") + cn, tr("OK")); + tr("The type of the Item '%1' is not recognized"). + arg(cn)); } } @@ -151,7 +152,8 @@ void ImportMulti::import(QModelIndex &idx) MainWindow::temps->insert(pki); } else { QMessageBox::warning(this, XCA_TITLE, - tr("The type of the Item is not recognized: ") + cn, tr("OK")); + tr("The type of the Item '%1' is not recognized"). + arg(cn)); delete pki; } } @@ -197,15 +199,17 @@ void ImportMulti::on_butDetails_clicked() delete dlg; } else if (cn == "pki_temp") { QMessageBox::warning(this, XCA_TITLE, - tr("Details of this item cannot be shown: ") + cn, tr("OK")); + tr("Details of the item '%1' cannot be shown"). + arg(cn)); } else QMessageBox::warning(this, XCA_TITLE, - tr("The type of the Item is not recognized ") + cn, tr("OK")); + tr("The type of the item '%1' is not recognized"). + arg(cn)); } catch (errorEx &err) { QMessageBox::warning(this, XCA_TITLE, tr("Error") + pki->getClassName() + - err.getString(), tr("OK")); + err.getString()); } } diff --git a/widgets/KeyDetail.cpp b/widgets/KeyDetail.cpp index c2efc19a..340d7628 100644 --- a/widgets/KeyDetail.cpp +++ b/widgets/KeyDetail.cpp @@ -37,7 +37,6 @@ static QString CurveComment(int nid) void KeyDetail::setKey(pki_key *key) { int nid; - QString title = tr("Details of the ") +key->getTypeString() +tr(" key"); keyDesc->setText(key->getIntName()); keyLength->setText(key->length()); @@ -45,8 +44,7 @@ void KeyDetail::setKey(pki_key *key) keyPrivEx->disableToolTip(); if (!key->isToken()) cardBox->hide(); - tlHeader->setText(tr("Details of the") + " " + key->getTypeString() + - " " + tr(" key")); + tlHeader->setText(tr("Details of the %1 key").arg(key->getTypeString())); if (key->isPubKey()) { keyPrivEx->setText(tr("Not available")); @@ -57,7 +55,7 @@ void KeyDetail::setKey(pki_key *key) cardBox->setTitle(tr("Token") +" [" +card->getCardLabel() +"]"); cardManufacturer->setText(card->getManufacturer()); cardSerial->setText(card->getSerial()); - keyPrivEx->setText(tr("via Security token; ID: ") +card->getId()); + keyPrivEx->setText(tr("Security token ID:%1").arg(card->getId())); keyBox->setTitle(tr("Key") + " [" + card->getLabel() + "]"); } else { keyPrivEx->setText(tr("Available")); @@ -85,6 +83,6 @@ void KeyDetail::setKey(pki_key *key) keyModulus->setText(key->ecPubKey()); break; default: - tlHeader->setText(tr("UNKNOWN Key")); + tlHeader->setText(tr("Unknown key")); } } diff --git a/widgets/MainWindow.cpp b/widgets/MainWindow.cpp index 8279e55d..a28f8dd1 100644 --- a/widgets/MainWindow.cpp +++ b/widgets/MainWindow.cpp @@ -286,7 +286,7 @@ void MainWindow::read_cmdline() case 'v' : cmd_version(); opt=0; break; case 'x' : exitApp = 1; opt=0; break; case 'h' : cmd_help(NULL); opt=0; break; - default : cmd_help(CCHAR(tr("no such option: ") + arg)); + default : cmd_help(CCHAR(tr("no such option: %1").arg(arg))); } if (arg[2] != '\0' && opt==1) { arg+=2; @@ -314,7 +314,7 @@ void MainWindow::read_cmdline() homedir = dbfile.left(dbfile.lastIndexOf(QDir::separator())); init_database(); } else { - cmd_help(CCHAR(tr("Database file does not exist: ") + arg)); + cmd_help(CCHAR(tr("Database file does not exist: '%1'").arg(arg))); } } @@ -779,7 +779,7 @@ int MainWindow::passWrite(char *buf, int size, int, void *userdata) hexwarn); } else { QMessageBox::warning(p->getWidget(), XCA_TITLE, - p->getType() + tr(" missmatch")); + tr("%1 missmatch").arg(p->getType())); } } delete dlg; @@ -791,9 +791,10 @@ void MainWindow::Error(errorEx &err) if (err.isEmpty()) return; QString msg = tr("The following error occured:") + "\n" + err.getString(); - int ret = QMessageBox::warning(qApp->activeWindow(), XCA_TITLE, - msg, tr("&OK"), tr("Copy to Clipboard")); - if (ret == 1) { + QMessageBox box(QMessageBox::Warning, XCA_TITLE, + msg, QMessageBox::Ok, NULL); + box.addButton(QMessageBox::Apply)->setText(tr("Copy to Clipboard")); + if (box.exec() == QMessageBox::Apply) { QClipboard *cb = QApplication::clipboard(); cb->setText(msg); } diff --git a/widgets/NewX509.cpp b/widgets/NewX509.cpp index 3db3fb43..ac0b657e 100644 --- a/widgets/NewX509.cpp +++ b/widgets/NewX509.cpp @@ -119,15 +119,16 @@ NewX509::NewX509(QWidget *parent) X509V3_set_ctx(&ext_ctx, NULL , NULL, NULL, NULL, 0); X509V3_set_ctx_nodb(&ext_ctx); - // setup the list of x509nameEntrys - name_ptr[0] = countryName; - name_ptr[1] = stateOrProvinceName; - name_ptr[2] = localityName; - name_ptr[3] = organisationName; - name_ptr[4] = organisationalUnitName; - name_ptr[5] = commonName; - name_ptr[6] = emailAddress; + QList nameLabel; + nameLabel << LcountryName << LstateOrProvinceName << LlocalityName << + LorganisationName << LorganisationalUnitName << LcommonName << + LemailAddress; + for(int i=0; isetText(OBJ_nid2ln(name_nid[i])); + nameLabel[i]->setToolTip(OBJ_nid2sn(name_nid[i])); + name_ptr[i] = (QLineEdit *)nameLabel[i]->buddy(); + } // Setup Request Attributes if (attrWidget->layout()) delete attrWidget->layout(); @@ -509,11 +510,6 @@ void NewX509::on_foreignSignRB_toggled(bool checked) certList->setEnabled(checked); } -void NewX509::on_selfSignRB_toggled(bool checked) -{ - serialNr->setEnabled(checked); -} - void NewX509::newKeyDone(QString name) { QStringList keys; @@ -531,11 +527,6 @@ void NewX509::newKeyDone(QString name) keyList->setCurrentIndex(keys.indexOf(name)); } -void NewX509::on_noWellDefinedExpDate_toggled(bool) -{ - notAfter->setEnabled(!noWellDefinedExpDate->isChecked()); -} - void NewX509::on_usedKeysToo_toggled(bool) { QString cur = keyList->currentText(); @@ -804,39 +795,43 @@ QString NewX509::mandatoryDnRemain() return dnl.join(","); } -void NewX509::on_okButton_clicked() +void NewX509::accept() { - on_tabWidget_currentChanged(0); + int tabsub = tabWidget->count() != 5 ? 0 : 1; + on_tabWidget_currentChanged(0); try { getX509name(1); } catch (errorEx &err) { - if (QMessageBox::warning(this, tr(XCA_TITLE), err.getString(), - tr("Ok"), tr("Abort rollout")) == 1) - { + tabWidget->setCurrentIndex(1); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, err.getString(), + QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + if (msg.exec() == QMessageBox::Close) { reject(); } return; } - - if (fromReqCB->isChecked()) { - if (!getSelectedReq()->verify()) { - if (QMessageBox::warning(this, tr(XCA_TITLE), - tr("The verification of the Certificate request failed.\n" - "The rollout should be aborted."), - tr("Continue anyway"), tr("Abort rollout")) == 1) - { - reject(); - } + if (fromReqCB->isChecked() && !getSelectedReq()->verify()) { + tabWidget->setCurrentIndex(0); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + tr("The verification of the Certificate request failed.\nThe rollout should be aborted."), + QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Continue anyway")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + if (msg.exec() == QMessageBox::Close) { + reject(); } } if (description->text().isEmpty() && !fromReqCB->isChecked()) { if (commonName->text().isEmpty()) { - if (QMessageBox::warning(this, tr(XCA_TITLE), - tr("The internal name and the common name are empty.\n" - "Please set at least the internal name."), - tr("Ok"), tr("Abort rollout")) == 1) - { + tabWidget->setCurrentIndex(1); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + tr("The internal name and the common name are empty.\nPlease set at least the internal name."), QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit name")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + if (msg.exec() == QMessageBox::Close) { reject(); } return; @@ -844,70 +839,130 @@ void NewX509::on_okButton_clicked() description->setText(commonName->text()); } } - - if ( keyList->count() == 0 && - keyList->isEnabled() && - !fromReqCB->isChecked()) + if ( keyList->count() == 0 && keyList->isEnabled() && + !fromReqCB->isChecked()) { - if (QMessageBox::warning(this, tr(XCA_TITLE), - tr("There is no Key selected for signing."), - tr("Ok"), tr("Abort rollout")) == 1) - { + tabWidget->setCurrentIndex(1); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + tr("There is no Key selected for signing."), QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Select key")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + if (msg.exec() == QMessageBox::Close) { reject(); } return; } - QString unsetDN; if (pt != tmpl) unsetDN = mandatoryDnRemain(); - if (!unsetDN.isEmpty()) - { - switch (QMessageBox::warning(this, tr(XCA_TITLE), - tr("The following distinguished name entries are empty,\n" - "though you have declared them as mandatory " - "in the options menu:\n") + unsetDN, - tr("Ok"), tr("Abort rollout"), - tr("Continue rollout"))) + if (!unsetDN.isEmpty()) { + tabWidget->setCurrentIndex(1); + QString text = tr("The following distinguished name entries are empty:\n%1\nthough you have declared them as mandatory in the options menu.").arg(unsetDN); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + text, QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit subject")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout")); + switch (msg.exec()) { - case -1: - case 0: + case QMessageBox::Ok: + case QMessageBox::Cancel: return; - case 1: + case QMessageBox::Close: reject(); return; + case QMessageBox::Apply: + break; } } - if (notBefore->getDate() > notAfter->getDate() && - !noWellDefinedExpDate->isChecked()) { - switch (QMessageBox::warning(this, tr(XCA_TITLE), - tr("The certificate will be out of date before it becomes valid. " - "You most probably mixed up both dates."), - tr("Ok"), tr("Abort rollout"), tr("Continue rollout"))) + if (notBefore->getDate() > notAfter->getDate()) { + tabWidget->setCurrentIndex(2-tabsub); + QString text = tr("The certificate will be out of date before it becomes valid. You most probably mixed up both dates."); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + text, QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit dates")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + msg.addButton(QMessageBox::Apply)->setText("Continue rollout"); + switch (msg.exec()) { - case -1: - case 0: + case QMessageBox::Ok: + case QMessageBox::Cancel: return; - case 1: + case QMessageBox::Close: reject(); return; + case QMessageBox::Apply: + break; + } + } + pki_x509 *signer = getSelectedSigner(); + if (notBefore->getDate() < signer->getNotBefore() && !selfSignRB->isChecked()) { + tabWidget->setCurrentIndex(2-tabsub); + QString text = tr("The certificate will be earlier valid than the signer. This is probably not what you want."); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + text, QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit times")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout")); + msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue")); + switch (msg.exec()) + { + case QMessageBox::Ok: + case QMessageBox::Cancel: + return; + case QMessageBox::Close: + reject(); + return; + case QMessageBox::Apply: + break; + case QMessageBox::Yes: + notBefore->setDate(signer->getNotBefore()); + } + } + if (notAfter->getDate() > signer->getNotAfter() && + !noWellDefinedExpDate->isChecked() && !selfSignRB->isChecked()) { + tabWidget->setCurrentIndex(2-tabsub); + QString text = tr("The certificate will be longer valid than the signer. This is probably not what you want."); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + text, QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit times")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout")); + msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue")); + switch (msg.exec()) + { + case QMessageBox::Ok: + case QMessageBox::Cancel: + return; + case QMessageBox::Close: + reject(); + return; + case QMessageBox::Apply: + break; + case QMessageBox::Yes: + notAfter->setDate(signer->getNotAfter()); } } on_adv_validate_clicked(); if (checkExtDuplicates()) { - switch (QMessageBox::warning(this, tr(XCA_TITLE), - tr("The certificate contains duplicated extensions. " - "Check the validation on the advanced tab."), - tr("Ok"), tr("Abort rollout"), tr("Continue rollout"))) + tabWidget->setCurrentIndex(5-tabsub); + QString text = tr("The certificate contains duplicated extensions. Check the validation on the advanced tab."); + QMessageBox msg(QMessageBox::Warning, XCA_TITLE, + text, QMessageBox::NoButton, this); + msg.addButton(QMessageBox::Ok)->setText(tr("Edit extensions")); + msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout")); + msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout")); + switch (msg.exec()) { - case -1: - case 0: + case QMessageBox::Ok: + case QMessageBox::Cancel: return; - case 1: + case QMessageBox::Close: reject(); return; + case QMessageBox::Apply: + break; } } - - accept(); + QDialog::accept(); } diff --git a/widgets/NewX509.h b/widgets/NewX509.h index 5ce0c72a..15cbffef 100644 --- a/widgets/NewX509.h +++ b/widgets/NewX509.h @@ -102,17 +102,15 @@ class NewX509: public QDialog, public Ui::NewX509 void on_editCrlDist_clicked(); void on_editAuthInfAcc_clicked(); void on_foreignSignRB_toggled(bool checked); - void on_selfSignRB_toggled(bool checked); void on_genKeyBut_clicked(); void on_showReqBut_clicked(); void on_certList_currentIndexChanged(int index); void on_applyTemplate_clicked(); - void on_okButton_clicked(); void on_adv_validate_clicked(); void on_usedKeysToo_toggled(bool checked); void on_tabWidget_currentChanged(int idx); void on_reqSubChange_clicked(); - void on_noWellDefinedExpDate_toggled(bool); + void accept(); signals: void genKey(QString); diff --git a/widgets/NewX509_ext.cpp b/widgets/NewX509_ext.cpp index 6da1a7de..95324639 100644 --- a/widgets/NewX509_ext.cpp +++ b/widgets/NewX509_ext.cpp @@ -223,8 +223,8 @@ extList NewX509::getAdvanced() ERR_error_string(i ,NULL)); QMessageBox::warning(this, XCA_TITLE, - tr("Advanced Settings Error: ") + - ERR_error_string(i ,NULL), tr("OK")); + tr("Advanced Settings Error: %1"). + arg(ERR_error_string(i ,NULL))); BIO_free(bio); return elist; } diff --git a/widgets/v3ext.cpp b/widgets/v3ext.cpp index d81fea91..8b9df3fd 100644 --- a/widgets/v3ext.cpp +++ b/widgets/v3ext.cpp @@ -126,13 +126,14 @@ bool v3ext::__validate(bool showSuccess) error += "\n"; } if (! error.isEmpty()) { - QMessageBox::warning(this, XCA_TITLE, tr("Validation failed:") - + "\n'" + str + "'\n" + error, tr("&OK")); + QMessageBox::warning(this, XCA_TITLE, + tr("Validation failed:\n'%1'").arg(str)); return false; } if (showSuccess) { QMessageBox::information(this, XCA_TITLE, - tr("Validation successfull:\n'") + ext.getValue() + "'", tr("&OK")); + tr("Validation successfull:\n'%1'"). + arg(ext.getValue())); } return true; } diff --git a/xca.pro b/xca.pro index feb7da0c..454568a4 100644 --- a/xca.pro +++ b/xca.pro @@ -92,7 +92,8 @@ FORMS += ui/About.ui \ ui/PassWrite.ui \ ui/ReqDetail.ui \ ui/TrustState.ui \ - ui/v3ext.ui + ui/v3ext.ui \ + ui/SelectToken.ui SOURCES += lib/asn1int.cpp \ lib/asn1time.cpp \ lib/db.cpp \