Skip to content

Instantly share code, notes, and snippets.

View robincher's full-sized avatar

Robin Cher robincher

View GitHub Profile
@robincher
robincher / self-sign-test.sh
Created August 29, 2019 09:39
Self-Signed CA and Client Certificate
#!/bin/bash
#Generate Self-signed CA
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout ca.key -out ca.crt
#Make a directory
mkdir client
#Generate Corresponding client certificate
openssl genrsa -out client/helios.key 2048
@robincher
robincher / keybase.md
Created December 21, 2018 06:45
Keybase

Keybase proof

I hereby claim:

  • I am robincher on github.
  • I am robincher (https://keybase.io/robincher) on keybase.
  • I have a public key ASAnWqIXbW8XGBZCwtZJx4tLmEmBLQpUdc5-4pMChJ1gbAo

To claim this, I am signing this object:

@robincher
robincher / index.js
Created September 8, 2018 10:38
Parsing X509 Certificate using pkijs
const atob = require('atob');
const asn1js = require('asn1js');
const fs = require('fs');
const pkijs = require('pkijs');
const pvutils = require('pvutils')
const Certificate = pkijs.Certificate
let certificateBuffer = new ArrayBuffer(0);