in source/sigv4.c [728:751]
static SigV4Status_t checkLeap( const SigV4DateTime_t * pDateElements )
{
SigV4Status_t returnStatus = SigV4ISOFormattingError;
assert( pDateElements != NULL );
/* If the date represents a leap day, verify that the leap year is valid. */
if( ( pDateElements->mon == 2 ) && ( pDateElements->mday == 29 ) )
{
if( ( ( pDateElements->year % 400 ) != 0 ) &&
( ( ( pDateElements->year % 4 ) != 0 ) ||
( ( pDateElements->year % 100 ) == 0 ) ) )
{
LogError( ( "%ld is not a valid leap year.",
( long int ) pDateElements->year ) );
}
else
{
returnStatus = SigV4Success;
}
}
return returnStatus;
}