summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <aheinecke@intevation.de>2016-08-04 12:50:26 (GMT)
committerAndre Heinecke <aheinecke@intevation.de>2016-08-04 13:09:24 (GMT)
commit27c76863817243e19582ac1d7fb0bc7e54ff3438 (patch)
tree378a493d4242b7b3aca5817bb1271bc267449172
parentd21ccf3659023f21b62e52e741ec83faae12bdd6 (diff)
Do not encode PGP Mail Addresses
It's specified in RFC 4880 (5.11) that the user id is UTF-8 encoded. So OpenPGP implementations handle this and (according to Werner Koch) the E-mail should not be IDNA encoded. This is also similar to the behavior of GPA and the gnupg command line. gpgsm and X509 in contrast do require it to be encoded.
-rw-r--r--src/newcertificatewizard/newcertificatewizard.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newcertificatewizard/newcertificatewizard.cpp b/src/newcertificatewizard/newcertificatewizard.cpp
index 33c9279..0d36b01 100644
--- a/src/newcertificatewizard/newcertificatewizard.cpp
+++ b/src/newcertificatewizard/newcertificatewizard.cpp
@@ -1711,14 +1711,15 @@ QString KeyCreationPage::createGnupgKeyParms() const
if (pgp() && expiryDate().isValid()) {
s << "expire-date: " << expiryDate().toString(Qt::ISODate) << endl;
}
- s << "name-email: " << encode_email(email()) << endl;
if (pgp()) {
s << "name-real: " << name() << endl;
+ s << "name-email: " << email() << endl;
if (!comment().isEmpty()) {
s << "name-comment: " << comment() << endl;
}
} else {
s << "name-dn: " << dn() << endl;
+ s << "name-email: " << encode_email(email()) << endl;
Q_FOREACH (const QString &email, additionalEMailAddresses()) {
s << "name-email: " << encode_email(email) << endl;
}