<pre>
paymentrequestplus.cpp: In member function ‘bool PaymentRequestPlus::getMerchant(X509_STORE*, QString&, QString&) const’:
paymentrequestplus.cpp:105: error: ‘class QSslCertificate’ has no member named ‘toText’
</pre>
Will rework to be compatible with Qt 4...
cozz
commented at 10:05 PM on February 16, 2014:
contributor
So we do not allow Insecure payment requests in general anymore?
recipient.authenticatedMerchant is empty in this case, we show a yellow instead of green background there. Maybe handling this like the webbrowsers do?:
Show a big fat warning (just a yellow background is too nice for an invalid certificate), but you can still send the transaction if you want to. But strongly recommended to not continue. A button to look at the certificate would be nice IMO.
Diapolo
commented at 10:26 PM on February 16, 2014:
none
My fault, I didn't want to block insecure payment requests... I was aiming for a quick fix for 0.9, as @laanwj sais, GUI can be improved in a later pull ;).
cozz
commented at 10:40 PM on February 16, 2014:
contributor
Yes, I was wondering about issue #3628 too. But as far as I have tested this, there is no bug.
The return value of getMerchant() is ignored, this is confusing, but QString& merchant is passed by reference, so recipient.authenticatedMerchant. This string is empty or not whether the certificate is valid or not. So thats our "bool" return value.
So if the string is empty we show a yellow background. If not empty green.
The only bug here is the yellow background misses a big fat warning.
Diapolo
commented at 7:14 AM on February 17, 2014:
none
@cozz Can you take another look, now insecure payment requests are possible, but errors are shown to user (not final but just to see I'm on track).
cozz
commented at 7:46 AM on February 17, 2014:
contributor
Yes, I would say on track :)
So pki == "none" ends up with the yellow background now.
To be honest I am not sure by myself what the expected behavior should be for an invalid certificate. There could be a temporary issue with the certificate. To not drive a store out of business in this case, maybe give the user an option to make an insecure payment request instead. But I can not judge, if this is a good idea or not.
laanwj
commented at 8:00 AM on February 17, 2014:
member
@cozz I think invalid certificates should be treated like missing certificates but there should be a warning that the certificate is invalid (to aid people building sites that issue them).
(as it just as easy for an attacker to strip the signature than corrupt it, it makes no sense to distinguish them in 'severenes' - IMO)
ryanxcharles
commented at 5:37 PM on February 17, 2014:
contributor
I get this error trying to build this pull request:
Undefined symbols for architecture x86_64:
"PaymentRequestPlus::getMerchant(x509_store_st*, QString&, QString&) const", referenced from:
PaymentServerTests::paymentServerTests() in test_bitcoin_qt-paymentservertests.o
ld: symbol(s) not found for architecture x86_64
luke-jr
commented at 3:24 AM on February 21, 2014:
member
@Diapolo Please stop trying to force dependency upgrades without discussion. We should remain compatible with the versions packaged by major stable distros. That currently means Qt 4.6.2 (limited by RedHat). I'm pretty sure PullTester's is not older than that...
Diapolo
commented at 8:09 AM on February 21, 2014:
none
To quote myself:
Will rework to be compatible with Qt 4...
laanwj
commented at 8:46 AM on February 21, 2014:
member
In a way it's good that pulltester tests with old libraries. My gut feeling is that none of the devs builds regularly against Qt4 (certainly not pre-4.8) anymore.
mikehearn
commented at 11:48 AM on February 27, 2014:
contributor
Sorry to weigh in late but I was away and am still catching up.
Please don't expose validation errors to users. Just silently fall back to treating them as if they were unsigned (and print errors to the logs). That way we can extend with new features later and even if they aren't fully backwards compatible, the worst that happens is some users see unverified requests instead of errors they almost certainly won't understand.
laanwj added this to the milestone 0.9.2 on Apr 19, 2014
laanwj removed this from the milestone 0.9.2 on May 13, 2014
laanwj
commented at 8:38 AM on July 1, 2014:
member
OK, won't show it to users. But better logging to the debug log is welcome.
Btw, we should change the Qt logging around a bit. Currently all log messages from the GUI are ignored unless -debug=qt is provided. IMO this should only apply to QtDebugMsg. QtWarningMsg/QtCriticalMsg/QtFatalMsg/QtSystemMsg should always be LogPrintf'ed.
Problems with Payment requests should at least have level QtWarningMsg.
Diapolo
commented at 8:44 AM on July 1, 2014:
none
Agreed on the logging change for Qt, even if this not the scope of this request.
We still have the serious problem that we don't check request.getMerchant() for success, which means current implementation of PRs is potential "unsafe". Will update this pull so that we log errors and don't allow request.getMerchant() to fail, but don't show the actual errors to users.
Diapolo
commented at 9:03 AM on July 1, 2014:
none
Damn, there is a problem with my assumption! Look at request.getMerchant(PaymentServer::certStore, recipient.authenticatedMerchant for insecure payment requests this call is allowed to fail, but for secure payment requests this should not be allowed to fail. An insecure PR has pki_type == none. @mikehearn Can you shed some light on this?
[Qt] ensure BIP70 certificate problems are shown to user
- fixes #3628 by showing certificate error(s) to user
- prevents accepting payment requests when certificate error(s) occur
- insecure payment requests are still possible with this, if they
correctly set paymentRequest.pki_type() == "none"
Diapolo
commented at 9:42 AM on July 1, 2014:
none
What about making getMerchant() return true if (pki_type == none) and reworking the comment on what getMerchant() returns true for insecure payment requests (that set pki_type = none) and true for secure payment requests only if no cert errors occur?
laanwj
commented at 1:32 PM on July 1, 2014:
member
As for 'secure' and 'insecure' payment requests, getMerchant must return false when no authenticated merchant could be extracted from the request. This can be either due to an error or due to the request not being signed at all. These cases don't need to be distinguished.
Also, the output argument QString merchant must be empty after the call unless there is a successfully authenticated merchant.
laanwj
commented at 2:55 PM on July 9, 2014:
member
Closing this pull, as we don't want to show these problems to the user, but just want to log them (which already happens).
If you want you can move the unrelated message change in src/qt/transactiondesc.cpp to a new pull.
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-20 00:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me