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());
|
||||
try {
|
||||
const status = await apiClient.getTlsStatus();
|
||||
status.certificate_chain = decodeURIComponent(status.certificate_chain);
|
||||
status.private_key = decodeURIComponent(status.private_key);
|
||||
status.certificate_chain = atob(status.certificate_chain);
|
||||
status.private_key = atob(status.private_key);
|
||||
|
||||
dispatch(getTlsStatusSuccess(status));
|
||||
} catch (error) {
|
||||
@ -677,8 +677,8 @@ export const setTlsConfig = config => async (dispatch) => {
|
||||
dispatch(setTlsConfigRequest());
|
||||
try {
|
||||
const values = { ...config };
|
||||
values.certificate_chain = encodeURIComponent(values.certificate_chain);
|
||||
values.private_key = encodeURIComponent(values.private_key);
|
||||
values.certificate_chain = btoa(values.certificate_chain);
|
||||
values.private_key = btoa(values.private_key);
|
||||
|
||||
await apiClient.setTlsConfig(values);
|
||||
dispatch(setTlsConfigSuccess(config));
|
||||
|
Loading…
Reference in New Issue
Block a user