summaryrefslogtreecommitdiffhomepage
path: root/Gpg.hs
blob: 9794395fcb7eda2d4aafac8abfe6f9a8874b2c62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{- Copyright 2016 Joey Hess <id@joeyh.name>
 -
 - Licensed under the GNU AGPL version 3 or higher.
 -}

module Gpg where

import Types
import System.Process

listSecretKeys :: IO [(Name, KeyId)]
listSecretKeys = undefined
-- gpg --batch --with-colons --list-secret-keys
-- extract from eg, sec::4096:1:C910D9222512E3C7:...

getSecretKey :: KeyId -> IO SecretKey
getSecretKey = undefined

-- | Check if a given gpg key is present on the keyserver.
-- (Without downloading the key.)
knownByKeyServer :: KeyId -> IO Bool
knownByKeyServer kid = undefined
-- gpg --batch --with-colons --search-keys 2>/dev/null
-- check if output includes pub: line