public class BlocklistEntries extends Object
Represents a signed blocklist containing router identifiers to be blocked or unblocked, with support for cryptographic signature verification and timestamp validation.
Provides methods for loading, verifying, and managing blocklist entries with security checks to prevent expired or invalid blocklists. Includes command-line tool for creating signed blocklist files from input text.
All String fields may be null to accommodate optional metadata elements in blocklist feeds.
| Modifier and Type | Field and Description |
|---|---|
List<String> |
entries
List of entries to block.
|
static int |
MAX_ENTRIES
Maximum number of entries allowed in a blocklist.
|
static long |
MAX_FUTURE |
List<String> |
removes
List of entries to unblock.
|
String |
sig
Signature in type:base64 format.
|
String |
signer
Signer certificate name.
|
String |
supdated
Updated timestamp as ISO 3339 date string.
|
long |
updated
Updated timestamp as milliseconds since epoch.
|
| Constructor and Description |
|---|
BlocklistEntries(int capacity)
Creates a new BlocklistEntries with the specified capacity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isVerified()
Check if the blocklist signature has been verified.
|
static void |
main(String[] args)
BlocklistEntries [-p keystorepw] input.txt keystore.ks you@mail.i2p
File format: One entry per line, # starts a comment, ! starts an unblock entry.
|
boolean |
verify(I2PAppContext ctx)
Verify the blocklist signature.
|
public final List<String> entries
public static final int MAX_ENTRIES
public static final long MAX_FUTURE
public String sig
public String signer
public String supdated
public long updated
public BlocklistEntries(int capacity)
capacity - the initial capacity for the entries listpublic boolean isVerified()
public static void main(String[] args)
public boolean verify(I2PAppContext ctx)
ctx - the application context