diff options
Diffstat (limited to 'app/models/x509_certificate.rb')
-rw-r--r-- | app/models/x509_certificate.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/x509_certificate.rb b/app/models/x509_certificate.rb index 43927e65db1..75b711eab5b 100644 --- a/app/models/x509_certificate.rb +++ b/app/models/x509_certificate.rb @@ -2,6 +2,7 @@ class X509Certificate < ApplicationRecord include X509SerialNumberAttribute + include AfterCommitQueue x509_serial_number_attribute :serial_number @@ -25,8 +26,14 @@ class X509Certificate < ApplicationRecord validates :x509_issuer_id, presence: true + after_commit :mark_commit_signatures_unverified + def self.safe_create!(attributes) create_with(attributes) .safe_find_or_create_by!(subject_key_identifier: attributes[:subject_key_identifier]) end + + def mark_commit_signatures_unverified + X509CertificateRevokeWorker.perform_async(self.id) if revoked? + end end |