GithubHelp home page GithubHelp logo

blankburian / keepass-pinentry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from djherbis/keepass-pinentry

0.0 0.0 0.0 12.02 MB

Keepass Plugin for gpg-agent pinentry

Dockerfile 0.01% Batchfile 0.11% Shell 0.03% CSS 0.29% HTML 13.51% Inno Setup 0.28% XSLT 0.40% C# 84.99% C 0.01% C++ 0.34% Go 0.03%

keepass-pinentry's Introduction

keepass-pinentry

Release experimental Software License Build Status

Tired of typing in your GPG password? Have Keepass do it for you! With this Keepass plugin installed and gpg-agent configured you can have Keepass respond to pinentry requests for you.

Installation

Clone this repo, do this somewhere it can reside permanently since we add ENV vars which point to this dir.

Grab a copy of KeepassPinentry.dll and stdproxy.exe from Releases (or build them yourself).

Run the install.cmd (auto adds the plugin ddl to the keepass dir).

In Keepass:

  • Add an Entry named "GPG" whose password is your GPG password (the one you want pinentry to use).
  • Add an Entry named "TLSKEY" whose password is the certificate password you created, and add the certificate.pem file as a binary to this entry.

How it works

The idea is really simple, we tell gpg-agent to talk to stdproxy as its pinentry program. It uses a simple text protocol to communicate with the pinentry program over STDIN/STDOUT. Stdproxy makes a TCP connection (wrapped in SSL) to the keepass-pinentry plugin which is running a local server. This TCP connection is used to forward the STDIN written by gpg-agent to stdproxy to keepass-pinentry which then responds over TCP back to stdproxy's STDOUT which is read by gpg-agent. Keepass-pinentry implements the bare minimum parts of the pinentry protocol in order to respond to the pinentry request.

Building locally / Development

KeepassPinentry.dll:

Dependencies:

  • Docker for Windows or dotnet

You can rebuild the DLL by running build.cmd, or running dotnet inside KeepassPinentry/.

stdproxy.exe:

Dependencies:

  • Go

cd into stdproxy/ and run "go build"

Notes

The SSL encryption here is probably silly since this is only ever intended to be run with a local keepass-pinentry server & gpg-agent, but it was fun adding the encryption layer.

The code is really rough because this was just a personal tool, so forgive me for that!

Future work

  • Fallback to non-SSL TCP when certificate not present.
  • Add tests

keepass-pinentry's People

Contributors

apollo2k4 avatar blankburian avatar djherbis 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.