Addressbook: Store last-modified date

SusiDNS: Display signature validation on details page
This commit is contained in:
zzz
2016-04-23 17:11:50 +00:00
parent d97908b430
commit f72753f3eb
4 changed files with 11 additions and 0 deletions

View File

@@ -373,6 +373,7 @@ public class Daemon {
". From: " + addressbook.getLocation());
}
allowExistingKeyInPublished = true;
props.setProperty("m", Long.toString(I2PAppContext.getGlobalContext().clock().now()));
} else {
// mismatch, disallow
logMismatch(log, action, key, pod2, polddest, addressbook);
@@ -447,6 +448,7 @@ public class Daemon {
} else if (action.equals(HostTxtEntry.ACTION_UPDATE)) {
if (isKnown) {
allowExistingKeyInPublished = true;
props.setProperty("m", Long.toString(I2PAppContext.getGlobalContext().clock().now()));
}
} else {
if (log != null)

View File

@@ -202,6 +202,10 @@ public class AddressBean
return getDate("m");
}
/** @since 0.9.26 */
public boolean isValidated() {
return Boolean.valueOf(getProp("v"));
}
/** @since 0.8.7 */
public String getNotes() {

View File

@@ -119,6 +119,9 @@
<td><%=intl._t("Added Date")%></td>
<td><%=addr.getAdded()%></td>
</tr><tr class="list${book.trClass}">
<td><%=intl._t("Validated")%></td>
<td><%=addr.isValidated() ? intl._t("yes") : intl._t("no")%></td>
</tr><tr class="list${book.trClass}">
<td><%=intl._t("Source")%></td>
<td><%=addr.getSource()%></td>
</tr><tr class="list${book.trClass}">

View File

@@ -132,7 +132,9 @@ public class BlockfileNamingService extends DummyNamingService {
private static final String VERSION = "4";
private static final String PROP_ADDED = "a";
private static final String PROP_MODDED = "m";
private static final String PROP_SOURCE = "s";
private static final String PROP_VALIDATED = "v";
private static final String DUMMY = "";
private static final int NEGATIVE_CACHE_SIZE = 32;