diff options
Diffstat (limited to 'lib/KeyRing/BuildKeyDB.hs')
-rw-r--r-- | lib/KeyRing/BuildKeyDB.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/KeyRing/BuildKeyDB.hs b/lib/KeyRing/BuildKeyDB.hs index 510c820..ef4edba 100644 --- a/lib/KeyRing/BuildKeyDB.hs +++ b/lib/KeyRing/BuildKeyDB.hs | |||
@@ -416,9 +416,9 @@ parseSpec wkgrip spec = | |||
416 | case prespec of | 416 | case prespec of |
417 | AnyMatch -> (KeyGrip "", Nothing) | 417 | AnyMatch -> (KeyGrip "", Nothing) |
418 | EmptyMatch -> error "Bad key spec." | 418 | EmptyMatch -> error "Bad key spec." |
419 | WorkingKeyMatch -> (KeyGrip $ show wkgrip, Nothing) | 419 | WorkingKeyMatch -> (KeyExact wkgrip, Nothing) |
420 | SubstringMatch (Just KeyTypeField) tag -> (KeyGrip $ show wkgrip, Just tag) | 420 | SubstringMatch (Just KeyTypeField) tag -> (KeyExact wkgrip, Just tag) |
421 | SubstringMatch Nothing str -> (KeyGrip $ show wkgrip, Just str) | 421 | SubstringMatch Nothing str -> (KeyExact wkgrip, Just str) |
422 | SubstringMatch (Just UserIDField) ustr -> (KeyUidMatch ustr, Nothing) | 422 | SubstringMatch (Just UserIDField) ustr -> (KeyUidMatch ustr, Nothing) |
423 | FingerprintMatch fp -> (KeyGrip fp, Nothing) | 423 | FingerprintMatch fp -> (KeyGrip fp, Nothing) |
424 | else | 424 | else |
@@ -780,6 +780,11 @@ is40digitHex xs = ys == xs && length ys==40 | |||
780 | ishex c = False | 780 | ishex c = False |
781 | 781 | ||
782 | matchSpec :: KeySpec -> KeyData -> Bool | 782 | matchSpec :: KeySpec -> KeyData -> Bool |
783 | matchSpec (KeyExact Nothing) _ = False | ||
784 | matchSpec (KeyExact (Just grip)) (KeyData p _ _ _) | ||
785 | | matchpr grip (packet p) = True | ||
786 | | otherwise = False | ||
787 | |||
783 | matchSpec (KeyGrip grip) (KeyData p _ _ _) | 788 | matchSpec (KeyGrip grip) (KeyData p _ _ _) |
784 | | matchpr' grip (packet p) = True | 789 | | matchpr' grip (packet p) = True |
785 | | otherwise = False | 790 | | otherwise = False |