[Differential] [Commented On] D3432: Initial TOFU support in messageviewer
knauss (Sandro Knauß)
noreply at phabricator.kde.org
Tue Nov 29 13:04:02 GMT 2016
knauss added inline comments.
INLINE COMMENTS
> defaultrenderer.cpp:1008
> + // Not enough TOFU trust, or key is well trusted/not trusted at all
> + if (metaData.keyTrust == GpgME::Signature::Unknown) {
> + block.setProperty("keyTrust", QStringLiteral("unknown"));
well if it is unknon we should better use Tofu, this is for sure better than Unknown.
> defaultrenderer.cpp:1187
> + if (metaData.isGoodSignature && mp->tofuValidity() != GpgME::TofuInfo::Conflict) {
> + if (mp->tofuValidity() < GpgME::TofuInfo::LargeHistory) {
> mClass = QStringLiteral("signOkKeyBad");
here you have to support the same logic as above, if tofu < GpgME::TofuInfo::LittleHistory than keyTrust.
> messagepart.cpp:732
> mMetaData.status_code = GPGME_SIG_STAT_NONE;
> + Q_ASSERT(!fromAddress.isEmpty());
> }
Not good to have this in commited code except from tests, plase replace this with a qError or anything, that would allow a running program not to crash.
> messagepart.cpp:865
> + GpgME::Signature signature;
> + GpgME::UserID userId;
> +
this variable is only set (l919,l933) but never read? So this can be deleted?
> messagepart.cpp:889
> + // is well-trusted, so there's no need to bother with TOFU.
> + if (sig.validity() == GpgME::Signature::Validity::Marginal) {
> + const auto tofu = uid->tofuInfo();
and what about Validity::Unknown?
> messagepart.cpp:920
> + userId = *uid;
> + if (tofu.signCount() > 10) {
> + // Trusted-enough, let's use this signature!
this is a little bit strage, to read a number here and not anything from gpgme, does that means, that gpg do not give hints, when a key is trust worthy?
why is 10 a good number? Is there any discussion about this threshold?
REPOSITORY
R94 PIM: Message Library
REVISION DETAIL
https://phabricator.kde.org/D3432
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: dvratil, aheinecke, knauss
Cc: kde-pim, spencerb, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20161129/9c138914/attachment.html>
More information about the kde-pim
mailing list