mirror of
https://github.com/ChronosX88/Influence-P2P.git
synced 2024-11-21 23:02:18 +00:00
Added patched TomP2P and disable signature encoding/decoding
This commit is contained in:
parent
55b298678d
commit
233fa69193
@ -38,14 +38,11 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs/tomp2p')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
||||
implementation "androidx.room:room-runtime:2.1.0-alpha04"
|
||||
annotationProcessor "androidx.room:room-compiler:2.1.0-alpha04"
|
||||
implementation('net.tomp2p:tomp2p-all:5.0-Beta8') {
|
||||
exclude group: 'net.tomp2p', module: 'tomp2p-storage'
|
||||
exclude group: 'org.mapdb', module: 'mapdb'
|
||||
}
|
||||
implementation 'org.slf4j:slf4j-log4j12:1.7.26'
|
||||
implementation group: 'com.h2database', name: 'h2-mvstore', version: '1.4.197'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha04'
|
||||
|
Binary file not shown.
BIN
app/libs/tomp2p-all-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p-all-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/gcm-server-1.0.2.jar
Normal file
BIN
app/libs/tomp2p/gcm-server-1.0.2.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/json-simple-1.1.jar
Normal file
BIN
app/libs/tomp2p/json-simple-1.1.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/netty-buffer-4.0.28.Final.jar
Normal file
BIN
app/libs/tomp2p/netty-buffer-4.0.28.Final.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/netty-common-4.0.28.Final.jar
Normal file
BIN
app/libs/tomp2p/netty-common-4.0.28.Final.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/netty-transport-4.0.28.Final.jar
Normal file
BIN
app/libs/tomp2p/netty-transport-4.0.28.Final.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/slf4j-api-1.7.5.jar
Normal file
BIN
app/libs/tomp2p/slf4j-api-1.7.5.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/tomp2p-all-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p/tomp2p-all-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/tomp2p-android-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p/tomp2p-android-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/tomp2p-core-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p/tomp2p-core-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/tomp2p-dht-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p/tomp2p-dht-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/tomp2p-nat-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p/tomp2p-nat-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/tomp2p-replication-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p/tomp2p-replication-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/tomp2p-tracker-5.0-Beta8.jar
Normal file
BIN
app/libs/tomp2p/tomp2p-tracker-5.0-Beta8.jar
Normal file
Binary file not shown.
BIN
app/libs/tomp2p/weupnp-0.1.2.jar
Normal file
BIN
app/libs/tomp2p/weupnp-0.1.2.jar
Normal file
Binary file not shown.
@ -47,16 +47,10 @@ class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBi
|
||||
if (!retVal) {
|
||||
Log.e(LOG_TAG, "# ERROR: Data could not be deserialized!")
|
||||
}
|
||||
retVal = data.decodeDone(buf, signatureFactory)
|
||||
if (!retVal) {
|
||||
Log.e(LOG_TAG, "# ERROR: Signature could not be read!")
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
override fun objectToEntry(data: Data, databaseEntry: DatabaseEntry) {
|
||||
val forSigningKP = keyPairManager.getKeyPair("mainSigningKeyPair")
|
||||
data.sign(forSigningKP)
|
||||
val out = ByteArrayOutputStream()
|
||||
val acb = AlternativeCompositeByteBuf.compBuffer(AlternativeCompositeByteBuf.UNPOOLED_HEAP)
|
||||
try {
|
||||
@ -68,8 +62,8 @@ class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBi
|
||||
// from memory
|
||||
writeData(out, data.toByteBuffers())
|
||||
// rest
|
||||
data.encodeDone(acb, signatureFactory)
|
||||
writeData(out, acb.nioBuffers())
|
||||
// data.encodeDone(acb, signatureFactory)
|
||||
// writeData(out, acb.nioBuffers())
|
||||
} catch (e: SignatureException) {
|
||||
e.printStackTrace()
|
||||
} catch (e: InvalidKeyException) {
|
||||
@ -98,7 +92,6 @@ class DataSerializerEx(private val signatureFactory: SignatureFactory) : EntryBi
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID = 1428836065493792295L
|
||||
private val keyPairManager = KeyPairManager()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user