Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
libkleo
Commits
3324d59c
Commit
3324d59c
authored
Nov 05, 2020
by
Ingo Klöcker
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add possibility to filter out invalid keys
parent
f44ca810
Pipeline
#39644
canceled with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
src/kleo/defaultkeyfilter.cpp
src/kleo/defaultkeyfilter.cpp
+13
-0
src/kleo/defaultkeyfilter.h
src/kleo/defaultkeyfilter.h
+2
-0
No files found.
src/kleo/defaultkeyfilter.cpp
View file @
3324d59c
...
...
@@ -35,6 +35,7 @@ public:
mMatchContexts
(
AnyMatchContext
),
mRevoked
(
DoesNotMatter
),
mExpired
(
DoesNotMatter
),
mInvalid
(
DoesNotMatter
),
mDisabled
(
DoesNotMatter
),
mRoot
(
DoesNotMatter
),
mCanEncrypt
(
DoesNotMatter
),
...
...
@@ -67,6 +68,7 @@ public:
TriState
mRevoked
;
TriState
mExpired
;
TriState
mInvalid
;
TriState
mDisabled
;
TriState
mRoot
;
TriState
mCanEncrypt
;
...
...
@@ -111,6 +113,7 @@ bool DefaultKeyFilter::matches(const Key &key, MatchContexts contexts) const
#define CAN_MATCH(what) MATCH( d_ptr->mCan##what, can##what )
IS_MATCH
(
Revoked
);
IS_MATCH
(
Expired
);
IS_MATCH
(
Invalid
);
IS_MATCH
(
Disabled
);
IS_MATCH
(
Root
);
CAN_MATCH
(
Encrypt
);
...
...
@@ -275,6 +278,11 @@ void DefaultKeyFilter::setExpired(DefaultKeyFilter::TriState value) const
d_ptr
->
mExpired
=
value
;
}
void
DefaultKeyFilter
::
setInvalid
(
DefaultKeyFilter
::
TriState
value
)
const
{
d_ptr
->
mInvalid
=
value
;
}
void
DefaultKeyFilter
::
setDisabled
(
DefaultKeyFilter
::
TriState
value
)
const
{
d_ptr
->
mDisabled
=
value
;
...
...
@@ -430,6 +438,11 @@ DefaultKeyFilter::TriState DefaultKeyFilter::expired() const
return
d_ptr
->
mExpired
;
}
DefaultKeyFilter
::
TriState
DefaultKeyFilter
::
invalid
()
const
{
return
d_ptr
->
mInvalid
;
}
DefaultKeyFilter
::
TriState
DefaultKeyFilter
::
disabled
()
const
{
return
d_ptr
->
mDisabled
;
...
...
src/kleo/defaultkeyfilter.h
View file @
3324d59c
...
...
@@ -75,6 +75,7 @@ public:
TriState
revoked
()
const
;
TriState
expired
()
const
;
TriState
invalid
()
const
;
TriState
disabled
()
const
;
TriState
root
()
const
;
TriState
canEncrypt
()
const
;
...
...
@@ -101,6 +102,7 @@ public:
void
setRevoked
(
const
TriState
)
const
;
void
setExpired
(
const
TriState
)
const
;
void
setInvalid
(
const
TriState
)
const
;
void
setDisabled
(
const
TriState
)
const
;
void
setRoot
(
const
TriState
)
const
;
void
setCanEncrypt
(
const
TriState
)
const
;
...
...
Ingo Klöcker
@kloecker
mentioned in commit
c2163f1b
·
Nov 05, 2020
mentioned in commit
c2163f1b
mentioned in commit c2163f1b82800c8ac536c6c48529df0555ea1f12
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment