Fix RangeError bignum too big to convert into `long' on armhf platforms

On a 32-bit platform such as armhf, the original calculation for
the end date of the registry SSL certificate overflowed.
Use TimeDate to prevent this from occurring.

Closes #1390
This commit is contained in:
Stan Hu 2016-07-12 15:16:48 -07:00
parent 09586f6bb3
commit 4ba24bfe21
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ module Registry
cert = OpenSSL::X509::Certificate.new
cert.subject = cert.issuer = OpenSSL::X509::Name.parse(subject)
cert.not_before = Time.now
cert.not_after = Time.now + 18250 * 24 * 60 * 60
cert.not_after = (DateTime.now + 365 * 50).to_time
cert.public_key = key.public_key
cert.serial = 0x0
cert.version = 2