Convert certificate and key to base64
This commit is contained in:
parent
4da55dc2aa
commit
93847bd309
@ -659,8 +659,8 @@ export const getTlsStatus = () => async (dispatch) => {
|
|||||||
dispatch(getTlsStatusRequest());
|
dispatch(getTlsStatusRequest());
|
||||||
try {
|
try {
|
||||||
const status = await apiClient.getTlsStatus();
|
const status = await apiClient.getTlsStatus();
|
||||||
status.certificate_chain = decodeURIComponent(status.certificate_chain);
|
status.certificate_chain = atob(status.certificate_chain);
|
||||||
status.private_key = decodeURIComponent(status.private_key);
|
status.private_key = atob(status.private_key);
|
||||||
|
|
||||||
dispatch(getTlsStatusSuccess(status));
|
dispatch(getTlsStatusSuccess(status));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -677,8 +677,8 @@ export const setTlsConfig = config => async (dispatch) => {
|
|||||||
dispatch(setTlsConfigRequest());
|
dispatch(setTlsConfigRequest());
|
||||||
try {
|
try {
|
||||||
const values = { ...config };
|
const values = { ...config };
|
||||||
values.certificate_chain = encodeURIComponent(values.certificate_chain);
|
values.certificate_chain = btoa(values.certificate_chain);
|
||||||
values.private_key = encodeURIComponent(values.private_key);
|
values.private_key = btoa(values.private_key);
|
||||||
|
|
||||||
await apiClient.setTlsConfig(values);
|
await apiClient.setTlsConfig(values);
|
||||||
dispatch(setTlsConfigSuccess(config));
|
dispatch(setTlsConfigSuccess(config));
|
||||||
|
Loading…
Reference in New Issue
Block a user