Changeset View
Changeset View
Standalone View
Standalone View
src/qt/paymentrequestplus.cpp
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | try { | ||||
// Now do the verification! | // Now do the verification! | ||||
int result = X509_verify_cert(store_ctx); | int result = X509_verify_cert(store_ctx); | ||||
if (result != 1) { | if (result != 1) { | ||||
int error = X509_STORE_CTX_get_error(store_ctx); | int error = X509_STORE_CTX_get_error(store_ctx); | ||||
// For testing payment requests, we allow self signed root certs! | // For testing payment requests, we allow self signed root certs! | ||||
// This option is just shown in the UI options, if -help-debug is | // This option is just shown in the UI options, if -help-debug is | ||||
// enabled. | // enabled. | ||||
if (!(error == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT && | if (!(error == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT && | ||||
GetBoolArg("-allowselfsignedrootcertificates", | gArgs.GetBoolArg("-allowselfsignedrootcertificates", | ||||
DEFAULT_SELFSIGNED_ROOTCERTS))) { | DEFAULT_SELFSIGNED_ROOTCERTS))) { | ||||
throw SSLVerifyError(X509_verify_cert_error_string(error)); | throw SSLVerifyError(X509_verify_cert_error_string(error)); | ||||
} else { | } else { | ||||
qDebug() << "PaymentRequestPlus::getMerchant: Allowing self " | qDebug() << "PaymentRequestPlus::getMerchant: Allowing self " | ||||
"signed root certificate, because " | "signed root certificate, because " | ||||
"-allowselfsignedrootcertificates is true."; | "-allowselfsignedrootcertificates is true."; | ||||
} | } | ||||
} | } | ||||
X509_NAME *certname = X509_get_subject_name(signing_cert); | X509_NAME *certname = X509_get_subject_name(signing_cert); | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |