Commit 27c76863 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

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.
parent d21ccf36
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment