@@ -118,7 +118,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
118118 // The first cert is the signing cert, the rest are untrusted certs that chain
119119 // to a valid root authority. OpenSSL needs them separately.
120120 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--) {
122122 sk_X509_push (chain, certs[i]);
123123 }
124124 X509 *signing_cert = certs[0 ];
@@ -166,9 +166,8 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
166166 EVP_MD_CTX_init (&ctx);
167167 if (!EVP_VerifyInit_ex (&ctx, digestAlgorithm, NULL ) ||
168168 !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." );
172171 }
173172
174173 // OpenSSL API for getting human printable strings from certs is baroque.
0 commit comments