FISCO-BCOS / FISCO-BCOS/web3sdk
FISCO-BCOS中client.keystore 的生成方法
- Dominant language
- Java
- Stars
- 122
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
FISCO-BCOS中client.keystore 的生成方法
1、client.keystore是用做web3sdk的SSL证书。
2、在web3sdk V1.0.0中,client.keystore里面有两个证书,一个client证书,一个ca证书。client.keystore的密码必须为“123456”,keystore中有私钥的client证书的密码也必须为“123456”。
V1.0.0版本的client.keystore生成方式:
```
(1)keytool -import -trustcacerts -alias ca -file ca.crt -keystore client.keystore
(2)openssl pkcs12 -export -name client -in server.crt -inkey server.key -out keystore.p12
(3)keytool -importkeystore -destkeystore client.keystore -srckeystore keystore.p12 -srcstoretype pkcs12 -alias client
(4)、Attention! Password must be ”123456”
```
注意:其中用到的ca.crt,必须是节点的ca.crt。server.crt,server.key 必须是节点的或者节点的兄弟证书(同一CA颁发)。
3、在web3sdk V1.1.0中,我们修改了证书这块的缺陷,client.keystore只保存client证书,而且命名和密码都做成了可配置。
相关的配置是这样的:
```
node1@10.107.105.137:8822
```
V1.1.0版本的client.keystore生成方式:
```
(1)openssl pkcs12 -export -name client -in server.crt -inkey server.key -out keystore.p12
(2)keytool -importkeystore -destkeystore client.keystore -srckeystore keystore.p12 -srcstoretype pkcs12 -alias client
```
注意:server.crt,server.key 必须是节点的或者节点的兄弟证书(同一CA颁发)。
附录
常用的keystore命令:https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html
keystore 和 openssl整合的命令:
http://www.herongyang.com/crypto/Migrating_Keys_keytool_to_OpenSSL_4.html
Contributor guide
Research direction
No documentation file or test is named. Start by locating the repository's documentation entry point and checking whether client.keystore, ca.crt, server.crt, or server.key are already documented. Done means the version-specific generation commands, certificate requirements, passwords, and configurable properties are documented accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100