; or (2) the date on which the alien's application for naturalization under section 328 or 329 has been denied or revoked and all administrative appeals have been exhausted. . (d) Timely determination by the secretary of defense Not later than 90 days after receiving a request by an alien who has enlisted in the Armed Forces pursuant to section 504(b)(1)(D) of title 10, United States Code, for a certification of service in the Armed Forces, the head of the military department under which the alien served shall issue a determination certifying whether the alien has served honorably in an active-duty status, and whether separation from such service was under honorable conditions as required by sections 328 and 329 of the Immigration and Nationality Act ( 8 U.S.C. 1439 , 1440), unless the head of the military department concerned requires additional time to vet national security or counter-intelligence concerns. (e) Medical exception An alien who otherwise meets the qualifications for enlistment under section 504(b)(1)(D) of title 10, United States Code, but who, after reporting for initial entry training, has not successfully completed such training primarily for medical reasons shall be considered to have separated from service in the Armed Forces under honorable conditions for purposes of sections 328 and 329 of the Immigration and Nationality Act ( 8 U.S.C. 1439 , 1440), if such medical reasons are certified by the head of the military department under which the individual so served. (f) Good moral character In determining whether an alien who has enlisted in the Armed Forces pursuant to section 504(b)(1)(D) of title 10, United States Code, has good moral character for purposes of section 101(f) of the Immigration and Nationality Act ( 8 U.S.C. 1101(f) ), the Secretary of Homeland Security— (1) shall consider the alien’s honorable service in the Armed Forces