Skip to content

Instantly share code, notes, and snippets.

View keshavab's full-sized avatar

Keshava keshavab

  • Bangalore
  • 16:14 (UTC +05:30)
View GitHub Profile
@keshavab
keshavab / self-signed-certificate-with-custom-ca.md
Created January 3, 2018 04:26 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@keshavab
keshavab / http-benchmark.md
Created November 27, 2017 05:22 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@keshavab
keshavab / update_curl.sh
Created November 20, 2017 17:14 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@keshavab
keshavab / add CA cert on CentOS.md
Created October 12, 2017 06:23 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS or Debian
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org
@keshavab
keshavab / rootca-cert-in-docker.md
Created October 4, 2017 13:19 — forked from zamd/rootca-cert-in-docker.md
trusting root ca certs in docker

Trusting custom root CA certificate in docker containers

Most large enterprises run their own PKI infrastructure and it’s common to issue internal CA signed certificate to services - The Root CA certificate is pushed to domain-joined workstations with group policy etc.

For non-domain joined services (like linux hosts etc.) it’s common to manually trust root CA cert.

Docker deamon automatically picks up the trusted root CA list from the host and use it as it's trusted CA list... Following commands can be used to add a custom CA certficate as trusted CA in Ubuntu

  • Go to /usr/share/ca-certificates/
  • Add your custom CA cert to this folder as PEM encoded file with .crt extension
@keshavab
keshavab / local.conf
Last active August 29, 2015 14:04 — forked from etoews/local.conf
[[local|localrc]]
# Credentials
OS_PASSWORD=password
ADMIN_USER=stack
ADMIN_PASSWORD=$OS_PASSWORD
DATABASE_PASSWORD=$OS_PASSWORD
SERVICE_PASSWORD=$OS_PASSWORD
SERVICE_TOKEN=$OS_PASSWORD
RABBIT_PASSWORD=$OS_PASSWORD