aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-12-12 16:14:44 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2015-04-15 14:31:50 +0200
commit9b14aefee379345a051f2d4cdd92fe8cd52a658d (patch)
treec4c466fd3162bbecb428916cb61917c8bcc88dda /src
parentd19ae3cf665de269c5dc4e2d9ed5ebe954b88be8 (diff)
[Qt] take care of a missing typecast in PaymentRequestPlus::getMerchant()
Diffstat (limited to 'src')
-rw-r--r--src/qt/paymentrequestplus.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
index de222fe147..7e9729eeb9 100644
--- a/src/qt/paymentrequestplus.cpp
+++ b/src/qt/paymentrequestplus.cpp
@@ -118,7 +118,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
// The first cert is the signing cert, the rest are untrusted certs that chain
// to a valid root authority. OpenSSL needs them separately.
STACK_OF(X509) *chain = sk_X509_new_null();
- for (int i = certs.size()-1; i > 0; i--) {
+ for (int i = certs.size() - 1; i > 0; i--) {
sk_X509_push(chain, certs[i]);
}
X509 *signing_cert = certs[0];
@@ -166,9 +166,8 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
EVP_MD_CTX_init(&ctx);
if (!EVP_VerifyInit_ex(&ctx, digestAlgorithm, NULL) ||
!EVP_VerifyUpdate(&ctx, data_to_verify.data(), data_to_verify.size()) ||
- !EVP_VerifyFinal(&ctx, (const unsigned char*)paymentRequest.signature().data(), paymentRequest.signature().size(), pubkey)) {
-
- throw SSLVerifyError("Bad signature, invalid PaymentRequest.");
+ !EVP_VerifyFinal(&ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) {
+ throw SSLVerifyError("Bad signature, invalid payment request.");
}
// OpenSSL API for getting human printable strings from certs is baroque.