upgrade dnsjava (#924)

This commit is contained in:
m2049r 2024-01-13 17:33:23 +01:00 committed by GitHub
parent 04d0bd2ffb
commit 0652a8ba14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -155,8 +155,7 @@ dependencies {
implementation fileTree(dir: 'libs/classes', include: ['*.jar']) implementation fileTree(dir: 'libs/classes', include: ['*.jar'])
implementation 'com.nulab-inc:zxcvbn:1.8.2' implementation 'com.nulab-inc:zxcvbn:1.8.2'
implementation 'dnsjava:dnsjava:2.1.9' implementation 'dnsjava:dnsjava:3.5.3'
implementation 'org.jitsi:dnssecjava:1.2.0'
implementation 'org.slf4j:slf4j-nop:2.0.11' implementation 'org.slf4j:slf4j-nop:2.0.11'
implementation 'com.github.brnunes:swipeablerecyclerview:1.0.2' implementation 'com.github.brnunes:swipeablerecyclerview:1.0.2'

View File

@ -23,7 +23,6 @@ import android.os.AsyncTask;
import com.m2049r.xmrwallet.data.BarcodeData; import com.m2049r.xmrwallet.data.BarcodeData;
import com.m2049r.xmrwallet.data.Crypto; import com.m2049r.xmrwallet.data.Crypto;
import org.jitsi.dnssec.validator.ValidatingResolver;
import org.xbill.DNS.DClass; import org.xbill.DNS.DClass;
import org.xbill.DNS.Flags; import org.xbill.DNS.Flags;
import org.xbill.DNS.Message; import org.xbill.DNS.Message;
@ -35,9 +34,11 @@ import org.xbill.DNS.Section;
import org.xbill.DNS.SimpleResolver; import org.xbill.DNS.SimpleResolver;
import org.xbill.DNS.TXTRecord; import org.xbill.DNS.TXTRecord;
import org.xbill.DNS.Type; import org.xbill.DNS.Type;
import org.xbill.DNS.dnssec.ValidatingResolver;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -107,7 +108,7 @@ public class OpenAliasHelper {
SimpleResolver sr = new SimpleResolver(DNSSEC_SERVERS[new Random().nextInt(DNSSEC_SERVERS.length)]); SimpleResolver sr = new SimpleResolver(DNSSEC_SERVERS[new Random().nextInt(DNSSEC_SERVERS.length)]);
ValidatingResolver vr = new ValidatingResolver(sr); ValidatingResolver vr = new ValidatingResolver(sr);
vr.setTimeout(0, DNS_LOOKUP_TIMEOUT); vr.setTimeout(0, DNS_LOOKUP_TIMEOUT);
vr.loadTrustAnchors(new ByteArrayInputStream(ROOT.getBytes("ASCII"))); vr.loadTrustAnchors(new ByteArrayInputStream(ROOT.getBytes(StandardCharsets.US_ASCII)));
Record qr = Record.newRecord(Name.fromConstantString(name + "."), Type.TXT, DClass.IN); Record qr = Record.newRecord(Name.fromConstantString(name + "."), Type.TXT, DClass.IN);
Message response = vr.send(Message.newQuery(qr)); Message response = vr.send(Message.newQuery(qr));
final int rcode = response.getRcode(); final int rcode = response.getRcode();