diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json
index b08147eb..8c0c65db 100644
--- a/client/src/__locales/en.json
+++ b/client/src/__locales/en.json
@@ -353,5 +353,13 @@
"blocked_services_global": "Use global blocked services",
"blocked_service": "Blocked service",
"block_all": "Block all",
- "unblock_all": "Unblock all"
-}
\ No newline at end of file
+ "unblock_all": "Unblock all",
+ "encryption_certificate_path": "Certificate path",
+ "encryption_certificate_path_notice": "To add a path to the certificate, clear the certificate chain textarea.",
+ "encryption_private_key_path": "Private key path",
+ "encryption_private_key_path_notice": "To add a path to the private key, clear the private key textarea.",
+ "encryption_certificates_source_path": "Set a certificates file path",
+ "encryption_certificates_source_content":"Paste the certificates contents",
+ "encryption_key_source_path": "Set a private key file",
+ "encryption_key_source_content": "Paste the private key contents"
+}
diff --git a/client/src/components/Settings/Encryption/CertificateStatus.js b/client/src/components/Settings/Encryption/CertificateStatus.js
new file mode 100644
index 00000000..1ecc2742
--- /dev/null
+++ b/client/src/components/Settings/Encryption/CertificateStatus.js
@@ -0,0 +1,71 @@
+import React, { Fragment } from 'react';
+import PropTypes from 'prop-types';
+import { withNamespaces, Trans } from 'react-i18next';
+import format from 'date-fns/format';
+
+import { EMPTY_DATE } from '../../../helpers/constants';
+
+const CertificateStatus = ({
+ validChain,
+ validCert,
+ subject,
+ issuer,
+ notAfter,
+ dnsNames,
+}) => (
+
+
+ encryption_status:
+
+
+ -
+ {validChain ? (
+ encryption_chain_valid
+ ) : (
+ encryption_chain_invalid
+ )}
+
+ {validCert && (
+
+ {subject && (
+ -
+ encryption_subject:
+ {subject}
+
+ )}
+ {issuer && (
+ -
+ encryption_issuer:
+ {issuer}
+
+ )}
+ {notAfter && notAfter !== EMPTY_DATE && (
+ -
+ encryption_expire:
+ {format(notAfter, 'YYYY-MM-DD HH:mm:ss')}
+
+ )}
+ {dnsNames && (
+ -
+ encryption_hostnames:
+ {dnsNames}
+
+ )}
+
+ )}
+
+
+);
+
+CertificateStatus.propTypes = {
+ validChain: PropTypes.bool.isRequired,
+ validCert: PropTypes.bool.isRequired,
+ subject: PropTypes.string,
+ issuer: PropTypes.string,
+ notAfter: PropTypes.string,
+ dnsNames: PropTypes.string,
+};
+
+export default withNamespaces()(CertificateStatus);
diff --git a/client/src/components/Settings/Encryption/Form.js b/client/src/components/Settings/Encryption/Form.js
index 94e9923c..058cf918 100644
--- a/client/src/components/Settings/Encryption/Form.js
+++ b/client/src/components/Settings/Encryption/Form.js
@@ -1,14 +1,22 @@
-import React, { Fragment } from 'react';
+import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { Field, reduxForm, formValueSelector } from 'redux-form';
import { Trans, withNamespaces } from 'react-i18next';
import flow from 'lodash/flow';
-import format from 'date-fns/format';
-import { renderField, renderSelectField, toNumber, port, portTLS, isSafePort } from '../../../helpers/form';
-import { EMPTY_DATE } from '../../../helpers/constants';
+import {
+ renderField,
+ renderSelectField,
+ renderRadioField,
+ toNumber,
+ port,
+ portTLS,
+ isSafePort,
+} from '../../../helpers/form';
import i18n from '../../../i18n';
+import KeyStatus from './KeyStatus';
+import CertificateStatus from './CertificateStatus';
const validate = (values) => {
const errors = {};
@@ -27,6 +35,8 @@ const clearFields = (change, setTlsConfig, t) => {
const fields = {
private_key: '',
certificate_chain: '',
+ private_key_path: '',
+ certificate_path: '',
port_https: 443,
port_dns_over_tls: 853,
server_name: '',
@@ -48,6 +58,8 @@ let Form = (props) => {
isEnabled,
certificateChain,
privateKey,
+ certificatePath,
+ privateKeyPath,
change,
invalid,
submitting,
@@ -64,6 +76,8 @@ let Form = (props) => {
subject,
warning_validation,
setTlsConfig,
+ certificateSource,
+ privateKeySource,
} = props;
const isSavingDisabled =
@@ -71,10 +85,9 @@ let Form = (props) => {
submitting ||
processingConfig ||
processingValidate ||
- (isEnabled && (!privateKey || !certificateChain)) ||
- (privateKey && !valid_key) ||
- (certificateChain && !valid_cert) ||
- (privateKey && certificateChain && !valid_pair);
+ !valid_key ||
+ !valid_cert ||
+ !valid_pair;
return (