github.com/s7techlab/cckit@v0.10.5/docs/create-test-cert.md (about) 1 # Hyperledger Fabric chaincode kit (CCKit) 2 3 ## X.509 certificate for testing 4 5 generate self-signed certificate: 6 7 ``` 8 $ openssl ecparam -name secp384r1 -genkey | openssl pkcs8 -topk8 -nocrypt > some-person.key.pem 9 $ openssl req -new -x509 -key some-person.key.pem -out some-person.pem -days 730 10 ``` 11 12 You are about to be asked to enter information that will be incorporated into your certificate request. 13 What you are about to enter is what is called a Distinguished Name or a DN. 14 15 16 examine the certificate: 17 18 `$ openssl x509 -in some-person.pem -text -noout` 19 20 21 ```` 22 Certificate: 23 Data: 24 Version: 1 (0x0) 25 Serial Number: 13222534896082439009 (0xb77fe16e97334b61) 26 Signature Algorithm: sha256WithRSAEncryption 27 Issuer: C=RU, ST=Moscow, L=Moscow, O=S7Techlab, OU=Blockchain dept, CN=Victor Nosov/emailAddress=vitiko@mail.ru 28 Validity 29 Not Before: Apr 24 07:49:10 2018 GMT 30 Not After : Jul 6 07:49:10 2018 GMT 31 Subject: C=RU, ST=Moscow, L=Moscow, O=S7Techlab, OU=Blockchain dept, CN=Victor Nosov/emailAddress=vitiko@mail.ru 32 Subject Public Key Info 33 ```` 34 35 36 examine the key: 37 38 `openssl ecparam -in some-person.pem.key -text -noout` 39 40 41 ```` 42 ASN1 OID: secp256k1 43 44 ````