diff --git a/app/controllers/staffs/x509_certificates_controller.rb b/app/controllers/staffs/x509_certificates_controller.rb index 45c2c01..818e187 100644 --- a/app/controllers/staffs/x509_certificates_controller.rb +++ b/app/controllers/staffs/x509_certificates_controller.rb @@ -35,7 +35,7 @@ class Staffs::X509CertificatesController < ApplicationController result = CreateRSAKeysAndX509SelfSignedCertificate.call \ @x509_certificate_form.attributes - redirect_to after_create_url result.certificate, result.key + redirect_to after_create_url result.certificate end private @@ -52,11 +52,11 @@ private ) end - def after_create_url(certificate, key) + def after_create_url(certificate) staff_x509_certificate_url( certificate, private_key_pem_secret: Base64.urlsafe_encode64( - key.private_key_pem_secret, + certificate.rsa_key.private_key_pem_secret, ), ) end