diff options
Diffstat (limited to 'src/qt/paymentrequestplus.cpp')
-rw-r--r-- | src/qt/paymentrequestplus.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp index 50fb1bd777..e369734a98 100644 --- a/src/qt/paymentrequestplus.cpp +++ b/src/qt/paymentrequestplus.cpp @@ -1,18 +1,22 @@ +// Copyright (c) 2011-2013 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + // // Wraps dumb protocol buffer paymentRequest // with some extra methods // -#include <QDateTime> -#include <QDebug> -#include <QSslCertificate> +#include "paymentrequestplus.h" + +#include <stdexcept> #include <openssl/x509.h> #include <openssl/x509_vfy.h> +#include <QDateTime> +#include <QDebug> +#include <QSslCertificate> -#include <stdexcept> - -#include "paymentrequestplus.h" class SSLVerifyError : public std::runtime_error { @@ -75,12 +79,11 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c digestAlgorithm = EVP_sha1(); } else if (paymentRequest.pki_type() == "none") { - if (fDebug) - qDebug() << "PaymentRequestPlus::getMerchant : Payment request: pki_type == none"; + qDebug() << "PaymentRequestPlus::getMerchant : Payment request: pki_type == none"; return false; } else { - qDebug() << "PaymentRequestPlus::getMerchant : Payment request: unknown pki_type " << paymentRequest.pki_type().c_str(); + qDebug() << "PaymentRequestPlus::getMerchant : Payment request: unknown pki_type " << QString::fromStdString(paymentRequest.pki_type()); return false; } @@ -152,7 +155,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c // Valid cert; check signature: payments::PaymentRequest rcopy(paymentRequest); // Copy rcopy.set_signature(std::string("")); - std::string data_to_verify; // Everything but the signature + std::string data_to_verify; // Everything but the signature rcopy.SerializeToString(&data_to_verify); EVP_MD_CTX ctx; |