mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 19:05:55 +02:00
fix(auto-cert): key type is not user specified
This commit is contained in:
parent
1ede630ad4
commit
187dd12f36
1 changed files with 9 additions and 6 deletions
|
@ -30,6 +30,7 @@ const data = ref({
|
||||||
credentials: {},
|
credentials: {},
|
||||||
additional: {},
|
additional: {},
|
||||||
},
|
},
|
||||||
|
key_type: '2048',
|
||||||
}) as Ref<AutoCertOptions>
|
}) as Ref<AutoCertOptions>
|
||||||
|
|
||||||
const modalClosable = ref(true)
|
const modalClosable = ref(true)
|
||||||
|
@ -43,10 +44,14 @@ const name = computed(() => {
|
||||||
return directivesMap.value.server_name[0].params.trim()
|
return directivesMap.value.server_name[0].params.trim()
|
||||||
})
|
})
|
||||||
|
|
||||||
const refObtainCertLive = ref()
|
const refObtainCertLive = useTemplateRef('refObtainCertLive')
|
||||||
|
|
||||||
function issue_cert(config_name: string, server_name: string) {
|
function issue_cert() {
|
||||||
refObtainCertLive.value.issue_cert(config_name, server_name.trim().split(' ')).then(resolveCert)
|
refObtainCertLive.value?.issue_cert(
|
||||||
|
props.configName,
|
||||||
|
name.value.trim().split(' '),
|
||||||
|
data.value.key_type,
|
||||||
|
).then(resolveCert)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function resolveCert({ ssl_certificate, ssl_certificate_key, key_type }: CertificateResult) {
|
async function resolveCert({ ssl_certificate, ssl_certificate_key, key_type }: CertificateResult) {
|
||||||
|
@ -123,9 +128,7 @@ function job() {
|
||||||
params: '',
|
params: '',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(issue_cert)
|
||||||
issue_cert(props.configName, name.value)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
function toggle(status: boolean) {
|
function toggle(status: boolean) {
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue