Skip to content

Commit c44481a

Browse files
committed
No special certs should be used. Accepting wrong hostnames will not be supported.
1 parent fe97c5b commit c44481a

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

src/asynch/nextcloud.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,7 @@ pub struct NextcloudConfiguration {
586586
password: String,
587587
password_cryptor: EntryPasswordCryptor,
588588
/// If a self-signed certificate is needed in order to communicate with the Nextcloud server over HTTPS,
589-
/// this boolean should be true. In that case, the application will use the certificate __cacert.pem__ located in
590-
/// `$HOME/.rust-keylock/etc/ssl/certs` and in `/sdcard/Download/rust-keylock/etc/ssl/certs` for Android devices.
591-
/// The user is responsible to place the self-signed .pem file into this location with this exact name.
589+
/// this boolean should be true.
592590
pub use_self_signed_certificate: bool,
593591
}
594592

src/file_handler.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -349,22 +349,6 @@ pub fn default_rustkeylock_location() -> PathBuf {
349349
home_dir
350350
}
351351

352-
#[cfg(target_os = "android")]
353-
pub(crate) fn create_certs_path() -> errors::Result<PathBuf> {
354-
let mut rust_keylock_home = default_rustkeylock_location();
355-
rust_keylock_home.push("/sdcard/Download/rust-keylock/etc/ssl/certs");
356-
let _ = fs::create_dir_all(rust_keylock_home.clone())?;
357-
Ok(rust_keylock_home)
358-
}
359-
360-
#[cfg(not(target_os = "android"))]
361-
pub(crate) fn create_certs_path() -> errors::Result<PathBuf> {
362-
let mut rust_keylock_home = default_rustkeylock_location();
363-
rust_keylock_home.push("etc/ssl/certs");
364-
fs::create_dir_all(rust_keylock_home.clone())?;
365-
Ok(rust_keylock_home)
366-
}
367-
368352
/// Transforms properties toml to Props dto
369353
fn transform_to_props(table: &Table) -> Result<Props, RustKeylockError> {
370354
Props::from_table(table)
@@ -480,9 +464,7 @@ fn load_existing_file(file_path: &PathBuf, cryptor_opt: Option<&dyn Cryptor>) ->
480464
debug!("Encrypted file does not exist. Initializing...");
481465
// Create the rust-keylock home
482466
fs::create_dir_all(default_rustkeylock_location())?;
483-
// Create the directory for the self signed certificates
484-
let _ = create_certs_path()?;
485-
debug!("Directories for home and certs created successfully");
467+
debug!("Directories for home created successfully");
486468
Vec::new()
487469
}
488470
}

0 commit comments

Comments
 (0)