Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions test/certificate_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def generate_root()
]
@root_cert.issuer = @root_cert.subject
@root_cert.public_key = @root_key.public_key
@root_cert.not_before = Time.now
@root_cert.not_after = Time.now + 60
@root_cert.not_before = Time.now - 10000
@root_cert.not_after = Time.now + 10000
ef = OpenSSL::X509::ExtensionFactory.new

ef.subject_certificate = @root_cert
Expand All @@ -52,8 +52,8 @@ def generate_intermediate()
]
@intermediate_cert.issuer = @root_cert.subject
@intermediate_cert.public_key = @intermediate_key.public_key
@intermediate_cert.not_before = Time.now
@intermediate_cert.not_after = Time.now + 60
@intermediate_cert.not_before = Time.now - 10000
@intermediate_cert.not_after = Time.now + 10000

ef = OpenSSL::X509::ExtensionFactory.new
ef.subject_certificate = @intermediate_cert
Expand All @@ -80,8 +80,8 @@ def generate_signer()
]
@signer_cert.issuer = @intermediate_cert.subject
@signer_cert.public_key = @signer_key.public_key
@signer_cert.not_before = Time.now
@signer_cert.not_after = Time.now + 60
@signer_cert.not_before = Time.now - 10000
@signer_cert.not_after = Time.now + 10000

ef = OpenSSL::X509::ExtensionFactory.new
ef.subject_certificate = @signer_cert
Expand Down Expand Up @@ -117,4 +117,4 @@ def sign_message(message)

return pkcs7.to_pem
end
end
end