Skip to content

Commit c6ae6d6

Browse files
authored
<doc>(project): update 2.10.0 changelog. (#896)
* <fix>(crypto): add safe key store path. * <doc>(project): update 2.10.0 changelog.
1 parent 2355903 commit c6ae6d6

File tree

6 files changed

+32
-2
lines changed

6 files changed

+32
-2
lines changed

Changelog.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
## v2.10.0
2+
3+
(2024-03-08)
4+
5+
请参考文档:
6+
7+
* [英文版用户手册](https://fisco-bcos-documentation.readthedocs.io/en/latest/docs/sdk/java_sdk/index.html)
8+
* [中文版用户手册](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/sdk/java_sdk/index.html#)
9+
* [中文版WIKI](https://github.com/FISCO-BCOS/java-sdk/wiki)
10+
11+
修复:
12+
13+
- 解决在使用Solidity复杂数据结构(如struct,二维数组等)、复杂事件场景(如重载event,有复杂数据结构参数)时,Java SDK在发交易/调用请求时出现的编解码错误;
14+
- 修复了读取密钥时可能存在的安全问题;
15+
16+
更新:
17+
18+
- 废弃 `sdk-codegen` 模块,合约生成Java文件的功能建议开发者使用`org.fisco-bcos.code-generator:bcos-code-generator`中的方法。以解决在使用Solidity复杂数据结构、复杂事件场景时,生成的Java文件出现编译、运行错误的问题;
19+
- 依赖变更:
20+
- `org.apache.commons:commons-lang3` 更新到3.14.0版本
21+
- `org.bouncycastle:bcprov-jdk15on` 变更为使用`org.bouncycastle:bcprov-jdk18on:1.77`版本
22+
- `io.netty:netty-all` 更新到 4.1.100.Final版本
23+
- `com.google.code.gson:gson` 更新到 2.10.1版本
24+
- `com.webank:webank-blockchain-java-crypto` 更新到1.0.3版本
25+
- 删除不必要的`com.google.guava:guava`
26+
127
## v2.9.2
228

329
(2022-10-31)

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ext {
3535
// integrationTest.mustRunAfter test
3636
allprojects {
3737
group = 'org.fisco-bcos.java-sdk'
38-
version = '2.10.0-SNAPSHOT'
38+
version = '2.10.0'
3939
apply plugin: 'maven'
4040
apply plugin: 'maven-publish'
4141
apply plugin: 'idea'

sdk-core/src/main/java/org/fisco/bcos/sdk/config/model/ConfigProperty.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public static InputStream getConfigInputStream(String configFilePath) throws Con
105105
}
106106
InputStream inputStream = null;
107107
try {
108+
configFilePath = configFilePath.replace("..", "");
108109
inputStream = new FileInputStream(configFilePath);
109110
if (inputStream != null) {
110111
return inputStream;

sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keystore/KeyTool.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ public static void storePublicKeyWithPem(PublicKey publicKey, String privateKeyF
289289
/** load information from the keyStoreFile */
290290
protected void load() {
291291
try {
292-
InputStream keyStoreFileInputStream = new FileInputStream(keyStoreFile);
292+
String safeFile = keyStoreFile.replace("..", "");
293+
InputStream keyStoreFileInputStream = new FileInputStream(safeFile);
293294
this.load(keyStoreFileInputStream);
294295
} catch (FileNotFoundException | org.bouncycastle.util.encoders.DecoderException e) {
295296
String errorMessage =

sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keystore/P12KeyStore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public static void storeKeyPairWithP12Format(
150150
Certificate[] certChain = new Certificate[1];
151151
certChain[0] = generateSelfSignedCertificate(keyPair, signatureAlgorithm);
152152
keyStore.setKeyEntry(NAME, privateKey, password.toCharArray(), certChain);
153+
privateKeyFilePath = privateKeyFilePath.replace("..", "");
153154
keyStore.store(new FileOutputStream(privateKeyFilePath), password.toCharArray());
154155
// store the public key
155156
storePublicKeyWithPem(privateKey, privateKeyFilePath);

sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keystore/PEMKeyStore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public static void storeKeyPairWithPemFormat(
6969
try {
7070
KeyPair keyPair = convertHexedStringToKeyPair(hexedPrivateKey, curveName);
7171
// save the private key
72+
privateKeyFilePath = privateKeyFilePath.replace("..", "");
7273
PemWriter writer = new PemWriter(new FileWriter(privateKeyFilePath));
7374
BCECPrivateKey bcecPrivateKey = (BCECPrivateKey) (keyPair.getPrivate());
7475
writer.writeObject(new PemObject(PRIVATE_KEY, bcecPrivateKey.getEncoded()));

0 commit comments

Comments
 (0)