Skip to content

Commit 1fd3936

Browse files
committed
auto add sm2_ prefix of keyIndex, and solve a bug of using contract SM binary.
1 parent ae2b655 commit 1fd3936

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ext {
3737
// integrationTest.mustRunAfter test
3838
allprojects {
3939
group = 'org.fisco-bcos.java-sdk'
40-
version = '2.8.0-hsm-SNAPSHOT'
40+
version = '2.8.0-SNAPSHOT'
4141
apply plugin: 'maven'
4242
apply plugin: 'maven-publish'
4343
apply plugin: 'idea'

sdk-core/src/main/java/org/fisco/bcos/sdk/network/ConnectionManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ private SslContext initSMSslContext(ConfigOption configOption) throws NetworkExc
275275
return SMSslClientContextFactory.build(
276276
configOption.getCryptoMaterialConfig().getCaInputStream(),
277277
configOption.getCryptoMaterialConfig().getEnSSLCertInputStream(),
278-
configOption.getCryptoMaterialConfig().getEnSslKeyIndex(),
278+
"sm2_" + configOption.getCryptoMaterialConfig().getEnSslKeyIndex(),
279279
configOption.getCryptoMaterialConfig().getSdkCertInputStream(),
280-
configOption.getCryptoMaterialConfig().getSslKeyIndex());
280+
"sm2_" + configOption.getCryptoMaterialConfig().getSslKeyIndex());
281281
} else {
282282
return SMSslClientContextFactory.build(
283283
configOption.getCryptoMaterialConfig().getCaInputStream(),

sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/CryptoSuite.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ protected void initCryptoSuite(int cryptoTypeConfig) {
115115
this.signatureImpl = new SDFSM2Signature();
116116
this.hashImpl = new SDFSM3Hash();
117117
this.keyPairFactory = new SDFSM2KeyPair();
118+
this.cryptoTypeConfig = CryptoType.SM_TYPE;
118119
} else {
119120
throw new UnsupportedCryptoTypeException(
120121
"only support "

sdk-service/src/main/java/org/fisco/bcos/sdk/client/Client.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static Client build(
108108
return null;
109109
}
110110
CryptoSuite cryptoSuite = new CryptoSuite(cryptoType, groupManagerService.getConfig());
111-
logger.info("build client success for group {}", groupId);
111+
logger.info("build client success for group {}, crypto type {}", groupId, cryptoType);
112112
return new ClientImpl(
113113
groupManagerService, channel, groupId, cryptoSuite, nodeVersion, eventResource);
114114
}

0 commit comments

Comments
 (0)