@@ -118,7 +118,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
118
118
// The first cert is the signing cert, the rest are untrusted certs that chain
119
119
// to a valid root authority. OpenSSL needs them separately.
120
120
STACK_OF (X509) *chain = sk_X509_new_null ();
121
- for (int i = certs.size ()- 1 ; i > 0 ; i--) {
121
+ for (int i = certs.size () - 1 ; i > 0 ; i--) {
122
122
sk_X509_push (chain, certs[i]);
123
123
}
124
124
X509 *signing_cert = certs[0 ];
@@ -166,9 +166,8 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
166
166
EVP_MD_CTX_init (&ctx);
167
167
if (!EVP_VerifyInit_ex (&ctx, digestAlgorithm, NULL ) ||
168
168
!EVP_VerifyUpdate (&ctx, data_to_verify.data (), data_to_verify.size ()) ||
169
- !EVP_VerifyFinal (&ctx, (const unsigned char *)paymentRequest.signature ().data (), paymentRequest.signature ().size (), pubkey)) {
170
-
171
- throw SSLVerifyError (" Bad signature, invalid PaymentRequest." );
169
+ !EVP_VerifyFinal (&ctx, (const unsigned char *)paymentRequest.signature ().data (), (unsigned int )paymentRequest.signature ().size (), pubkey)) {
170
+ throw SSLVerifyError (" Bad signature, invalid payment request." );
172
171
}
173
172
174
173
// OpenSSL API for getting human printable strings from certs is baroque.
0 commit comments