Skip to content
Snippets Groups Projects
Commit 11ea898b authored by akwizgran's avatar akwizgran
Browse files

Erase the tag key after use.

parent c0c6af7a
No related branches found
No related tags found
No related merge requests found
<project name='prototype' default='compile'>
<fileset id='prototype-jars' dir='../libs'>
<include name='*.jar'/>
</fileset>
<path id='android-jar'>
<pathelement location='../android.jar'/>
</path>
<path id='prototype-classes'>
<pathelement location='../build'/>
</path>
<target name='clean'>
<delete dir='../build'/>
</target>
<target name='compile'>
<mkdir dir='../build'/>
<javac srcdir='net/sf/briar' destdir='../build' source='1.5'
includeantruntime='false' debug='off'>
<classpath>
<fileset id='prototype-jars' dir='../libs'>
<include name='*.jar'/>
</fileset>
<path id='android-jar'>
<pathelement location='../android.jar'/>
</path>
<path id='prototype-classes'>
<pathelement location='../build'/>
</path>
<target name='clean'>
<delete dir='../build'/>
</target>
<target name='compile'>
<mkdir dir='../build'/>
<javac srcdir='net/sf/briar' destdir='../build' source='1.5'
includeantruntime='false' debug='off'>
<classpath>
<fileset refid='prototype-jars'/>
<path refid='android-jar'/>
<path refid='prototype-classes'/>
</classpath>
</javac>
</target>
</classpath>
</javac>
</target>
</project>
......@@ -55,7 +55,7 @@ class TransportConnectionRecogniser {
for(long connection1 : window.setSeen(connection)) {
byte[] tag1 = new byte[TAG_LENGTH];
crypto.encodeTag(tag1, cipher, key, connection1);
if(connection1 <= connection) {
if(connection1 < connection) {
TagContext old = tagMap.remove(new Bytes(tag1));
assert old != null;
ByteUtils.erase(old.context.getSecret());
......@@ -95,6 +95,7 @@ class TransportConnectionRecogniser {
TagContext old = tagMap.put(new Bytes(tag), tctx);
assert old == null;
}
key.erase();
// Create a removal context to remove the window later
RemovalContext rctx = new RemovalContext(window, secret, alice);
removalMap.put(new RemovalKey(contactId, period), rctx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment