addressbook: Add date parameter to authentication strings

This commit is contained in:
zzz
2017-02-27 19:50:21 +00:00
parent 8d928eadba
commit 2de25ca453

View File

@@ -396,6 +396,8 @@ public class HostTxtEntry {
throw new IllegalStateException();
props.setProperty(PROP_NAME, name);
props.setProperty(PROP_DEST, dest);
if (!props.containsKey(PROP_DATE))
props.setProperty(PROP_DATE, Long.toString(System.currentTimeMillis() / 1000));
StringWriter buf = new StringWriter(1024);
try {
writeProps(buf);
@@ -418,6 +420,8 @@ public class HostTxtEntry {
throw new IllegalStateException();
if (props.containsKey(sigprop))
throw new IllegalStateException();
if (!props.containsKey(PROP_DATE))
props.setProperty(PROP_DATE, Long.toString(System.currentTimeMillis() / 1000));
StringWriter buf = new StringWriter(1024);
buf.append(name);
buf.append(KV_SEPARATOR);