forked from I2P_Developers/i2p.i2p
OCMOSJ: Don't create unused objects for ECIES
This commit is contained in:
@ -104,9 +104,11 @@ class OutboundClientMessageJobHelper {
|
||||
* @param dataClove may be null for ECIES-layer ack
|
||||
* @param tagsToSendOverride if > 0, use this instead of skm's default
|
||||
* @param lowTagsOverride if > 0, use this instead of skm's default
|
||||
* @param wrappedKey non-null with null data,
|
||||
* output parameter that will be filled with the SessionKey used
|
||||
* @param wrappedTags output parameter that will be filled with the sessionTags used
|
||||
* @param wrappedKey for ElGamal, non-null with null data,
|
||||
* output parameter that will be filled with the SessionKey used,
|
||||
* may be null for ECIES
|
||||
* @param wrappedTags for ElGamal, output parameter that will be filled with the sessionTags used,
|
||||
* may be null for ECIES
|
||||
* @param replyTunnel non-null if requireAck is true or bundledReplyLeaseSet is non-null
|
||||
* @param requireAck if true, bundle replyToken in an ack clove
|
||||
* @param bundledReplyLeaseSet may be null; if non-null, put it in a clove
|
||||
|
@ -699,8 +699,15 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
clove = null;
|
||||
}
|
||||
|
||||
SessionKey sessKey = new SessionKey();
|
||||
Set<SessionTag> tags = new HashSet<SessionTag>();
|
||||
SessionKey sessKey;
|
||||
Set<SessionTag> tags;
|
||||
if (_encryptionKey.getType() == EncType.ECIES_X25519) {
|
||||
sessKey = null;
|
||||
tags = null;
|
||||
} else {
|
||||
sessKey = new SessionKey();
|
||||
tags = new HashSet<SessionTag>();
|
||||
}
|
||||
|
||||
// Per-message flag > 0 overrides per-session option
|
||||
int tagsToSend = SendMessageOptions.getTagsToSend(sendFlags);
|
||||
|
Reference in New Issue
Block a user