1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Smack 4.1.7

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJXD/2lXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41rggH/0DjBLpCfTSdjjKGFNChc+1V
 dW9PaPGFUiPuTt3T2NEa74jGYe4PsPpy5zDsJ8uYi2aq3LAiCQvfk+F5LXjRJFoa
 eftz0GtPvfP42oFg8wyDAebFtb0OtE7aJueSRkYGhA1+kzHBbJ9s6TxqDWcB0UWC
 puLh/DEWDFGX5njln+l10O7b10G0+bSrvece22eP0sQIv4hvZJoPQ5rOpCR1wibL
 ldp6wXI6C/b/oQS9MjHq9SV10S+5GykBqN/UzcFnwRVHLbasqnXeNFLGOnMtx0g9
 DmOolAYKGBN5m7m0rqEj9R+OyNgtefV8sCHE69iNAlpQhbmTqPd5rIhIXIII4U4=
 =yWKV
 -----END PGP SIGNATURE-----

Merge tag '4.1.7'

Smack 4.1.7
This commit is contained in:
Florian Schmaus 2016-04-14 22:30:34 +02:00
commit b94b2586e2
7 changed files with 51 additions and 9 deletions

View file

@ -141,6 +141,26 @@ hr {
<div id="pageBody">
<h2>4.1.7 -- <span style="font-weight: normal;">2016-04-14</span></h2>
<h2> Bug
</h2>
<ul>
<li>[<a href='https://igniterealtime.org/issues/browse/SMACK-712'>SMACK-712</a>] - XMPPTCPConnection&#39;s setEnabledSSL(Protocols|Ciphers) has no effect
</li>
<li>[<a href='https://igniterealtime.org/issues/browse/SMACK-716'>SMACK-716</a>] - EntityTimeManager.getTime() does not set the recipients JID
</li>
<li>[<a href='https://igniterealtime.org/issues/browse/SMACK-719'>SMACK-719</a>] - XMPPError should use Locale.US in toUpperCase()
</li>
</ul>
<h2> Improvement
</h2>
<ul>
<li>[<a href='https://igniterealtime.org/issues/browse/SMACK-715'>SMACK-715</a>] - Add Roster.setRosterLoadedAtLoginDefault(boolean)
</li>
</ul>
<h2>4.1.6 -- <span style="font-weight: normal;">2016-01-23</span></h2>
<h2> Bug

View file

@ -57,6 +57,6 @@ public final class StanzaTypeFilter implements StanzaFilter {
@Override
public String toString() {
return getClass().getSimpleName() + ": " + packetType.getName();
return getClass().getSimpleName() + ": " + packetType.getSimpleName();
}
}

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smack.packet;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Logger;
@ -361,13 +362,11 @@ public class XMPPError extends AbstractError {
@Override
public String toString() {
// Locale.US not required, since Type consists only of ASCII chars
return name().toLowerCase();
return name().toLowerCase(Locale.US);
}
public static Type fromString(String string) {
// Locale.US not required, since Type consists only of ASCII chars
string = string.toUpperCase();
string = string.toUpperCase(Locale.US);
return Type.valueOf(string);
}
}

View file

@ -108,6 +108,8 @@ public final class EntityTimeManager extends Manager {
return null;
Time request = new Time();
// TODO Add Time(Jid) constructor and use this constructor instead
request.setTo(jid);
Time response = (Time) connection().createPacketCollectorAndSend(request).nextResultOrThrow();
return response;
}

View file

@ -1061,6 +1061,18 @@ public final class Roster extends Manager {
}
}
/**
* Sets if the roster will be loaded from the server when logging in for newly created instances
* of {@link Roster}.
*
* @param rosterLoadedAtLoginDefault if the roster will be loaded from the server when logging in.
* @see #setRosterLoadedAtLogin(boolean)
* @since 4.1.7
*/
public static void setRosterLoadedAtLoginDefault(boolean rosterLoadedAtLoginDefault) {
Roster.rosterLoadedAtLoginDefault = rosterLoadedAtLoginDefault;
}
/**
* Sets if the roster will be loaded from the server when logging in. This
* is the common behaviour for clients but sometimes clients may want to differ this

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2014 Florian Schmaus
* Copyright 2014-2016 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -32,6 +32,7 @@ import de.measite.minidns.Question;
import de.measite.minidns.Record;
import de.measite.minidns.Record.CLASS;
import de.measite.minidns.Record.TYPE;
import de.measite.minidns.record.Data;
import de.measite.minidns.record.SRV;
@ -81,7 +82,11 @@ public class MiniDnsResolver implements SmackInitializer, DNSResolver {
return res;
}
for (Record record : message.getAnswers()) {
SRV srv = (SRV) record.getPayload();
Data data = record.getPayload();
if (!(data instanceof SRV)) {
continue;
}
SRV srv = (SRV) data;
res.add(new SRVRecord(srv.getName(), srv.getPort(), srv.getPriority(), srv.getWeight()));
}
return res;

View file

@ -741,12 +741,16 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
// Secure the plain connection
socket = context.getSocketFactory().createSocket(plain,
host, plain.getPort(), true);
// Initialize the reader and writer with the new secured version
initReaderAndWriter();
final SSLSocket sslSocket = (SSLSocket) socket;
// Immediately set the enabled SSL protocols and ciphers. See SMACK-712 why this is
// important (at least on certain platforms) and it seems to be a good idea anyways to
// prevent an accidental implicit handshake.
TLSUtils.setEnabledProtocolsAndCiphers(sslSocket, config.getEnabledSSLProtocols(), config.getEnabledSSLCiphers());
// Initialize the reader and writer with the new secured version
initReaderAndWriter();
// Proceed to do the handshake
sslSocket.startHandshake();