mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix lint
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
4ef3ea2afe
commit
98d851aff7
@ -7,17 +7,17 @@ import execFileInjectable from "../fs/exec-file.injectable";
|
|||||||
import { requestSystemCAsInjectionToken } from "./request-system-cas-token";
|
import { requestSystemCAsInjectionToken } from "./request-system-cas-token";
|
||||||
|
|
||||||
const pemEncoding = (hexEncodedCert: String) => {
|
const pemEncoding = (hexEncodedCert: String) => {
|
||||||
const certData = Buffer.from(hexEncodedCert, "hex").toString('base64');
|
const certData = Buffer.from(hexEncodedCert, "hex").toString("base64");
|
||||||
const lines = ['-----BEGIN CERTIFICATE-----'];
|
const lines = ["-----BEGIN CERTIFICATE-----"];
|
||||||
|
|
||||||
for (let i = 0; i < certData.length; i += 64) {
|
for (let i = 0; i < certData.length; i += 64) {
|
||||||
lines.push(certData.substring(i, i + 64));
|
lines.push(certData.substring(i, i + 64));
|
||||||
}
|
}
|
||||||
|
|
||||||
lines.push('-----END CERTIFICATE-----', '');
|
lines.push("-----END CERTIFICATE-----", "");
|
||||||
|
|
||||||
return lines.join("\r\n");
|
return lines.join("\r\n");
|
||||||
}
|
};
|
||||||
|
|
||||||
const requestSystemCAsInjectable = getInjectable({
|
const requestSystemCAsInjectable = getInjectable({
|
||||||
id: "request-system-cas",
|
id: "request-system-cas",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user