Menu

#36 DG11File isn't in compliance with ICAO spec. Can't handle partial dates

v1.0_(example)
closed
1
2017-06-24
2017-06-22
Arnljot
No

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.

Discussion

  • Martijn Oostdijk

    • assigned_to: Martijn Oostdijk
     
  • Martijn Oostdijk

    Thanks for reporting @Arnljot. I'm looking into this.

     
  • Martijn Oostdijk

    Solved in commit 1673.

     
  • Martijn Oostdijk

    • status: open --> closed
     
  • Martijn Oostdijk

    I replaced Date with String. DG11File will 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

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB