@@ -170,11 +170,17 @@ def test_read_from_file
170170 end
171171
172172 def test_eq
173- cacert = issue_cert ( @ca , @rsa1024 , 1 , [ ] , nil , nil )
174- cert1 = issue_cert ( @ee1 , @rsa2048 , 2 , [ ] , cacert , @rsa1024 )
175- cert2 = issue_cert ( @ee1 , @rsa2048 , 2 , [ ] , cacert , @rsa1024 )
176- cert3 = issue_cert ( @ee1 , @rsa2048 , 3 , [ ] , cacert , @rsa1024 )
177- cert4 = issue_cert ( @ee1 , @rsa2048 , 2 , [ ] , cacert , @rsa1024 , digest : "sha512" )
173+ now = Time . now
174+ cacert = issue_cert ( @ca , @rsa1024 , 1 , [ ] , nil , nil ,
175+ not_before : now , not_after : now + 3600 )
176+ cert1 = issue_cert ( @ee1 , @rsa2048 , 2 , [ ] , cacert , @rsa1024 ,
177+ not_before : now , not_after : now + 3600 )
178+ cert2 = issue_cert ( @ee1 , @rsa2048 , 2 , [ ] , cacert , @rsa1024 ,
179+ not_before : now , not_after : now + 3600 )
180+ cert3 = issue_cert ( @ee1 , @rsa2048 , 3 , [ ] , cacert , @rsa1024 ,
181+ not_before : now , not_after : now + 3600 )
182+ cert4 = issue_cert ( @ee1 , @rsa2048 , 2 , [ ] , cacert , @rsa1024 ,
183+ digest : "sha512" , not_before : now , not_after : now + 3600 )
178184
179185 assert_equal false , cert1 == 12345
180186 assert_equal true , cert1 == cert2
0 commit comments