Coder Social home page Coder Social logo

certgen's Introduction

certgen

Corda Certificate Generator

certgen is a python tool to create certificate hierarchies. It is a wrapper around keytool and uses a configuration file that can specify full certificate hierarchies.

Installation

certgen requires the Java keytool to be on the path. Install the Java JDK

run pip setup -r requirements.txt to install python dependencies

Usage

python certgen.py --config CONFIG [--workdir=WORKDIR] [--execute]
  • config - path to the certificate configuration file (see Examples below)
  • workdir - (optional) path to store temporary files. Default is ./work
  • execute - execute

Example:

python certgen.py --config examples/node_certs.conf --execute

Examples

See examples\node_certs.conf and examples\netmap_cert.conf

Certificate Configuration

Certificate configuration is specified in a YAML file. There are two basic sections that need to be specified

Stores

keystores must be specified in the stores section:

stores: {
  caKeyStore: {
    file : "./examples/cordadevcakeys.jks",
    password : "cordacadevpass"
  },
  destStore : {
    file : "./work/destkeystore.jks",
    password : "keystorepass"
  }
}

Certificates

certificates : {
   certalias: {
       alias: "alias"
       subject: "X500 name"
       store: "destStore"
       issuer : "caKeyStore.cordaintermediateca:cordacadevkeypass",
       key : {
            alias : "identity-private-key",
            password : "cordacadevpass",
            algorithm : "ECDSA_SECP256R1_SHA256"
       },
       extensions: {
        BasicConstraints: "critical,ca:false,pathlen:0",
        KeyUsage: "keyCertSign,cRLSign,digitalSignature",
        ExtendedKeyUsage: "serverAuth,clientAuth"        
      }       
   }
}

Certificate hierarchies are created by specifying an issuer certificate. The issuer can be another defined certificate, or can be stored in an external keystore

Certificate extensions are passed directly to keytool using the addext option. Refer to keytool documentation for details.

certgen's People

Contributors

jamesbr3 avatar

certgen's Issues

Does this even work?

Hello,

I am trying to test the certgen but the usage is actually different form the one defined in the README (it requires some additional params). I have been able to guess them and their usage, but no certificates are stored.

Is this maintained/used anywhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.