|
|
@ -166,9 +166,8 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c |
|
|
|
EVP_MD_CTX_init(&ctx); |
|
|
|
EVP_MD_CTX_init(&ctx); |
|
|
|
if (!EVP_VerifyInit_ex(&ctx, digestAlgorithm, NULL) || |
|
|
|
if (!EVP_VerifyInit_ex(&ctx, digestAlgorithm, NULL) || |
|
|
|
!EVP_VerifyUpdate(&ctx, data_to_verify.data(), data_to_verify.size()) || |
|
|
|
!EVP_VerifyUpdate(&ctx, data_to_verify.data(), data_to_verify.size()) || |
|
|
|
!EVP_VerifyFinal(&ctx, (const unsigned char*)paymentRequest.signature().data(), paymentRequest.signature().size(), pubkey)) { |
|
|
|
!EVP_VerifyFinal(&ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) { |
|
|
|
|
|
|
|
throw SSLVerifyError("Bad signature, invalid payment request."); |
|
|
|
throw SSLVerifyError("Bad signature, invalid PaymentRequest."); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// OpenSSL API for getting human printable strings from certs is baroque.
|
|
|
|
// OpenSSL API for getting human printable strings from certs is baroque.
|
|
|
|