-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a25eedd
commit 844a77e
Showing
6 changed files
with
98 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
export const digitalCertificate = `-----BEGIN CERTIFICATE----- | ||
MIIExzCCAq+gAwIBAgIQNzkyMDIzMDgwNzE1NTMxMDANBgkqhkiG9w0BAQsFADCB | ||
mDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRswGQYDVQQKDBJRWiBJbmR1c3Ry | ||
aWVzLCBMTEMxGzAZBgNVBAsMElFaIEluZHVzdHJpZXMsIExMQzEZMBcGA1UEAwwQ | ||
cXppbmR1c3RyaWVzLmNvbTEnMCUGCSqGSIb3DQEJARYYc3VwcG9ydEBxemluZHVz | ||
dHJpZXMuY29tMB4XDTIzMDgwNzE1NTMxMFoXDTI0MDgwNzE0NDA0N1owgYAxCzAJ | ||
BgNVBAYMAkNMMQswCQYDVQQIDAJSTTERMA8GA1UEBwwIU2FudGlhZ28xDjAMBgNV | ||
BAoMBUp1c3RvMQ4wDAYDVQQLDAVKdXN0bzEOMAwGA1UEAwwFSnVzdG8xITAfBgkq | ||
hkiG9w0BCQEMEmFkbWluQGdldGp1c3RvLmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD | ||
ggEPADCCAQoCggEBAKr0D8QiKYyiMTnOcAcozIRIAfO3+uaE/ecQaDMQ6XC/ERxT | ||
3FMocPfsz9g/xJXzGZ10rQ+YIU/CuFwPcwf8BQGwfCiVNFjMC/PlGnZs5LX/jD9U | ||
dEADdnEyI9QWyoh3uYeAGFrrHWqcbJPoSuBfB9JRHjS58d9ujXTLejToqFWMx3mp | ||
wfrIFcacHDZNt3AqJZC2IaX7a0hwhTDUcC6hhN6oXaG0fsPT3sFEK/m7eUDp2NVk | ||
/YKZgByfZceIYrhDQIoB/VULVRpekTdMIwrXKREKfNAcLfpzJG/7lLgZ8mxlAgDI | ||
yxYPNIxiEZxlyk3h4tl/O55SaJPMpXsP5snIjxkCAwEAAaMjMCEwHwYDVR0jBBgw | ||
FoAUkKZQt4TUuepf8gWEE3hF6Kl1VFwwDQYJKoZIhvcNAQELBQADggIBAGGOjMCM | ||
ZsdFBRJvhWsYspI7M2yrwEK5LwX+RDDee87e+gHBZb8tGiAA2COemXKOXIw22LGa | ||
fZAywibxyfcIb1qozr7snZXk8KFikMkg2FYnbnmWkB150F0lpa7rDhYh8MOQuUg2 | ||
mfSyo0CM+NYtz7a3F9k5RVwDY15NR0YYQktAwuw7YFfMTBXsAu6irOJ10UiOK66f | ||
RsWATv1NKHxCYpyoEoaFS0kjoSw36oTtJKsBCCriW+0IGLLZG7baH5h9Qtrl5nnJ | ||
2pJlk8jLJ3KKoBoPaG66hyY0G4B+EkZrziTofVH3vHVMuBbXyTiJCatD/GcGZxRK | ||
Zgl5ezSG4TfnzjiY/jgyIEISvTIDBPyuu3EiFqJuzto13M2wX+R05SD0dtOdjGi2 | ||
6WMx3bcgpZR+OPhQs970CHs879pVUXXOq5kDEEu9m4Ow5dbYRce74qpfFy2UZrcM | ||
3aJV40TqBQS1p3JoGa7WndggO1LIka0iLiwEmoqBAdZN1LR26pk1vktAgXifWfei | ||
wqSODs8I6i/0mxkAmY+kZ3Nvf3JQKrtuiISqJLIydC5POvl83lX14PvhbihHxBxu | ||
F7jYRdnu0+vTCQaoyvRcYt2+P0uiteCsVbQKbnaWzH73e7ycuYjupfd/kpn/3VRW | ||
xnx4vUsEpT/tvduj04GoZkiUx4TaaKGeMmn+ | ||
-----END CERTIFICATE----- | ||
--START INTERMEDIATE CERT-- | ||
-----BEGIN CERTIFICATE----- | ||
MIIFEjCCA/qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgawxCz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C5NZnd/tJNxjyUyk7bjdDzhzT10CGRAsqxAnsjvMD | ||
2KcMf3oXN4PNgyfpbfq2ipxJ1u777Gpbzyf0xoKwH9FYigmqfRH2N2pEdiYawKrX | ||
6pyXzGM4cvQ5X1Yxf2x/+xdTLdVaLnZgwrdqwFYmDejGAldXlYDl3jbBHVM1v+uY | ||
5ItGTjk+3vLrxmvGy5XFVG+8fF/xaVfo5TW5AgMBAAGjUDBOMB0GA1UdDgQWBBSQ | ||
plC3hNS56l/yBYQTeEXoqXVUXDAfBgNVHSMEGDAWgBQDRcZNwPqOqQvagw9BpW0S | ||
BkOpXjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAJIO8SiNr9jpLQ | ||
eUsFUmbueoxyI5L+P5eV92ceVOJ2tAlBA13vzF1NWlpSlrMmQcVUE/K4D01qtr0k | ||
gDs6LUHvj2XXLpyEogitbBgipkQpwCTJVfC9bWYBwEotC7Y8mVjjEV7uXAT71GKT | ||
x8XlB9maf+BTZGgyoulA5pTYJ++7s/xX9gzSWCa+eXGcjguBtYYXaAjjAqFGRAvu | ||
pz1yrDWcA6H94HeErJKUXBakS0Jm/V33JDuVXY+aZ8EQi2kV82aZbNdXll/R6iGw | ||
2ur4rDErnHsiphBgZB71C5FD4cdfSONTsYxmPmyUb5T+KLUouxZ9B0Wh28ucc1Lp | ||
rbO7BnjW | ||
-----END CERTIFICATE-----` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sudo from 'sudo-prompt' | ||
|
||
export async function sudoPromise(script: string) { | ||
await new Promise<string>((resolve, reject) => { | ||
console.log(`Will run sudo promise: ${script}`) | ||
sudo.exec(script, {name: 'Crisp'}, function (error, stdout, stderr) { | ||
if (error) { | ||
console.log(`Error in sudo promise: ${error}`, stdout, stderr) | ||
reject(`Error: ${error.message}`) | ||
} else { | ||
console.log('Sudo promise success', { | ||
stdout | ||
}) | ||
resolve(stdout.toString()) | ||
} | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters