diff --git a/README.md b/README.md
index 79c704138..e7ba4bb73 100644
--- a/README.md
+++ b/README.md
@@ -298,7 +298,7 @@ To use OpenPGP you have to install the open source app
manage accounts and choose renew PGP announcement from the contextual menu.
#### OMEMO is grayed out. What do I do?
-OMEMO has two requirements: Your server and the server of your contact need to support PEP. Both of you can verify that individually by opening your account details and selecting ```Server info``` from the menu. The appearing table should list PEP as available. The second requirement is mutual presence subscription. You can verify that be going into the contact details and see if the both check boxes *Send presence updates* and *Receive presence updates* are checked.
+OMEMO has two requirements: Your server and the server of your contact need to support PEP. Both of you can verify that individually by opening your account details and selecting ```Server info``` from the menu. The appearing table should list PEP as available. The second requirement is mutual presence subscription. You can verify that be opening the contact details and see if the both check boxes *Send presence updates* and *Receive presence updates* are checked.
#### How does the encryption for conferences work?
diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrService.java b/src/main/java/eu/siacs/conversations/crypto/OtrService.java
index 3663cd3be..55f4ebb53 100644
--- a/src/main/java/eu/siacs/conversations/crypto/OtrService.java
+++ b/src/main/java/eu/siacs/conversations/crypto/OtrService.java
@@ -194,8 +194,9 @@ public class OtrService extends OtrCryptoEngineImpl implements OtrEngineHost {
} catch (final InvalidJidException ignored) {
}
-
packet.setType(MessagePacket.TYPE_CHAT);
+ packet.addChild("encryption","urn:xmpp:eme:0")
+ .setAttribute("namespace","urn:xmpp:otr:0");
account.getXmppConnection().sendMessagePacket(packet);
}
diff --git a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java
index cb9ffd96f..8393a0115 100644
--- a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java
+++ b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java
@@ -10,12 +10,15 @@ import org.whispersystems.libaxolotl.ecc.ECPublicKey;
import org.whispersystems.libaxolotl.state.PreKeyRecord;
import org.whispersystems.libaxolotl.state.SignedPreKeyRecord;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TimeZone;
+import java.util.UUID;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
@@ -315,7 +318,7 @@ public class IqGenerator extends AbstractGenerator {
IqPacket packet = new IqPacket(IqPacket.TYPE.GET);
packet.setTo(host);
Element request = packet.addChild("request", Xmlns.HTTP_UPLOAD);
- request.addChild("filename").setContent(file.getName());
+ request.addChild("filename").setContent(convertFilename(file.getName()));
request.addChild("size").setContent(String.valueOf(file.getExpectedSize()));
if (mime != null) {
request.addChild("content-type").setContent(mime);
@@ -323,6 +326,23 @@ public class IqGenerator extends AbstractGenerator {
return packet;
}
+ private static String convertFilename(String name) {
+ int pos = name.indexOf('.');
+ if (pos != -1) {
+ try {
+ UUID uuid = UUID.fromString(name.substring(0, pos));
+ ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
+ bb.putLong(uuid.getMostSignificantBits());
+ bb.putLong(uuid.getLeastSignificantBits());
+ return Base64.encodeToString(bb.array(), Base64.URL_SAFE) + name.substring(pos, name.length());
+ } catch (Exception e) {
+ return name;
+ }
+ } else {
+ return name;
+ }
+ }
+
public IqPacket generateCreateAccountWithCaptcha(Account account, String id, Data data) {
final IqPacket register = new IqPacket(IqPacket.TYPE.SET);
register.setFrom(account.getJid().toBareJid());
diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
index f5c701cc2..d0c20ad5b 100644
--- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
+++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
@@ -79,6 +79,9 @@ public class MessageGenerator extends AbstractGenerator {
packet.setBody(OMEMO_FALLBACK_MESSAGE);
}
packet.addChild("store", "urn:xmpp:hints");
+ packet.addChild("encryption","urn:xmpp:eme:0")
+ .setAttribute("name","OMEMO")
+ .setAttribute("namespace",AxolotlService.PEP_PREFIX);
return packet;
}
@@ -109,6 +112,8 @@ public class MessageGenerator extends AbstractGenerator {
content = message.getBody();
}
packet.setBody(otrSession.transformSending(content)[0]);
+ packet.addChild("encryption","urn:xmpp:eme:0")
+ .setAttribute("namespace","urn:xmpp:otr:0");
return packet;
} catch (OtrException e) {
return null;
@@ -139,6 +144,8 @@ public class MessageGenerator extends AbstractGenerator {
} else if (message.getEncryption() == Message.ENCRYPTION_PGP) {
packet.addChild("x", "jabber:x:encrypted").setContent(message.getBody());
}
+ packet.addChild("encryption","urn:xmpp:eme:0")
+ .setAttribute("namespace","jabber:x:encrypted");
return packet;
}
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index ef5ff854c..d80f44f47 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -1255,7 +1255,7 @@ public class XmppConnection implements Runnable {
}
private String nextRandomId() {
- return new BigInteger(50, mXmppConnectionService.getRNG()).toString(32);
+ return new BigInteger(50, mXmppConnectionService.getRNG()).toString(36);
}
public String sendIqPacket(final IqPacket packet, final OnIqPacketReceived callback) {
diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
index 8cd814f27..34aea49a2 100644
--- a/src/main/res/values-de/strings.xml
+++ b/src/main/res/values-de/strings.xml
@@ -541,7 +541,7 @@
Jabber-ID stimmt nicht dem Zertifikat überein
Zertifikat erneuern
Kann OMEMO-Schlüssel nicht empfangen!
- Überprüfter OMEMO-Schlüssel mit Zertifikat!
+ OMEMO-Schlüssel mit Zertifikat bestätigt!
Dein Gerät unterstützt das Auswählen von Client-Zertifikaten nicht!
Verbindung
Über Tor verbinden
diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml
index 90f800863..f2ebafe92 100644
--- a/src/main/res/values-es/strings.xml
+++ b/src/main/res/values-es/strings.xml
@@ -332,6 +332,7 @@
Opciones de mensaje
Copiar texto
Seleccionar texto
+ Citar
Copiar URL original
Volver a enviar
URL de archivo
@@ -679,4 +680,15 @@
Huellas digitales OMEMO de confianza ciega
No confiables
Código QR inválido
+ Limpiar caché de datos (usado por la aplicación de la cámara)
+ Limpiar caché
+ Limpiar datos privados
+ Limpiar datos privados de ficheros descargados (Pueden volver a descargarse desde el servidor)
+ Enlace desde una fuente de confianza
+ Vas a verificar las claves OMEMO de %1$s después de hacer click en el enlace. Esto solo es seguro si conseguiste este enlace desde una fuente de confianza donde solo %2$s pudo haber publicado el enlace
+ Verificar claves OMEMO
+ Mostrar dispositivos inactivos
+ Ocultar dispositivos inactivos
+ Desconfiar de este dispositivo
+ ¿Estás seguro que quieres eliminar la verificación de este dispositivo?\nEste dispositivo y los mensajes que lleguen desde allí serán marcados como no confiables.
diff --git a/src/main/res/values-eu/strings.xml b/src/main/res/values-eu/strings.xml
index 76d86b0cf..25122722c 100644
--- a/src/main/res/values-eu/strings.xml
+++ b/src/main/res/values-eu/strings.xml
@@ -332,6 +332,7 @@
Mezuaren aukerak
Testua kopiatu
Testua hautatu
+ Aipatu
Jatorrizko URLa kopiatu
Berriro bidali
Fitxategiaren URLa
@@ -679,4 +680,15 @@
Itsuki fidatutako OMEMO gakoak
Ez fidagarria
2D barra kodea baliogabea
+ Cachearen karpeta garbitu (kameraren aplikazioak erabiltzen du)
+ Cachea garbitu
+ Biltegi pribatua garbitu
+ Fitxategiak gordetzeko erabiltzen den biltegi pribatua garbitu (zerbitzaritik berriro deskargatu daitezke)
+ Lotura hau jatorri fidagarri batetik jarraitu dut
+ %1$s(r)en OMEMO gakoak egiaztatuko dira lotura batean sakatu ondoren. Hau segurua da soilik lotura hau jatorri fidagarri batetik jarraitu baduzu eta soilik %2$s(e)k argitaratu izan ahal badu.
+ OMEMO gakoak egiaztatu
+ Erabiltzen ez diren gailuak erakutsi
+ Erabiltzen ez diren gailuak ezkutatu
+ Gailu ez fidagarria
+ Gailu honen egiaztapena ezabatu nahi duzulaz ziur al zaude?\nGailu hau eta beregandik datozen mezuak ez fidagarriak bezala markatuko dira.
diff --git a/src/main/res/values-nb-rNO/strings.xml b/src/main/res/values-nb-rNO/strings.xml
index 7c27f88fb..cbec9c466 100644
--- a/src/main/res/values-nb-rNO/strings.xml
+++ b/src/main/res/values-nb-rNO/strings.xml
@@ -295,7 +295,7 @@
Alltid send meldinger kryptert (bortsett fra konferanser)
Tillat meldingskorrigering
La dine kontakter korrigere sine meldinger i ettertid
- Ikke lagre krypterte meldinger
+ Ikke lagre krypt. meldinger
Advarsel: Dette kan føre til at meldinger går tapt
Ekspertinnstillinger
Vær forsiktig med disse
@@ -315,7 +315,7 @@
Annet
Konferanse-rom
Bruk rommets samtaletema istedenfor JID til å identifisere konferanser
- Ta del i konferanser automatisk
+ Gå rett inn i konferanser
Respekter flagget for automatisk tilknytning i konferansebokmerker
OTR-fingeravtrykk kopiert til utklippstavle!
OMEMO-fingeravtrykk kopiert til utklippstavle!
@@ -332,6 +332,7 @@
Meldingsvalg
Kopier tekst
Velg tekst
+ Sitat
Kopier orginal nettadresse
Send igjen
Filens nettadresse
@@ -449,7 +450,7 @@
8 timer
Til videre beskjed
Inndata
- Enter er forsendelsesknapp
+ Enter-forsendelsesknapp
Bruk enter for å sende en melding
Vis enter-tast
Endre smilefjas-tast til en enter-tast
@@ -520,11 +521,11 @@
Tilstedeværelse
Borte når skjermen er av
Markerer din ressurs som borte når skjermen er avskrudd
- Ikke tilgjengelig i stille-modus
+ Stille-tilgjengelighet
Markerer din ressurs som \'ikke tilgjengelig\' når enheten er i stille-modus.
Behandle vibrering som stille-modus
Markerer din ressurs som ikke tilgjengelig når enheten er skrudd til vibrering
- Utvidede tilkoblingsinnstillinger
+ Utvidede tilkoblingsinnst.
Vis vertsnavn og portinnstillinger når du setter opp en ny konto
xmpp.eksempel.no
Legg til konto med sertifikat
@@ -600,7 +601,7 @@
Opprett konto
Bruk min egen tilbyder
Velg ditt brukernavn
- Endre tilstedeværelse manuelt
+ Egendef. tilstedeværelse
Trykk på avataren din for å endre tilstedeværelse
Endre tilstedeværelse
Statusmelding
@@ -679,6 +680,12 @@
OMEMO-nøkler du stoler blindt på
Ikke betrodd
Ugyldig 2D-strekkode
+ Tøm hurtiglagermappa (brukes av kameraprogrammet)
+ Tøm hurtiglager
+ Tøm privat lagring
+ Tøm privat lagring der filene beholdes (De kan lastes ned igjen fra tjeneren)
+ Jeg fulgte denne lenken fra en tiltrodd kilde
+ Du er i ferd med å bekrefte at OMEMO-nøklene til %1$s etter å ha trykket på en lenke. Dette er bare sikkert hvis du fulgte denne lenken fra en tiltrodd kilde der bare %2$s kunne ha offentliggjort denne lenken.
Bekreft OMEMO-nøkler
Vis inaktive enheter
Skjul inaktive enheter