Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Error opening signer certificate /etc/passbook/keys/ #50

Closed
yozef opened this issue Jun 30, 2016 · 1 comment
Closed

Error opening signer certificate /etc/passbook/keys/ #50

yozef opened this issue Jun 30, 2016 · 1 comment

Comments

@yozef
Copy link

yozef commented Jun 30, 2016

I've done everything that was mentioned to the letter:
1- Exported the .p12 certificate of the Pass Type.
2- Added that .p12 file into etc/passbook/keys/
3- Ran node-passbook prepare-keys -p keys
4- Entered Import Password, Entered PEM pass phrase, and Verifying Enter PEM pass phrase
5- I do see in the keys/ folder now: com.xxxx.yyy.pem, wwdr.pem and my original com.xxx.yyy.p12 file

I call the createMyPass method:

var template = createTemplate("boardingPass", {
   passTypeIdentifier:"pass.com.xxx.yyy",
   teamIdentifier:      "8XYZ876JS", // not the real one
   backgroundColor: "rgb(255,255,255)",
});
template.keys("/etc/passbook/keys", "password_when_creating_PEM"); // from step 4
template.loadImagesFrom("images"); // has icon.png and @2x as well as logo.png and @2x

function createMyPass(req, res) {

    var pass = template.createPass({
        serialNumber:   "123456",
        organizationName: "Some Org",
        description:    "20% off",
        icon:       "icon.png"
    });

    pass.fields.barcode = {
        message: "ABC123456789",
        format: "PKBarcodeFormatPDF417",
    };

    var file = fs.createWriteStream("mypass.pkpass");

    pass.on("error", function(error) {
      logger.info('Error: ' + error);
      process.exit(1);
    });

    pass.pipe(file);

    pass.render(res, function(error) {
            if (error) logger.info('Error: ' + error);
    });
};

When this method gets called, I get in the console:

 | Error: Error: Error opening signer certificate /etc/passbook/keys/com.xxx.yyy.pem
48790:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/crypto/bio/bss_file.c:356:fopen('/etc/passbook/keys/com.xxx.yyy..pem','r')
48790:error:20074002:BIO routines:FILE_CTRL:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/crypto/bio/bss_file.c:358:
unable to load certificate
@yozef
Copy link
Author

yozef commented Jul 2, 2016

Changing the location of the keys works.

@yozef yozef closed this as completed Jul 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant