File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed
main/java/org/fisco/bcos/sdk/v3/config/model Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,19 @@ public CryptoMaterialConfig(ConfigProperty configProperty) throws ConfigExceptio
52
52
53
53
Map <String , Object > cryptoMaterialProperty = configProperty .getCryptoMaterial ();
54
54
String useSMCrypto = (String ) cryptoMaterialProperty .get ("useSMCrypto" );
55
- String disableSsl = (String ) cryptoMaterialProperty .get ("disableSsl" );
55
+ Object disableSsl = cryptoMaterialProperty .get ("disableSsl" );
56
+ Object enableSsl = cryptoMaterialProperty .get ("enableSsl" );
56
57
String enableHsm = (String ) cryptoMaterialProperty .get ("enableHsm" );
57
58
58
59
this .useSmCrypto = Boolean .valueOf (useSMCrypto );
59
- this .disableSsl = Boolean .valueOf (disableSsl );
60
+ if (disableSsl != null ) {
61
+ this .disableSsl = Boolean .parseBoolean ((String ) disableSsl );
62
+ }
63
+ if (enableSsl != null ) {
64
+ // if enableSsl is set, disableSsl will be ignored
65
+ this .disableSsl = !Boolean .parseBoolean ((String ) enableSsl );
66
+ }
67
+
60
68
this .enableHsm = Boolean .valueOf (enableHsm );
61
69
62
70
if (this .enableHsm ) {
Original file line number Diff line number Diff line change 9
9
<map >
10
10
<entry key =" certPath" value =" conf" />
11
11
<entry key =" useSMCrypto" value =" false" />
12
- <entry key =" disableSsl " value =" false " />
12
+ <entry key =" enableSsl " value =" true " />
13
13
<!-- SSL certificate configuration -->
14
14
<!-- entry key="caCert" value="conf/ca.crt" /-->
15
15
<!-- entry key="sslCert" value="conf/sdk.crt" /-->
Original file line number Diff line number Diff line change 2
2
3
3
certPath = " conf" # The certification path
4
4
useSMCrypto = " false"
5
- disableSsl = " false " # Communication with nodes without SSL
5
+ enableSsl = " true " # Communication with nodes without SSL
6
6
7
7
# The following configurations take the certPath by default if commented
8
8
# caCert = "conf/ca.crt" # CA cert file path
Original file line number Diff line number Diff line change 2
2
3
3
certPath = " conf" # The certification path
4
4
useSMCrypto = " false"
5
- disableSsl = " false " # Communication with nodes without SSL
5
+ enableSsl = " true " # Communication with nodes without SSL
6
6
7
7
# The following configurations take the certPath by default if commented
8
8
# caCert = "conf/ca.crt" # CA cert file path
You can’t perform that action at this time.
0 commit comments