Skip to content

Commit 187dd12

Browse files
committed
fix(auto-cert): key type is not user specified
1 parent 1ede630 commit 187dd12

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

app/src/views/site/cert/components/ObtainCert.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const data = ref({
3030
credentials: {},
3131
additional: {},
3232
},
33+
key_type: '2048',
3334
}) as Ref<AutoCertOptions>
3435
3536
const modalClosable = ref(true)
@@ -43,10 +44,14 @@ const name = computed(() => {
4344
return directivesMap.value.server_name[0].params.trim()
4445
})
4546
46-
const refObtainCertLive = ref()
47+
const refObtainCertLive = useTemplateRef('refObtainCertLive')
4748
48-
function issue_cert(config_name: string, server_name: string) {
49-
refObtainCertLive.value.issue_cert(config_name, server_name.trim().split(' ')).then(resolveCert)
49+
function issue_cert() {
50+
refObtainCertLive.value?.issue_cert(
51+
props.configName,
52+
name.value.trim().split(' '),
53+
data.value.key_type,
54+
).then(resolveCert)
5055
}
5156
5257
async function resolveCert({ ssl_certificate, ssl_certificate_key, key_type }: CertificateResult) {
@@ -123,9 +128,7 @@ function job() {
123128
params: '',
124129
})
125130
}
126-
}).then(() => {
127-
issue_cert(props.configName, name.value)
128-
})
131+
}).then(issue_cert)
129132
}
130133
function toggle(status: boolean) {
131134
if (status) {

0 commit comments

Comments
 (0)