diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-10-11 20:45:01 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-10-11 20:45:01 +0200 |
commit | b519411d34da07d9b249f921548b079666b2cc18 (patch) | |
tree | 86474ac5dd0f9aefbb48d5a714d1d844e1ef45ac /src/main/java/eu/siacs/conversations/crypto | |
parent | 7be331bbb2ae2abde55eb031f4fdf4616846360e (diff) |
enable SASL EXTERNAL (certificate login
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/sasl/External.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/sasl/External.java b/src/main/java/eu/siacs/conversations/crypto/sasl/External.java new file mode 100644 index 000000000..df92898c1 --- /dev/null +++ b/src/main/java/eu/siacs/conversations/crypto/sasl/External.java @@ -0,0 +1,29 @@ +package eu.siacs.conversations.crypto.sasl; + +import android.util.Base64; +import java.security.SecureRandom; + +import eu.siacs.conversations.entities.Account; +import eu.siacs.conversations.xml.TagWriter; + +public class External extends SaslMechanism { + + public External(TagWriter tagWriter, Account account, SecureRandom rng) { + super(tagWriter, account, rng); + } + + @Override + public int getPriority() { + return 25; + } + + @Override + public String getMechanism() { + return "EXTERNAL"; + } + + @Override + public String getClientFirstMessage() { + return Base64.encodeToString(account.getJid().toBareJid().toString().getBytes(),Base64.NO_WRAP); + } +} |