tsa fallback
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user