mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 05:29:51 +00:00
fix: couldn't save certificate source
This commit is contained in:
parent
ddb6a88392
commit
3c70a4f455
@ -216,9 +216,9 @@ func apply(option *applyConfig, provider challenge.Provider) (*Certificate, erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
challengeOptions := make([]dns01.ChallengeOption, 0)
|
challengeOptions := make([]dns01.ChallengeOption, 0)
|
||||||
nameservers := parseNameservers(option.Nameservers)
|
if len(option.Nameservers) > 0 {
|
||||||
if len(nameservers) > 0 {
|
challengeOptions = append(challengeOptions, dns01.AddRecursiveNameservers(dns01.ParseNameservers(strings.Split(option.Nameservers, ";"))))
|
||||||
challengeOptions = append(challengeOptions, dns01.AddRecursiveNameservers(nameservers))
|
challengeOptions = append(challengeOptions, dns01.DisableAuthoritativeNssPropagationRequirement())
|
||||||
}
|
}
|
||||||
|
|
||||||
client.Challenge.SetDNS01Provider(provider, challengeOptions...)
|
client.Challenge.SetDNS01Provider(provider, challengeOptions...)
|
||||||
@ -306,23 +306,6 @@ func getReg(client *lego.Client, sslProvider *SSLProviderConfig, user *applyUser
|
|||||||
return reg, nil
|
return reg, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseNameservers(ns string) []string {
|
|
||||||
nameservers := make([]string, 0)
|
|
||||||
|
|
||||||
lines := strings.Split(ns, ";")
|
|
||||||
|
|
||||||
for _, line := range lines {
|
|
||||||
line = strings.TrimSpace(line)
|
|
||||||
if line == "" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
nameservers = append(nameservers, line)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nameservers
|
|
||||||
}
|
|
||||||
|
|
||||||
func parseKeyAlgorithm(algo string) certcrypto.KeyType {
|
func parseKeyAlgorithm(algo string) certcrypto.KeyType {
|
||||||
switch algo {
|
switch algo {
|
||||||
case "RSA2048":
|
case "RSA2048":
|
||||||
|
@ -130,7 +130,7 @@ func (w *WorkflowOutputRepository) Save(ctx context.Context, output *domain.Work
|
|||||||
}
|
}
|
||||||
|
|
||||||
certRecord := models.NewRecord(certCollection)
|
certRecord := models.NewRecord(certCollection)
|
||||||
certRecord.Set("source", certificate.Source)
|
certRecord.Set("source", string(certificate.Source))
|
||||||
certRecord.Set("subjectAltNames", certificate.SubjectAltNames)
|
certRecord.Set("subjectAltNames", certificate.SubjectAltNames)
|
||||||
certRecord.Set("certificate", certificate.Certificate)
|
certRecord.Set("certificate", certificate.Certificate)
|
||||||
certRecord.Set("privateKey", certificate.PrivateKey)
|
certRecord.Set("privateKey", certificate.PrivateKey)
|
||||||
|
@ -161,9 +161,9 @@ const WorkflowList = () => {
|
|||||||
if (record.lastRunId) {
|
if (record.lastRunId) {
|
||||||
if (record.lastRunStatus === WORKFLOW_RUN_STATUSES.SUCCEEDED) {
|
if (record.lastRunStatus === WORKFLOW_RUN_STATUSES.SUCCEEDED) {
|
||||||
return (
|
return (
|
||||||
<Space className="max-w-full" direction="vertical" size={4}>
|
<Space>
|
||||||
<Badge status="success" count={<CheckCircleOutlinedIcon style={{ color: themeToken.colorSuccess }} />} />
|
<Badge status="success" count={<CheckCircleOutlinedIcon style={{ color: themeToken.colorSuccess }} />} />
|
||||||
<Typography.Text type="secondary">{dayjs(record.lastRunTime!).format("YYYY-MM-DD HH:mm:ss")}</Typography.Text>
|
<Typography.Text>{dayjs(record.lastRunTime!).format("YYYY-MM-DD HH:mm:ss")}</Typography.Text>
|
||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
} else if (record.lastRunStatus === WORKFLOW_RUN_STATUSES.FAILED) {
|
} else if (record.lastRunStatus === WORKFLOW_RUN_STATUSES.FAILED) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user