Skip to content

Commit 77dd149

Browse files
committed
More naunced scoring
1 parent a27f203 commit 77dd149

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

security/keys.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,9 @@ function createTLSSelector(type, mtlsOptions) {
756756
let quality = cert.is_self_signed ? 1 : 3;
757757
// prefer operations certificates for operations API
758758
if (cert.uses?.includes(type)) quality += 3;
759+
else if (cert.uses?.includes('https'))
760+
quality += 0.5; // this was a legacy generic general use type
761+
else quality -= (cert.uses?.length ?? 0) / 5; // if there are designed uses for this that don't match, dock points
759762

760763
const private_key = getPrivateKeyByName(cert.private_key_name);
761764

0 commit comments

Comments
 (0)