diff --git a/CHANGELOG b/CHANGELOG index 745597bb06..3ec9ca11cf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,8 @@ git-annex (6.20160908) UNRELEASED; urgency=medium objects to the json output. * Remove key:null from git-annex add --json output. * copy, move, mirror: Support --json and --json-progress. + * Improve gpg secret key list parser to deal with changes in gpg 2.1.15. + Fixes key name display in webapp. -- Joey Hess Thu, 08 Sep 2016 12:48:55 -0400 diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs index 1ac03ef54c..af740c3e0e 100644 --- a/Utility/Gpg.hs +++ b/Utility/Gpg.hs @@ -178,8 +178,10 @@ secretKeys cmd = catchDefaultIO M.empty makemap parse = extract [] Nothing . map (split ":") extract c (Just keyid) (("uid":_:_:_:_:_:_:_:_:userid:_):rest) = extract ((keyid, decode_c userid):c) Nothing rest - extract c (Just keyid) rest = + extract c (Just keyid) rest@(("sec":_):_) = extract ((keyid, ""):c) Nothing rest + extract c (Just keyid) (_:rest) = + extract c (Just keyid) rest extract c _ [] = c extract c _ (("sec":_:_:_:keyid:_):rest) = extract c (Just keyid) rest