Skip to content

Commit a582eb1

Browse files
fix(SSLGenerate): dump private key if issuer was not let's encrypt (#1086) (#1087)
(cherry picked from commit fdf3cbd) Co-authored-by: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com>
1 parent 55ca0ab commit a582eb1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

swiftwave_service/core/domain.operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (domain *Domain) UpdateSSLStatus(_ context.Context, db gorm.DB, status Doma
7373
}
7474

7575
func (domain *Domain) validateAndFillSSLInfo() error {
76-
if domain == nil || domain.SSLFullChain == "" {
76+
if domain == nil || domain.SSLFullChain == "" || domain.SSLPrivateKey == "" {
7777
return nil
7878
}
7979

swiftwave_service/worker/process_ssl_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (m Manager) SSLGenerate(request SSLGenerateRequest, ctx context.Context, _
4343
return nil
4444
}
4545
// generate private key [if not found]
46-
if domain.SSLPrivateKey == "" {
46+
if domain.SSLPrivateKey == "" || strings.Compare(domain.SSLIssuer, "Let's Encrypt") != 0 {
4747
privateKey, err := generatePrivateKey()
4848
if err != nil {
4949
return err

0 commit comments

Comments
 (0)