diff --git a/pokerth_game.pro b/pokerth_game.pro index e8a5628b..13e0b90a 100644 --- a/pokerth_game.pro +++ b/pokerth_game.pro @@ -322,6 +322,7 @@ win32 { -lgcrypt \ -ltasn1 \ -lgpg-error \ + -lidn \ -lgsasl LIBS += -lcurl LIBS += -lz diff --git a/pokerth_server.pro b/pokerth_server.pro index 85ca17d5..3e8c0218 100644 --- a/pokerth_server.pro +++ b/pokerth_server.pro @@ -134,7 +134,7 @@ win32 { } win32-g++ { - LIBS += -lgnutls-openssl -lgnutls -lgcrypt -ltasn1 -lgpg-error -lgsasl + LIBS += -lgnutls-openssl -lgnutls -lgcrypt -ltasn1 -lgpg-error -lidn -lgsasl LIBS += -lcurl LIBS += -lz LIBS += -llibboost_thread-mgw44-mt diff --git a/src/net/common/sessiondata.cpp b/src/net/common/sessiondata.cpp index 934695a5..409698f9 100644 --- a/src/net/common/sessiondata.cpp +++ b/src/net/common/sessiondata.cpp @@ -96,10 +96,10 @@ SessionData::CreateClientAuthSession(Gsasl *context, const string &userName, con errorCode = gsasl_client_start(context, "SCRAM-SHA-1", &m_authSession); if (errorCode == GSASL_OK) { - char *base64User = NULL; - gsasl_base64_to(userName.c_str(), userName.length(), &base64User, NULL); - gsasl_property_set(m_authSession, GSASL_AUTHID, base64User); - gsasl_free(base64User); + //char *base64User = NULL; + //gsasl_base64_to(userName.c_str(), userName.length(), &base64User, NULL); + gsasl_property_set(m_authSession, GSASL_AUTHID, userName.c_str()); + //gsasl_free(base64User); gsasl_property_set(m_authSession, GSASL_PASSWORD, password.c_str()); @@ -141,14 +141,15 @@ SessionData::AuthGetUser() const string retStr; if (m_authSession) { - char *base64User = NULL; - size_t lenBase64User = 0; + //char *base64User = NULL; + //size_t lenBase64User = 0; const char *tmpUser = gsasl_property_fast(m_authSession, GSASL_AUTHID); - gsasl_base64_from(tmpUser, strlen(tmpUser), &base64User, &lenBase64User); - if (base64User) + //gsasl_base64_from(tmpUser, strlen(tmpUser), &base64User, &lenBase64User); + if (tmpUser) { - retStr = string(base64User, lenBase64User); - gsasl_free(base64User); + //retStr = string(base64User, lenBase64User); + retStr = tmpUser; + //gsasl_free(base64User); } } return retStr;