mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Implement BQP transport descriptors
This commit is contained in:
@@ -19,4 +19,7 @@ public interface PluginManager {
|
||||
|
||||
/** Returns any running duplex plugins that support invitations. */
|
||||
Collection<DuplexPlugin> getInvitationPlugins();
|
||||
|
||||
/** Returns any running duplex plugins that support key agreement. */
|
||||
Collection<DuplexPlugin> getKeyAgreementPlugins();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package org.briarproject.api.plugins.duplex;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
import org.briarproject.api.crypto.PseudoRandom;
|
||||
import org.briarproject.api.keyagreement.KeyAgreementListener;
|
||||
import org.briarproject.api.keyagreement.TransportDescriptor;
|
||||
import org.briarproject.api.plugins.Plugin;
|
||||
|
||||
/** An interface for transport plugins that support duplex communication. */
|
||||
@@ -24,4 +26,19 @@ public interface DuplexPlugin extends Plugin {
|
||||
*/
|
||||
DuplexTransportConnection createInvitationConnection(PseudoRandom r,
|
||||
long timeout, boolean alice);
|
||||
|
||||
/** Returns true if the plugin supports short-range key agreement. */
|
||||
boolean supportsKeyAgreement();
|
||||
|
||||
/**
|
||||
* Returns a listener that can be used to perform key agreement.
|
||||
*/
|
||||
KeyAgreementListener createKeyAgreementListener(byte[] localCommitment);
|
||||
|
||||
/**
|
||||
* Attempts to connect to the remote peer specified in the given descriptor.
|
||||
* Returns null if no connection can be established within the given time.
|
||||
*/
|
||||
DuplexTransportConnection createKeyAgreementConnection(
|
||||
byte[] remoteCommitment, TransportDescriptor d, long timeout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user