mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 12:39:01 +08:00
fix: 创建CA机构生成的应为证书而非证书签名请求 (#6404)
This commit is contained in:
parent
a53fff2416
commit
466617847f
@ -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))
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div v-loading="loading">
|
||||
<el-radio-group v-model="curr">
|
||||
<el-radio-button value="detail">{{ $t('ssl.organizationDetail') }}</el-radio-button>
|
||||
<el-radio-button value="ssl">csr</el-radio-button>
|
||||
<el-radio-button value="ssl">{{ $t('ssl.ssl') }}</el-radio-button>
|
||||
<el-radio-button value="key">{{ $t('ssl.key') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div v-if="curr === 'detail'" class="mt-5">
|
||||
|
Loading…
Reference in New Issue
Block a user