VirtualBox

Ignore:
Timestamp:
Jul 12, 2022 9:42:24 AM (2 years ago)
Author:
vboxsync
Message:

RTSignTool: Must normalize after changing RTTIME.i32Year before imploding it to a RTTIMESPEC. bugref:8691

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/tools/RTSignTool.cpp

    r95600 r95605  
    16981698                RTTimeExplode(&Time, RTTimeNow(&SigningTime));
    16991699                Time.i32Year = (int32_t)ValueUnion.u32;
    1700                 if (Time.u8MonthDay == 29 && Time.u8Month == 2 && !RTTimeIsLeapYear(Time.i32Year))
     1700                if (Time.u8MonthDay > 28 && Time.u8Month == 2 && !RTTimeIsLeapYear(Time.i32Year))
    17011701                    Time.u8MonthDay = 28;
    1702                 RTTimeImplode(&SigningTime, &Time);
     1702                Time.u16YearDay = 0;
     1703                Time.fFlags    &= ~(RTTIME_FLAGS_COMMON_YEAR | RTTIME_FLAGS_LEAP_YEAR);
     1704                RTTimeImplode(&SigningTime, RTTimeNormalize(&Time));
    17031705                break;
    17041706            }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette