mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
feature #212: XML-RPC Client can handle bigger messages
This commit is contained in:
parent
9fdbfe3a12
commit
0ccd01500f
@ -62,6 +62,8 @@ public:
|
||||
{
|
||||
set_one_auth(secret);
|
||||
set_one_endpoint(endpoint);
|
||||
|
||||
xmlrpc_limit_set(XMLRPC_XML_SIZE_LIMIT_ID, 1024*MESSAGE_SIZE);
|
||||
}
|
||||
|
||||
const string& get_oneauth()
|
||||
@ -92,6 +94,11 @@ private:
|
||||
int split_secret(const string secret, string& user, string& pass);
|
||||
|
||||
string sha1_digest(const string& pass);
|
||||
|
||||
/**
|
||||
* Default message size for XML data off the network
|
||||
*/
|
||||
static const int MESSAGE_SIZE;
|
||||
};
|
||||
|
||||
#endif /*ONECLIENT_H_*/
|
||||
|
@ -32,6 +32,13 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <iomanip>
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
const int Client::MESSAGE_SIZE = 51200;
|
||||
//
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void Client::set_one_auth(string secret)
|
||||
{
|
||||
@ -65,8 +72,8 @@ void Client::set_one_auth(string secret)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
int Client::read_oneauth(string &secret)
|
||||
{
|
||||
@ -150,6 +157,9 @@ int Client::split_secret(const string secret, string& user, string& pass)
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
string Client::sha1_digest(const string& pass)
|
||||
{
|
||||
EVP_MD_CTX mdctx;
|
||||
@ -174,6 +184,9 @@ string Client::sha1_digest(const string& pass)
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void Client::set_one_endpoint(string endpoint)
|
||||
{
|
||||
one_endpoint = "http://localhost:2633/RPC2";
|
||||
|
Loading…
x
Reference in New Issue
Block a user