Test out of bounds month, day of month, hour, minute and seconds.
Ensure we check the leap year boundaries.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28789)
"20210328030000+0200",
1616893200,
},
+ {
+ /* test seconds out of bound */
+ "210328005960Z",
+ -1,
+ },
+ {
+ /* test minutes out of bound */
+ "210328006059Z",
+ -1,
+ },
+ {
+ /* test hours out of bound */
+ "210328255959Z",
+ -1,
+ },
+ {
+ /* test days out of bound */
+ "210332005959Z",
+ -1,
+ },
+ {
+ /* test days out of bound */
+ "210230005959Z",
+ -1,
+ },
+ {
+ /* test days out of bound (non leap year)*/
+ "210229005959Z",
+ -1,
+ },
+ {
+ /* test days not out of bound (non leap year) */
+ "210228005959Z",
+ 1614473999,
+ },
+ {
+ /* test days not out of bound (leap year)*/
+ "200229005959Z",
+ 1582937999,
+ },
+ {
+ /* test days out of bound (leap year)*/
+ "200230005959Z",
+ -1
+ },
+ {
+ /* test month out of bound */
+ "211328005960Z",
+ -1,
+ },
{
/*
* Invalid strings should get -1 as a result