px5g: creates certificates that expire in the past
authorJohn Crispin <john@openwrt.org>
Thu, 4 Jul 2013 13:31:32 +0000 (13:31 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 4 Jul 2013 13:31:32 +0000 (13:31 +0000)
commit60f5dd53127b13c43cf406764b0ff386e233bc43
tree6017d39770b9d4653fe8b2040b42636db2b8ea88
parent8e280de4b8df075300984d657ceaafb7ba230c45
px5g: creates certificates that expire in the past

the attached patch fixes a bug of px5g when instructed to build
certificates that expire after 2038-01-19, caused a multiplication that
may overflow the "to" variable of type time_t

Attached patch checks if "to" precedes "from": if so sets "to" to its
maximum value. Pretty rude, but works well even if certificate is set to
expire in a century

Signed-off-by: Federico Fissore <federico@fissore.org>
Patchork: http://patchwork.openwrt.org/patch/3749/

SVN-Revision: 37165
package/utils/px5g/src/px5g.c