Emiliano Montesdeoca
Emiliano Montesdeoca

Reputation: 364

Manifest signature did not verify successfully

I'm implementing passbook to our app which is working fine on Android but now so well in iOS and Mac OS, probably due to its signature or certifications.

I have 2 files for the certificates:

  1. company.pfx (valid until 2021)
  2. AppleWWDRCA.cer (latest one)

And also have the password for that .pfx file.

I'm using the dotnet-passbook framework in a .NET MVC Webapi, also you can find my issue in the repository here.


I'm using the following code to generate de .pkpass file:

     public static byte[] Generate(Models.PassKey.PassBookTicketData data)
      {
        // Generator to get the passkey
        var generator = new PassGenerator();

        string appleCertPath = (HttpContext.Current.Server.MapPath("~/Certificates/AppleWWDRCA.cer"));
        string companyCertPath = (HttpContext.Current.Server.MapPath("~/Certificates/company.pfx"));

        // Request to send
        var request = new PassGeneratorRequest()
        {
            PassTypeIdentifier = "pass.com.company",
            TeamIdentifier = "TEAM",
            Certificate = File.ReadAllBytes(companyCertPath),
            CertificatePassword = ConfigurationManager.AppSettings["PASSBOOK_PASSWORD"],
            AppleWWDRCACertificate = File.ReadAllBytes(appleCertPath),
            SerialNumber = Guid.NewGuid().ToString(),
            Description = data.Description,
            OrganizationName = "some organization",
            BackgroundColor = ColorHexToPassBookColor("#00517c"),
            ForegroundColor = ColorHexToPassBookColor("#f68700"),
            LabelColor = ColorHexToPassBookColor("#ffffff"),
            LogoText = "some text",
            GroupingIdentifier = data.EventCode
        };

             // .... images, icons, fields, etc

             return generator.Generate(request);
       }

It's missing the part where you add the fields, images, icons but that is irrelevant right now, I created a Gist with the entire code if you need it.


Do I need to make a new cert when send it, to make it work?

Upvotes: 1

Views: 1602

Answers (1)

Tomas McGuinness
Tomas McGuinness

Reputation: 7689

I'm the developer of dotnet-passbook and I helped Emiliano resolve this issue on Github.

The problem was the pfx certificate being used to sign the manifest.

This certificate wasn't generated from the Apple Developer portal and, as a result, it was missing required information. I ran the pass through my validation tool (https://pkpassvalidator.azurewebsites.net) and this gave me an idea of what the issue was. Once I'd established that the pass type identifier and team identifier values differed, I investigated the certificate further.

You can read the full history of the issue here - https://github.com/tomasmcguinness/dotnet-passbook/issues/69

Upvotes: 2

Related Questions