aboutsummaryrefslogtreecommitdiff
path: root/src/qt/paymentserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5665Jeff Garzik2015-09-151-14/+20
|\
| * [Qt] add verifySize() function to PaymentServerPhilip Kaufmann2015-08-101-14/+20
| | | | | | | | | | | | | | - add static verifySize() function to PaymentServer and move the logging on error into the function - also use the new function in the unit test - the function checks if the size is allowed as per BIP70
* | typofixes (found by misspell_fixer)Veres Lajos2015-08-101-1/+1
|/
* Includes: Cleanup around net main and walletJorge Timón2015-07-231-1/+1
| | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* [Qt] remove std namespace polution from codePhilip Kaufmann2015-07-161-3/+1
|
* qt: define QT_NO_KEYWORDSWladimir J. van der Laan2015-07-151-29/+29
| | | | | | | | QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`, `slots` and `emit` macros. Avoid overlap between Qt macros and boost - for example #undef hackiness in #6421.
* [Qt] minor comment updates in PaymentServerPhilip Kaufmann2015-04-151-9/+8
|
* [Qt] constify first parameter of processPaymentRequest()Philip Kaufmann2015-04-151-1/+1
|
* [Qt] paymentserver: better logging of invalid certsPhilip Kaufmann2015-04-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before and after was tested in Windows: before: GUI: ReportInvalidCertificate : Payment server found an invalid certificate: ("Microsoft Authenticode(tm) Root Authority") GUI: ReportInvalidCertificate : Payment server found an invalid certificate: () GUI: ReportInvalidCertificate : Payment server found an invalid certificate: () GUI: ReportInvalidCertificate : Payment server found an invalid certificate: () after: GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "01" ("Microsoft Authenticode(tm) Root Authority") () () GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "01" () () ("Copyright (c) 1997 Microsoft Corp.", "Microsoft Time Stamping Service Root", "Microsoft Corporation") GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "4a:19:d2:38:8c:82:59:1c:a5:5d:73:5f:15:5d:dc:a3" () () ("NO LIABILITY ACCEPTED, (c)97 VeriSign, Inc.", "VeriSign Time Stamping Service Root", "VeriSign, Inc.") GUI: ReportInvalidCertificate: Payment server found an invalid certificate: "e4:9e:fd:f3:3a:e8:0e:cf:a5:11:3e:19:a4:24:02:32" () () ("Class 3 Public Primary Certification Authority")
* [Qt] paymentserver: do not log NULL certificatesPhilip Kaufmann2015-04-151-2/+9
| | | | - also add a few more comments in PaymentServer::LoadRootCAs
* Includes: Do not include main.h from any other headerJorge Timón2015-03-241-0/+1
|
* [Move Only] Move wallet related things to src/wallet/Jonas Schnelli2015-03-121-1/+1
| | | | could once be renamed from /src/wallet to /src/legacywallet.
* openssl: abstract out OPENSSL_cleanseCory Fields2015-02-151-1/+0
| | | | | | This makes it easier for us to replace it if desired, since it's now only in one spot. Also, it avoids the openssl include from allocators.h, which essentially forced openssl to be included from every compilation unit.
* [Qt] prevent amount overflow problem with payment requestsPhilip Kaufmann2015-02-041-0/+25
| | | | | | | | | | | | | | | | Bitcoin amounts are stored as uint64 in the protobuf messages (see paymentrequest.proto), but CAmount is defined as int64_t. Because of that we need to verify that single and accumulated amounts are in a valid range and no variable overflow has happened. - fixes #5624 (#5622) Thanks @SergioDemianLerner for reporting that issue and also supplying us with a possible solution. - add static verifyAmount() function to PaymentServer and move the logging on error into the function - also add a unit test to paymentservertests.cpp
* Remove whitespaces before double colon in errors and logsPavel Janík2015-01-311-14/+14
|
* Merge pull request #5620Wladimir J. van der Laan2015-01-291-8/+17
|\ | | | | | | 6715efb [Qt] Payment request expiration bug fix (re-done) (Philip Kaufmann)
| * [Qt] Payment request expiration bug fix (re-done)Philip Kaufmann2015-01-151-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - this is based on #4122 (which can be closed) Currently a payment request is only checked for expiration upon receipt. It should be checked again immediately before sending coins to prevent the user from paying to an expired invoice which would then require a customer service interaction. - add static verifyExpired() function to PaymentServer to be able to use the same validation code in GUI and unit-testing code - extend unit tests to use that function and also add an unit test which overflows, because payment requests allow expires as uint64, whereas we use int64_t for verification of expired payment requests
* | [Qt] add debug logging for -rootcertificates optionPhilip Kaufmann2015-01-151-7/+10
|/ | | | | | | - now logs if -rootcertificates="" was used to disable payment request authentication via X.509 certificates - also logs which file is used as trusted root cert, if -rootcertificates is set
* [Qt] add payment request unit test for non matching networksPhilip Kaufmann2015-01-141-2/+13
| | | | | | - verify that payment request network matches client network - add static verifyNetwork() function to PaymentServer to be able to use the same validation code in GUI and unit-testing code
* namespace: remove boost namespace pollutionCory Fields2015-01-021-1/+0
|
* [Qt] update a translation string and argument countsPhilip Kaufmann2014-12-311-2/+1
|
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* [Qt] update paymentserver license and cleanup orderingPhilip Kaufmann2014-12-081-3/+3
|
* [Qt] add BIP70 payment request size DoS protection for URIsPhilip Kaufmann2014-12-081-12/+32
| | | | | | | | - current code only does this for payment request files, which are used on Mac - also rename readPaymentRequest to readPaymentRequestFromFile, so it's obvious that function only handles payment request files and not URIs - small logging changes in readPaymentRequestFromFile
* [Qt] remove dup lock that is done in SetAddressBook()Philip Kaufmann2014-12-081-1/+0
|
* [Qt] ensure socket is set to NULL in PaymentServer::ipcSendCommandLinePhilip Kaufmann2014-12-081-1/+4
|
* [Qt] add BIP70/BIP71 constants for all messages and mime typesPhilip Kaufmann2014-12-081-12/+18
| | | | | - also rename current ones to match the new ones - remove constant from guiconstant.h and add it to paymentserver.cpp
* [Qt] make PaymentServer::ipcParseCommandLine voidPhilip Kaufmann2014-12-081-2/+5
| | | | | - the function only returned true, so make it void - add a comment about payment request network detection
* Use a typedef for monetary valuesMark Friedenbach2014-09-261-2/+2
|
* Move CTxDestination from script/script to script/standardPieter Wuille2014-09-161-2/+2
|
* Merge pull request #4623Wladimir J. van der Laan2014-09-101-2/+6
|\ | | | | | | e84843c Broken addresses on command line no longer trigger testnet. (Ross Nicoll)
| * Broken addresses on command line no longer trigger testnet.Ross Nicoll2014-08-301-2/+6
| | | | | | | | | | When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the user to the test network.
* | Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+1
|/ | | | | | | | | | | | | | | | Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
* qt: Demote ReportInvalidCertificate message to qDebugWladimir J. van der Laan2014-08-041-1/+1
| | | | Too spammy.
* qt: Update some messages after suggestions by translatorsWladimir J. van der Laan2014-07-311-3/+3
| | | | | - *cannot* is more common, thus preferred to *can not* - Use *Watch-only* instead of *Watchonly* as one word
* Payment request parsing on startup now only changes network if a valid ↵Ross Nicoll2014-07-081-1/+5
| | | | network name is specified.
* remove SOCKS4 support from core and GUIPhilip Kaufmann2014-07-071-10/+4
| | | | - now we support SOCKS5 only
* Move fee policy out of coreGavin Andresen2014-07-031-1/+1
|
* qt: fix 'opens in testnet mode when presented with a BIP-72 link with no ↵Julian Haight2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | fallback' Passes tests: ``` $ ./bitcoin-qt 'bitcoin:?r=http://www.example.com/' .. fixed the original problem - this launches mainnet. $ ./bitcoin-qt 'bitcoin:mngeNQbTKnmaMbx8EXCYdwUbnt9JJD52cC' .. launches testnet $ ./bitcoin-qt -testnet 'bitcoin:1NXXeQRyMFFFRfyUix2o7mk1vhvk2Nxp78' .. sanity check - launches mainnet. ``` Fixes #4355. Closes #4411.
* qt: Change serious messages from qDebug to qWarningWladimir J. van der Laan2014-07-011-12/+12
| | | | | By changing the logging stream for warnings from qDebug to qWarning, these will always be logged to debug.log.
* Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan2014-06-251-4/+4
| | | | | | | | | This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
* Remove `using namespace std` from header fileWladimir J. van der Laan2014-06-161-0/+1
| | | | | It's considered bad form to import things into the global namespace in a header. Put it in the cpp files where it is needed instead.
* add NetworkIDString() to chainparamsPhilip Kaufmann2014-06-121-12/+1
| | | | | | - returns the BIP70 network string - use that new function in the core and GUI code and remove unused code and functions
* Merge pull request #3824Wladimir J. van der Laan2014-06-091-2/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon) 2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon) c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon) a3d946e Get rid of TestNet() (jtimon) 6fc0fa6 Add RPCisTestNet chain parameter (jtimon) cfeb823 Add RequireStandard chain parameter (jtimon) 21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon) d754f34 Move majority constants to chainparams (jtimon) 8d26721 Get rid of RegTest() (jtimon) cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon) 2595b9a Add DefaultMinerThreads chain parameter (jtimon) bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon) 1712adb Add MiningRequiresPeers chain parameter (jtimon)
| * Use Params().NetworkID() instead of TestNet() from the payment protocoljtimon2014-06-041-2/+12
| |
* | Type-safe CFeeRate classGavin Andresen2014-06-061-1/+1
|/ | | | | | | | Use CFeeRate instead of an int64_t for quantities that are fee-per-size. Helps prevent unit-conversion mismatches between the wallet, relaying, and mining code.
* [Qt] ensure payment request network matches client networkPhilip Kaufmann2014-05-061-21/+60
| | | | | | | | | | - replaces checks in SendCoinsDialog::handlePaymentRequest() that belong to PaymentServer (normal URIs are special cased, as only an isValid check is done on BTC addresses) - prevents the client to handle payment requests that do not match the clients network and shows an error instead (mainly a problem with drag&drop payment requests onto the client window) - includes some small comment changes also
* [Qt] let OptionsModel::getProxySettings() directly query proxyPhilip Kaufmann2014-01-171-10/+15
| | | | | | | | | - as a proxy set via GUI can be overridden via -proxy, directly query the core to get active proxy - give a warning, if active proxy is not SOCKS5 (needs to be SOCKS5 for the Qt networking code to work) - also remove an obsolete connect() call from optionsdialog.cpp and a reference to Bitcoin-Qt (now just GUI)
* [Qt] small paymentserver header cleanupPhilip Kaufmann2014-01-141-2/+0
|
* Merge pull request #3374Wladimir J. van der Laan2014-01-131-16/+36
|\ | | | | | | bd70562 [Qt] add messages when handling local payment request files (Philip Kaufmann)