[70] [Add flag to read e-passport photoAdd flag to read e-passport photo]
Changes
The existing code base has an inherent logic that deals when a read permission is not satisfied and as a result, a data group is unreadable. Inserting the new flag into this logic results in a minimal change.
Pass a boolean flag to the NFCDocumentTag constructor here
The flag will propagate to PassportNFC instance
The flag is used in PassportNFC::getDG( ) method to control the DG2 read.
The verifyHash() will skip the hash check for DG2 (ie, modified flow will not read DG2) in use cases where the photo from DG2 is not needed. For other cases where the photo is retrieved (because it needs to be displayed in a UI), then verifyHash() will read DG2 to calculate its value and compare (ie, original flow).
Issue
For issue#70 adding a flag to read DG2 or not.
[70] [Add flag to read e-passport photoAdd flag to read e-passport photo]
Changes
The existing code base has an inherent logic that deals when a read permission is not satisfied and as a result, a data group is unreadable. Inserting the new flag into this logic results in a minimal change.
NFCDocumentTag
constructor herePassportNFC
instancePassportNFC::getDG( )
method to control theDG2
read.The
verifyHash()
will skip the hash check forDG2
(ie, modified flow will not read DG2) in use cases where the photo fromDG2
is not needed. For other cases where the photo is retrieved (because it needs to be displayed in a UI), thenverifyHash()
will readDG2
to calculate its value and compare (ie, original flow).