tsa fallback

This commit is contained in:
Pete Matsyburka
2025-04-30 22:58:50 +03:00
parent 6efe8027f1
commit 4a8e2a82e5
+6
View File
@@ -20,6 +20,7 @@ module Submissions
signature[:SubFilter] = :'ETSI.RFC3161'
end
# rubocop:disable Metrics
def sign(io, byte_range)
digest = OpenSSL::Digest.new(HASH_ALGORITHM)
@@ -49,7 +50,12 @@ module Submissions
end
OpenSSL::Timestamp::Response.new(response.body).token.to_der
rescue StandardError => e
Rollbar.error(e) if defined?(Rollbar)
OpenSSL::ASN1::GeneralizedTime.new(Time.now.utc).to_der
end
# rubocop:enable Metrics
def build_payload(digest)
req = OpenSSL::Timestamp::Request.new