Skip to content

Add support for specifying CA cert#189

Open
alexg-axis wants to merge 4 commits into
EdJoPaTo:mainfrom
alexg-axis:dev/ca-certs
Open

Add support for specifying CA cert#189
alexg-axis wants to merge 4 commits into
EdJoPaTo:mainfrom
alexg-axis:dev/ca-certs

Conversation

@alexg-axis

Copy link
Copy Markdown

Solves #188

@alexg-axis alexg-axis marked this pull request as ready for review May 22, 2025 07:00

@EdJoPaTo EdJoPaTo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for providing a PR for this!

I have some variable naming / argument naming thoughts to simplify understanding the args / code. But other than that it looks good!

Comment thread src/cli.rs Outdated

/// Path to the TLS CA certificate file.
///
/// Used together with --client-cert, --client-key to enable TLS client

@EdJoPaTo EdJoPaTo May 23, 2025

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, requires can be used here then? When it’s used, the others have to be used too?

Comment thread src/cli.rs
EdJoPaTo added 3 commits July 13, 2025 12:11
Keep them similar in different places.
_path is superfluous as their type is already &Path.
As there are multiple different certificates handled now its harder to
figure out which certificate created an error.
Conflicts:
	src/cli.rs
	src/mqtt/connect.rs
	src/mqtt/encryption.rs
@EdJoPaTo

Copy link
Copy Markdown
Owner

Following https://test.mosquitto.org/ssl/ ends up with invalid peer certificate: Other(OtherError(UnsupportedCertVersion)). rustls does not work with all the formats out there, is that the case here too? Or have I done anything wrong? Or is there some issue elsewhere?

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.

2 participants