tananaev / passport-reader

e-Passport NFC Reader Android app
348 stars 132 forks source link

sodDigestEncryptionAlgorithm not proper set #51

Open dragom opened 1 year ago

dragom commented 1 year ago

https://github.com/tananaev/passport-reader/commit/87df88020c0add700d0290d5aea082eb3edc60ea This is not always same algorithm. One used to sign certificate other to sign SOD file. @daferna

tananaev commented 1 year ago

So, what is the right solution? It seems like old code didn't work for some passports and you're saying new one doesn't work for some? Which passport it doesn't work for?

dragom commented 1 year ago

Not expert on this. But previos code looks more valid, and it works if CA sign alg is different from SOD sign alg. And change was made because BC not return proper string? Probably you should check what readId do in their app and do the same.