From 466617847fe635dd2b8d967939b3e751365fb2bb Mon Sep 17 00:00:00 2001 From: Anye <53684988+Anyexyz@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:56:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BACA=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84=E5=BA=94=E4=B8=BA=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E8=80=8C=E9=9D=9E=E8=AF=81=E4=B9=A6=E7=AD=BE=E5=90=8D=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=20(#6404)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/website_ca.go | 6 +++--- frontend/src/views/website/ssl/ca/detail/index.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/app/service/website_ca.go b/backend/app/service/website_ca.go index a93b6ad34..b10402278 100644 --- a/backend/app/service/website_ca.go +++ b/backend/app/service/website_ca.go @@ -432,14 +432,14 @@ func (w WebsiteCAService) DownloadFile(id uint) (*os.File, error) { if err = fileOp.CreateDir(dir, 0666); err != nil { return nil, err } - if err = fileOp.WriteFile(path.Join(dir, "ca.csr"), strings.NewReader(ca.CSR), 0644); err != nil { + if err = fileOp.WriteFile(path.Join(dir, "ca.crt"), strings.NewReader(ca.CSR), 0644); err != nil { return nil, err } - if err = fileOp.WriteFile(path.Join(dir, "private.key"), strings.NewReader(ca.PrivateKey), 0644); err != nil { + if err = fileOp.WriteFile(path.Join(dir, "ca.key"), strings.NewReader(ca.PrivateKey), 0644); err != nil { return nil, err } fileName := ca.Name + ".zip" - if err = fileOp.Compress([]string{path.Join(dir, "ca.csr"), path.Join(dir, "private.key")}, dir, fileName, files.SdkZip, ""); err != nil { + if err = fileOp.Compress([]string{path.Join(dir, "ca.crt"), path.Join(dir, "ca.key")}, dir, fileName, files.SdkZip, ""); err != nil { return nil, err } return os.Open(path.Join(dir, fileName)) diff --git a/frontend/src/views/website/ssl/ca/detail/index.vue b/frontend/src/views/website/ssl/ca/detail/index.vue index 5ca838f12..6b4a7301a 100644 --- a/frontend/src/views/website/ssl/ca/detail/index.vue +++ b/frontend/src/views/website/ssl/ca/detail/index.vue @@ -6,7 +6,7 @@
{{ $t('ssl.organizationDetail') }} - csr + {{ $t('ssl.ssl') }} {{ $t('ssl.key') }}