mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge #9785: Avoid variable length arrays
c801c82
Move BIP70_MAX_PAYMENTREQUEST_SIZE to header (Pieter Wuille)914fad1
Make KEY_SIZE a compile-time constant (Pieter Wuille)
This commit is contained in:
commit
df42bcdbfe
@ -112,7 +112,7 @@ static bool multiUserAuthorized(std::string strUserPass)
|
|||||||
std::string strSalt = vFields[1];
|
std::string strSalt = vFields[1];
|
||||||
std::string strHash = vFields[2];
|
std::string strHash = vFields[2];
|
||||||
|
|
||||||
unsigned int KEY_SIZE = 32;
|
static const unsigned int KEY_SIZE = 32;
|
||||||
unsigned char out[KEY_SIZE];
|
unsigned char out[KEY_SIZE];
|
||||||
|
|
||||||
CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out);
|
CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out);
|
||||||
|
@ -55,8 +55,6 @@ const char* BIP70_MESSAGE_PAYMENTREQUEST = "PaymentRequest";
|
|||||||
const char* BIP71_MIMETYPE_PAYMENT = "application/bitcoin-payment";
|
const char* BIP71_MIMETYPE_PAYMENT = "application/bitcoin-payment";
|
||||||
const char* BIP71_MIMETYPE_PAYMENTACK = "application/bitcoin-paymentack";
|
const char* BIP71_MIMETYPE_PAYMENTACK = "application/bitcoin-paymentack";
|
||||||
const char* BIP71_MIMETYPE_PAYMENTREQUEST = "application/bitcoin-paymentrequest";
|
const char* BIP71_MIMETYPE_PAYMENTREQUEST = "application/bitcoin-paymentrequest";
|
||||||
// BIP70 max payment request size in bytes (DoS protection)
|
|
||||||
const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000;
|
|
||||||
|
|
||||||
struct X509StoreDeleter {
|
struct X509StoreDeleter {
|
||||||
void operator()(X509_STORE* b) {
|
void operator()(X509_STORE* b) {
|
||||||
|
@ -53,7 +53,7 @@ class QUrl;
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
// BIP70 max payment request size in bytes (DoS protection)
|
// BIP70 max payment request size in bytes (DoS protection)
|
||||||
extern const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE;
|
static const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000;
|
||||||
|
|
||||||
class PaymentServer : public QObject
|
class PaymentServer : public QObject
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user