Commit 3324d59c authored by Ingo Klöcker's avatar Ingo Klöcker

Add possibility to filter out invalid keys

parent f44ca810
Pipeline #39644 canceled with stage
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment