Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tag.rb « x509 « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cf24e6f62bdcd2b46ae8a2b0905c5468a986a970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true
require 'openssl'
require 'digest'

module Gitlab
  module X509
    class Tag < Gitlab::SignedTag
      include Gitlab::Utils::StrongMemoize

      def signature
        strong_memoize(:signature) do
          super

          signature = X509::Signature.new(signature_text, signed_text, @tag.tagger.email, Time.at(@tag.tagger.date.seconds))
          signature unless signature.verified_signature.nil?
        end
      end
    end
  end
end