mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Feature/ssl cert management (#442)
* Adds core logic API for SSL Certificate Management * Update appmgr/src/net/ssl.rs Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
committed by
Aiden McClelland
parent
ab728424a8
commit
c91790d1eb
@@ -54,7 +54,8 @@ pub enum ErrorKind {
|
||||
Wifi = 46,
|
||||
Journald = 47,
|
||||
Zfs = 48,
|
||||
PasswordHashGeneration = 49,
|
||||
OpenSsl = 49,
|
||||
PasswordHashGeneration = 50,
|
||||
}
|
||||
impl ErrorKind {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
@@ -108,6 +109,7 @@ impl ErrorKind {
|
||||
Wifi => "WiFi Internal Error",
|
||||
Journald => "Journald Error",
|
||||
Zfs => "ZFS Error",
|
||||
OpenSsl => "OpenSSL Internal Error",
|
||||
PasswordHashGeneration => "Password Hash Generation Error",
|
||||
}
|
||||
}
|
||||
@@ -203,6 +205,11 @@ impl From<std::net::AddrParseError> for Error {
|
||||
Error::new(e, ErrorKind::ParseNetAddress)
|
||||
}
|
||||
}
|
||||
impl From<openssl::error::ErrorStack> for Error {
|
||||
fn from(e: openssl::error::ErrorStack) -> Self {
|
||||
Error::new(anyhow!("OpenSSL ERROR:\n{}", e), ErrorKind::OpenSsl)
|
||||
}
|
||||
}
|
||||
impl From<Error> for RpcError {
|
||||
fn from(e: Error) -> Self {
|
||||
let mut data_object = serde_json::Map::with_capacity(2);
|
||||
|
||||
Reference in New Issue
Block a user