Skip to content

Commit 19a5426

Browse files
committed
Keystore is induced to an asap peer from the outside now. Extended SharkTestPeer accordingly.
1 parent 6092165 commit 19a5426

5 files changed

Lines changed: 7 additions & 1 deletion

File tree

SharkPeerUI.jar

2.06 KB
Binary file not shown.

libs/ASAPHub.jar

1.23 KB
Binary file not shown.

libs/ASAPJava.jar

725 Bytes
Binary file not shown.

src/net/sharksystem/SharkPeer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ void removeComponent(Class<? extends SharkComponent> facade)
5959
* Start the Shark peer. An ASAP peer will be launched with listening to all format from all
6060
* components. Components can neither be added nor withdrawn after launch.
6161
* @throws SharkException Exception can only be caused by ASAP peer launch
62+
* @deprecated only for tests acceptable. A blank asap peer will be created; no keystore would be set.
63+
* No cryptography whatsoever would function.
6264
*/
6365
void start(CharSequence peerID) throws SharkException;
6466

src/net/sharksystem/SharkTestPeerFS.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import net.sharksystem.asap.ASAPException;
44
import net.sharksystem.asap.apps.testsupport.ASAPTestPeerFS;
5+
import net.sharksystem.asap.crypto.InMemoASAPKeyStore;
56
import net.sharksystem.fs.FSUtils;
67

78
import java.io.IOException;
@@ -24,7 +25,10 @@ public SharkTestPeerFS(CharSequence sharkName, CharSequence rootFolder) {
2425
}
2526

2627
protected ASAPTestPeerFS createASAPPeer(CharSequence peerID) throws IOException, ASAPException {
27-
return new ASAPTestPeerFS(peerID, this.rootFolder, this.components.keySet());
28+
ASAPTestPeerFS testPeer = new ASAPTestPeerFS(peerID, this.rootFolder, this.components.keySet());
29+
// add key store
30+
testPeer.setASAPKeyStore(new InMemoASAPKeyStore(peerID));
31+
return testPeer;
2832
}
2933

3034
public ASAPTestPeerFS getASAPTestPeerFS() throws SharkException {

0 commit comments

Comments
 (0)