nkt / electron-ssl-pinning

Prevents MITM in Electron applications

Home Page:https://dialogs.github.io/electron-ssl-pinning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Electron SSL Pinning

Build Status Code Coverage

Prevents MITM in Electron applications.

What? MITM?

Installation

npm install electron-ssl-pinning

Usage

Retrive pinning config using following command

fetch-ssl-pinning-config google.com

Then apply this config to Electron session.

const { session } = require('electron');
const { createSslVerificator } = require('electron-ssl-pinning');

session.defaultSession.setCertificateVerifyProc(
  createSslVerificator([
    {
      domain: '*.google.com',
      fingerprints: [
        'sha256/fyFMxrkFMkcRq9nDQimG8gq8136Vbrzm5pQSMhRH2Os=',
        'sha256/vgzNVNTOzaG9Xl2ezIWgTCwfk6UiDXf96I/prQgfZBs='
      ]
    }
  ])
);

License

Apache-2.0

About

Prevents MITM in Electron applications

https://dialogs.github.io/electron-ssl-pinning

License:Apache License 2.0


Languages

Language:TypeScript 88.8%Language:JavaScript 11.2%