I work for norwegian border patrol, and we observe problems in parsing datagroup 11 objects for people with partial birdth date data available.
DG11File object holds it's private field member "fullDateOfBirth" for tag 0x5F2B (Full Date Of Birth) in a java.util.Date object.
This is not compatible with the specification for DG11, there is a note in the specification (ICAO doc 9303 v7 part 10):
"In case the month (MM) or the day (DD) are unknown, the interoperable way to indicate this in DG11 is to set the respectice characters to '00'. Incase the century and the year (CCYY) are unknown, the interoperable way to indicate this in DG11 is to set the respective characters to '0000'. Issuer-assigned dates must always be used consistently."
According to the specification (ICAO doc 9303 part 3 - common spec) all or some of the date of birth might be missing and set to filler characters in the visible MRZ.
We then see in DG11 that they don's zeros but rather fillers. This generates a ParseException that is rethrown as an IllegalArgumentException.
In our own code that parses MRZs we handle dates by a POJO that has three fields: Year (YYYY), month (MM) and day (DD). This complies with the spec. As we use this data both server side (JEE code, java8) and Android side (java7), we cant use java time (java8) or jodatime.
DG11 should in other words not use java.util.Date as in some cases dates are not full, and cannot be represented in java.util.Date, but there should rather be introduced a new JMRTD specific type.
Anonymous
Thanks for reporting @Arnljot. I'm looking into this.
Solved in commit 1673.
I replaced
DatewithString.DG11Filewill return the UTF-8 value as read in this data group literally. Parsing to a date is now a responsibility of client code.Last edit: Martijn Oostdijk 2017-06-24