From 0e7b86d079f9d164660caebf9c6491cdb3e768d8 Mon Sep 17 00:00:00 2001 From: Hendrik Bugdoll Date: Tue, 13 Jan 2026 22:22:12 +0100 Subject: [PATCH] feat: exposed team name in certificates --- lib/certs.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/certs.js b/lib/certs.js index 6c0f514..60b0efd 100644 --- a/lib/certs.js +++ b/lib/certs.js @@ -104,7 +104,8 @@ function detect(options, callback) { } if (!validOnly || !invalid) { - const teamId = cert.subject.attributes.find(attr => attr.name === 'organizationalUnitName'); + const teamId = cert.subject.getField('OU').value; + const teamName = cert.subject.getField('O').value; dest.push({ name: certName, fullname: appc.encoding.decodeOctalUTF8(commonName).trim(), @@ -113,7 +114,8 @@ function detect(options, callback) { after: cert.validity.notAfter, expired: expired, invalid: invalid, - teamId: teamId && teamId.value + teamId: teamId, + teamName: appc.encoding.decodeOctalUTF8(teamName).trim() }); }