From 59d2a8e551f09e9eb57597798a40e024f3a7147c Mon Sep 17 00:00:00 2001 From: Craig Lutgen Date: Thu, 8 Aug 2019 13:35:14 -0500 Subject: [PATCH] Changed server crentials property name from password to certificateCredentials --- Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs | 2 +- Source/MQTTnet/Server/MqttServerOptionsBuilder.cs | 4 ++-- Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs b/Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs index 8ef8c51..e3dcab8 100644 --- a/Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs +++ b/Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs @@ -48,7 +48,7 @@ namespace MQTTnet.Implementations throw new ArgumentException("TLS certificate is not set."); } - var tlsCertificate = new X509Certificate2(options.TlsEndpointOptions.Certificate, options.TlsEndpointOptions.Password.Password); + var tlsCertificate = new X509Certificate2(options.TlsEndpointOptions.Certificate, options.TlsEndpointOptions.CertificateCredentials.Password); if (!tlsCertificate.HasPrivateKey) { throw new InvalidOperationException("The certificate for TLS encryption must contain the private key."); diff --git a/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs b/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs index 8404271..5991e7d 100644 --- a/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs +++ b/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs @@ -82,10 +82,10 @@ namespace MQTTnet.Server return this; } - public MqttServerOptionsBuilder WithEncryptionCertificate(byte[] value, IMqttServerCredentials password = null) + public MqttServerOptionsBuilder WithEncryptionCertificate(byte[] value, IMqttServerCredentials credentials = null) { _options.TlsEndpointOptions.Certificate = value; - _options.TlsEndpointOptions.Password = password; + _options.TlsEndpointOptions.CertificateCredentials = credentials; return this; } diff --git a/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs b/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs index 8d65230..e92d987 100644 --- a/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs +++ b/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs @@ -12,7 +12,7 @@ namespace MQTTnet.Server public byte[] Certificate { get; set; } - public IMqttServerCredentials Password { get; set; } + public IMqttServerCredentials CertificateCredentials { get; set; } public bool ClientCertificateRequired { get; set; }