diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/OtrService.java | 3 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/generator/IqGenerator.java | 22 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/generator/MessageGenerator.java | 7 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 2 | ||||
-rw-r--r-- | src/main/res/values-de/strings.xml | 2 | ||||
-rw-r--r-- | src/main/res/values-es/strings.xml | 12 | ||||
-rw-r--r-- | src/main/res/values-eu/strings.xml | 12 | ||||
-rw-r--r-- | src/main/res/values-nb-rNO/strings.xml | 19 |
9 files changed, 70 insertions, 11 deletions
@@ -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 3663cd3b..55f4ebb5 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 cb9ffd96..8393a011 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 f5c701cc..d0c20ad5 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 ef5ff854..d80f44f4 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 8cd814f2..34aea49a 100644 --- a/src/main/res/values-de/strings.xml +++ b/src/main/res/values-de/strings.xml @@ -541,7 +541,7 @@ <string name="jid_does_not_match_certificate">Jabber-ID stimmt nicht dem Zertifikat überein</string> <string name="action_renew_certificate">Zertifikat erneuern</string> <string name="error_fetching_omemo_key">Kann OMEMO-Schlüssel nicht empfangen!</string> - <string name="verified_omemo_key_with_certificate">Überprüfter OMEMO-Schlüssel mit Zertifikat!</string> + <string name="verified_omemo_key_with_certificate">OMEMO-Schlüssel mit Zertifikat bestätigt!</string> <string name="device_does_not_support_certificates">Dein Gerät unterstützt das Auswählen von Client-Zertifikaten nicht!</string> <string name="pref_connection_options">Verbindung</string> <string name="pref_use_tor">Über Tor verbinden</string> diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml index 90f80086..f2ebafe9 100644 --- a/src/main/res/values-es/strings.xml +++ b/src/main/res/values-es/strings.xml @@ -332,6 +332,7 @@ <string name="message_options">Opciones de mensaje</string> <string name="copy_text">Copiar texto</string> <string name="select_text">Seleccionar texto</string> + <string name="quote">Citar</string> <string name="copy_original_url">Copiar URL original</string> <string name="send_again">Volver a enviar</string> <string name="file_url">URL de archivo</string> @@ -679,4 +680,15 @@ <string name="blindly_trusted_omemo_keys">Huellas digitales OMEMO de confianza ciega</string> <string name="not_trusted">No confiables</string> <string name="invalid_barcode">Código QR inválido</string> + <string name="pref_clean_cache_summary">Limpiar caché de datos (usado por la aplicación de la cámara)</string> + <string name="pref_clean_cache">Limpiar caché</string> + <string name="pref_clean_private_storage">Limpiar datos privados</string> + <string name="pref_clean_private_storage_summary">Limpiar datos privados de ficheros descargados (Pueden volver a descargarse desde el servidor)</string> + <string name="i_followed_this_link_from_a_trusted_source">Enlace desde una fuente de confianza</string> + <string name="verifying_omemo_keys_trusted_source">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</string> + <string name="verify_omemo_keys">Verificar claves OMEMO</string> + <string name="show_inactive_devices">Mostrar dispositivos inactivos</string> + <string name="hide_inactive_devices">Ocultar dispositivos inactivos</string> + <string name="distrust_omemo_key">Desconfiar de este dispositivo</string> + <string name="distrust_omemo_key_text">¿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.</string> </resources> diff --git a/src/main/res/values-eu/strings.xml b/src/main/res/values-eu/strings.xml index 76d86b0c..25122722 100644 --- a/src/main/res/values-eu/strings.xml +++ b/src/main/res/values-eu/strings.xml @@ -332,6 +332,7 @@ <string name="message_options">Mezuaren aukerak</string> <string name="copy_text">Testua kopiatu</string> <string name="select_text">Testua hautatu</string> + <string name="quote">Aipatu</string> <string name="copy_original_url">Jatorrizko URLa kopiatu</string> <string name="send_again">Berriro bidali</string> <string name="file_url">Fitxategiaren URLa</string> @@ -679,4 +680,15 @@ <string name="blindly_trusted_omemo_keys">Itsuki fidatutako OMEMO gakoak</string> <string name="not_trusted">Ez fidagarria</string> <string name="invalid_barcode">2D barra kodea baliogabea</string> + <string name="pref_clean_cache_summary">Cachearen karpeta garbitu (kameraren aplikazioak erabiltzen du)</string> + <string name="pref_clean_cache">Cachea garbitu</string> + <string name="pref_clean_private_storage">Biltegi pribatua garbitu</string> + <string name="pref_clean_private_storage_summary">Fitxategiak gordetzeko erabiltzen den biltegi pribatua garbitu (zerbitzaritik berriro deskargatu daitezke)</string> + <string name="i_followed_this_link_from_a_trusted_source">Lotura hau jatorri fidagarri batetik jarraitu dut</string> + <string name="verifying_omemo_keys_trusted_source">%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.</string> + <string name="verify_omemo_keys">OMEMO gakoak egiaztatu</string> + <string name="show_inactive_devices">Erabiltzen ez diren gailuak erakutsi</string> + <string name="hide_inactive_devices">Erabiltzen ez diren gailuak ezkutatu</string> + <string name="distrust_omemo_key">Gailu ez fidagarria</string> + <string name="distrust_omemo_key_text">Gailu honen egiaztapena ezabatu nahi duzulaz ziur al zaude?\nGailu hau eta beregandik datozen mezuak ez fidagarriak bezala markatuko dira.</string> </resources> diff --git a/src/main/res/values-nb-rNO/strings.xml b/src/main/res/values-nb-rNO/strings.xml index 7c27f88f..cbec9c46 100644 --- a/src/main/res/values-nb-rNO/strings.xml +++ b/src/main/res/values-nb-rNO/strings.xml @@ -295,7 +295,7 @@ <string name="pref_force_encryption_summary">Alltid send meldinger kryptert (bortsett fra konferanser)</string> <string name="pref_allow_message_correction">Tillat meldingskorrigering</string> <string name="pref_allow_message_correction_summary">La dine kontakter korrigere sine meldinger i ettertid</string> - <string name="pref_dont_save_encrypted">Ikke lagre krypterte meldinger</string> + <string name="pref_dont_save_encrypted">Ikke lagre krypt. meldinger</string> <string name="pref_dont_save_encrypted_summary">Advarsel: Dette kan føre til at meldinger går tapt</string> <string name="pref_expert_options">Ekspertinnstillinger</string> <string name="pref_expert_options_summary">Vær forsiktig med disse</string> @@ -315,7 +315,7 @@ <string name="pref_expert_options_other">Annet</string> <string name="pref_conference_name">Konferanse-rom</string> <string name="pref_conference_name_summary">Bruk rommets samtaletema istedenfor JID til å identifisere konferanser</string> - <string name="pref_autojoin">Ta del i konferanser automatisk</string> + <string name="pref_autojoin">Gå rett inn i konferanser</string> <string name="pref_autojoin_summary">Respekter flagget for automatisk tilknytning i konferansebokmerker</string> <string name="toast_message_otr_fingerprint">OTR-fingeravtrykk kopiert til utklippstavle!</string> <string name="toast_message_omemo_fingerprint">OMEMO-fingeravtrykk kopiert til utklippstavle!</string> @@ -332,6 +332,7 @@ <string name="message_options">Meldingsvalg</string> <string name="copy_text">Kopier tekst</string> <string name="select_text">Velg tekst</string> + <string name="quote">Sitat</string> <string name="copy_original_url">Kopier orginal nettadresse</string> <string name="send_again">Send igjen</string> <string name="file_url">Filens nettadresse</string> @@ -449,7 +450,7 @@ <string name="eight_hours">8 timer</string> <string name="until_further_notice">Til videre beskjed</string> <string name="pref_input_options">Inndata</string> - <string name="pref_enter_is_send">Enter er forsendelsesknapp</string> + <string name="pref_enter_is_send">Enter-forsendelsesknapp</string> <string name="pref_enter_is_send_summary">Bruk enter for å sende en melding</string> <string name="pref_display_enter_key">Vis enter-tast</string> <string name="pref_display_enter_key_summary">Endre smilefjas-tast til en enter-tast</string> @@ -520,11 +521,11 @@ <string name="pref_presence_settings">Tilstedeværelse</string> <string name="pref_away_when_screen_off">Borte når skjermen er av</string> <string name="pref_away_when_screen_off_summary">Markerer din ressurs som borte når skjermen er avskrudd</string> - <string name="pref_xa_on_silent_mode">Ikke tilgjengelig i stille-modus</string> + <string name="pref_xa_on_silent_mode">Stille-tilgjengelighet</string> <string name="pref_xa_on_silent_mode_summary">Markerer din ressurs som \'ikke tilgjengelig\' når enheten er i stille-modus.</string> <string name="pref_treat_vibrate_as_silent">Behandle vibrering som stille-modus</string> <string name="pref_treat_vibrate_as_silent_summary">Markerer din ressurs som ikke tilgjengelig når enheten er skrudd til vibrering</string> - <string name="pref_show_connection_options">Utvidede tilkoblingsinnstillinger</string> + <string name="pref_show_connection_options">Utvidede tilkoblingsinnst.</string> <string name="pref_show_connection_options_summary">Vis vertsnavn og portinnstillinger når du setter opp en ny konto</string> <string name="hostname_example">xmpp.eksempel.no</string> <string name="action_add_account_with_certificate">Legg til konto med sertifikat</string> @@ -600,7 +601,7 @@ <string name="create_account">Opprett konto</string> <string name="use_own_provider">Bruk min egen tilbyder</string> <string name="pick_your_username">Velg ditt brukernavn</string> - <string name="pref_manually_change_presence">Endre tilstedeværelse manuelt</string> + <string name="pref_manually_change_presence">Egendef. tilstedeværelse</string> <string name="pref_manually_change_presence_summary">Trykk på avataren din for å endre tilstedeværelse</string> <string name="change_presence">Endre tilstedeværelse</string> <string name="status_message">Statusmelding</string> @@ -679,6 +680,12 @@ <string name="blindly_trusted_omemo_keys">OMEMO-nøkler du stoler blindt på</string> <string name="not_trusted">Ikke betrodd</string> <string name="invalid_barcode">Ugyldig 2D-strekkode</string> + <string name="pref_clean_cache_summary">Tøm hurtiglagermappa (brukes av kameraprogrammet)</string> + <string name="pref_clean_cache">Tøm hurtiglager</string> + <string name="pref_clean_private_storage">Tøm privat lagring</string> + <string name="pref_clean_private_storage_summary">Tøm privat lagring der filene beholdes (De kan lastes ned igjen fra tjeneren)</string> + <string name="i_followed_this_link_from_a_trusted_source">Jeg fulgte denne lenken fra en tiltrodd kilde</string> + <string name="verifying_omemo_keys_trusted_source">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.</string> <string name="verify_omemo_keys">Bekreft OMEMO-nøkler</string> <string name="show_inactive_devices">Vis inaktive enheter</string> <string name="hide_inactive_devices">Skjul inaktive enheter</string> |