mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01:00
bdb50539de
More info regarding KeePass: http://keepass.info/ KeePass integration will use KeePassHttp (https://github.com/pfn/keepasshttp/) to facilitate communications between the client and KeePass. KeePassHttp is a plugin for KeePass 2.x and provides a secure means of exposing KeePass entries via HTTP for clients to consume. The implementation is dependent on the following: - crypter.h for AES encryption helper functions. - rpcprotocol.h for handling RPC communications. Could only be used partially however due some static values in the code. - OpenSSL for base64 encoding. regular util.h libraries were not used for base64 encoding/decoding since they do not use secure allocation. - JSON Spirit for reading / writing RPC communications The following changes were made: - Added CLI options in help - Added RPC commands: keepass <genkey|init|setpassphrase> - Added keepass.h and keepass.cpp which hold the integration routines - Modified rpcwallet.cpp to support RPC commands The following new options are available for darkcoind and darkcoin-qt: -keepass Use KeePass 2 integration using KeePassHttp plugin (default: 0) -keepassport=<port> Connect to KeePassHttp on port <port> (default: 19455) -keepasskey=<key> KeePassHttp key for AES encrypted communication with KeePass -keepassid=<name> KeePassHttp id for the established association -keepassname=<name> Name to construct url for KeePass entry that stores the wallet passphrase The following rpc commands are available: - keepass genkey: generates a base64 encoded 256 bit AES key that can be used for the communication with KeePassHttp. Only necessary for manual configuration. Use init for automatic configuration. - keepass init: sets up the association between darkcoind and keepass by generating an AES key and sending an association message to KeePassHttp. This will trigger KeePass to ask for an Id for the association. Returns the association and the base64 encoded string for the AES key. - keepass setpassphrase <passphrase>: updates the passphrase in KeePassHttp to a new value. This should match the passphrase you intend to use for the wallet. Please note that the standard RPC commands walletpassphrasechange and the wallet encrption from the QT GUI already send the updates to KeePassHttp, so this is only necessary for manual manipulation of the password. Sample initialization flow from darkcoin-qt console (this needs to be done only once to set up the association): - Have KeePass running with an open database - Start darkcoin-qt - Open console - type: "keepass init" in darkcoin-qt console - (keepass pops up and asks for an association id, fill that in). Example: mydrkwallet - response: Association successful. Id: mydrkwalletdarkcoin - Key: AgQkcs6cI7v9tlSYKjG/+s8wJrGALHl3jLosJpPLzUE= - Edit darkcoin.conf and fill in these values keepass=1 keepasskey=AgQkcs6cI7v9tlSYKjG/+s8wJrGALHl3jLosJpPLzUE= keepassid=mydrkwallet keepassname=testwallet - Restart darkcoin-qt At this point, the association is made. The next action depends on your particular situation: - current wallet is not yet encrypted. Encrypting the wallet will trigger the integration and stores the password in KeePass (Under the 'KeePassHttp Passwords' group, named after keepassname. - current wallet is already encrypted: use "keepass setpassphrase <passphrase>" to store the passphrase in KeePass. At this point, the passphrase is stored in KeePassHttp. When Unlocking the wallet, one can use keepass as the passphrase to trigger retrieval of the password. This works from the RPC commands as well as the GUI.
243 lines
4.7 KiB
Makefile
243 lines
4.7 KiB
Makefile
include Makefile.include
|
|
|
|
AM_CPPFLAGS += -I$(builddir)
|
|
|
|
noinst_LIBRARIES = \
|
|
libdarkcoin_server.a \
|
|
libdarkcoin_common.a \
|
|
libdarkcoin_cli.a
|
|
if ENABLE_WALLET
|
|
noinst_LIBRARIES += libdarkcoin_wallet.a
|
|
endif
|
|
|
|
bin_PROGRAMS =
|
|
|
|
if BUILD_BITCOIND
|
|
bin_PROGRAMS += darkcoind
|
|
endif
|
|
|
|
if BUILD_BITCOIN_CLI
|
|
bin_PROGRAMS += darkcoin-cli
|
|
endif
|
|
|
|
SUBDIRS = . $(BUILD_QT) $(BUILD_TEST)
|
|
DIST_SUBDIRS = . qt test
|
|
.PHONY: FORCE
|
|
# darkcoin core #
|
|
BITCOIN_CORE_H = \
|
|
activemasternode.h \
|
|
addrman.h \
|
|
alert.h \
|
|
allocators.h \
|
|
base58.h bignum.h \
|
|
bloom.h \
|
|
chainparams.h \
|
|
checkpoints.h \
|
|
checkqueue.h \
|
|
clientversion.h \
|
|
coincontrol.h \
|
|
coins.h \
|
|
compat.h \
|
|
core.h \
|
|
crypter.h \
|
|
darksend.h \
|
|
db.h \
|
|
hash.h \
|
|
init.h \
|
|
instantx.h \
|
|
key.h \
|
|
keepass.h \
|
|
keystore.h \
|
|
leveldbwrapper.h \
|
|
limitedmap.h \
|
|
main.h \
|
|
masternode.h \
|
|
masternodeconfig.h \
|
|
miner.h \
|
|
mruset.h \
|
|
netbase.h \
|
|
net.h \
|
|
noui.h \
|
|
protocol.h \
|
|
rpcclient.h \
|
|
rpcprotocol.h \
|
|
rpcserver.h \
|
|
script.h \
|
|
serialize.h \
|
|
sph_blake.h \
|
|
sph_bmw.h \
|
|
sph_cubehash.h \
|
|
sph_echo.h \
|
|
sph_groestl.h \
|
|
sph_jh.h \
|
|
sph_keccak.h \
|
|
sph_luffa.h \
|
|
sph_shavite.h \
|
|
sph_simd.h \
|
|
sph_skein.h \
|
|
sph_types.h \
|
|
sync.h \
|
|
threadsafety.h \
|
|
tinyformat.h \
|
|
txdb.h \
|
|
txmempool.h \
|
|
ui_interface.h \
|
|
uint256.h \
|
|
util.h \
|
|
version.h \
|
|
walletdb.h \
|
|
wallet.h
|
|
|
|
JSON_H = \
|
|
json/json_spirit.h \
|
|
json/json_spirit_error_position.h \
|
|
json/json_spirit_reader.h \
|
|
json/json_spirit_reader_template.h \
|
|
json/json_spirit_stream_reader.h \
|
|
json/json_spirit_utils.h \
|
|
json/json_spirit_value.h \
|
|
json/json_spirit_writer.h \
|
|
json/json_spirit_writer_template.h
|
|
|
|
obj/build.h: FORCE
|
|
@$(MKDIR_P) $(abs_top_builddir)/src/obj
|
|
@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
|
|
$(abs_top_srcdir)
|
|
version.o: obj/build.h
|
|
|
|
libdarkcoin_server_a_SOURCES = \
|
|
activemasternode.cpp \
|
|
addrman.cpp \
|
|
alert.cpp \
|
|
bloom.cpp \
|
|
checkpoints.cpp \
|
|
coins.cpp \
|
|
init.cpp \
|
|
keystore.cpp \
|
|
leveldbwrapper.cpp \
|
|
main.cpp \
|
|
miner.cpp \
|
|
net.cpp \
|
|
noui.cpp \
|
|
rpcblockchain.cpp \
|
|
rpcdarksend.cpp \
|
|
rpcmining.cpp \
|
|
rpcmisc.cpp \
|
|
rpcnet.cpp \
|
|
rpcrawtransaction.cpp \
|
|
rpcserver.cpp \
|
|
txdb.cpp \
|
|
txmempool.cpp \
|
|
$(JSON_H) \
|
|
$(BITCOIN_CORE_H)
|
|
|
|
libdarkcoin_wallet_a_SOURCES = \
|
|
activemasternode.cpp \
|
|
db.cpp \
|
|
crypter.cpp \
|
|
rpcdump.cpp \
|
|
rpcwallet.cpp \
|
|
wallet.cpp \
|
|
walletdb.cpp \
|
|
keepass.cpp \
|
|
$(BITCOIN_CORE_H)
|
|
|
|
libdarkcoin_common_a_SOURCES = \
|
|
activemasternode.cpp \
|
|
base58.cpp \
|
|
allocators.cpp \
|
|
chainparams.cpp \
|
|
core.cpp \
|
|
darksend.cpp \
|
|
masternode.cpp \
|
|
masternodeconfig.cpp \
|
|
instantx.cpp \
|
|
hash.cpp \
|
|
key.cpp \
|
|
netbase.cpp \
|
|
protocol.cpp \
|
|
rpcprotocol.cpp \
|
|
script.cpp \
|
|
sync.cpp \
|
|
util.cpp \
|
|
version.cpp \
|
|
aes_helper.c \
|
|
luffa.c \
|
|
groestl.c \
|
|
jh.c \
|
|
echo.c \
|
|
shavite.c \
|
|
keccak.c \
|
|
skein.c \
|
|
bmw.c \
|
|
simd.c \
|
|
cubehash.c \
|
|
blake.c \
|
|
$(BITCOIN_CORE_H)
|
|
|
|
if GLIBC_BACK_COMPAT
|
|
libdarkcoin_common_a_SOURCES += compat/glibc_compat.cpp
|
|
libdarkcoin_common_a_SOURCES += compat/glibcxx_compat.cpp
|
|
endif
|
|
|
|
libdarkcoin_cli_a_SOURCES = \
|
|
rpcclient.cpp \
|
|
$(BITCOIN_CORE_H)
|
|
|
|
nodist_libdarkcoin_common_a_SOURCES = $(top_srcdir)/src/obj/build.h
|
|
#
|
|
|
|
# darkcoind binary #
|
|
darkcoind_LDADD = \
|
|
libdarkcoin_server.a \
|
|
libdarkcoin_cli.a \
|
|
libdarkcoin_common.a \
|
|
$(LIBLEVELDB) \
|
|
$(LIBMEMENV)
|
|
if ENABLE_WALLET
|
|
darkcoind_LDADD += libdarkcoin_wallet.a
|
|
endif
|
|
darkcoind_SOURCES = darkcoind.cpp
|
|
#
|
|
|
|
if TARGET_WINDOWS
|
|
darkcoind_SOURCES += bitcoind-res.rc
|
|
endif
|
|
|
|
AM_CPPFLAGS += $(BDB_CPPFLAGS)
|
|
darkcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS)
|
|
|
|
# darkcoin-cli binary #
|
|
darkcoin_cli_LDADD = \
|
|
libdarkcoin_cli.a \
|
|
libdarkcoin_common.a \
|
|
$(BOOST_LIBS)
|
|
darkcoin_cli_SOURCES = darkcoin-cli.cpp
|
|
#
|
|
|
|
if TARGET_WINDOWS
|
|
darkcoin_cli_SOURCES += bitcoin-cli-res.rc
|
|
endif
|
|
|
|
# NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race
|
|
leveldb/libleveldb.a: leveldb/libmemenv.a
|
|
|
|
leveldb/%.a:
|
|
@echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
|
|
CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
|
|
OPT="$(CXXFLAGS) $(CPPFLAGS)"
|
|
|
|
qt/bitcoinstrings.cpp: $(libdarkcoin_server_a_SOURCES) $(libdarkcoin_common_a_SOURCES) $(libdarkcoin_cli_a_SOURCES)
|
|
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
|
|
@cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
|
|
|
|
CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
|
|
|
|
DISTCLEANFILES = obj/build.h
|
|
|
|
EXTRA_DIST = leveldb Makefile.include
|
|
|
|
clean-local:
|
|
-$(MAKE) -C leveldb clean
|
|
rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
|