aboutsummaryrefslogtreecommitdiff
path: root/Utility/Gpg.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Gpg.hs')
-rw-r--r--Utility/Gpg.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs
index dae254854..94d588cd7 100644
--- a/Utility/Gpg.hs
+++ b/Utility/Gpg.hs
@@ -184,6 +184,9 @@ secretKeys cmd = catchDefaultIO M.empty makemap
params = [Param "--with-colons", Param "--list-secret-keys", Param "--fixed-list-mode"]
parse = extract [] Nothing . map (splitc ':')
extract c (Just keyid) (("uid":_:_:_:_:_:_:_:_:userid:_):rest) =
+ -- If the userid contains a ":" or a few other special
+ -- characters, gpg will hex-escape it. Use decode_c to
+ -- undo.
extract ((keyid, decode_c userid):c) Nothing rest
extract c (Just keyid) rest@(("sec":_):_) =
extract ((keyid, ""):c) Nothing rest