Skip to content

Commit

Permalink
fix: crypto provider installed for redis tls support (#72)
Browse files Browse the repository at this point in the history
* fix: crypto provided installed for redis tls support

* fix: version bumped
  • Loading branch information
robert-affinidi authored Dec 20, 2024
1 parent 17b4b94 commit 8ef6f7c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [
resolver = "2"

[workspace.package]
version = '0.8.2'
version = '0.8.3'
edition = "2021"
authors = ["Glenn Gore <[email protected]>"]
description = "Affinidi Messaging"
Expand Down
8 changes: 5 additions & 3 deletions affinidi-messaging-mediator/src/database/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ use redis::aio::PubSub;
use std::{fs::read_to_string, thread::sleep, time::Duration};
use tracing::{error, event, info, Level};

const REDIS_VERSION: &str = "7.1"; // Minimum Redis version required
const REDIS_VERSION: &str = "7.2"; // required Redis version

impl DatabaseHandler {
pub async fn new(config: &Config) -> Result<Self, MediatorError> {
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();

// Creates initial pool Configuration from the redis database URL
let pool = deadpool_redis::Config::from_url(&config.database.database_url)
.builder()
Expand Down Expand Up @@ -159,13 +161,13 @@ async fn _check_server_version(database: &DatabaseHandler) -> Result<String, Med
Ok(version.to_owned())
} else {
error!(
"Redis version ({}) must be equal or higher than minimum ({})",
"Redis version ({}) must be equal to major.minor: ({})",
version, REDIS_VERSION
);
Err(MediatorError::DatabaseError(
"NA".into(),
format!(
"Redis version ({}) must be equal or higher than minimum ({})",
"Redis version ({}) must be equal to major.minor: ({})",
version, REDIS_VERSION
),
))
Expand Down

0 comments on commit 8ef6f7c

Please sign in to comment.