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

Add possibility to filter out invalid keys

parent f44ca810
Pipeline #39644 canceled with stage
...@@ -35,6 +35,7 @@ public: ...@@ -35,6 +35,7 @@ public:
mMatchContexts(AnyMatchContext), mMatchContexts(AnyMatchContext),
mRevoked(DoesNotMatter), mRevoked(DoesNotMatter),
mExpired(DoesNotMatter), mExpired(DoesNotMatter),
mInvalid(DoesNotMatter),
mDisabled(DoesNotMatter), mDisabled(DoesNotMatter),
mRoot(DoesNotMatter), mRoot(DoesNotMatter),
mCanEncrypt(DoesNotMatter), mCanEncrypt(DoesNotMatter),
...@@ -67,6 +68,7 @@ public: ...@@ -67,6 +68,7 @@ public:
TriState mRevoked; TriState mRevoked;
TriState mExpired; TriState mExpired;
TriState mInvalid;
TriState mDisabled; TriState mDisabled;
TriState mRoot; TriState mRoot;
TriState mCanEncrypt; TriState mCanEncrypt;
...@@ -111,6 +113,7 @@ bool DefaultKeyFilter::matches(const Key &key, MatchContexts contexts) const ...@@ -111,6 +113,7 @@ bool DefaultKeyFilter::matches(const Key &key, MatchContexts contexts) const
#define CAN_MATCH(what) MATCH( d_ptr->mCan##what, can##what ) #define CAN_MATCH(what) MATCH( d_ptr->mCan##what, can##what )
IS_MATCH(Revoked); IS_MATCH(Revoked);
IS_MATCH(Expired); IS_MATCH(Expired);
IS_MATCH(Invalid);
IS_MATCH(Disabled); IS_MATCH(Disabled);
IS_MATCH(Root); IS_MATCH(Root);
CAN_MATCH(Encrypt); CAN_MATCH(Encrypt);
...@@ -275,6 +278,11 @@ void DefaultKeyFilter::setExpired(DefaultKeyFilter::TriState value) const ...@@ -275,6 +278,11 @@ void DefaultKeyFilter::setExpired(DefaultKeyFilter::TriState value) const
d_ptr->mExpired = value; d_ptr->mExpired = value;
} }
void DefaultKeyFilter::setInvalid(DefaultKeyFilter::TriState value) const
{
d_ptr->mInvalid = value;
}
void DefaultKeyFilter::setDisabled(DefaultKeyFilter::TriState value) const void DefaultKeyFilter::setDisabled(DefaultKeyFilter::TriState value) const
{ {
d_ptr->mDisabled = value; d_ptr->mDisabled = value;
...@@ -430,6 +438,11 @@ DefaultKeyFilter::TriState DefaultKeyFilter::expired() const ...@@ -430,6 +438,11 @@ DefaultKeyFilter::TriState DefaultKeyFilter::expired() const
return d_ptr->mExpired; return d_ptr->mExpired;
} }
DefaultKeyFilter::TriState DefaultKeyFilter::invalid() const
{
return d_ptr->mInvalid;
}
DefaultKeyFilter::TriState DefaultKeyFilter::disabled() const DefaultKeyFilter::TriState DefaultKeyFilter::disabled() const
{ {
return d_ptr->mDisabled; return d_ptr->mDisabled;
......
...@@ -75,6 +75,7 @@ public: ...@@ -75,6 +75,7 @@ public:
TriState revoked() const; TriState revoked() const;
TriState expired() const; TriState expired() const;
TriState invalid() const;
TriState disabled() const; TriState disabled() const;
TriState root() const; TriState root() const;
TriState canEncrypt() const; TriState canEncrypt() const;
...@@ -101,6 +102,7 @@ public: ...@@ -101,6 +102,7 @@ public:
void setRevoked(const TriState) const; void setRevoked(const TriState) const;
void setExpired(const TriState) const; void setExpired(const TriState) const;
void setInvalid(const TriState) const;
void setDisabled(const TriState) const; void setDisabled(const TriState) const;
void setRoot(const TriState) const; void setRoot(const TriState) const;
void setCanEncrypt(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