Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TLS configuration #925

Merged
merged 2 commits into from
Apr 15, 2024
Merged

Add TLS configuration #925

merged 2 commits into from
Apr 15, 2024

Conversation

jnugh
Copy link
Contributor

@jnugh jnugh commented Feb 1, 2024

As described in #917 there is currently no way to specify parameters for the TLS connections which is required if one would like to (in our case) use a TLS client certificate or maybe even disable certificate checks altogether as in #694).

I'm not sure if the approach on how to supply configuration parameters is a good one (I just added a configuration struct using manage that can be changed from other parts of the application).

Let me know if any documentation should be done as well :)

Closes #917. Closes #694

@jnugh jnugh requested a review from a team as a code owner February 1, 2024 10:35
@FabianLars
Copy link
Member

Thanks for contributing and sorry for the delay :)

I'm not sure if the approach on how to supply configuration parameters is a good one (I just added a configuration struct using manage that can be changed from other parts of the application).

I think it'd be better to just refactor plugin init to a builder similar to

#[derive(Default)]
pub struct Builder {
migrations: Option<HashMap<String, MigrationList>>,
}
impl Builder {
pub fn new() -> Self {
Self::default()
}
/// Add migrations to a database.
#[must_use]
pub fn add_migrations(mut self, db_url: &str, migrations: Vec<Migration>) -> Self {
self.migrations
.get_or_insert(Default::default())
.insert(db_url.to_string(), MigrationList(migrations));
self
}
(careful, that's v2 but the syntax should be the same in v1)

@FabianLars FabianLars merged commit 5c97db9 into tauri-apps:v1 Apr 15, 2024
6 checks passed
@jnugh
Copy link
Contributor Author

jnugh commented Apr 15, 2024

I completely forgot that there was a todo in this PR. Thank you very much for updating and merging the change 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[websocket] Use TLS Client certificate [websocket] How to ignore certificate errors in websocket?
2 participants