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: b9a3b11ac34f7cb26d3b162b68f7c2a61d12601f (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.user_email, @tag.date)
          signature unless signature.verified_signature.nil?
        end
      end
    end
  end
end