How to use the xdl.IosCodeSigning.findP12CertSerialNumber function in xdl

To help you get started, we’ve selected a few xdl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo-cli / packages / expo-cli / src / commands / build / IOSBuilder.js View on Github external
async userProvidedOverride(choice) {
    switch (choice) {
      case 'distCert': {
        log('Please provide your distribution certificate P12:');
        const distCertValues = await prompt(sharedQuestions);
        const certP12Buffer = await fs.readFile(distCertValues.pathToP12);
        const certPassword = distCertValues.p12Password;
        const distCertSerialNumber = IosCodeSigning.findP12CertSerialNumber(
          certP12Buffer,
          certPassword
        );
        return {
          metadata: { distCertSerialNumber },
          credentials: this._ensureObjectsHasOnlyStrings({
            certP12: certP12Buffer.toString('base64'),
            certPassword,
          }),
        };
      }
      case 'pushCert': {
        log('Please provide the path to your push notification cert P12');
        const pushCertValues = await prompt(sharedQuestions);
        return {
          metadata: {},
github expo / expo-cli / packages / expo-cli / src / commands / build / IOSBuilder.js View on Github external
async expoManagedResource(choice, appleCreds, teamId, credsMetadata, isEnterprise) {
    switch (choice) {
      case 'distCert': {
        const produceCertAttempt = await authFuncs.produceCerts(appleCreds, teamId, isEnterprise);
        this._throwIfFailureWithReasonDump(produceCertAttempt);
        const distCertSerialNumber = IosCodeSigning.findP12CertSerialNumber(
          produceCertAttempt.certP12,
          produceCertAttempt.certPassword
        );
        return {
          metadata: { distCertSerialNumber },
          credentials: this._ensureObjectsHasOnlyStrings(produceCertAttempt),
        };
      }
      case 'pushCert': {
        const producePushCertsAttempt = await authFuncs.producePushCerts(
          appleCreds,
          credsMetadata,
          teamId,
          isEnterprise
        );
        this._throwIfFailureWithReasonDump(producePushCertsAttempt);