Update to 4.11
This commit is contained in:
parent
c2ced9dfc7
commit
a3df0b5bd2
29
custom_cert.patch
Normal file
29
custom_cert.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
diff --git a/wazuh-install.sh b/wazuh-install.sh
|
||||||
|
index d6baf0a..c1dc598 100644
|
||||||
|
--- a/wazuh-install.sh
|
||||||
|
+++ b/wazuh-install.sh
|
||||||
|
@@ -4013,10 +4013,20 @@ function cert_generateDashboardcertificates() {
|
||||||
|
|
||||||
|
}
|
||||||
|
function cert_generateRootCAcertificate() {
|
||||||
|
-
|
||||||
|
- common_logger "Generating the root certificate."
|
||||||
|
- cert_executeAndValidate "openssl req -x509 -new -nodes -newkey rsa:2048 -keyout ${cert_tmp_path}/root-ca.key -out ${cert_tmp_path}/root-ca.pem -batch -subj '/OU=Wazuh/O=Wazuh/L=California/' -days 3650"
|
||||||
|
-
|
||||||
|
+ common_logger "Checking for an existing root certificate."
|
||||||
|
+
|
||||||
|
+ # Define expected file names
|
||||||
|
+ existing_ca_key="root-ca.key"
|
||||||
|
+ existing_ca_cert="root-ca.pem"
|
||||||
|
+
|
||||||
|
+ if [[ -f "./$existing_ca_key" && -f "./$existing_ca_cert" ]]; then
|
||||||
|
+ common_logger "Existing root certificate found. Copying to target paths."
|
||||||
|
+ cp "./$existing_ca_key" "${cert_tmp_path}/root-ca.key"
|
||||||
|
+ cp "./$existing_ca_cert" "${cert_tmp_path}/root-ca.pem"
|
||||||
|
+ else
|
||||||
|
+ common_logger "No existing root certificate found. Generating a new one."
|
||||||
|
+ cert_executeAndValidate "openssl req -x509 -new -nodes -newkey rsa:2048 -keyout ${cert_tmp_path}/root-ca.key -out ${cert_tmp_path}/root-ca.pem -batch -subj '/OU=Wazuh/O=Wazuh/L=California/' -days 3650"
|
||||||
|
+ fi
|
||||||
|
}
|
||||||
|
function cert_parseYaml() {
|
||||||
|
|
2830
wazuh-install.sh
2830
wazuh-install.sh
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user