13#include <openssl/x509_vfy.h>
17#include <QSslCertificate>
30 <<
"PaymentRequestPlus::parse: Error parsing payment request";
34 qWarning() <<
"PaymentRequestPlus::parse: Received up-version payment "
44 <<
"PaymentRequestPlus::parse: Error parsing payment details";
74 qWarning() <<
"PaymentRequestPlus::getMerchant: Payment request: "
78 qWarning() <<
"PaymentRequestPlus::getMerchant: Payment request: "
86 qWarning() <<
"PaymentRequestPlus::getMerchant: Payment request: error "
91 std::vector<X509 *>
certs;
93 for (
int i = 0; i <
certChain.certificate_size(); i++) {
99 qWarning() <<
"PaymentRequestPlus::getMerchant: Payment request: "
100 "certificate expired or not yet active: "
104 if (
qCert.isBlacklisted()) {
105 qWarning() <<
"PaymentRequestPlus::getMerchant: Payment request: "
106 "certificate blacklisted: "
117 qWarning() <<
"PaymentRequestPlus::getMerchant: Payment request: empty "
125 for (
int i =
certs.size() - 1; i > 0; i--) {
134 qWarning() <<
"PaymentRequestPlus::getMerchant: Payment request: error "
135 "creating X509_STORE_CTX";
157 qDebug() <<
"PaymentRequestPlus::getMerchant: Allowing self "
158 "signed root certificate, because "
159 "-allowselfsignedrootcertificates is true.";
167 rcopy.set_signature(std::string(
""));
172#if HAVE_DECL_EVP_MD_CTX_NEW
192#if HAVE_DECL_EVP_MD_CTX_NEW
212 qWarning() <<
"PaymentRequestPlus::getMerchant: SSL error: "
221 for (
size_t i = 0; i <
certs.size(); i++) {
230 for (
int i = 0; i <
details.outputs_size(); i++) {
static constexpr Amount SATOSHI
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
QList< std::pair< CScript, Amount > > getPayTo() const
bool getMerchant(X509_STORE *certStore, QString &merchant) const
payments::PaymentDetails details
bool IsInitialized() const
bool parse(const QByteArray &data)
payments::PaymentRequest paymentRequest
bool SerializeToString(std::string *output) const
SSLVerifyError(std::string err)
bool error(const char *fmt, const Args &...args)
Implement std::hash so RCUPtr can be used as a key for maps or sets.
static const bool DEFAULT_SELFSIGNED_ROOTCERTS
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...