wazuh-packages
wazuh-packages copied to clipboard
Remove Ignoring days warning
Description
When using wazuh-certs-tool.sh warnings are given about the "-days" option. With this code change the warnings are gone.
Logs example
bash wazuh-certs-tool.sh -A -v 15/10/2022 15:51:57 DEBUG: Creating the root certificate. Generating a RSA private key ...........................................................+++++ ...........................................................................................+++++ writing new private key to '/tmp/wazuh-certificates/root-ca.key'
Generating RSA private key, 2048 bit long modulus (2 primes) ...............+++++ .............................+++++ e is 65537 (0x010001) Signature ok subject=C = US, L = California, O = Wazuh, OU = Wazuh, CN = admin Getting CA Private Key 15/10/2022 15:51:57 INFO: Admin certificates created. 15/10/2022 15:51:57 DEBUG: Creating the Wazuh indexer certificates. Ignoring -days; not generating a certificate
Tests
When using the new code, the warnings are gone.
bash wazuh-certs-tool.sh -A -v 15/10/2022 15:51:57 DEBUG: Creating the root certificate. Generating a RSA private key ...........................................................+++++ ...........................................................................................+++++ writing new private key to '/tmp/wazuh-certificates/root-ca.key'
Generating RSA private key, 2048 bit long modulus (2 primes) ...............+++++ .............................+++++ e is 65537 (0x010001) Signature ok subject=C = US, L = California, O = Wazuh, OU = Wazuh, CN = admin Getting CA Private Key 15/10/2022 15:51:57 INFO: Admin certificates created. 15/10/2022 15:51:57 DEBUG: Creating the Wazuh indexer certificates.