aboutsummaryrefslogtreecommitdiff
path: root/src/rpcprotocol.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-07-14 13:05:35 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-07-14 13:06:01 +0200
commitfd5dfda9396968346edcf1f5ddf946d63e797554 (patch)
treed45ba1bce0c7994fa496731577782304a342b6bf /src/rpcprotocol.h
parentbb59e7890cb45f71192c1a4bc0268618d2f6075e (diff)
parent093729055358ecf155b74ce1b2870d3eb9064355 (diff)
downloadbitcoin-fd5dfda9396968346edcf1f5ddf946d63e797554.tar.xz
Merge pull request #6388
0937290 doc: mention RPC random cookie authentication in release notes (Wladimir J. van der Laan) 71cbeaa rpc: Implement random-cookie based authentication (Wladimir J. van der Laan)
Diffstat (limited to 'src/rpcprotocol.h')
-rw-r--r--src/rpcprotocol.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index ccd2439c9f..2360ec2c60 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -14,6 +14,7 @@
#include <boost/iostreams/stream.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
+#include <boost/filesystem.hpp>
#include "univalue/univalue.h"
@@ -165,4 +166,13 @@ UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const Un
std::string JSONRPCReply(const UniValue& result, const UniValue& error, const UniValue& id);
UniValue JSONRPCError(int code, const std::string& message);
+/** Get name of RPC authentication cookie file */
+boost::filesystem::path GetAuthCookieFile();
+/** Generate a new RPC authentication cookie and write it to disk */
+bool GenerateAuthCookie(std::string *cookie_out);
+/** Read the RPC authentication cookie from disk */
+bool GetAuthCookie(std::string *cookie_out);
+/** Delete RPC authentication cookie from disk */
+void DeleteAuthCookie();
+
#endif // BITCOIN_RPCPROTOCOL_H