FixRM #8034 Pick a valid certificate expiration
Helps to put the rand() wrapper in
Land #2343 protect vs int wrap on ARM/Android

[FixRM #8034]
Merge remote-tracking branch 'upstream/master'