Refactoring: renamed 'security' to 'cryptography'
This commit is contained in:
parent
fa766cb6f1
commit
5d1d2ee98a
@ -43,7 +43,7 @@ dependencies {
|
|||||||
compile 'ch.dissem.jabit:jabit-domain:0.2.1-SNAPSHOT'
|
compile 'ch.dissem.jabit:jabit-domain:0.2.1-SNAPSHOT'
|
||||||
compile 'ch.dissem.jabit:jabit-networking:0.2.1-SNAPSHOT'
|
compile 'ch.dissem.jabit:jabit-networking:0.2.1-SNAPSHOT'
|
||||||
compile 'ch.dissem.jabit:jabit-repositories:0.2.1-SNAPSHOT'
|
compile 'ch.dissem.jabit:jabit-repositories:0.2.1-SNAPSHOT'
|
||||||
compile 'ch.dissem.jabit:jabit-security-bouncy:0.2.1-SNAPSHOT'
|
compile 'ch.dissem.jabit:jabit-cryptography-bouncy:0.2.1-SNAPSHOT'
|
||||||
compile 'ch.dissem.jabit:jabit-extensions:0.2.1-SNAPSHOT'
|
compile 'ch.dissem.jabit:jabit-extensions:0.2.1-SNAPSHOT'
|
||||||
|
|
||||||
compile 'com.h2database:h2:1.4.187'
|
compile 'com.h2database:h2:1.4.187'
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
package ch.dissem.bitmessage.server;
|
package ch.dissem.bitmessage.server;
|
||||||
|
|
||||||
import ch.dissem.bitmessage.BitmessageContext;
|
import ch.dissem.bitmessage.BitmessageContext;
|
||||||
|
import ch.dissem.bitmessage.cryptography.bc.BouncyCryptography;
|
||||||
import ch.dissem.bitmessage.entity.BitmessageAddress;
|
import ch.dissem.bitmessage.entity.BitmessageAddress;
|
||||||
import ch.dissem.bitmessage.networking.DefaultNetworkHandler;
|
import ch.dissem.bitmessage.networking.DefaultNetworkHandler;
|
||||||
import ch.dissem.bitmessage.ports.*;
|
import ch.dissem.bitmessage.ports.*;
|
||||||
import ch.dissem.bitmessage.repository.*;
|
import ch.dissem.bitmessage.repository.*;
|
||||||
import ch.dissem.bitmessage.security.bc.BouncySecurity;
|
|
||||||
import ch.dissem.bitmessage.server.repository.ServerProofOfWorkRepository;
|
import ch.dissem.bitmessage.server.repository.ServerProofOfWorkRepository;
|
||||||
import ch.dissem.bitmessage.utils.Singleton;
|
import ch.dissem.bitmessage.utils.Singleton;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -82,10 +82,10 @@ public class JabitServerConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Security security() {
|
public Cryptography cryptography() {
|
||||||
BouncySecurity security = new BouncySecurity();
|
BouncyCryptography cryptography = new BouncyCryptography();
|
||||||
Singleton.initialize(security); // needed for admins and clients
|
Singleton.initialize(cryptography); // needed for admins and clients
|
||||||
return security;
|
return cryptography;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ -113,7 +113,7 @@ public class JabitServerConfig {
|
|||||||
.networkHandler(networkHandler())
|
.networkHandler(networkHandler())
|
||||||
.listener(serverListener())
|
.listener(serverListener())
|
||||||
.customCommandHandler(commandHandler())
|
.customCommandHandler(commandHandler())
|
||||||
.security(security())
|
.cryptography(cryptography())
|
||||||
.port(port)
|
.port(port)
|
||||||
.connectionLimit(connectionLimit)
|
.connectionLimit(connectionLimit)
|
||||||
.connectionTTL(connectionTTL)
|
.connectionTTL(connectionTTL)
|
||||||
@ -122,7 +122,7 @@ public class JabitServerConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Set<BitmessageAddress> admins() {
|
public Set<BitmessageAddress> admins() {
|
||||||
security();
|
cryptography();
|
||||||
return Utils.readOrCreateList(
|
return Utils.readOrCreateList(
|
||||||
ADMIN_LIST,
|
ADMIN_LIST,
|
||||||
"# Admins can send commands to the server.\n"
|
"# Admins can send commands to the server.\n"
|
||||||
@ -131,7 +131,7 @@ public class JabitServerConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Set<BitmessageAddress> clients() {
|
public Set<BitmessageAddress> clients() {
|
||||||
security();
|
cryptography();
|
||||||
return Utils.readOrCreateList(
|
return Utils.readOrCreateList(
|
||||||
CLIENT_LIST,
|
CLIENT_LIST,
|
||||||
"# Clients may send incomplete objects for proof of work.\n"
|
"# Clients may send incomplete objects for proof of work.\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user