Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(ssl): fix SSL regeneration to sign with CA cert and use mount path

peaklabs-dev69a6010839f9
diff --git a/app/Jobs/RegenerateSslCertJob.php b/app/Jobs/RegenerateSslCertJob.php
index 541e53b7e9..0155ee798a 100644
--- a/app/Jobs/RegenerateSslCertJob.php
+++ b/app/Jobs/RegenerateSslCertJob.php
@@ -47,14 +47,21 @@ class RegenerateSslCertJob implements ShouldQueue
foreach ($certificates as $certificate) {
try {
+ $caCert = SslCertificate::where('server_id', $certificate->server_id)
+ ->where('resource_type', null)
+ ->where('resource_id', null)
+ ->first();
+
SSLHelper::generateSslCertificate(
commonName: $certificate->common_name,
subjectAlternativeNames: $certificate->subject_alternative_names,
resourceType: $certificate->resource_type,
resourceId: $certificate->resource_id,
serverId: $certificate->server_id,
- validityDays: 365,
configurationDir: $certificate->configuration_dir,
+ mountPath: $certificate->mount_path,
+ caCert: $caCert->ssl_certificate,
+ caKey: $caCert->ssl_private_key,
);
$regenerated->push($certificate);
} catch (\Exception $e) {