소스 검색

Changed server crentials property name from password to certificateCredentials

release/3.x.x
Craig Lutgen 5 년 전
부모
커밋
59d2a8e551
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. +1
    -1
      Source/MQTTnet/Implementations/MqttTcpServerAdapter.cs
  2. +2
    -2
      Source/MQTTnet/Server/MqttServerOptionsBuilder.cs
  3. +1
    -1
      Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs

+ 1
- 1
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.");


+ 2
- 2
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;
}



+ 1
- 1
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; }



불러오는 중...
취소
저장