aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-01-18 00:31:57 +0100
committerfunjoker <funjoker109@gmail.com>2024-01-29 21:47:33 +0100
commit461e049b86a860feed658e707510259da323b7f5 (patch)
tree9f5cce00e0f82795dee155a307923a661983ccf2 /src
parentf0488242795625807f2a32bf89ffe42520e4a3ff (diff)
Core/Bnet: Added SRP http endpoints
(cherry picked from commit 5cc1b97fc1430f07d8942ae9f87fd5ad9708db59)
Diffstat (limited to 'src')
-rw-r--r--src/server/bnetserver/REST/LoginRESTService.cpp114
-rw-r--r--src/server/bnetserver/REST/LoginRESTService.h1
-rw-r--r--src/server/proto/Login/Login.pb.cc221
-rw-r--r--src/server/proto/Login/Login.pb.h982
-rw-r--r--src/server/proto/Login/Login.proto15
5 files changed, 1302 insertions, 31 deletions
diff --git a/src/server/bnetserver/REST/LoginRESTService.cpp b/src/server/bnetserver/REST/LoginRESTService.cpp
index 9ec759d98a5..7587510bafc 100644
--- a/src/server/bnetserver/REST/LoginRESTService.cpp
+++ b/src/server/bnetserver/REST/LoginRESTService.cpp
@@ -63,6 +63,11 @@ bool LoginRESTService::StartNetwork(Trinity::Asio::IoContext& ioContext, std::st
return HandlePostLogin(std::move(session), context);
}, RequestHandlerFlag::DoNotLogRequestContent);
+ RegisterHandler(boost::beast::http::verb::post, "/bnetserver/login/srp/", [](std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context)
+ {
+ return HandlePostLoginSrpChallenge(std::move(session), context);
+ });
+
RegisterHandler(boost::beast::http::verb::post, "/bnetserver/refreshLoginTicket/", [this](std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context)
{
return HandlePostRefreshLoginTicket(std::move(session), context);
@@ -160,10 +165,13 @@ std::string LoginRESTService::ExtractAuthorization(HttpRequest const& request)
return ticket;
}
-LoginRESTService::RequestHandlerResult LoginRESTService::HandleGetForm(std::shared_ptr<LoginHttpSession> /*session*/, HttpRequestContext& context) const
+LoginRESTService::RequestHandlerResult LoginRESTService::HandleGetForm(std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context) const
{
+ JSON::Login::FormInputs form = _formInputs;
+ form.set_srp_url(Trinity::StringFormat("https://{}:{}/bnetserver/login/srp/", GetHostnameForClient(session->GetRemoteIpAddress()), _port));
+
context.response.set(boost::beast::http::field::content_type, "application/json;charset=utf-8");
- context.response.body() = ::JSON::Serialize(_formInputs);
+ context.response.body() = ::JSON::Serialize(form);
return RequestHandlerResult::Handled;
}
@@ -271,6 +279,7 @@ LoginRESTService::RequestHandlerResult LoginRESTService::HandlePostLogin(std::sh
std::string login(getInputValue(loginForm.get(), "account_name"));
Utf8ToUpperOnlyLatin(login);
bool passwordCorrect = false;
+ Optional<std::string> serverM2;
Field* fields = result->Fetch();
uint32 accountId = fields[0].GetUInt32();
@@ -288,6 +297,16 @@ LoginRESTService::RequestHandlerResult LoginRESTService::HandlePostLogin(std::sh
passwordCorrect = session->GetSessionState()->Srp->CheckCredentials(srpUsername, password);
}
+ else
+ {
+ BigNumber A(getInputValue(loginForm.get(), "public_A"));
+ BigNumber M1(getInputValue(loginForm.get(), "client_evidence_M1"));
+ if (Optional<BigNumber> sessionKey = session->GetSessionState()->Srp->VerifyClientEvidence(A, M1))
+ {
+ passwordCorrect = true;
+ serverM2 = session->GetSessionState()->Srp->CalculateServerEvidence(A, M1, *sessionKey).AsHexStr();
+ }
+ }
uint32 failedLogins = fields[4].GetUInt32();
std::string loginTicket = fields[5].GetString();
@@ -359,11 +378,13 @@ LoginRESTService::RequestHandlerResult LoginRESTService::HandlePostLogin(std::sh
stmt->setString(0, loginTicket);
stmt->setUInt32(1, time(nullptr) + _loginTicketDuration);
stmt->setUInt32(2, accountId);
- callback.WithPreparedCallback([session, context = std::move(context), loginTicket = std::move(loginTicket)](PreparedQueryResult) mutable
+ callback.WithPreparedCallback([session, context = std::move(context), loginTicket = std::move(loginTicket), serverM2 = std::move(serverM2)](PreparedQueryResult) mutable
{
JSON::Login::LoginResult loginResult;
loginResult.set_authentication_state(JSON::Login::DONE);
loginResult.set_login_ticket(loginTicket);
+ if (serverM2)
+ loginResult.set_server_evidence_m2(*serverM2);
context.response.set(boost::beast::http::field::content_type, "application/json;charset=utf-8");
context.response.body() = ::JSON::Serialize(loginResult);
@@ -374,6 +395,93 @@ LoginRESTService::RequestHandlerResult LoginRESTService::HandlePostLogin(std::sh
return RequestHandlerResult::Async;
}
+LoginRESTService::RequestHandlerResult LoginRESTService::HandlePostLoginSrpChallenge(std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context)
+{
+ JSON::Login::LoginForm loginForm;
+ if (!::JSON::Deserialize(context.request.body(), &loginForm))
+ {
+ JSON::Login::LoginResult loginResult;
+ loginResult.set_authentication_state(JSON::Login::LOGIN);
+ loginResult.set_error_code("UNABLE_TO_DECODE");
+ loginResult.set_error_message("There was an internal error while connecting to Battle.net. Please try again later.");
+
+ context.response.result(boost::beast::http::status::bad_request);
+ context.response.set(boost::beast::http::field::content_type, "application/json;charset=utf-8");
+ context.response.body() = ::JSON::Serialize(loginResult);
+ session->SendResponse(context);
+
+ return RequestHandlerResult::Handled;
+ }
+
+ std::string login;
+
+ for (int32 i = 0; i < loginForm.inputs_size(); ++i)
+ if (loginForm.inputs(i).input_id() == "account_name")
+ login = loginForm.inputs(i).value();
+
+ Utf8ToUpperOnlyLatin(login);
+
+ LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_BNET_CHECK_PASSWORD_BY_EMAIL);
+ stmt->setString(0, login);
+
+ session->QueueQuery(LoginDatabase.AsyncQuery(stmt)
+ .WithPreparedCallback([session, context = std::move(context), login = std::move(login)](PreparedQueryResult result) mutable
+ {
+ if (!result)
+ {
+ JSON::Login::LoginResult loginResult;
+ loginResult.set_authentication_state(JSON::Login::DONE);
+ context.response.set(boost::beast::http::field::content_type, "application/json;charset=utf-8");
+ context.response.body() = ::JSON::Serialize(loginResult);
+ session->SendResponse(context);
+ return;
+ }
+
+ Field* fields = result->Fetch();
+ SrpVersion version = SrpVersion(fields[0].GetInt8());
+ SrpHashFunction hashFunction = SrpHashFunction::Sha256;
+ std::string srpUsername = ByteArrayToHexStr(Trinity::Crypto::SHA256::GetDigestOf(login));
+ Trinity::Crypto::SRP::Salt s = fields[1].GetBinary<Trinity::Crypto::SRP::SALT_LENGTH>();
+ Trinity::Crypto::SRP::Verifier v = fields[2].GetBinary();
+
+ session->GetSessionState()->Srp = CreateSrpImplementation(version, hashFunction, srpUsername, s, v);
+ if (!session->GetSessionState()->Srp)
+ {
+ context.response.result(boost::beast::http::status::internal_server_error);
+ session->SendResponse(context);
+ return;
+ }
+
+ JSON::Login::SrpLoginChallenge challenge;
+ challenge.set_version(session->GetSessionState()->Srp->GetVersion());
+ challenge.set_iterations(session->GetSessionState()->Srp->GetXIterations());
+ challenge.set_modulus(session->GetSessionState()->Srp->GetN().AsHexStr());
+ challenge.set_generator(session->GetSessionState()->Srp->Getg().AsHexStr());
+ challenge.set_hash_function([=]
+ {
+ switch (hashFunction)
+ {
+ case SrpHashFunction::Sha256:
+ return "SHA-256";
+ case SrpHashFunction::Sha512:
+ return "SHA-512";
+ default:
+ break;
+ }
+ return "";
+ }());
+ challenge.set_username(srpUsername);
+ challenge.set_salt(ByteArrayToHexStr(session->GetSessionState()->Srp->s));
+ challenge.set_public_b(session->GetSessionState()->Srp->B.AsHexStr());
+
+ context.response.set(boost::beast::http::field::content_type, "application/json;charset=utf-8");
+ context.response.body() = ::JSON::Serialize(challenge);
+ session->SendResponse(context);
+ }));
+
+ return RequestHandlerResult::Async;
+}
+
LoginRESTService::RequestHandlerResult LoginRESTService::HandlePostRefreshLoginTicket(std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context) const
{
std::string ticket = ExtractAuthorization(context.request);
diff --git a/src/server/bnetserver/REST/LoginRESTService.h b/src/server/bnetserver/REST/LoginRESTService.h
index 9d48f1d2710..5683c262590 100644
--- a/src/server/bnetserver/REST/LoginRESTService.h
+++ b/src/server/bnetserver/REST/LoginRESTService.h
@@ -72,6 +72,7 @@ private:
RequestHandlerResult HandleGetPortal(std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context) const;
RequestHandlerResult HandlePostLogin(std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context) const;
+ static RequestHandlerResult HandlePostLoginSrpChallenge(std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context);
RequestHandlerResult HandlePostRefreshLoginTicket(std::shared_ptr<LoginHttpSession> session, HttpRequestContext& context) const;
static std::unique_ptr<Trinity::Crypto::SRP::BnetSRP6Base> CreateSrpImplementation(SrpVersion version, SrpHashFunction hashFunction,
diff --git a/src/server/proto/Login/Login.pb.cc b/src/server/proto/Login/Login.pb.cc
index 37ee94d0348..23c6f987b0b 100644
--- a/src/server/proto/Login/Login.pb.cc
+++ b/src/server/proto/Login/Login.pb.cc
@@ -37,6 +37,9 @@ const ::google::protobuf::internal::GeneratedMessageReflection*
const ::google::protobuf::Descriptor* LoginForm_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
LoginForm_reflection_ = NULL;
+const ::google::protobuf::Descriptor* SrpLoginChallenge_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ SrpLoginChallenge_reflection_ = NULL;
const ::google::protobuf::Descriptor* LoginResult_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
LoginResult_reflection_ = NULL;
@@ -93,9 +96,11 @@ void protobuf_AssignDesc_Login_2eproto() {
::google::protobuf::MessageFactory::generated_factory(),
sizeof(FormInput));
FormInputs_descriptor_ = file->message_type(2);
- static const int FormInputs_offsets_[2] = {
+ static const int FormInputs_offsets_[4] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormInputs, type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormInputs, inputs_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormInputs, srp_url_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FormInputs, srp_js_),
};
FormInputs_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -142,13 +147,37 @@ void protobuf_AssignDesc_Login_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(LoginForm));
- LoginResult_descriptor_ = file->message_type(5);
- static const int LoginResult_offsets_[5] = {
+ SrpLoginChallenge_descriptor_ = file->message_type(5);
+ static const int SrpLoginChallenge_offsets_[9] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, version_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, iterations_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, modulus_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, generator_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, hash_function_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, username_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, salt_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, public_b_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, eligible_credential_upgrade_),
+ };
+ SrpLoginChallenge_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ SrpLoginChallenge_descriptor_,
+ SrpLoginChallenge::default_instance_,
+ SrpLoginChallenge_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SrpLoginChallenge, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(SrpLoginChallenge));
+ LoginResult_descriptor_ = file->message_type(6);
+ static const int LoginResult_offsets_[6] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginResult, authentication_state_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginResult, error_code_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginResult, error_message_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginResult, url_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginResult, login_ticket_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginResult, server_evidence_m2_),
};
LoginResult_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -161,7 +190,7 @@ void protobuf_AssignDesc_Login_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(LoginResult));
- LoginRefreshResult_descriptor_ = file->message_type(6);
+ LoginRefreshResult_descriptor_ = file->message_type(7);
static const int LoginRefreshResult_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginRefreshResult, login_ticket_expiry_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LoginRefreshResult, is_expired_),
@@ -177,7 +206,7 @@ void protobuf_AssignDesc_Login_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(LoginRefreshResult));
- GameAccountInfo_descriptor_ = file->message_type(7);
+ GameAccountInfo_descriptor_ = file->message_type(8);
static const int GameAccountInfo_offsets_[6] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GameAccountInfo, display_name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GameAccountInfo, expansion_),
@@ -197,7 +226,7 @@ void protobuf_AssignDesc_Login_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(GameAccountInfo));
- GameAccountList_descriptor_ = file->message_type(8);
+ GameAccountList_descriptor_ = file->message_type(9);
static const int GameAccountList_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GameAccountList, game_accounts_),
};
@@ -237,6 +266,8 @@ void protobuf_RegisterTypes(const ::std::string&) {
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
LoginForm_descriptor_, &LoginForm::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ SrpLoginChallenge_descriptor_, &SrpLoginChallenge::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
LoginResult_descriptor_, &LoginResult::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
LoginRefreshResult_descriptor_, &LoginRefreshResult::default_instance());
@@ -259,6 +290,8 @@ void protobuf_ShutdownFile_Login_2eproto() {
delete FormInputValue_reflection_;
delete LoginForm::default_instance_;
delete LoginForm_reflection_;
+ delete SrpLoginChallenge::default_instance_;
+ delete SrpLoginChallenge_reflection_;
delete LoginResult::default_instance_;
delete LoginResult_reflection_;
delete LoginRefreshResult::default_instance_;
@@ -279,28 +312,35 @@ void protobuf_AddDesc_Login_2eproto() {
"\n\013Login.proto\022\024Battlenet.JSON.Login\"\017\n\rE"
"rrorResponse\"N\n\tFormInput\022\020\n\010input_id\030\001 "
"\002(\t\022\014\n\004type\030\002 \002(\t\022\r\n\005label\030\003 \002(\t\022\022\n\nmax_"
- "length\030\004 \001(\r\"k\n\nFormInputs\022,\n\004type\030\001 \002(\016"
- "2\036.Battlenet.JSON.Login.FormType\022/\n\006inpu"
- "ts\030\002 \003(\0132\037.Battlenet.JSON.Login.FormInpu"
- "t\"1\n\016FormInputValue\022\020\n\010input_id\030\001 \002(\t\022\r\n"
- "\005value\030\002 \002(\t\"{\n\tLoginForm\022\023\n\013platform_id"
- "\030\001 \002(\t\022\022\n\nprogram_id\030\002 \002(\t\022\017\n\007version\030\003 "
- "\002(\t\0224\n\006inputs\030\004 \003(\0132$.Battlenet.JSON.Log"
- "in.FormInputValue\"\244\001\n\013LoginResult\022G\n\024aut"
- "hentication_state\030\001 \002(\0162).Battlenet.JSON"
- ".Login.AuthenticationState\022\022\n\nerror_code"
- "\030\002 \001(\t\022\025\n\rerror_message\030\003 \001(\t\022\013\n\003url\030\004 \001"
- "(\t\022\024\n\014login_ticket\030\005 \001(\t\"E\n\022LoginRefresh"
- "Result\022\033\n\023login_ticket_expiry\030\001 \002(\004\022\022\n\ni"
- "s_expired\030\002 \001(\010\"\232\001\n\017GameAccountInfo\022\024\n\014d"
- "isplay_name\030\001 \002(\t\022\021\n\texpansion\030\002 \002(\r\022\024\n\014"
- "is_suspended\030\003 \001(\010\022\021\n\tis_banned\030\004 \001(\010\022\032\n"
- "\022suspension_expires\030\005 \001(\004\022\031\n\021suspension_"
- "reason\030\006 \001(\t\"O\n\017GameAccountList\022<\n\rgame_"
- "accounts\030\001 \003(\0132%.Battlenet.JSON.Login.Ga"
- "meAccountInfo*\032\n\010FormType\022\016\n\nLOGIN_FORM\020"
- "\001*H\n\023AuthenticationState\022\t\n\005LOGIN\020\001\022\t\n\005L"
- "EGAL\020\002\022\021\n\rAUTHENTICATOR\020\003\022\010\n\004DONE\020\004B\002H\002", 999);
+ "length\030\004 \001(\r\"\214\001\n\nFormInputs\022,\n\004type\030\001 \002("
+ "\0162\036.Battlenet.JSON.Login.FormType\022/\n\006inp"
+ "uts\030\002 \003(\0132\037.Battlenet.JSON.Login.FormInp"
+ "ut\022\017\n\007srp_url\030\003 \001(\t\022\016\n\006srp_js\030\004 \001(\t\"1\n\016F"
+ "ormInputValue\022\020\n\010input_id\030\001 \002(\t\022\r\n\005value"
+ "\030\002 \002(\t\"{\n\tLoginForm\022\023\n\013platform_id\030\001 \002(\t"
+ "\022\022\n\nprogram_id\030\002 \002(\t\022\017\n\007version\030\003 \002(\t\0224\n"
+ "\006inputs\030\004 \003(\0132$.Battlenet.JSON.Login.For"
+ "mInputValue\"\312\001\n\021SrpLoginChallenge\022\017\n\007ver"
+ "sion\030\001 \002(\r\022\022\n\niterations\030\002 \002(\r\022\017\n\007modulu"
+ "s\030\003 \002(\t\022\021\n\tgenerator\030\004 \002(\t\022\025\n\rhash_funct"
+ "ion\030\005 \002(\t\022\020\n\010username\030\006 \002(\t\022\014\n\004salt\030\007 \002("
+ "\t\022\020\n\010public_B\030\010 \002(\t\022#\n\033eligible_credenti"
+ "al_upgrade\030\t \001(\010\"\300\001\n\013LoginResult\022G\n\024auth"
+ "entication_state\030\001 \002(\0162).Battlenet.JSON."
+ "Login.AuthenticationState\022\022\n\nerror_code\030"
+ "\002 \001(\t\022\025\n\rerror_message\030\003 \001(\t\022\013\n\003url\030\004 \001("
+ "\t\022\024\n\014login_ticket\030\005 \001(\t\022\032\n\022server_eviden"
+ "ce_M2\030\006 \001(\t\"E\n\022LoginRefreshResult\022\033\n\023log"
+ "in_ticket_expiry\030\001 \002(\004\022\022\n\nis_expired\030\002 \001"
+ "(\010\"\232\001\n\017GameAccountInfo\022\024\n\014display_name\030\001"
+ " \002(\t\022\021\n\texpansion\030\002 \002(\r\022\024\n\014is_suspended\030"
+ "\003 \001(\010\022\021\n\tis_banned\030\004 \001(\010\022\032\n\022suspension_e"
+ "xpires\030\005 \001(\004\022\031\n\021suspension_reason\030\006 \001(\t\""
+ "O\n\017GameAccountList\022<\n\rgame_accounts\030\001 \003("
+ "\0132%.Battlenet.JSON.Login.GameAccountInfo"
+ "*\032\n\010FormType\022\016\n\nLOGIN_FORM\020\001*H\n\023Authenti"
+ "cationState\022\t\n\005LOGIN\020\001\022\t\n\005LEGAL\020\002\022\021\n\rAUT"
+ "HENTICATOR\020\003\022\010\n\004DONE\020\004B\002H\002", 1266);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"Login.proto", &protobuf_RegisterTypes);
ErrorResponse::default_instance_ = new ErrorResponse();
@@ -308,6 +348,7 @@ void protobuf_AddDesc_Login_2eproto() {
FormInputs::default_instance_ = new FormInputs();
FormInputValue::default_instance_ = new FormInputValue();
LoginForm::default_instance_ = new LoginForm();
+ SrpLoginChallenge::default_instance_ = new SrpLoginChallenge();
LoginResult::default_instance_ = new LoginResult();
LoginRefreshResult::default_instance_ = new LoginRefreshResult();
GameAccountInfo::default_instance_ = new GameAccountInfo();
@@ -317,6 +358,7 @@ void protobuf_AddDesc_Login_2eproto() {
FormInputs::default_instance_->InitAsDefaultInstance();
FormInputValue::default_instance_->InitAsDefaultInstance();
LoginForm::default_instance_->InitAsDefaultInstance();
+ SrpLoginChallenge::default_instance_->InitAsDefaultInstance();
LoginResult::default_instance_->InitAsDefaultInstance();
LoginRefreshResult::default_instance_->InitAsDefaultInstance();
GameAccountInfo::default_instance_->InitAsDefaultInstance();
@@ -522,6 +564,8 @@ void FormInput::Swap(FormInput* other) {
#ifndef _MSC_VER
const int FormInputs::kTypeFieldNumber;
const int FormInputs::kInputsFieldNumber;
+const int FormInputs::kSrpUrlFieldNumber;
+const int FormInputs::kSrpJsFieldNumber;
#endif // !_MSC_VER
FormInputs::FormInputs()
@@ -541,8 +585,11 @@ FormInputs::FormInputs(const FormInputs& from)
}
void FormInputs::SharedCtor() {
+ ::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
type_ = 1;
+ srp_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ srp_js_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -552,6 +599,12 @@ FormInputs::~FormInputs() {
}
void FormInputs::SharedDtor() {
+ if (srp_url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete srp_url_;
+ }
+ if (srp_js_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete srp_js_;
+ }
if (this != default_instance_) {
}
}
@@ -761,11 +814,119 @@ void LoginForm::Swap(LoginForm* other) {
// ===================================================================
#ifndef _MSC_VER
+const int SrpLoginChallenge::kVersionFieldNumber;
+const int SrpLoginChallenge::kIterationsFieldNumber;
+const int SrpLoginChallenge::kModulusFieldNumber;
+const int SrpLoginChallenge::kGeneratorFieldNumber;
+const int SrpLoginChallenge::kHashFunctionFieldNumber;
+const int SrpLoginChallenge::kUsernameFieldNumber;
+const int SrpLoginChallenge::kSaltFieldNumber;
+const int SrpLoginChallenge::kPublicBFieldNumber;
+const int SrpLoginChallenge::kEligibleCredentialUpgradeFieldNumber;
+#endif // !_MSC_VER
+
+SrpLoginChallenge::SrpLoginChallenge()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:Battlenet.JSON.Login.SrpLoginChallenge)
+}
+
+void SrpLoginChallenge::InitAsDefaultInstance() {
+}
+
+SrpLoginChallenge::SrpLoginChallenge(const SrpLoginChallenge& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+ // @@protoc_insertion_point(copy_constructor:Battlenet.JSON.Login.SrpLoginChallenge)
+}
+
+void SrpLoginChallenge::SharedCtor() {
+ ::google::protobuf::internal::GetEmptyString();
+ _cached_size_ = 0;
+ version_ = 0u;
+ iterations_ = 0u;
+ modulus_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ generator_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ hash_function_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ username_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ salt_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ public_b_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ eligible_credential_upgrade_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+SrpLoginChallenge::~SrpLoginChallenge() {
+ // @@protoc_insertion_point(destructor:Battlenet.JSON.Login.SrpLoginChallenge)
+ SharedDtor();
+}
+
+void SrpLoginChallenge::SharedDtor() {
+ if (modulus_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete modulus_;
+ }
+ if (generator_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete generator_;
+ }
+ if (hash_function_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete hash_function_;
+ }
+ if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete username_;
+ }
+ if (salt_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete salt_;
+ }
+ if (public_b_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete public_b_;
+ }
+ if (this != default_instance_) {
+ }
+}
+
+void SrpLoginChallenge::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* SrpLoginChallenge::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return SrpLoginChallenge_descriptor_;
+}
+
+const SrpLoginChallenge& SrpLoginChallenge::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_Login_2eproto();
+ return *default_instance_;
+}
+
+SrpLoginChallenge* SrpLoginChallenge::default_instance_ = NULL;
+
+SrpLoginChallenge* SrpLoginChallenge::New() const {
+ return new SrpLoginChallenge;
+}
+
+void SrpLoginChallenge::Swap(SrpLoginChallenge* other) {
+ if (other != this) {
+ GetReflection()->Swap(this, other);}
+}
+
+::google::protobuf::Metadata SrpLoginChallenge::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = SrpLoginChallenge_descriptor_;
+ metadata.reflection = SrpLoginChallenge_reflection_;
+ return metadata;
+}
+
+// ===================================================================
+
+#ifndef _MSC_VER
const int LoginResult::kAuthenticationStateFieldNumber;
const int LoginResult::kErrorCodeFieldNumber;
const int LoginResult::kErrorMessageFieldNumber;
const int LoginResult::kUrlFieldNumber;
const int LoginResult::kLoginTicketFieldNumber;
+const int LoginResult::kServerEvidenceM2FieldNumber;
#endif // !_MSC_VER
LoginResult::LoginResult()
@@ -792,6 +953,7 @@ void LoginResult::SharedCtor() {
error_message_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
login_ticket_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ server_evidence_m2_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -813,6 +975,9 @@ void LoginResult::SharedDtor() {
if (login_ticket_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete login_ticket_;
}
+ if (server_evidence_m2_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete server_evidence_m2_;
+ }
if (this != default_instance_) {
}
}
diff --git a/src/server/proto/Login/Login.pb.h b/src/server/proto/Login/Login.pb.h
index 9f23746d954..331c6c70406 100644
--- a/src/server/proto/Login/Login.pb.h
+++ b/src/server/proto/Login/Login.pb.h
@@ -42,6 +42,7 @@ class FormInput;
class FormInputs;
class FormInputValue;
class LoginForm;
+class SrpLoginChallenge;
class LoginResult;
class LoginRefreshResult;
class GameAccountInfo;
@@ -314,16 +315,46 @@ class TC_PROTO_API FormInputs : public ::google::protobuf::Message {
inline ::google::protobuf::RepeatedPtrField< ::Battlenet::JSON::Login::FormInput >*
mutable_inputs();
+ // optional string srp_url = 3;
+ inline bool has_srp_url() const;
+ inline void clear_srp_url();
+ static const int kSrpUrlFieldNumber = 3;
+ inline const ::std::string& srp_url() const;
+ inline void set_srp_url(const ::std::string& value);
+ inline void set_srp_url(const char* value);
+ inline void set_srp_url(const char* value, size_t size);
+ inline ::std::string* mutable_srp_url();
+ inline ::std::string* release_srp_url();
+ inline void set_allocated_srp_url(::std::string* srp_url);
+
+ // optional string srp_js = 4;
+ inline bool has_srp_js() const;
+ inline void clear_srp_js();
+ static const int kSrpJsFieldNumber = 4;
+ inline const ::std::string& srp_js() const;
+ inline void set_srp_js(const ::std::string& value);
+ inline void set_srp_js(const char* value);
+ inline void set_srp_js(const char* value, size_t size);
+ inline ::std::string* mutable_srp_js();
+ inline ::std::string* release_srp_js();
+ inline void set_allocated_srp_js(::std::string* srp_js);
+
// @@protoc_insertion_point(class_scope:Battlenet.JSON.Login.FormInputs)
private:
inline void set_has_type();
inline void clear_has_type();
+ inline void set_has_srp_url();
+ inline void clear_has_srp_url();
+ inline void set_has_srp_js();
+ inline void clear_has_srp_js();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::RepeatedPtrField< ::Battlenet::JSON::Login::FormInput > inputs_;
+ ::std::string* srp_url_;
+ ::std::string* srp_js_;
int type_;
friend void TC_PROTO_API protobuf_AddDesc_Login_2eproto();
friend void protobuf_AssignDesc_Login_2eproto();
@@ -534,6 +565,182 @@ class TC_PROTO_API LoginForm : public ::google::protobuf::Message {
};
// -------------------------------------------------------------------
+class TC_PROTO_API SrpLoginChallenge : public ::google::protobuf::Message {
+ public:
+ SrpLoginChallenge();
+ virtual ~SrpLoginChallenge();
+
+ SrpLoginChallenge(const SrpLoginChallenge& from);
+
+ inline SrpLoginChallenge& operator=(const SrpLoginChallenge& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _unknown_fields_;
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return &_unknown_fields_;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const SrpLoginChallenge& default_instance();
+
+ void Swap(SrpLoginChallenge* other);
+
+ // implements Message ----------------------------------------------
+
+ SrpLoginChallenge* New() const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ public:
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // required uint32 version = 1;
+ inline bool has_version() const;
+ inline void clear_version();
+ static const int kVersionFieldNumber = 1;
+ inline ::google::protobuf::uint32 version() const;
+ inline void set_version(::google::protobuf::uint32 value);
+
+ // required uint32 iterations = 2;
+ inline bool has_iterations() const;
+ inline void clear_iterations();
+ static const int kIterationsFieldNumber = 2;
+ inline ::google::protobuf::uint32 iterations() const;
+ inline void set_iterations(::google::protobuf::uint32 value);
+
+ // required string modulus = 3;
+ inline bool has_modulus() const;
+ inline void clear_modulus();
+ static const int kModulusFieldNumber = 3;
+ inline const ::std::string& modulus() const;
+ inline void set_modulus(const ::std::string& value);
+ inline void set_modulus(const char* value);
+ inline void set_modulus(const char* value, size_t size);
+ inline ::std::string* mutable_modulus();
+ inline ::std::string* release_modulus();
+ inline void set_allocated_modulus(::std::string* modulus);
+
+ // required string generator = 4;
+ inline bool has_generator() const;
+ inline void clear_generator();
+ static const int kGeneratorFieldNumber = 4;
+ inline const ::std::string& generator() const;
+ inline void set_generator(const ::std::string& value);
+ inline void set_generator(const char* value);
+ inline void set_generator(const char* value, size_t size);
+ inline ::std::string* mutable_generator();
+ inline ::std::string* release_generator();
+ inline void set_allocated_generator(::std::string* generator);
+
+ // required string hash_function = 5;
+ inline bool has_hash_function() const;
+ inline void clear_hash_function();
+ static const int kHashFunctionFieldNumber = 5;
+ inline const ::std::string& hash_function() const;
+ inline void set_hash_function(const ::std::string& value);
+ inline void set_hash_function(const char* value);
+ inline void set_hash_function(const char* value, size_t size);
+ inline ::std::string* mutable_hash_function();
+ inline ::std::string* release_hash_function();
+ inline void set_allocated_hash_function(::std::string* hash_function);
+
+ // required string username = 6;
+ inline bool has_username() const;
+ inline void clear_username();
+ static const int kUsernameFieldNumber = 6;
+ inline const ::std::string& username() const;
+ inline void set_username(const ::std::string& value);
+ inline void set_username(const char* value);
+ inline void set_username(const char* value, size_t size);
+ inline ::std::string* mutable_username();
+ inline ::std::string* release_username();
+ inline void set_allocated_username(::std::string* username);
+
+ // required string salt = 7;
+ inline bool has_salt() const;
+ inline void clear_salt();
+ static const int kSaltFieldNumber = 7;
+ inline const ::std::string& salt() const;
+ inline void set_salt(const ::std::string& value);
+ inline void set_salt(const char* value);
+ inline void set_salt(const char* value, size_t size);
+ inline ::std::string* mutable_salt();
+ inline ::std::string* release_salt();
+ inline void set_allocated_salt(::std::string* salt);
+
+ // required string public_B = 8;
+ inline bool has_public_b() const;
+ inline void clear_public_b();
+ static const int kPublicBFieldNumber = 8;
+ inline const ::std::string& public_b() const;
+ inline void set_public_b(const ::std::string& value);
+ inline void set_public_b(const char* value);
+ inline void set_public_b(const char* value, size_t size);
+ inline ::std::string* mutable_public_b();
+ inline ::std::string* release_public_b();
+ inline void set_allocated_public_b(::std::string* public_b);
+
+ // optional bool eligible_credential_upgrade = 9;
+ inline bool has_eligible_credential_upgrade() const;
+ inline void clear_eligible_credential_upgrade();
+ static const int kEligibleCredentialUpgradeFieldNumber = 9;
+ inline bool eligible_credential_upgrade() const;
+ inline void set_eligible_credential_upgrade(bool value);
+
+ // @@protoc_insertion_point(class_scope:Battlenet.JSON.Login.SrpLoginChallenge)
+ private:
+ inline void set_has_version();
+ inline void clear_has_version();
+ inline void set_has_iterations();
+ inline void clear_has_iterations();
+ inline void set_has_modulus();
+ inline void clear_has_modulus();
+ inline void set_has_generator();
+ inline void clear_has_generator();
+ inline void set_has_hash_function();
+ inline void clear_has_hash_function();
+ inline void set_has_username();
+ inline void clear_has_username();
+ inline void set_has_salt();
+ inline void clear_has_salt();
+ inline void set_has_public_b();
+ inline void clear_has_public_b();
+ inline void set_has_eligible_credential_upgrade();
+ inline void clear_has_eligible_credential_upgrade();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::google::protobuf::uint32 _has_bits_[1];
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 version_;
+ ::google::protobuf::uint32 iterations_;
+ ::std::string* modulus_;
+ ::std::string* generator_;
+ ::std::string* hash_function_;
+ ::std::string* username_;
+ ::std::string* salt_;
+ ::std::string* public_b_;
+ bool eligible_credential_upgrade_;
+ friend void TC_PROTO_API protobuf_AddDesc_Login_2eproto();
+ friend void protobuf_AssignDesc_Login_2eproto();
+ friend void protobuf_ShutdownFile_Login_2eproto();
+
+ void InitAsDefaultInstance();
+ static SrpLoginChallenge* default_instance_;
+};
+// -------------------------------------------------------------------
+
class TC_PROTO_API LoginResult : public ::google::protobuf::Message {
public:
LoginResult();
@@ -629,6 +836,18 @@ class TC_PROTO_API LoginResult : public ::google::protobuf::Message {
inline ::std::string* release_login_ticket();
inline void set_allocated_login_ticket(::std::string* login_ticket);
+ // optional string server_evidence_M2 = 6;
+ inline bool has_server_evidence_m2() const;
+ inline void clear_server_evidence_m2();
+ static const int kServerEvidenceM2FieldNumber = 6;
+ inline const ::std::string& server_evidence_m2() const;
+ inline void set_server_evidence_m2(const ::std::string& value);
+ inline void set_server_evidence_m2(const char* value);
+ inline void set_server_evidence_m2(const char* value, size_t size);
+ inline ::std::string* mutable_server_evidence_m2();
+ inline ::std::string* release_server_evidence_m2();
+ inline void set_allocated_server_evidence_m2(::std::string* server_evidence_m2);
+
// @@protoc_insertion_point(class_scope:Battlenet.JSON.Login.LoginResult)
private:
inline void set_has_authentication_state();
@@ -641,6 +860,8 @@ class TC_PROTO_API LoginResult : public ::google::protobuf::Message {
inline void clear_has_url();
inline void set_has_login_ticket();
inline void clear_has_login_ticket();
+ inline void set_has_server_evidence_m2();
+ inline void clear_has_server_evidence_m2();
::google::protobuf::UnknownFieldSet _unknown_fields_;
@@ -650,6 +871,7 @@ class TC_PROTO_API LoginResult : public ::google::protobuf::Message {
::std::string* error_message_;
::std::string* url_;
::std::string* login_ticket_;
+ ::std::string* server_evidence_m2_;
int authentication_state_;
friend void TC_PROTO_API protobuf_AddDesc_Login_2eproto();
friend void protobuf_AssignDesc_Login_2eproto();
@@ -1252,6 +1474,158 @@ FormInputs::mutable_inputs() {
return &inputs_;
}
+// optional string srp_url = 3;
+inline bool FormInputs::has_srp_url() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void FormInputs::set_has_srp_url() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void FormInputs::clear_has_srp_url() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void FormInputs::clear_srp_url() {
+ if (srp_url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_url_->clear();
+ }
+ clear_has_srp_url();
+}
+inline const ::std::string& FormInputs::srp_url() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.FormInputs.srp_url)
+ return *srp_url_;
+}
+inline void FormInputs::set_srp_url(const ::std::string& value) {
+ set_has_srp_url();
+ if (srp_url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_url_ = new ::std::string;
+ }
+ srp_url_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.FormInputs.srp_url)
+}
+inline void FormInputs::set_srp_url(const char* value) {
+ set_has_srp_url();
+ if (srp_url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_url_ = new ::std::string;
+ }
+ srp_url_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.FormInputs.srp_url)
+}
+inline void FormInputs::set_srp_url(const char* value, size_t size) {
+ set_has_srp_url();
+ if (srp_url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_url_ = new ::std::string;
+ }
+ srp_url_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.FormInputs.srp_url)
+}
+inline ::std::string* FormInputs::mutable_srp_url() {
+ set_has_srp_url();
+ if (srp_url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_url_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.FormInputs.srp_url)
+ return srp_url_;
+}
+inline ::std::string* FormInputs::release_srp_url() {
+ clear_has_srp_url();
+ if (srp_url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = srp_url_;
+ srp_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void FormInputs::set_allocated_srp_url(::std::string* srp_url) {
+ if (srp_url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete srp_url_;
+ }
+ if (srp_url) {
+ set_has_srp_url();
+ srp_url_ = srp_url;
+ } else {
+ clear_has_srp_url();
+ srp_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.FormInputs.srp_url)
+}
+
+// optional string srp_js = 4;
+inline bool FormInputs::has_srp_js() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void FormInputs::set_has_srp_js() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void FormInputs::clear_has_srp_js() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void FormInputs::clear_srp_js() {
+ if (srp_js_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_js_->clear();
+ }
+ clear_has_srp_js();
+}
+inline const ::std::string& FormInputs::srp_js() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.FormInputs.srp_js)
+ return *srp_js_;
+}
+inline void FormInputs::set_srp_js(const ::std::string& value) {
+ set_has_srp_js();
+ if (srp_js_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_js_ = new ::std::string;
+ }
+ srp_js_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.FormInputs.srp_js)
+}
+inline void FormInputs::set_srp_js(const char* value) {
+ set_has_srp_js();
+ if (srp_js_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_js_ = new ::std::string;
+ }
+ srp_js_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.FormInputs.srp_js)
+}
+inline void FormInputs::set_srp_js(const char* value, size_t size) {
+ set_has_srp_js();
+ if (srp_js_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_js_ = new ::std::string;
+ }
+ srp_js_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.FormInputs.srp_js)
+}
+inline ::std::string* FormInputs::mutable_srp_js() {
+ set_has_srp_js();
+ if (srp_js_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ srp_js_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.FormInputs.srp_js)
+ return srp_js_;
+}
+inline ::std::string* FormInputs::release_srp_js() {
+ clear_has_srp_js();
+ if (srp_js_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = srp_js_;
+ srp_js_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void FormInputs::set_allocated_srp_js(::std::string* srp_js) {
+ if (srp_js_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete srp_js_;
+ }
+ if (srp_js) {
+ set_has_srp_js();
+ srp_js_ = srp_js;
+ } else {
+ clear_has_srp_js();
+ srp_js_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.FormInputs.srp_js)
+}
+
// -------------------------------------------------------------------
// FormInputValue
@@ -1672,6 +2046,538 @@ LoginForm::mutable_inputs() {
// -------------------------------------------------------------------
+// SrpLoginChallenge
+
+// required uint32 version = 1;
+inline bool SrpLoginChallenge::has_version() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void SrpLoginChallenge::set_has_version() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void SrpLoginChallenge::clear_has_version() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void SrpLoginChallenge::clear_version() {
+ version_ = 0u;
+ clear_has_version();
+}
+inline ::google::protobuf::uint32 SrpLoginChallenge::version() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.version)
+ return version_;
+}
+inline void SrpLoginChallenge::set_version(::google::protobuf::uint32 value) {
+ set_has_version();
+ version_ = value;
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.version)
+}
+
+// required uint32 iterations = 2;
+inline bool SrpLoginChallenge::has_iterations() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void SrpLoginChallenge::set_has_iterations() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void SrpLoginChallenge::clear_has_iterations() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void SrpLoginChallenge::clear_iterations() {
+ iterations_ = 0u;
+ clear_has_iterations();
+}
+inline ::google::protobuf::uint32 SrpLoginChallenge::iterations() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.iterations)
+ return iterations_;
+}
+inline void SrpLoginChallenge::set_iterations(::google::protobuf::uint32 value) {
+ set_has_iterations();
+ iterations_ = value;
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.iterations)
+}
+
+// required string modulus = 3;
+inline bool SrpLoginChallenge::has_modulus() const {
+ return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void SrpLoginChallenge::set_has_modulus() {
+ _has_bits_[0] |= 0x00000004u;
+}
+inline void SrpLoginChallenge::clear_has_modulus() {
+ _has_bits_[0] &= ~0x00000004u;
+}
+inline void SrpLoginChallenge::clear_modulus() {
+ if (modulus_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ modulus_->clear();
+ }
+ clear_has_modulus();
+}
+inline const ::std::string& SrpLoginChallenge::modulus() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.modulus)
+ return *modulus_;
+}
+inline void SrpLoginChallenge::set_modulus(const ::std::string& value) {
+ set_has_modulus();
+ if (modulus_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ modulus_ = new ::std::string;
+ }
+ modulus_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.modulus)
+}
+inline void SrpLoginChallenge::set_modulus(const char* value) {
+ set_has_modulus();
+ if (modulus_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ modulus_ = new ::std::string;
+ }
+ modulus_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.SrpLoginChallenge.modulus)
+}
+inline void SrpLoginChallenge::set_modulus(const char* value, size_t size) {
+ set_has_modulus();
+ if (modulus_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ modulus_ = new ::std::string;
+ }
+ modulus_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.SrpLoginChallenge.modulus)
+}
+inline ::std::string* SrpLoginChallenge::mutable_modulus() {
+ set_has_modulus();
+ if (modulus_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ modulus_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.SrpLoginChallenge.modulus)
+ return modulus_;
+}
+inline ::std::string* SrpLoginChallenge::release_modulus() {
+ clear_has_modulus();
+ if (modulus_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = modulus_;
+ modulus_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void SrpLoginChallenge::set_allocated_modulus(::std::string* modulus) {
+ if (modulus_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete modulus_;
+ }
+ if (modulus) {
+ set_has_modulus();
+ modulus_ = modulus;
+ } else {
+ clear_has_modulus();
+ modulus_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.SrpLoginChallenge.modulus)
+}
+
+// required string generator = 4;
+inline bool SrpLoginChallenge::has_generator() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void SrpLoginChallenge::set_has_generator() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void SrpLoginChallenge::clear_has_generator() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void SrpLoginChallenge::clear_generator() {
+ if (generator_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ generator_->clear();
+ }
+ clear_has_generator();
+}
+inline const ::std::string& SrpLoginChallenge::generator() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.generator)
+ return *generator_;
+}
+inline void SrpLoginChallenge::set_generator(const ::std::string& value) {
+ set_has_generator();
+ if (generator_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ generator_ = new ::std::string;
+ }
+ generator_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.generator)
+}
+inline void SrpLoginChallenge::set_generator(const char* value) {
+ set_has_generator();
+ if (generator_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ generator_ = new ::std::string;
+ }
+ generator_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.SrpLoginChallenge.generator)
+}
+inline void SrpLoginChallenge::set_generator(const char* value, size_t size) {
+ set_has_generator();
+ if (generator_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ generator_ = new ::std::string;
+ }
+ generator_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.SrpLoginChallenge.generator)
+}
+inline ::std::string* SrpLoginChallenge::mutable_generator() {
+ set_has_generator();
+ if (generator_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ generator_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.SrpLoginChallenge.generator)
+ return generator_;
+}
+inline ::std::string* SrpLoginChallenge::release_generator() {
+ clear_has_generator();
+ if (generator_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = generator_;
+ generator_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void SrpLoginChallenge::set_allocated_generator(::std::string* generator) {
+ if (generator_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete generator_;
+ }
+ if (generator) {
+ set_has_generator();
+ generator_ = generator;
+ } else {
+ clear_has_generator();
+ generator_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.SrpLoginChallenge.generator)
+}
+
+// required string hash_function = 5;
+inline bool SrpLoginChallenge::has_hash_function() const {
+ return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void SrpLoginChallenge::set_has_hash_function() {
+ _has_bits_[0] |= 0x00000010u;
+}
+inline void SrpLoginChallenge::clear_has_hash_function() {
+ _has_bits_[0] &= ~0x00000010u;
+}
+inline void SrpLoginChallenge::clear_hash_function() {
+ if (hash_function_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ hash_function_->clear();
+ }
+ clear_has_hash_function();
+}
+inline const ::std::string& SrpLoginChallenge::hash_function() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.hash_function)
+ return *hash_function_;
+}
+inline void SrpLoginChallenge::set_hash_function(const ::std::string& value) {
+ set_has_hash_function();
+ if (hash_function_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ hash_function_ = new ::std::string;
+ }
+ hash_function_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.hash_function)
+}
+inline void SrpLoginChallenge::set_hash_function(const char* value) {
+ set_has_hash_function();
+ if (hash_function_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ hash_function_ = new ::std::string;
+ }
+ hash_function_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.SrpLoginChallenge.hash_function)
+}
+inline void SrpLoginChallenge::set_hash_function(const char* value, size_t size) {
+ set_has_hash_function();
+ if (hash_function_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ hash_function_ = new ::std::string;
+ }
+ hash_function_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.SrpLoginChallenge.hash_function)
+}
+inline ::std::string* SrpLoginChallenge::mutable_hash_function() {
+ set_has_hash_function();
+ if (hash_function_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ hash_function_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.SrpLoginChallenge.hash_function)
+ return hash_function_;
+}
+inline ::std::string* SrpLoginChallenge::release_hash_function() {
+ clear_has_hash_function();
+ if (hash_function_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = hash_function_;
+ hash_function_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void SrpLoginChallenge::set_allocated_hash_function(::std::string* hash_function) {
+ if (hash_function_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete hash_function_;
+ }
+ if (hash_function) {
+ set_has_hash_function();
+ hash_function_ = hash_function;
+ } else {
+ clear_has_hash_function();
+ hash_function_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.SrpLoginChallenge.hash_function)
+}
+
+// required string username = 6;
+inline bool SrpLoginChallenge::has_username() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void SrpLoginChallenge::set_has_username() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void SrpLoginChallenge::clear_has_username() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void SrpLoginChallenge::clear_username() {
+ if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ username_->clear();
+ }
+ clear_has_username();
+}
+inline const ::std::string& SrpLoginChallenge::username() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.username)
+ return *username_;
+}
+inline void SrpLoginChallenge::set_username(const ::std::string& value) {
+ set_has_username();
+ if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ username_ = new ::std::string;
+ }
+ username_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.username)
+}
+inline void SrpLoginChallenge::set_username(const char* value) {
+ set_has_username();
+ if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ username_ = new ::std::string;
+ }
+ username_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.SrpLoginChallenge.username)
+}
+inline void SrpLoginChallenge::set_username(const char* value, size_t size) {
+ set_has_username();
+ if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ username_ = new ::std::string;
+ }
+ username_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.SrpLoginChallenge.username)
+}
+inline ::std::string* SrpLoginChallenge::mutable_username() {
+ set_has_username();
+ if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ username_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.SrpLoginChallenge.username)
+ return username_;
+}
+inline ::std::string* SrpLoginChallenge::release_username() {
+ clear_has_username();
+ if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = username_;
+ username_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void SrpLoginChallenge::set_allocated_username(::std::string* username) {
+ if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete username_;
+ }
+ if (username) {
+ set_has_username();
+ username_ = username;
+ } else {
+ clear_has_username();
+ username_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.SrpLoginChallenge.username)
+}
+
+// required string salt = 7;
+inline bool SrpLoginChallenge::has_salt() const {
+ return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void SrpLoginChallenge::set_has_salt() {
+ _has_bits_[0] |= 0x00000040u;
+}
+inline void SrpLoginChallenge::clear_has_salt() {
+ _has_bits_[0] &= ~0x00000040u;
+}
+inline void SrpLoginChallenge::clear_salt() {
+ if (salt_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ salt_->clear();
+ }
+ clear_has_salt();
+}
+inline const ::std::string& SrpLoginChallenge::salt() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.salt)
+ return *salt_;
+}
+inline void SrpLoginChallenge::set_salt(const ::std::string& value) {
+ set_has_salt();
+ if (salt_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ salt_ = new ::std::string;
+ }
+ salt_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.salt)
+}
+inline void SrpLoginChallenge::set_salt(const char* value) {
+ set_has_salt();
+ if (salt_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ salt_ = new ::std::string;
+ }
+ salt_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.SrpLoginChallenge.salt)
+}
+inline void SrpLoginChallenge::set_salt(const char* value, size_t size) {
+ set_has_salt();
+ if (salt_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ salt_ = new ::std::string;
+ }
+ salt_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.SrpLoginChallenge.salt)
+}
+inline ::std::string* SrpLoginChallenge::mutable_salt() {
+ set_has_salt();
+ if (salt_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ salt_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.SrpLoginChallenge.salt)
+ return salt_;
+}
+inline ::std::string* SrpLoginChallenge::release_salt() {
+ clear_has_salt();
+ if (salt_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = salt_;
+ salt_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void SrpLoginChallenge::set_allocated_salt(::std::string* salt) {
+ if (salt_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete salt_;
+ }
+ if (salt) {
+ set_has_salt();
+ salt_ = salt;
+ } else {
+ clear_has_salt();
+ salt_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.SrpLoginChallenge.salt)
+}
+
+// required string public_B = 8;
+inline bool SrpLoginChallenge::has_public_b() const {
+ return (_has_bits_[0] & 0x00000080u) != 0;
+}
+inline void SrpLoginChallenge::set_has_public_b() {
+ _has_bits_[0] |= 0x00000080u;
+}
+inline void SrpLoginChallenge::clear_has_public_b() {
+ _has_bits_[0] &= ~0x00000080u;
+}
+inline void SrpLoginChallenge::clear_public_b() {
+ if (public_b_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ public_b_->clear();
+ }
+ clear_has_public_b();
+}
+inline const ::std::string& SrpLoginChallenge::public_b() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.public_B)
+ return *public_b_;
+}
+inline void SrpLoginChallenge::set_public_b(const ::std::string& value) {
+ set_has_public_b();
+ if (public_b_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ public_b_ = new ::std::string;
+ }
+ public_b_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.public_B)
+}
+inline void SrpLoginChallenge::set_public_b(const char* value) {
+ set_has_public_b();
+ if (public_b_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ public_b_ = new ::std::string;
+ }
+ public_b_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.SrpLoginChallenge.public_B)
+}
+inline void SrpLoginChallenge::set_public_b(const char* value, size_t size) {
+ set_has_public_b();
+ if (public_b_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ public_b_ = new ::std::string;
+ }
+ public_b_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.SrpLoginChallenge.public_B)
+}
+inline ::std::string* SrpLoginChallenge::mutable_public_b() {
+ set_has_public_b();
+ if (public_b_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ public_b_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.SrpLoginChallenge.public_B)
+ return public_b_;
+}
+inline ::std::string* SrpLoginChallenge::release_public_b() {
+ clear_has_public_b();
+ if (public_b_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = public_b_;
+ public_b_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void SrpLoginChallenge::set_allocated_public_b(::std::string* public_b) {
+ if (public_b_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete public_b_;
+ }
+ if (public_b) {
+ set_has_public_b();
+ public_b_ = public_b;
+ } else {
+ clear_has_public_b();
+ public_b_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.SrpLoginChallenge.public_B)
+}
+
+// optional bool eligible_credential_upgrade = 9;
+inline bool SrpLoginChallenge::has_eligible_credential_upgrade() const {
+ return (_has_bits_[0] & 0x00000100u) != 0;
+}
+inline void SrpLoginChallenge::set_has_eligible_credential_upgrade() {
+ _has_bits_[0] |= 0x00000100u;
+}
+inline void SrpLoginChallenge::clear_has_eligible_credential_upgrade() {
+ _has_bits_[0] &= ~0x00000100u;
+}
+inline void SrpLoginChallenge::clear_eligible_credential_upgrade() {
+ eligible_credential_upgrade_ = false;
+ clear_has_eligible_credential_upgrade();
+}
+inline bool SrpLoginChallenge::eligible_credential_upgrade() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.SrpLoginChallenge.eligible_credential_upgrade)
+ return eligible_credential_upgrade_;
+}
+inline void SrpLoginChallenge::set_eligible_credential_upgrade(bool value) {
+ set_has_eligible_credential_upgrade();
+ eligible_credential_upgrade_ = value;
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.SrpLoginChallenge.eligible_credential_upgrade)
+}
+
+// -------------------------------------------------------------------
+
// LoginResult
// required .Battlenet.JSON.Login.AuthenticationState authentication_state = 1;
@@ -2003,6 +2909,82 @@ inline void LoginResult::set_allocated_login_ticket(::std::string* login_ticket)
// @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.LoginResult.login_ticket)
}
+// optional string server_evidence_M2 = 6;
+inline bool LoginResult::has_server_evidence_m2() const {
+ return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void LoginResult::set_has_server_evidence_m2() {
+ _has_bits_[0] |= 0x00000020u;
+}
+inline void LoginResult::clear_has_server_evidence_m2() {
+ _has_bits_[0] &= ~0x00000020u;
+}
+inline void LoginResult::clear_server_evidence_m2() {
+ if (server_evidence_m2_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ server_evidence_m2_->clear();
+ }
+ clear_has_server_evidence_m2();
+}
+inline const ::std::string& LoginResult::server_evidence_m2() const {
+ // @@protoc_insertion_point(field_get:Battlenet.JSON.Login.LoginResult.server_evidence_M2)
+ return *server_evidence_m2_;
+}
+inline void LoginResult::set_server_evidence_m2(const ::std::string& value) {
+ set_has_server_evidence_m2();
+ if (server_evidence_m2_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ server_evidence_m2_ = new ::std::string;
+ }
+ server_evidence_m2_->assign(value);
+ // @@protoc_insertion_point(field_set:Battlenet.JSON.Login.LoginResult.server_evidence_M2)
+}
+inline void LoginResult::set_server_evidence_m2(const char* value) {
+ set_has_server_evidence_m2();
+ if (server_evidence_m2_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ server_evidence_m2_ = new ::std::string;
+ }
+ server_evidence_m2_->assign(value);
+ // @@protoc_insertion_point(field_set_char:Battlenet.JSON.Login.LoginResult.server_evidence_M2)
+}
+inline void LoginResult::set_server_evidence_m2(const char* value, size_t size) {
+ set_has_server_evidence_m2();
+ if (server_evidence_m2_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ server_evidence_m2_ = new ::std::string;
+ }
+ server_evidence_m2_->assign(reinterpret_cast<const char*>(value), size);
+ // @@protoc_insertion_point(field_set_pointer:Battlenet.JSON.Login.LoginResult.server_evidence_M2)
+}
+inline ::std::string* LoginResult::mutable_server_evidence_m2() {
+ set_has_server_evidence_m2();
+ if (server_evidence_m2_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ server_evidence_m2_ = new ::std::string;
+ }
+ // @@protoc_insertion_point(field_mutable:Battlenet.JSON.Login.LoginResult.server_evidence_M2)
+ return server_evidence_m2_;
+}
+inline ::std::string* LoginResult::release_server_evidence_m2() {
+ clear_has_server_evidence_m2();
+ if (server_evidence_m2_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ return NULL;
+ } else {
+ ::std::string* temp = server_evidence_m2_;
+ server_evidence_m2_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ return temp;
+ }
+}
+inline void LoginResult::set_allocated_server_evidence_m2(::std::string* server_evidence_m2) {
+ if (server_evidence_m2_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+ delete server_evidence_m2_;
+ }
+ if (server_evidence_m2) {
+ set_has_server_evidence_m2();
+ server_evidence_m2_ = server_evidence_m2;
+ } else {
+ clear_has_server_evidence_m2();
+ server_evidence_m2_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ }
+ // @@protoc_insertion_point(field_set_allocated:Battlenet.JSON.Login.LoginResult.server_evidence_M2)
+}
+
// -------------------------------------------------------------------
// LoginRefreshResult
diff --git a/src/server/proto/Login/Login.proto b/src/server/proto/Login/Login.proto
index 58e436166c1..1a3ad954e2a 100644
--- a/src/server/proto/Login/Login.proto
+++ b/src/server/proto/Login/Login.proto
@@ -21,6 +21,8 @@ message FormInput {
message FormInputs {
required FormType type = 1;
repeated FormInput inputs = 2;
+ optional string srp_url = 3;
+ optional string srp_js = 4;
}
message FormInputValue {
@@ -35,6 +37,18 @@ message LoginForm {
repeated FormInputValue inputs = 4;
}
+message SrpLoginChallenge {
+ required uint32 version = 1;
+ required uint32 iterations = 2;
+ required string modulus = 3;
+ required string generator = 4;
+ required string hash_function = 5;
+ required string username = 6;
+ required string salt = 7;
+ required string public_B = 8;
+ optional bool eligible_credential_upgrade = 9;
+}
+
enum AuthenticationState {
LOGIN = 1;
LEGAL = 2;
@@ -48,6 +62,7 @@ message LoginResult {
optional string error_message = 3;
optional string url = 4;
optional string login_ticket = 5;
+ optional string server_evidence_M2 = 6;
}
message LoginRefreshResult {