cryptogen

cryptogen is an utility for generating Hyperledger Fabric key material. It is provided as a means of preconfiguring a network for testing purposes. It would normally not be used in the operation of a production network.

Syntax

The cryptogen command has five subcommands, as follows:

  • help

  • generate

  • showtemplate

  • extend

  • version

cryptogen help

  1. usage: cryptogen [<flags>] <command> [<args> ...]
  2. Utility for generating Hyperledger Fabric key material
  3. Flags:
  4. --help Show context-sensitive help (also try --help-long and --help-man).
  5. Commands:
  6. help [<command>...]
  7. Show help.
  8. generate [<flags>]
  9. Generate key material
  10. showtemplate
  11. Show the default configuration template
  12. version
  13. Show version information
  14. extend [<flags>]
  15. Extend existing network

cryptogen generate

  1. usage: cryptogen generate [<flags>]
  2. Generate key material
  3. Flags:
  4. --help Show context-sensitive help (also try --help-long
  5. and --help-man).
  6. --output="crypto-config" The output directory in which to place artifacts
  7. --config=CONFIG The configuration template to use

cryptogen showtemplate

  1. usage: cryptogen showtemplate
  2. Show the default configuration template
  3. Flags:
  4. --help Show context-sensitive help (also try --help-long and --help-man).

cryptogen extend

  1. usage: cryptogen extend [<flags>]
  2. Extend existing network
  3. Flags:
  4. --help Show context-sensitive help (also try --help-long and
  5. --help-man).
  6. --input="crypto-config" The input directory in which existing network place
  7. --config=CONFIG The configuration template to use

cryptogen version

  1. usage: cryptogen version
  2. Show version information
  3. Flags:
  4. --help Show context-sensitive help (also try --help-long and --help-man).

Usage

Here’s an example using the different available flags on the cryptogen extend command.

  1. cryptogen extend --input="crypto-config" --config=config.yaml
  2. org3.example.com

Where config.yaml adds a new peer organization called org3.example.com

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.