Przeglądaj źródła

Refactor server certificate classes (breaking change).

release/3.x.x
Christian Kratky 5 lat temu
rodzic
commit
8ad1fb2871
5 zmienionych plików z 13 dodań i 8 usunięć
  1. +4
    -0
      Source/MQTTnet/Server/IMqttServerCertificateCredentials.cs
  2. +0
    -6
      Source/MQTTnet/Server/IMqttServerCredentials.cs
  3. +7
    -0
      Source/MQTTnet/Server/MqttServerCertificateCredentials.cs
  4. +1
    -1
      Source/MQTTnet/Server/MqttServerOptionsBuilder.cs
  5. +1
    -1
      Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs

+ 4
- 0
Source/MQTTnet/Server/IMqttServerCertificateCredentials.cs Wyświetl plik

@@ -0,0 +1,4 @@
public interface IMqttServerCertificateCredentials
{
string Password { get; }
}

+ 0
- 6
Source/MQTTnet/Server/IMqttServerCredentials.cs Wyświetl plik

@@ -1,6 +0,0 @@
using System;

public interface IMqttServerCredentials
{
String Password { get; }
}

+ 7
- 0
Source/MQTTnet/Server/MqttServerCertificateCredentials.cs Wyświetl plik

@@ -0,0 +1,7 @@
namespace MQTTnet.Server
{
public class MqttServerCertificateCredentials : IMqttServerCertificateCredentials
{
public string Password { get; set; }
}
}

+ 1
- 1
Source/MQTTnet/Server/MqttServerOptionsBuilder.cs Wyświetl plik

@@ -82,7 +82,7 @@ namespace MQTTnet.Server
return this;
}

public MqttServerOptionsBuilder WithEncryptionCertificate(byte[] value, IMqttServerCredentials credentials = null)
public MqttServerOptionsBuilder WithEncryptionCertificate(byte[] value, IMqttServerCertificateCredentials credentials = null)
{
_options.TlsEndpointOptions.Certificate = value;
_options.TlsEndpointOptions.CertificateCredentials = credentials;


+ 1
- 1
Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs Wyświetl plik

@@ -12,7 +12,7 @@ namespace MQTTnet.Server

public byte[] Certificate { get; set; }

public IMqttServerCredentials CertificateCredentials { get; set; }
public IMqttServerCertificateCredentials CertificateCredentials { get; set; }

public bool ClientCertificateRequired { get; set; }



Ładowanie…
Anuluj
Zapisz