Skip to content

Instantly share code, notes, and snippets.

View alexanderjsx's full-sized avatar

Alex B alexanderjsx

View GitHub Profile

Here are some common file extensions used in mutual TLS (mTLS) and when to use each:

  • .pem (Privacy Enhanced Mail): This is a container format that may include just the public certificate or the entire certificate chain (private key, public key, root certificates). It's used for storing and sending cryptographic keys, certificates, and other data, and it's base64 encoded.
  • .crt (Certificate): This is a public key certificate. It's usually in the X.509 standard and it's used to establish a TLS encrypted secure connection.
  • .key (Key): This is a private key file. It's used in the creation and verification of digital signatures and in the decryption of data.
  • .csr (Certificate Signing Request): This is a block of encoded text that is given to a Certificate Authority when applying for an SSL Certificate. It's used to apply for your own certificates.
  • .cer/.crt (Certificate): These are SSL certificates that can be in binary form (ASN.1 DER) or encoded with Base-64 with header and footer in
@alexanderjsx
alexanderjsx / index.js
Created February 7, 2019 12:46
This script is base for creating and applying sequelize schema migrations on the fly.
// models/index.js
import fs from 'fs';
import path from 'path';
import Sequelize from 'sequelize';
import { spawnSync } from 'child_process';
import migrate from 'sequelize-auto-migrations/lib/migrate';
import logger from '../utils/logger';
const models = {};