passbook
passbook copied to clipboard
PKCS12_parse: unsupported error with Ruby 3.2
Ruby 3.2 includes OpenSSL 3. This causes issues signed Passbook passes using a p12
archive.
The fix is to extract the certificate and private key from your p12
file and pass those individually to the Passbook gem.
Passbook.configure do |passbook|
passbook.wwdc_cert = Rails.root.join('config/apple/wwdr.pem')
# no longer works in Ruby 3.2 / OpenSSL 3
# passbook.p12_certificate = Rails.root.join('config/apple/whatever.p12')
# passbook.p12_password = ''
# this works in Ruby 3.2
passbook.p12_certificate = Rails.root.join('config/apple/whatever.crt')
passbook.p12_key = Rails.root.join('config/apple/whatever.key')
end