Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
libkleo
Commits
3324d59c
Commit
3324d59c
authored
Nov 05, 2020
by
Ingo Klöcker
Browse files
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
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
Supports
Markdown
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