yourkarma / JWT

A JSON Web Token implementation in Objective-C.
MIT License
350 stars 107 forks source link

Fixes crash when providing a pkcs12 file with only one private key in #215

Open unier opened 4 years ago

unier commented 4 years ago

Added a patch to make sure the pkcs12 that were opened actually has the number of private - certificate pairs that are needed to continue. If a pkcs12 that was created with only one private key in it and no certificate was tried used, this just crashed when accessing index 0 with the CFArrayGetValueAtIndex

lolgear commented 4 years ago

Hi! Thank you for PR! Could you also add tests for this case?

lolgear commented 3 years ago

@unier If you don't mind I added this PR via combining it with another PR. I guess this PR could be closed. Could you check latest master?

Thanks!