import React, { useState } from 'react'; import style from '../../less/main.less'; import ButtonDisplay from './ButtonDisplay'; import ContentWrapper from '../containers/ContentWrapper'; export default ({ testingCertPaths, uploadingCerts, certPathInvalid, certKeyPathInvalid, onClickCertPath, onClickCertUpload }) => { const [certPath, setCertPath] = useState(""); const [certKeyPath, setCertKeyPath] = useState(""); const [certFile, setCertFile] = useState(); const [certKeyFile, setCertKeyFile] = useState(); if (testingCertPaths) { return

Testing the cert paths.

} else if (uploadingCerts) { return

Uploading Certs

} else { return

TLS Path

If you have a tls cert on your server you can provide a path to it here. The cert needs to be a `.pem` file that includes the full certificate chain including any intermediate certificates.

Please enter {certPathInvalid ? "a valid" : "the"} path to the cert

setCertPath(e.target.value)} />

Please enter {certKeyPathInvalid ? "a valid" : "the"} path to the cert's key

setCertKeyPath(e.target.value)} />

OR..

Upload a TLS cert

Upload a cert file.

setCertFile(e.target.files[0])} />

Upload the cert's private key file.

setCertKeyFile(e.target.files[0])} />
} }