mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-02-03 01:12:52 +00:00
Add option to select RSA or ECDSA key type when creating certificates
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import EasyModal, { type InnerModalProps } from "ez-modal-react";
|
||||
import { Form, Formik } from "formik";
|
||||
import { Form, Formik, Field } from "formik";
|
||||
import { type ReactNode, useState } from "react";
|
||||
import { Alert } from "react-bootstrap";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
@@ -44,6 +44,7 @@ const DNSCertificateModal = EasyModal.create(({ visible, remove }: InnerModalPro
|
||||
provider: "letsencrypt",
|
||||
meta: {
|
||||
dnsChallenge: true,
|
||||
keyType: "ecdsa",
|
||||
},
|
||||
} as any
|
||||
}
|
||||
@@ -63,6 +64,30 @@ const DNSCertificateModal = EasyModal.create(({ visible, remove }: InnerModalPro
|
||||
<div className="card m-0 border-0">
|
||||
<div className="card-body">
|
||||
<DomainNamesField isWildcardPermitted dnsProviderWildcardSupported />
|
||||
<Field name="meta.keyType">
|
||||
{({ field }: any) => (
|
||||
<div className="mb-3">
|
||||
<label htmlFor="keyType" className="form-label">
|
||||
<T id="certificates.key-type" />
|
||||
</label>
|
||||
<select
|
||||
id="keyType"
|
||||
className="form-select"
|
||||
{...field}
|
||||
>
|
||||
<option value="rsa">
|
||||
<T id="certificates.key-type-rsa" />
|
||||
</option>
|
||||
<option value="ecdsa">
|
||||
<T id="certificates.key-type-ecdsa" />
|
||||
</option>
|
||||
</select>
|
||||
<small className="form-text text-muted">
|
||||
<T id="certificates.key-type-description" />
|
||||
</small>
|
||||
</div>
|
||||
)}
|
||||
</Field>
|
||||
<DNSProviderFields />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import EasyModal, { type InnerModalProps } from "ez-modal-react";
|
||||
import { Form, Formik } from "formik";
|
||||
import { Form, Formik, Field } from "formik";
|
||||
import { type ReactNode, useState } from "react";
|
||||
import { Alert } from "react-bootstrap";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
@@ -115,6 +115,9 @@ const HTTPCertificateModal = EasyModal.create(({ visible, remove }: InnerModalPr
|
||||
{
|
||||
domainNames: [],
|
||||
provider: "letsencrypt",
|
||||
meta: {
|
||||
keyType: "ecdsa",
|
||||
},
|
||||
} as any
|
||||
}
|
||||
onSubmit={onSubmit}
|
||||
@@ -142,6 +145,30 @@ const HTTPCertificateModal = EasyModal.create(({ visible, remove }: InnerModalPr
|
||||
setTestResults(null);
|
||||
}}
|
||||
/>
|
||||
<Field name="meta.keyType">
|
||||
{({ field }: any) => (
|
||||
<div className="mb-3">
|
||||
<label htmlFor="keyType" className="form-label">
|
||||
<T id="certificates.key-type" />
|
||||
</label>
|
||||
<select
|
||||
id="keyType"
|
||||
className="form-select"
|
||||
{...field}
|
||||
>
|
||||
<option value="rsa">
|
||||
<T id="certificates.key-type-rsa" />
|
||||
</option>
|
||||
<option value="ecdsa">
|
||||
<T id="certificates.key-type-ecdsa" />
|
||||
</option>
|
||||
</select>
|
||||
<small className="form-text text-muted">
|
||||
<T id="certificates.key-type-description" />
|
||||
</small>
|
||||
</div>
|
||||
)}
|
||||
</Field>
|
||||
</div>
|
||||
{testResults ? (
|
||||
<div className="card-footer">
|
||||
|
||||
Reference in New Issue
Block a user