Skip to content

Commit

Permalink
[FAB-3259] Make cryptogen output more flexible
Browse files Browse the repository at this point in the history
This patch enhances the cryptogen tool by providing a more
flexible configuration and output operation, based on a
YAML config file and golang templates.

Summary of changes:
-------------------------

*) Tool now has two subcommands
   *) "generate" - This takes the role of the previous top-level
                   command.  It gets rid of almost all of the
                   previous command-line switches and replaces them
                   with:

       -output: specify the output directory.  defaults to
                crypto-config
       -config: specify the input configuration file.  defaults to
                a configuration similar to before (1 orderer, 2 peer
                orgs, 1 peer/org

   *) "showtemplate" - Prints the built-in default template to
                       standard out, suitble for saving/editing
                       for future "generate" sessions.

*) CommonName outputs are now much more DNS friendly.  For example: we
   now use "peer3.org1.com" in favor of "peerOrg1Peer3".  Users also gain
   total control over the generation of the CommonNames with various
   templating facilities. See "cryptogen showtemplate" for more details.

Change-Id: I5968a794d4469ada8d3b90e112bdfe93e77c9661
Signed-off-by: Gregory Haskins <gregory.haskins@gmail.com>
  • Loading branch information
ghaskins committed Apr 20, 2017
1 parent fed2efa commit 2ec150d
Show file tree
Hide file tree
Showing 39 changed files with 10,014 additions and 98 deletions.
396 changes: 298 additions & 98 deletions common/tools/cryptogen/main.go

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions vendor/github.com/alecthomas/template/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions vendor/github.com/alecthomas/template/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2ec150d

Please sign in to comment.