Router: Prep for RI sig types:

- New router.sigType config
 - Generate / regenerate router keys based on config
 - New router.keys2 file format for sig types and padding
 - Fix RouterInfo.readBytes() signature verification with sig types
 - Catch unset padding in KeysAndCert.writeBytes()
 - Catch key errors in ReadRouterJob
 - Show RI sig type on /netdb in console
 - Move some things from Router to startup classes
 - Startup classes package private
 - Buffer readin of key files
 - Remove configurability of router.info and router.keys file locations
This commit is contained in:
zzz
2014-08-23 23:48:16 +00:00
parent d7feab116f
commit 593779b54f
16 changed files with 252 additions and 87 deletions

View File

@ -114,6 +114,8 @@ public class KeysAndCert extends DataStructureImpl {
_publicKey.writeBytes(out);
if (_padding != null)
out.write(_padding);
else if (_signingKey.length() < SigningPublicKey.KEYSIZE_BYTES)
throw new DataFormatException("No padding set");
_signingKey.writeTruncatedBytes(out);
_certificate.writeBytes(out);
}