GithubHelp home page GithubHelp logo

isabella232 / dps-certgen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/dps-certgen

0.0 0.0 0.0 16 KB

Azure IoT x509 Certificate Helper Tool

License: MIT License

JavaScript 72.71% Shell 27.29%

dps-certgen's Introduction

x509 Certificate Helper Tool

  • need an easy to use x509 certificate tool ?
  • don't have OpenSSL cli or don't know how to use it ?
  • all of the above ?

Requirements

node.js version 8+

Install

npm i -g dps-certgen

Usage

dps-certgen <args>

args:
--new-config  : creates a new 'certgen.config.json' file (overwrites the existing one)
--new-root-cert : creates a new root certificate that is based on 'certgen.config.json'
--new-leaf-cert <subject> : creates a new certificate and signs it with the root certificate's private key

--is2K : use 2048 bits (not suggested). default 4096 bits

i.e. => dps-certgen --new-root-cert

Sample apps

Sample usage

Create a new X509 root certificate

Create a new certificate configuration file

dps-certgen --new-config

Edit certgen.config.json file on the path.

Create a new x509 certificate / public and private keys

dps-certgen --new-root-cert

Command above will create root-cert.pem, root-public-key.pem, and root-private-key.pem on the path.

Verify a root certificate

If any platform asks you to verify your certificate, it will give you a verification key to do that.

Run the command below on your favorite terminal. Make sure root-cert.pem, root-public-key.pem, and root-private-key.pem are already on the path.

dps-certgen --new-leaf-cert PUT_THAT_VERIFICATION_KEY_HERE

Command above will create subject-cert.pem, subject-public-key.pem, and subject-private-key.pem on the path.

Use subject-cert.pem in order to verify the ownership.

Create a device certificate

Make sure root-cert.pem, root-public-key.pem, and root-private-key.pem are already on the path.

dps-certgen --new-leaf-cert PUT_DEVICE_ID_HERE

Command above will create subject-cert.pem, subject-public-key.pem, and subject-private-key.pem on the path.

Use subject-cert.pem as device certificate and subject-private-key.pem as the private key.

dps-certgen's People

Contributors

microsoftopensource avatar msftgits avatar obastemur avatar

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.