You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2025. It is now read-only.
Will move and prettify HSM detailed contents in README.md into
fabric-sdk-node.github.io tutorials, since the special tests
for HSM is not necessary thing for every builder/developer.
Let's move it out of README.
Signed-off-by: “5sWind” <fiveswind@gmail.com>
Change-Id: Ia97289b27c5f6efae4ca2e03ea7a1cf6ee56010a
Copy file name to clipboardExpand all lines: README.md
+2-21Lines changed: 2 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -49,27 +49,8 @@ We have functional and scenario based tests that may be run via the following co
49
49
*`node test/integration/e2e/query.js`
50
50
51
51
### Special Tests for Hardware Security Module support via PKCS#11 interface
52
-
The SDK has support for PKCS#11 interface in order to allow applications to make use of HSM devices for key management. To turn these tests off, set environment variable "PKCS11_TESTS" to "false". In order to run the tests:
53
-
54
-
* Install a software emulator of the PKCS#11 interface. The unit tests have been tried with SoftHSM2:
55
-
* install using the package manager for your host system:
56
-
* Ubuntu: apt-get install softhsm2
57
-
* macOS: brew install softhsm
58
-
* or install from source:
59
-
* install openssl 1.0.0+ or botan 1.10.0+
60
-
* download the source code from https://dist.opendnssec.org/source/softhsm-2.2.0.tar.gz
61
-
*`tar -xvf softhsm-2.2.0.tar.gz`
62
-
*`cd softhsm-2.2.0`
63
-
*`./configure --disable-gost` (would require additional libraries, turn it off unless you need gost algorithm support for the Russian market)
64
-
*`make`
65
-
*`sudo make install`
66
-
* set environment variable "SOFTHSM2_CONF" to "./test/fixtures/hsm/softhsm2.conf"
67
-
* create a token to store keys inside slot 0: `softhsm2-util --init-token --slot 0 --label "My token 1"`, you will be prompted two PINs: SO (Security Officer) PIN that can be used to re-initialize the token, and user PIN to be used by applications to access the token for generating and retrieving keys
68
-
69
-
The unit test assumes slot '0' and user PIN `98765432`. If your configuration is different, use these environment variables to pass in the values:
70
-
* PKCS11_LIB - path to the SoftHSM2 library, if not specified, the test case searches through a list of popular install locaions
71
-
* PKCS11_PIN
72
-
* PKCS11_SLOT
52
+
53
+
The SDK has support for Hardware Security Module via PKCS#11 interface. See [Testing for Hardware Security Module via PKCS#11 interface](https://fabric-sdk-node.github.io/release-1.4/tutorial-hsm-pkcs11.html) for configuration and tests.
73
54
74
55
### Hyperledger Fabric Client objects and reference documentation
75
56
The SDK has support for Java based Chaincode. To turn these tests off, set the environment variable "JAVA_TESTS" to false.
This tutorial illustrates the different ways of installing, configuring and testing the Hardware Security Module SoftHSM via PKCS#11 interface with a Hyperledger Fabric SDK for Node.js as of 1.4.
2
+
3
+
For more information please refer to [SoftHSM](https://www.opendnssec.org/softhsm/).
4
+
5
+
## Overview
6
+
7
+
The SDK has support for PKCS#11 interface in order to allow applications to make use of HSM devices for key management.
8
+
9
+
## Installation
10
+
11
+
In order to run the tests, install a software emulator of the PKCS#11 interface.
12
+
13
+
### Install using the package manager for your host system
14
+
15
+
* Ubuntu: apt-get install softhsm2
16
+
* macOS: brew install softhsm
17
+
* Windows: **unsupported**.
18
+
19
+
### Or install from source
20
+
21
+
1. install openssl 1.0.0+ or botan 1.10.0+
22
+
2. download the source code from <https://dist.opendnssec.org/source/softhsm-2.2.0.tar.gz>
23
+
3.`tar -xvf softhsm-2.2.0.tar.gz`
24
+
4.`cd softhsm-2.2.0`
25
+
5.`./configure --disable-gost` (would require additional libraries, turn it off unless you need gost algorithm support for the Russian market)
26
+
6.`make`
27
+
7.`sudo make install`
28
+
29
+
### Set environment variable "SOFTHSM2_CONF" to "./test/fixtures/softhsm2.conf"
softhsm2-util --init-token --slot 0 --label "My token 1"
39
+
```
40
+
41
+
Then you will be prompted two PINs: SO (Security Officer) PIN that can be used to re-initialize the token, and user PIN to be used by applications to access the token for generating and retrieving keys.
42
+
43
+
## Test
44
+
45
+
The unit tests have been tried with SoftHSM2 and assumes slot '0' and user PIN `98765432`. If your configuration is different, use these environment variables to pass in the values:
46
+
47
+
* PKCS11_LIB - path to the SoftHSM2 library, if not specified, the test case searches through a list of popular install locaions
48
+
* PKCS11_PIN
49
+
* PKCS11_SLOT
50
+
51
+
To turn these tests off, set environment variable "PKCS11_TESTS" to "false".
0 commit comments