fix tsa settings

This commit is contained in:
Pete Matsyburka
2024-05-15 00:21:52 +03:00
parent 6f6fb74988
commit b202941b79
@@ -1,6 +1,8 @@
# frozen_string_literal: true
class TimestampServerController < ApplicationController
HASH_ALGORITHM = 'SHA256'
before_action :build_encrypted_config
authorize_resource :encrypted_config
@@ -24,8 +26,8 @@ class TimestampServerController < ApplicationController
def test_timeserver_url(url)
req = OpenSSL::Timestamp::Request.new
req.algorithm = 'SHA512'
req.message_imprint = 'test'
req.algorithm = HASH_ALGORITHM
req.message_imprint = OpenSSL::Digest.digest(HASH_ALGORITHM, 'test')
uri = Addressable::URI.parse(url)