File tree 2 files changed +9
-8
lines changed 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ class _InternalCoapConfig extends CoapConfigDefault {
27
27
dtlsVerify = coapConfig.dtlsVerify,
28
28
dtlsWithTrustedRoots = coapConfig.dtlsWithTrustedRoots,
29
29
rootCertificates = coapConfig.rootCertificates,
30
- clientCertificateFileName = coapConfig.clientCertificateFileName ,
31
- clientKeyFileName = coapConfig.clientKeyFileName ,
30
+ clientCertificate = coapConfig.clientCertificate ,
31
+ clientPrivateKey = coapConfig.clientPrivateKey ,
32
32
_verifyPrivateKey = coapConfig.verifyPrivateKey;
33
33
34
34
@override
@@ -47,10 +47,10 @@ class _InternalCoapConfig extends CoapConfigDefault {
47
47
final List <Uint8List > rootCertificates;
48
48
49
49
@override
50
- final String ? clientCertificateFileName ;
50
+ final coap. ClientCertificate ? clientCertificate ;
51
51
52
52
@override
53
- final String ? clientKeyFileName ;
53
+ final coap. ClientPrivateKey ? clientPrivateKey ;
54
54
55
55
final bool _verifyPrivateKey;
56
56
Original file line number Diff line number Diff line change 6
6
7
7
import "dart:typed_data" ;
8
8
9
+ import "package:coap/coap.dart" ;
9
10
import "package:meta/meta.dart" ;
10
11
11
12
/// Allows for configuring the behavior of CoAP clients and servers.
@@ -22,8 +23,8 @@ class CoapConfig {
22
23
this .rootCertificates = const [],
23
24
this .dtlsWithTrustedRoots = true ,
24
25
this .dtlsVerify = true ,
25
- this .clientKeyFileName ,
26
- this .clientCertificateFileName ,
26
+ this .clientCertificate ,
27
+ this .clientPrivateKey ,
27
28
this .verifyPrivateKey = false ,
28
29
});
29
30
@@ -62,10 +63,10 @@ class CoapConfig {
62
63
final Duration multicastDiscoveryTimeout;
63
64
64
65
/// Name of a file referring to a client certificate used with DTLS PKI mode.
65
- final String ? clientCertificateFileName ;
66
+ final ClientCertificate ? clientCertificate ;
66
67
67
68
/// Name of a file referring to a private client key used with DTLS PKI mode.
68
- final String ? clientKeyFileName ;
69
+ final ClientPrivateKey ? clientPrivateKey ;
69
70
70
71
/// Whether the private key of the client certificate should be verified when
71
72
/// creating the DTLS context.
You can’t perform that action at this time.
0 commit comments