summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-22 10:26:01 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-22 10:27:06 (GMT)
commita393a4ac64abb24b0fc2cb0e3e154706013d7803 (patch)
tree2ae8c502b0a465ab202e9f38ae9fd7dd176c92ca /Swiften/SASL
parent2df5e148de44c6c91c5a28d197b8b2b913ca80d4 (diff)
downloadswift-a393a4ac64abb24b0fc2cb0e3e154706013d7803.zip
swift-a393a4ac64abb24b0fc2cb0e3e154706013d7803.tar.bz2
Stringprep SCRAM-SHA-1 authcid.
Diffstat (limited to 'Swiften/SASL')
-rw-r--r--Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp3
-rw-r--r--Swiften/SASL/SConscript12
2 files changed, 14 insertions, 1 deletions
diff --git a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp
index 15c8ab6..b0a9f96 100644
--- a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp
+++ b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp
@@ -8,6 +8,7 @@
#include "Swiften/StringCodecs/Base64.h"
#include "Swiften/StringCodecs/HMACSHA1.h"
#include "Swiften/StringCodecs/PBKDF2.h"
+#include "Swiften/StringPrep/StringPrep.h"
namespace Swift {
@@ -87,7 +88,7 @@ std::map<char, String> SCRAMSHA1ClientAuthenticator::parseMap(const String& s) {
}
ByteArray SCRAMSHA1ClientAuthenticator::getInitialBareClientMessage() const {
- String authenticationID = getAuthenticationID();
+ String authenticationID = StringPrep::getPrepared(getAuthenticationID(), StringPrep::SASLPrep);
String escapedAuthenticationID;
for (size_t i = 0; i < authenticationID.getUTF8Size(); ++i) {
if (authenticationID[i] == ',') {
diff --git a/Swiften/SASL/SConscript b/Swiften/SASL/SConscript
new file mode 100644
index 0000000..22b242e
--- /dev/null
+++ b/Swiften/SASL/SConscript
@@ -0,0 +1,12 @@
+Import("swiften_env")
+
+myenv = swiften_env.Clone()
+myenv.MergeFlags(swiften_env["LIBIDN_FLAGS"])
+
+objects = myenv.StaticObject([
+ "ClientAuthenticator.cpp",
+ "PLAINClientAuthenticator.cpp",
+ "PLAINMessage.cpp",
+ "SCRAMSHA1ClientAuthenticator.cpp",
+ ])
+swiften_env.Append(SWIFTEN_OBJECTS = [objects])