2019-08-28 15:55:53 +00:00
|
|
|
import React from 'react';
|
2019-02-18 13:06:27 +00:00
|
|
|
import { connect } from 'react-redux';
|
2019-01-24 15:51:50 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2019-02-18 13:06:27 +00:00
|
|
|
import { Field, reduxForm, formValueSelector } from 'redux-form';
|
2020-05-22 14:06:05 +00:00
|
|
|
import { Trans, withTranslation } from 'react-i18next';
|
2019-01-24 15:51:50 +00:00
|
|
|
import flow from 'lodash/flow';
|
|
|
|
|
2019-08-28 15:55:53 +00:00
|
|
|
import {
|
2019-12-12 18:48:17 +00:00
|
|
|
renderInputField,
|
2020-08-19 15:23:05 +00:00
|
|
|
renderCheckboxField,
|
2019-08-28 15:55:53 +00:00
|
|
|
renderRadioField,
|
|
|
|
toNumber,
|
|
|
|
} from '../../../helpers/form';
|
2020-09-07 10:50:03 +00:00
|
|
|
import {
|
|
|
|
validateIsSafePort, validatePort, validatePortQuic, validatePortTLS,
|
|
|
|
} from '../../../helpers/validators';
|
2019-01-24 15:51:50 +00:00
|
|
|
import i18n from '../../../i18n';
|
2019-08-28 15:55:53 +00:00
|
|
|
import KeyStatus from './KeyStatus';
|
|
|
|
import CertificateStatus from './CertificateStatus';
|
2020-09-07 10:50:03 +00:00
|
|
|
import {
|
|
|
|
DNS_OVER_QUIC_PORT, DNS_OVER_TLS_PORT, FORM_NAME, STANDARD_HTTPS_PORT,
|
|
|
|
} from '../../../helpers/constants';
|
2019-01-24 15:51:50 +00:00
|
|
|
|
|
|
|
const validate = (values) => {
|
|
|
|
const errors = {};
|
|
|
|
|
2019-02-01 13:52:59 +00:00
|
|
|
if (values.port_dns_over_tls && values.port_https) {
|
|
|
|
if (values.port_dns_over_tls === values.port_https) {
|
|
|
|
errors.port_dns_over_tls = i18n.t('form_error_equal');
|
|
|
|
errors.port_https = i18n.t('form_error_equal');
|
|
|
|
}
|
2019-01-24 15:51:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return errors;
|
|
|
|
};
|
|
|
|
|
2019-02-20 09:46:34 +00:00
|
|
|
const clearFields = (change, setTlsConfig, t) => {
|
2019-02-19 10:05:16 +00:00
|
|
|
const fields = {
|
|
|
|
private_key: '',
|
|
|
|
certificate_chain: '',
|
2019-08-28 15:55:53 +00:00
|
|
|
private_key_path: '',
|
|
|
|
certificate_path: '',
|
2020-08-19 15:23:05 +00:00
|
|
|
port_https: STANDARD_HTTPS_PORT,
|
|
|
|
port_dns_over_tls: DNS_OVER_TLS_PORT,
|
2020-09-07 10:50:03 +00:00
|
|
|
port_dns_over_quic: DNS_OVER_QUIC_PORT,
|
2019-02-19 10:05:16 +00:00
|
|
|
server_name: '',
|
|
|
|
force_https: false,
|
|
|
|
enabled: false,
|
|
|
|
};
|
2019-02-20 09:46:34 +00:00
|
|
|
// eslint-disable-next-line no-alert
|
|
|
|
if (window.confirm(t('encryption_reset'))) {
|
2020-07-03 16:10:05 +00:00
|
|
|
Object.keys(fields)
|
|
|
|
.forEach((field) => change(field, fields[field]));
|
2019-02-20 09:46:34 +00:00
|
|
|
setTlsConfig(fields);
|
|
|
|
}
|
2019-02-19 10:05:16 +00:00
|
|
|
};
|
|
|
|
|
2019-02-18 13:06:27 +00:00
|
|
|
let Form = (props) => {
|
2019-01-24 15:51:50 +00:00
|
|
|
const {
|
|
|
|
t,
|
|
|
|
handleSubmit,
|
2019-02-18 13:06:27 +00:00
|
|
|
handleChange,
|
|
|
|
isEnabled,
|
|
|
|
certificateChain,
|
|
|
|
privateKey,
|
2019-08-28 15:55:53 +00:00
|
|
|
certificatePath,
|
|
|
|
privateKeyPath,
|
2019-02-19 10:05:16 +00:00
|
|
|
change,
|
2019-01-24 15:51:50 +00:00
|
|
|
invalid,
|
|
|
|
submitting,
|
2019-02-19 12:46:29 +00:00
|
|
|
processingConfig,
|
2019-02-19 12:43:36 +00:00
|
|
|
processingValidate,
|
2019-02-18 13:06:27 +00:00
|
|
|
not_after,
|
|
|
|
valid_chain,
|
|
|
|
valid_key,
|
2019-02-19 12:43:36 +00:00
|
|
|
valid_cert,
|
2019-02-28 11:59:25 +00:00
|
|
|
valid_pair,
|
2019-02-18 13:06:27 +00:00
|
|
|
dns_names,
|
|
|
|
key_type,
|
|
|
|
issuer,
|
|
|
|
subject,
|
|
|
|
warning_validation,
|
2019-02-20 09:46:34 +00:00
|
|
|
setTlsConfig,
|
2019-08-28 15:55:53 +00:00
|
|
|
certificateSource,
|
|
|
|
privateKeySource,
|
2019-01-24 15:51:50 +00:00
|
|
|
} = props;
|
|
|
|
|
2020-05-22 14:06:05 +00:00
|
|
|
const isSavingDisabled = invalid
|
|
|
|
|| submitting
|
|
|
|
|| processingConfig
|
|
|
|
|| processingValidate
|
|
|
|
|| !valid_key
|
|
|
|
|| !valid_cert
|
|
|
|
|| !valid_pair;
|
2019-02-28 11:59:25 +00:00
|
|
|
|
2019-01-24 15:51:50 +00:00
|
|
|
return (
|
|
|
|
<form onSubmit={handleSubmit}>
|
|
|
|
<div className="row">
|
2019-02-18 13:06:27 +00:00
|
|
|
<div className="col-12">
|
|
|
|
<div className="form__group form__group--settings">
|
|
|
|
<Field
|
|
|
|
name="enabled"
|
|
|
|
type="checkbox"
|
2020-08-19 15:23:05 +00:00
|
|
|
component={renderCheckboxField}
|
2019-02-18 13:06:27 +00:00
|
|
|
placeholder={t('encryption_enable')}
|
|
|
|
onChange={handleChange}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="form__desc">
|
|
|
|
<Trans>encryption_enable_desc</Trans>
|
|
|
|
</div>
|
2019-06-03 12:41:45 +00:00
|
|
|
<hr />
|
2019-02-18 13:06:27 +00:00
|
|
|
</div>
|
2019-01-24 15:51:50 +00:00
|
|
|
<div className="col-12">
|
|
|
|
<label className="form__label" htmlFor="server_name">
|
|
|
|
<Trans>encryption_server</Trans>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div className="col-lg-6">
|
|
|
|
<div className="form__group form__group--settings">
|
|
|
|
<Field
|
|
|
|
id="server_name"
|
|
|
|
name="server_name"
|
2019-12-12 18:48:17 +00:00
|
|
|
component={renderInputField}
|
2019-01-24 15:51:50 +00:00
|
|
|
type="text"
|
|
|
|
className="form-control"
|
|
|
|
placeholder={t('encryption_server_enter')}
|
2019-02-18 13:06:27 +00:00
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
2019-01-24 15:51:50 +00:00
|
|
|
/>
|
|
|
|
<div className="form__desc">
|
|
|
|
<Trans>encryption_server_desc</Trans>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="col-lg-6">
|
|
|
|
<div className="form__group form__group--settings">
|
|
|
|
<Field
|
|
|
|
name="force_https"
|
|
|
|
type="checkbox"
|
2020-08-19 15:23:05 +00:00
|
|
|
component={renderCheckboxField}
|
2019-01-24 15:51:50 +00:00
|
|
|
placeholder={t('encryption_redirect')}
|
2019-02-18 13:06:27 +00:00
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
2019-01-24 15:51:50 +00:00
|
|
|
/>
|
|
|
|
<div className="form__desc">
|
|
|
|
<Trans>encryption_redirect_desc</Trans>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="row">
|
|
|
|
<div className="col-lg-6">
|
|
|
|
<div className="form__group form__group--settings">
|
|
|
|
<label className="form__label" htmlFor="port_https">
|
|
|
|
<Trans>encryption_https</Trans>
|
|
|
|
</label>
|
|
|
|
<Field
|
|
|
|
id="port_https"
|
|
|
|
name="port_https"
|
2019-12-12 18:48:17 +00:00
|
|
|
component={renderInputField}
|
2019-01-24 15:51:50 +00:00
|
|
|
type="number"
|
|
|
|
className="form-control"
|
|
|
|
placeholder={t('encryption_https')}
|
2020-07-03 16:10:05 +00:00
|
|
|
validate={[validatePort, validateIsSafePort]}
|
2019-01-24 15:51:50 +00:00
|
|
|
normalize={toNumber}
|
2019-02-18 13:06:27 +00:00
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
2019-01-24 15:51:50 +00:00
|
|
|
/>
|
|
|
|
<div className="form__desc">
|
|
|
|
<Trans>encryption_https_desc</Trans>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="col-lg-6">
|
|
|
|
<div className="form__group form__group--settings">
|
|
|
|
<label className="form__label" htmlFor="port_dns_over_tls">
|
|
|
|
<Trans>encryption_dot</Trans>
|
|
|
|
</label>
|
|
|
|
<Field
|
|
|
|
id="port_dns_over_tls"
|
|
|
|
name="port_dns_over_tls"
|
2019-12-12 18:48:17 +00:00
|
|
|
component={renderInputField}
|
2019-01-24 15:51:50 +00:00
|
|
|
type="number"
|
|
|
|
className="form-control"
|
|
|
|
placeholder={t('encryption_dot')}
|
2020-07-03 16:10:05 +00:00
|
|
|
validate={[validatePortTLS]}
|
2019-01-24 15:51:50 +00:00
|
|
|
normalize={toNumber}
|
2019-02-18 13:06:27 +00:00
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
2019-01-24 15:51:50 +00:00
|
|
|
/>
|
|
|
|
<div className="form__desc">
|
|
|
|
<Trans>encryption_dot_desc</Trans>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-09-07 10:50:03 +00:00
|
|
|
<div className="col-lg-6">
|
|
|
|
<div className="form__group form__group--settings">
|
|
|
|
<label className="form__label" htmlFor="port_dns_over_quic">
|
|
|
|
<Trans>encryption_doq</Trans>
|
|
|
|
|
|
|
|
(<Trans>experimental</Trans>)
|
|
|
|
</label>
|
|
|
|
<Field
|
|
|
|
id="port_dns_over_quic"
|
|
|
|
name="port_dns_over_quic"
|
|
|
|
component={renderInputField}
|
|
|
|
type="number"
|
|
|
|
className="form-control"
|
|
|
|
placeholder={t('encryption_doq')}
|
|
|
|
validate={[validatePortQuic]}
|
|
|
|
normalize={toNumber}
|
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
|
|
|
/>
|
|
|
|
<div className="form__desc">
|
|
|
|
<Trans>encryption_doq_desc</Trans>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-01-24 15:51:50 +00:00
|
|
|
</div>
|
|
|
|
<div className="row">
|
|
|
|
<div className="col-12">
|
|
|
|
<div className="form__group form__group--settings">
|
2019-06-03 12:41:45 +00:00
|
|
|
<label
|
2019-08-28 15:55:53 +00:00
|
|
|
className="form__label form__label--with-desc form__label--bold"
|
2019-06-03 12:41:45 +00:00
|
|
|
htmlFor="certificate_chain"
|
|
|
|
>
|
2019-01-24 15:51:50 +00:00
|
|
|
<Trans>encryption_certificates</Trans>
|
|
|
|
</label>
|
|
|
|
<div className="form__desc form__desc--top">
|
2019-01-25 12:18:05 +00:00
|
|
|
<Trans
|
|
|
|
values={{ link: 'letsencrypt.org' }}
|
2019-06-03 12:41:45 +00:00
|
|
|
components={[
|
|
|
|
<a href="https://letsencrypt.org/" key="0">
|
|
|
|
link
|
|
|
|
</a>,
|
|
|
|
]}
|
2019-01-25 12:18:05 +00:00
|
|
|
>
|
|
|
|
encryption_certificates_desc
|
|
|
|
</Trans>
|
2019-01-24 15:51:50 +00:00
|
|
|
</div>
|
2019-08-28 15:55:53 +00:00
|
|
|
|
|
|
|
<div className="form__inline mb-2">
|
|
|
|
<div className="custom-controls-stacked">
|
|
|
|
<Field
|
|
|
|
name="certificate_source"
|
|
|
|
component={renderRadioField}
|
|
|
|
type="radio"
|
|
|
|
className="form-control mr-2"
|
|
|
|
value="path"
|
|
|
|
placeholder={t('encryption_certificates_source_path')}
|
2019-10-25 20:46:08 +00:00
|
|
|
disabled={!isEnabled}
|
2019-08-28 15:55:53 +00:00
|
|
|
/>
|
|
|
|
<Field
|
|
|
|
name="certificate_source"
|
|
|
|
component={renderRadioField}
|
|
|
|
type="radio"
|
|
|
|
className="form-control mr-2"
|
|
|
|
value="content"
|
|
|
|
placeholder={t('encryption_certificates_source_content')}
|
2019-10-25 20:46:08 +00:00
|
|
|
disabled={!isEnabled}
|
2019-08-28 15:55:53 +00:00
|
|
|
/>
|
|
|
|
</div>
|
2019-01-24 15:51:50 +00:00
|
|
|
</div>
|
2019-08-28 15:55:53 +00:00
|
|
|
|
|
|
|
{certificateSource === 'content' && (
|
|
|
|
<Field
|
|
|
|
id="certificate_chain"
|
|
|
|
name="certificate_chain"
|
|
|
|
component="textarea"
|
|
|
|
type="text"
|
|
|
|
className="form-control form-control--textarea"
|
|
|
|
placeholder={t('encryption_certificates_input')}
|
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
{certificateSource === 'path' && (
|
|
|
|
<Field
|
|
|
|
id="certificate_path"
|
|
|
|
name="certificate_path"
|
2019-12-12 18:48:17 +00:00
|
|
|
component={renderInputField}
|
2019-08-28 15:55:53 +00:00
|
|
|
type="text"
|
|
|
|
className="form-control"
|
|
|
|
placeholder={t('encryption_certificate_path')}
|
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
<div className="form__status">
|
|
|
|
{(certificateChain || certificatePath) && (
|
|
|
|
<CertificateStatus
|
|
|
|
validChain={valid_chain}
|
|
|
|
validCert={valid_cert}
|
|
|
|
subject={subject}
|
|
|
|
issuer={issuer}
|
|
|
|
notAfter={not_after}
|
|
|
|
dnsNames={dns_names}
|
|
|
|
/>
|
|
|
|
)}
|
2019-01-24 15:51:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="row">
|
|
|
|
<div className="col-12">
|
2019-08-28 15:55:53 +00:00
|
|
|
<div className="form__group form__group--settings mt-3">
|
2019-01-24 15:51:50 +00:00
|
|
|
<label className="form__label form__label--bold" htmlFor="private_key">
|
|
|
|
<Trans>encryption_key</Trans>
|
|
|
|
</label>
|
2019-08-28 15:55:53 +00:00
|
|
|
|
|
|
|
<div className="form__inline mb-2">
|
|
|
|
<div className="custom-controls-stacked">
|
|
|
|
<Field
|
|
|
|
name="key_source"
|
|
|
|
component={renderRadioField}
|
|
|
|
type="radio"
|
|
|
|
className="form-control mr-2"
|
|
|
|
value="path"
|
|
|
|
placeholder={t('encryption_key_source_path')}
|
2019-10-25 20:46:08 +00:00
|
|
|
disabled={!isEnabled}
|
2019-08-28 15:55:53 +00:00
|
|
|
/>
|
|
|
|
<Field
|
|
|
|
name="key_source"
|
|
|
|
component={renderRadioField}
|
|
|
|
type="radio"
|
|
|
|
className="form-control mr-2"
|
|
|
|
value="content"
|
|
|
|
placeholder={t('encryption_key_source_content')}
|
2019-10-25 20:46:08 +00:00
|
|
|
disabled={!isEnabled}
|
2019-08-28 15:55:53 +00:00
|
|
|
/>
|
|
|
|
</div>
|
2019-01-24 15:51:50 +00:00
|
|
|
</div>
|
2019-08-28 15:55:53 +00:00
|
|
|
|
|
|
|
{privateKeySource === 'content' && (
|
|
|
|
<Field
|
|
|
|
id="private_key"
|
|
|
|
name="private_key"
|
|
|
|
component="textarea"
|
|
|
|
type="text"
|
|
|
|
className="form-control form-control--textarea"
|
|
|
|
placeholder={t('encryption_key_input')}
|
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
{privateKeySource === 'path' && (
|
|
|
|
<Field
|
|
|
|
id="private_key_path"
|
|
|
|
name="private_key_path"
|
2019-12-12 18:48:17 +00:00
|
|
|
component={renderInputField}
|
2019-08-28 15:55:53 +00:00
|
|
|
type="text"
|
|
|
|
className="form-control"
|
|
|
|
placeholder={t('encryption_private_key_path')}
|
|
|
|
onChange={handleChange}
|
|
|
|
disabled={!isEnabled}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
<div className="form__status">
|
|
|
|
{(privateKey || privateKeyPath) && (
|
|
|
|
<KeyStatus validKey={valid_key} keyType={key_type} />
|
|
|
|
)}
|
2019-01-24 15:51:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-03 12:41:45 +00:00
|
|
|
{warning_validation && (
|
2019-02-20 11:26:56 +00:00
|
|
|
<div className="col-12">
|
2019-06-03 12:41:45 +00:00
|
|
|
<p className="text-danger">{warning_validation}</p>
|
2019-02-20 11:26:56 +00:00
|
|
|
</div>
|
2019-06-03 12:41:45 +00:00
|
|
|
)}
|
2019-01-24 15:51:50 +00:00
|
|
|
</div>
|
|
|
|
|
2019-02-18 13:06:27 +00:00
|
|
|
<div className="btn-list mt-2">
|
2019-02-01 13:52:59 +00:00
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
className="btn btn-success btn-standart"
|
2019-02-28 11:59:25 +00:00
|
|
|
disabled={isSavingDisabled}
|
2019-02-01 13:52:59 +00:00
|
|
|
>
|
|
|
|
<Trans>save_config</Trans>
|
|
|
|
</button>
|
|
|
|
<button
|
2019-02-18 13:06:27 +00:00
|
|
|
type="button"
|
2019-02-01 13:52:59 +00:00
|
|
|
className="btn btn-secondary btn-standart"
|
2019-02-19 12:46:29 +00:00
|
|
|
disabled={submitting || processingConfig}
|
2019-02-20 09:46:34 +00:00
|
|
|
onClick={() => clearFields(change, setTlsConfig, t)}
|
2019-02-01 13:52:59 +00:00
|
|
|
>
|
|
|
|
<Trans>reset_settings</Trans>
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-01-24 15:51:50 +00:00
|
|
|
</form>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
Form.propTypes = {
|
|
|
|
handleSubmit: PropTypes.func.isRequired,
|
2019-02-18 13:06:27 +00:00
|
|
|
handleChange: PropTypes.func,
|
|
|
|
isEnabled: PropTypes.bool.isRequired,
|
|
|
|
certificateChain: PropTypes.string.isRequired,
|
|
|
|
privateKey: PropTypes.string.isRequired,
|
2019-08-28 15:55:53 +00:00
|
|
|
certificatePath: PropTypes.string.isRequired,
|
|
|
|
privateKeyPath: PropTypes.string.isRequired,
|
2019-02-19 10:05:16 +00:00
|
|
|
change: PropTypes.func.isRequired,
|
2019-01-24 15:51:50 +00:00
|
|
|
submitting: PropTypes.bool.isRequired,
|
|
|
|
invalid: PropTypes.bool.isRequired,
|
|
|
|
initialValues: PropTypes.object.isRequired,
|
2019-02-19 12:46:29 +00:00
|
|
|
processingConfig: PropTypes.bool.isRequired,
|
2019-02-19 12:43:36 +00:00
|
|
|
processingValidate: PropTypes.bool.isRequired,
|
2019-02-18 13:06:27 +00:00
|
|
|
status_key: PropTypes.string,
|
|
|
|
not_after: PropTypes.string,
|
|
|
|
warning_validation: PropTypes.string,
|
|
|
|
valid_chain: PropTypes.bool,
|
|
|
|
valid_key: PropTypes.bool,
|
2019-02-19 12:43:36 +00:00
|
|
|
valid_cert: PropTypes.bool,
|
2019-02-28 11:59:25 +00:00
|
|
|
valid_pair: PropTypes.bool,
|
2019-02-18 13:06:27 +00:00
|
|
|
dns_names: PropTypes.string,
|
|
|
|
key_type: PropTypes.string,
|
|
|
|
issuer: PropTypes.string,
|
|
|
|
subject: PropTypes.string,
|
2019-01-24 15:51:50 +00:00
|
|
|
t: PropTypes.func.isRequired,
|
2019-02-20 09:46:34 +00:00
|
|
|
setTlsConfig: PropTypes.func.isRequired,
|
2019-08-28 15:55:53 +00:00
|
|
|
certificateSource: PropTypes.string,
|
|
|
|
privateKeySource: PropTypes.string,
|
2019-01-24 15:51:50 +00:00
|
|
|
};
|
|
|
|
|
2020-06-10 16:04:19 +00:00
|
|
|
const selector = formValueSelector(FORM_NAME.ENCRYPTION);
|
2019-02-18 13:06:27 +00:00
|
|
|
|
|
|
|
Form = connect((state) => {
|
|
|
|
const isEnabled = selector(state, 'enabled');
|
|
|
|
const certificateChain = selector(state, 'certificate_chain');
|
|
|
|
const privateKey = selector(state, 'private_key');
|
2019-08-28 15:55:53 +00:00
|
|
|
const certificatePath = selector(state, 'certificate_path');
|
|
|
|
const privateKeyPath = selector(state, 'private_key_path');
|
|
|
|
const certificateSource = selector(state, 'certificate_source');
|
|
|
|
const privateKeySource = selector(state, 'key_source');
|
2019-02-18 13:06:27 +00:00
|
|
|
return {
|
|
|
|
isEnabled,
|
|
|
|
certificateChain,
|
|
|
|
privateKey,
|
2019-08-28 15:55:53 +00:00
|
|
|
certificatePath,
|
|
|
|
privateKeyPath,
|
|
|
|
certificateSource,
|
|
|
|
privateKeySource,
|
2019-02-18 13:06:27 +00:00
|
|
|
};
|
|
|
|
})(Form);
|
|
|
|
|
2019-01-24 15:51:50 +00:00
|
|
|
export default flow([
|
2020-05-22 14:06:05 +00:00
|
|
|
withTranslation(),
|
2019-01-24 15:51:50 +00:00
|
|
|
reduxForm({
|
2020-06-10 16:04:19 +00:00
|
|
|
form: FORM_NAME.ENCRYPTION,
|
2019-01-24 15:51:50 +00:00
|
|
|
validate,
|
|
|
|
}),
|
|
|
|
])(Form);
|