sort confirmed keys before unconfirmed primary ones (OKC-01-011)
This commit is contained in:
@@ -771,6 +771,11 @@ public class ProviderHelper {
|
|||||||
if (type != o.type) {
|
if (type != o.type) {
|
||||||
return type == null ? -1 : 1;
|
return type == null ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
// if one is *trusted* but the other isn't, that one comes first
|
||||||
|
// this overrides the primary attribute, even!
|
||||||
|
if ( (trustedCerts.size() == 0) != (o.trustedCerts.size() == 0) ) {
|
||||||
|
return trustedCerts.size() > o.trustedCerts.size() ? -1 : 1;
|
||||||
|
}
|
||||||
// if one key is primary but the other isn't, the primary one always comes first
|
// if one key is primary but the other isn't, the primary one always comes first
|
||||||
if (isPrimary != o.isPrimary) {
|
if (isPrimary != o.isPrimary) {
|
||||||
return isPrimary ? -1 : 1;
|
return isPrimary ? -1 : 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user