diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /lib/gitlab/x509 | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'lib/gitlab/x509')
-rw-r--r-- | lib/gitlab/x509/certificate.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/x509/signature.rb | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/x509/certificate.rb b/lib/gitlab/x509/certificate.rb index 98688f504eb..e1ba5cdac7d 100644 --- a/lib/gitlab/x509/certificate.rb +++ b/lib/gitlab/x509/certificate.rb @@ -3,7 +3,7 @@ module Gitlab module X509 class Certificate - CERT_REGEX = /-----BEGIN CERTIFICATE-----(?:.|\n)+?-----END CERTIFICATE-----/.freeze + CERT_REGEX = /-----BEGIN CERTIFICATE-----(?:.|\n)+?-----END CERTIFICATE-----/ attr_reader :key, :cert, :ca_certs diff --git a/lib/gitlab/x509/signature.rb b/lib/gitlab/x509/signature.rb index 649e5379927..74d861c8701 100644 --- a/lib/gitlab/x509/signature.rb +++ b/lib/gitlab/x509/signature.rb @@ -39,6 +39,8 @@ module Gitlab return :unverified if x509_certificate.nil? || x509_certificate.revoked? || + certificate_subject.nil? || + certificate_crl.nil? || !verified_signature || signed_by_user.nil? @@ -127,6 +129,7 @@ module Gitlab def certificate_crl extension = get_certificate_extension('crlDistributionPoints') + return if extension.nil? crl_url = nil @@ -185,7 +188,7 @@ module Gitlab end def x509_issuer - return if verified_signature.nil? || issuer_subject_key_identifier.nil? || certificate_crl.nil? + return if verified_signature.nil? || issuer_subject_key_identifier.nil? || certificate_issuer.nil? attributes = { subject_key_identifier: issuer_subject_key_identifier, |