Skip to content

Commit

Permalink
remove pem restriction for now
Browse files Browse the repository at this point in the history
apple-platform-rs orders their pem certs with key then cert...
  • Loading branch information
nodeselector committed Aug 2, 2024
1 parent d8c8f51 commit adb4d93
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export async function prepareKeychainWithDeveloperCertificate(
keychain: Keychain
): Promise<void> {
const decodedCert = Buffer.from(secretValue, 'base64').toString('utf-8')
// TODO this won't work for all certificate encodings (e.g. DER)
try {
pki.certificateFromPem(decodedCert)
} catch (e) {
throw new Error(
`Failed to parse certificate (PEM support only right now): ${e}`
)
}
// // TODO this won't work for all certificate encodings (e.g. DER)
// try {
// pki.certificateFromPem(decodedCert)
// } catch (e) {
// throw new Error(
// `Failed to parse certificate (PEM support only right now): ${e}`
// )
// }

await keychain.createKeychain()
await keychain.addToSearchList()
Expand Down

0 comments on commit adb4d93

Please sign in to comment.