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

Bump to MQTTnet v4.3.0.858 and replace deprecated call. #2298

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

mrsuciu
Copy link
Contributor

@mrsuciu mrsuciu commented Sep 6, 2023

Bump to MQTTnet v4.3.0.858 and replaced obsolete WithTls method call with WithTlsOptions method cal.

Proposed changes

MQTTnet v4.3.0.858 deprecated the WithTls method and recommends WithTlsOptions instead.

Related Issues

Enables bump to MQTTnet v4.3.0.858

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage: 11.11% and project coverage change: +0.11% 🎉

Comparison is base (5d4e962) 58.96% compared to head (5d34266) 59.07%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2298      +/-   ##
==========================================
+ Coverage   58.96%   59.07%   +0.11%     
==========================================
  Files         330      330              
  Lines       63320    63331      +11     
==========================================
+ Hits        37334    37415      +81     
+ Misses      25986    25916      -70     
Files Changed Coverage Δ
...es/Opc.Ua.PubSub/Transport/MqttPubSubConnection.cs 29.01% <11.11%> (-0.28%) ⬇️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

{
foreach (var x509cert in mqttTlsOptions?.Certificates.X509Certificates)
{
x509Certificate2s.Add(new X509Certificate2(x509cert));
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these have to be disposed eventually? Why not use the configured cert here and create a new one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They have to be disposed; I expected that the Mqtt client does it but looking into its code it does not.
The new call expects a X509Certificate2 type: WithClientCertificates(IEnumerable certificates) therefore using the x509cert.Handle of the existing certificate should keep the same resource reference

@mrsuciu mrsuciu requested a review from mregen September 13, 2023 12:43
@mrsuciu mrsuciu merged commit 49bc6a9 into OPCFoundation:master Sep 20, 2023
44 of 45 checks passed
@mregen mregen added this to the 1.4.372 updates milestone Oct 25, 2023
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.

None yet

3 participants