-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1494cfc
commit a8742b3
Showing
10 changed files
with
32 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "wazuh-cert-oauth2-client" | ||
version = "0.2.6" | ||
version = "0.2.7" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,42 @@ | ||
use std::path::{Path, PathBuf}; | ||
|
||
/// Define a function to handle the default cert path | ||
pub fn default_cert_path() -> String { | ||
let cert_path = default_path_to_ossec(); | ||
format!("{}/etc/sslagent.cert", cert_path) | ||
let path_buf = cert_path.join("etc").join("sslagent.cert"); | ||
path_buf.display().to_string() | ||
} | ||
|
||
/// Define a function to handle the default key path | ||
pub fn default_key_path() -> String { | ||
let cert_path = default_path_to_ossec(); | ||
format!("{}/etc/sslagent.key", cert_path) | ||
let path_buf = cert_path.join("etc").join("sslagent.key"); | ||
path_buf.display().to_string() | ||
} | ||
|
||
/// Define a function to handle the default path to the agent control | ||
/// Define a function to handle the default agent control path | ||
pub fn default_path_agent_control() -> String { | ||
let ossec_path = default_path_to_ossec(); | ||
format!("{}/bin/wazuh-control", ossec_path) | ||
let path_buf = ossec_path.join("bin").join("wazuh-control"); | ||
path_buf.display().to_string() | ||
} | ||
|
||
/// Define a function to handle the default path to the ossec.conf file | ||
/// Define a function to handle the default path to ossec.conf | ||
pub fn default_path_to_ossec_conf() -> String { | ||
let ossec_path = default_path_to_ossec(); | ||
format!("{}/etc/ossec.conf", ossec_path) | ||
let path_buf = ossec_path.join("etc").join("ossec.conf"); | ||
path_buf.display().to_string() | ||
} | ||
|
||
/// Define a function to handle the default path to the ossec directory | ||
pub fn default_path_to_ossec() -> &'static str { | ||
if cfg!(target_os = "macos") { | ||
/// Define a function to handle the default path to ossec | ||
pub fn default_path_to_ossec() -> PathBuf { | ||
let base_path = if cfg!(target_os = "macos") { | ||
"/Library/Ossec" | ||
} else if cfg!(target_os = "windows") { | ||
"C:\\Program Files (x86)\\ossec-agent" | ||
} else { | ||
"/var/ossec" | ||
} | ||
}; | ||
|
||
Path::new(base_path).to_path_buf() | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "wazuh-cert-oauth2-model" | ||
version = "0.2.6" | ||
version = "0.2.7" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "wazuh-cert-oauth2" | ||
version = "0.2.6" | ||
version = "0.2.7" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
|