| 223 | } |
| 224 | |
| 225 | async function copySecureLiveUpdatesKey(secureLiveUpdatesKeyFile: string, rootDir: string, nativeAbsDir: string) { |
| 226 | const keyAbsFromPath = join(rootDir, secureLiveUpdatesKeyFile); |
| 227 | const keyAbsToPath = join(nativeAbsDir, basename(keyAbsFromPath)); |
| 228 | const keyRelToDir = relative(rootDir, nativeAbsDir); |
| 229 | |
| 230 | if (!(await pathExists(keyAbsFromPath))) { |
| 231 | logger.warn( |
| 232 | `Cannot copy Secure Live Updates signature file from ${c.strong(keyAbsFromPath)} to ${keyRelToDir}\n` + |
| 233 | `Signature file does not exist at specified key path.`, |
| 234 | ); |
| 235 | |
| 236 | return; |
| 237 | } |
| 238 | |
| 239 | await runTask( |
| 240 | `Copying Secure Live Updates key from ${c.strong(secureLiveUpdatesKeyFile)} to ${keyRelToDir}`, |
| 241 | async () => { |
| 242 | return fsCopy(keyAbsFromPath, keyAbsToPath); |
| 243 | }, |
| 244 | ); |
| 245 | } |
| 246 | |
| 247 | async function copySSLCert(sslCertPaths: string[], rootDir: string, targetDir: string) { |
| 248 | const validCertPaths: string[] = []; |