File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ class _InternalCoapConfig extends CoapConfigDefault {
2626 dtlsCiphers = coapConfig.dtlsCiphers,
2727 dtlsVerify = coapConfig.dtlsVerify,
2828 dtlsWithTrustedRoots = coapConfig.dtlsWithTrustedRoots,
29- rootCertificates = coapConfig.rootCertificates;
29+ rootCertificates = coapConfig.rootCertificates,
30+ clientCertificateFileName = coapConfig.clientCertificateFileName,
31+ clientKeyFileName = coapConfig.clientKeyFileName,
32+ verifyPrivateKey = coapConfig.verifyPrivateKey;
3033
3134 @override
3235 final int preferredBlockSize;
@@ -42,6 +45,15 @@ class _InternalCoapConfig extends CoapConfigDefault {
4245
4346 @override
4447 final List <Uint8List > rootCertificates;
48+
49+ @override
50+ final String ? clientCertificateFileName;
51+
52+ @override
53+ final String ? clientKeyFileName;
54+
55+ @override
56+ final bool verifyPrivateKey;
4557}
4658
4759coap.PskCredentialsCallback ? _createPskCallback (
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ class CoapConfig {
2222 this .rootCertificates = const [],
2323 this .dtlsWithTrustedRoots = true ,
2424 this .dtlsVerify = true ,
25+ this .clientKeyFileName,
26+ this .clientCertificateFileName,
27+ this .verifyPrivateKey = false ,
2528 });
2629
2730 /// Whether certificates should be verified by OpenSSL.
@@ -57,4 +60,8 @@ class CoapConfig {
5760 ///
5861 /// Defaults to 60 seconds.
5962 final Duration multicastDiscoveryTimeout;
63+
64+ final String ? clientCertificateFileName;
65+ final String ? clientKeyFileName;
66+ final bool verifyPrivateKey;
6067}
Original file line number Diff line number Diff line change @@ -30,3 +30,9 @@ dependencies:
3030 typed_data : ^1.3.2
3131 uri : ^1.0.0
3232 uuid : ^4.2.1
33+
34+ dependency_overrides :
35+ coap :
36+ git :
37+ url : https://github.com/namib-project/coap
38+ ref : client-certificate-support
You can’t perform that action at this time.
0 commit comments