forked from I2P_Developers/i2p.i2p
update version
This commit is contained in:
@ -178,7 +178,7 @@ public class EditBean extends IndexBean {
|
||||
return getBooleanProperty(tunnel, "i2cp.encryptLeaseSet");
|
||||
}
|
||||
|
||||
/** @since 0.9.11 */
|
||||
/** @since 0.9.12 */
|
||||
public int getSigType(int tunnel) {
|
||||
return getProperty(tunnel, I2PClient.PROP_SIGTYPE, 0);
|
||||
}
|
||||
@ -351,7 +351,7 @@ public class EditBean extends IndexBean {
|
||||
return Addresses.getAllAddresses();
|
||||
}
|
||||
|
||||
/** @since 0.9.11 */
|
||||
/** @since 0.9.12 */
|
||||
public boolean isAdvanced() {
|
||||
return _context.getBooleanProperty("routerconsole.advanced");
|
||||
}
|
||||
|
@ -964,7 +964,7 @@ public class IndexBean {
|
||||
_certSigner = val;
|
||||
}
|
||||
|
||||
/** @since 0.9.11 */
|
||||
/** @since 0.9.12 */
|
||||
public void setSigType(String val) {
|
||||
if (val != null) {
|
||||
_otherOptions.put(I2PClient.PROP_SIGTYPE, val);
|
||||
|
@ -260,7 +260,7 @@ public class I2PSocketManagerFactory {
|
||||
|
||||
/**
|
||||
* @param opts may be null
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
private static SigType getSigType(Properties opts) {
|
||||
if (opts != null) {
|
||||
|
@ -238,7 +238,7 @@ public class AddressBean
|
||||
|
||||
/**
|
||||
* Do this the easy way
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public String getSigType() {
|
||||
// (4 / 3) * (pubkey length + signing key length)
|
||||
|
@ -41,9 +41,9 @@ public interface I2PClient {
|
||||
/** @since 0.8.1 */
|
||||
public final static String PROP_RELIABILITY_NONE = "none";
|
||||
|
||||
/** @since 0.9.11 */
|
||||
/** @since 0.9.12 */
|
||||
public static final String PROP_SIGTYPE = "i2cp.destination.sigType";
|
||||
/** @since 0.9.11 */
|
||||
/** @since 0.9.12 */
|
||||
public static final SigType DEFAULT_SIGTYPE = SigType.DSA_SHA1;
|
||||
|
||||
/**
|
||||
@ -97,7 +97,7 @@ public interface I2PClient {
|
||||
*
|
||||
* @param destKeyStream location to write out the destination, PrivateKey, and SigningPrivateKey,
|
||||
* format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public Destination createDestination(OutputStream destKeyStream, SigType type) throws I2PException, IOException;
|
||||
|
||||
|
@ -58,7 +58,7 @@ class I2PClientImpl implements I2PClient {
|
||||
*
|
||||
* @param destKeyStream location to write out the destination, PrivateKey, and SigningPrivateKey,
|
||||
* format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public Destination createDestination(OutputStream destKeyStream, SigType type) throws I2PException, IOException {
|
||||
Certificate cert;
|
||||
|
@ -33,7 +33,7 @@ public class I2PSimpleClient implements I2PClient {
|
||||
/**
|
||||
* @deprecated Don't do this
|
||||
* @throws UnsupportedOperationException always
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public Destination createDestination(OutputStream destKeyStream, SigType type) throws I2PException, IOException {
|
||||
throw new UnsupportedOperationException();
|
||||
|
@ -93,7 +93,7 @@ public class DSAEngine {
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify using any sig type as of 0.9.11 (DSA only prior to that)
|
||||
* Verify using any sig type as of 0.9.12 (DSA only prior to that)
|
||||
*/
|
||||
public boolean verifySignature(Signature signature, byte signedData[], int offset, int size, SigningPublicKey verifyingKey) {
|
||||
boolean rv;
|
||||
@ -266,7 +266,7 @@ public class DSAEngine {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sign using any key type as of 0.9.11 (DSA-SHA1 only prior to that)
|
||||
* Sign using any key type as of 0.9.12 (DSA-SHA1 only prior to that)
|
||||
*
|
||||
* @return null on error
|
||||
*/
|
||||
@ -495,7 +495,7 @@ public class DSAEngine {
|
||||
/**
|
||||
* Generic verify DSA_SHA1, ECDSA, or RSA
|
||||
* @throws GeneralSecurityException if algorithm unvailable or on other errors
|
||||
* @since 0.9.9 added off/len 0.9.11
|
||||
* @since 0.9.9 added off/len 0.9.12
|
||||
*/
|
||||
private boolean altVerifySig(Signature signature, byte[] data, int offset, int len, SigningPublicKey verifyingKey)
|
||||
throws GeneralSecurityException {
|
||||
@ -555,7 +555,7 @@ public class DSAEngine {
|
||||
/**
|
||||
* Alternate to verifySignature() using java.security libraries.
|
||||
* @throws GeneralSecurityException if algorithm unvailable or on other errors
|
||||
* @since 0.8.7 added off/len 0.9.11
|
||||
* @since 0.8.7 added off/len 0.9.12
|
||||
*/
|
||||
private boolean altVerifySigSHA1(Signature signature, byte[] data, int offset,
|
||||
int len, SigningPublicKey verifyingKey) throws GeneralSecurityException {
|
||||
@ -574,7 +574,7 @@ public class DSAEngine {
|
||||
/**
|
||||
* Generic sign DSA_SHA1, ECDSA, or RSA
|
||||
* @throws GeneralSecurityException if algorithm unvailable or on other errors
|
||||
* @since 0.9.9 added off/len 0.9.11
|
||||
* @since 0.9.9 added off/len 0.9.12
|
||||
*/
|
||||
private Signature altSign(byte[] data, int offset, int len,
|
||||
SigningPrivateKey privateKey) throws GeneralSecurityException {
|
||||
@ -624,7 +624,7 @@ public class DSAEngine {
|
||||
/**
|
||||
* Alternate to sign() using java.security libraries.
|
||||
* @throws GeneralSecurityException if algorithm unvailable or on other errors
|
||||
* @since 0.8.7 added off/len args 0.9.11
|
||||
* @since 0.8.7 added off/len args 0.9.12
|
||||
*/
|
||||
private Signature altSignSHA1(byte[] data, int offset, int len,
|
||||
SigningPrivateKey privateKey) throws GeneralSecurityException {
|
||||
|
@ -177,7 +177,7 @@ public enum SigType {
|
||||
*
|
||||
* @param stype number or name
|
||||
* @return null if not found
|
||||
* @since 0.9.9 moved from SU3File in 0.9.11
|
||||
* @since 0.9.9 moved from SU3File in 0.9.12
|
||||
*/
|
||||
public static SigType parseSigType(String stype) {
|
||||
try {
|
||||
|
@ -42,7 +42,7 @@ public class Certificate extends DataStructureImpl {
|
||||
public final static int CERTIFICATE_LENGTH_SIGNED_WITH_HASH = Signature.SIGNATURE_BYTES + Hash.HASH_LENGTH;
|
||||
/** Contains multiple certs */
|
||||
public final static int CERTIFICATE_TYPE_MULTIPLE = 4;
|
||||
/** @since 0.9.11 */
|
||||
/** @since 0.9.12 */
|
||||
public final static int CERTIFICATE_TYPE_KEY = 5;
|
||||
|
||||
/**
|
||||
@ -218,7 +218,7 @@ public class Certificate extends DataStructureImpl {
|
||||
* Up-convert this to a KeyCertificate
|
||||
*
|
||||
* @throws DataFormatException if cert type != CERTIFICATE_TYPE_KEY
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public KeyCertificate toKeyCertificate() throws DataFormatException {
|
||||
if (_type != CERTIFICATE_TYPE_KEY)
|
||||
|
@ -11,7 +11,7 @@ import net.i2p.crypto.SigType;
|
||||
*
|
||||
* The crypto type is assumed to be always 0x0000 (ElG) for now.
|
||||
*
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public class KeyCertificate extends Certificate {
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class KeysAndCert extends DataStructureImpl {
|
||||
|
||||
/**
|
||||
* @throws IllegalStateException if was already set
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public void setPadding(byte[] padding) {
|
||||
if (_padding != null)
|
||||
|
@ -227,7 +227,7 @@ public class PrivateKeyFile {
|
||||
/**
|
||||
* Change cert type - caller must also call write().
|
||||
* Side effect - creates new Destination object.
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public Certificate setKeyCert(SigType type) {
|
||||
if (type == SigType.DSA_SHA1)
|
||||
|
@ -116,7 +116,7 @@ public class SigningPublicKey extends SimpleDataStructure {
|
||||
* Up-convert this from an untyped (type 0) SPK to a typed SPK based on the Key Cert given
|
||||
*
|
||||
* @throws IllegalArgumentException if this is already typed to a different type
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public SigningPublicKey toTypedKey(KeyCertificate kcert) {
|
||||
if (_data == null)
|
||||
@ -147,7 +147,7 @@ public class SigningPublicKey extends SimpleDataStructure {
|
||||
*
|
||||
* @return leading padding length > 0 or null
|
||||
* @throws IllegalArgumentException if this is already typed to a different type
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public byte[] getPadding(KeyCertificate kcert) {
|
||||
if (_data == null)
|
||||
@ -169,7 +169,7 @@ public class SigningPublicKey extends SimpleDataStructure {
|
||||
/**
|
||||
* Write the data up to a max of 128 bytes.
|
||||
* If longer, the rest will be written in the KeyCertificate.
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
public void writeTruncatedBytes(OutputStream out) throws DataFormatException, IOException {
|
||||
if (_type.getPubkeyLen() <= KEYSIZE_BYTES)
|
||||
|
@ -501,11 +501,11 @@ class StoreJob extends JobImpl {
|
||||
return VersionComparator.comp(v, MIN_ENCRYPTION_VERSION) >= 0;
|
||||
}
|
||||
|
||||
private static final String MIN_KEYCERT_VERSION = "0.9.11";
|
||||
private static final String MIN_KEYCERT_VERSION = "0.9.12";
|
||||
|
||||
/**
|
||||
* Does he support key certs (assumed with a non-DSA key)?
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
private static boolean supportsKeyCerts(RouterInfo ri) {
|
||||
String v = ri.getOption("router.version");
|
||||
@ -518,7 +518,7 @@ class StoreJob extends JobImpl {
|
||||
|
||||
/**
|
||||
* Does he support more than 6 leasesets?
|
||||
* @since 0.9.11
|
||||
* @since 0.9.12
|
||||
*/
|
||||
private static boolean supportsBigLeaseSets(RouterInfo ri) {
|
||||
String v = ri.getOption("router.version");
|
||||
|
Reference in New Issue
Block a user