@matter/protocol 0.18.0 → 0.18.1-alpha.0-20261111-b89790712

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (527) hide show
  1. package/dist/cjs/action/Val.d.ts +8 -0
  2. package/dist/cjs/action/Val.d.ts.map +1 -1
  3. package/dist/cjs/action/client/ClientInteraction.d.ts.map +1 -1
  4. package/dist/cjs/action/client/ClientInteraction.js +19 -20
  5. package/dist/cjs/action/client/ClientInteraction.js.map +1 -1
  6. package/dist/cjs/action/client/ClientRequest.d.ts +14 -0
  7. package/dist/cjs/action/client/ClientRequest.d.ts.map +1 -1
  8. package/dist/cjs/action/client/InputChunk.js +39 -2
  9. package/dist/cjs/action/client/InputChunk.js.map +1 -1
  10. package/dist/cjs/action/errors.d.ts +3 -1
  11. package/dist/cjs/action/errors.d.ts.map +1 -1
  12. package/dist/cjs/action/errors.js +7 -2
  13. package/dist/cjs/action/errors.js.map +1 -1
  14. package/dist/cjs/action/protocols.d.ts +6 -1
  15. package/dist/cjs/action/protocols.d.ts.map +1 -1
  16. package/dist/cjs/action/request/Invoke.d.ts +24 -1
  17. package/dist/cjs/action/request/Invoke.d.ts.map +1 -1
  18. package/dist/cjs/action/request/Invoke.js +40 -12
  19. package/dist/cjs/action/request/Invoke.js.map +1 -1
  20. package/dist/cjs/action/request/Write.d.ts.map +1 -1
  21. package/dist/cjs/action/request/Write.js +6 -5
  22. package/dist/cjs/action/request/Write.js.map +1 -1
  23. package/dist/cjs/action/response/ReadResult.d.ts +14 -5
  24. package/dist/cjs/action/response/ReadResult.d.ts.map +1 -1
  25. package/dist/cjs/action/server/AttributeReadResponse.d.ts.map +1 -1
  26. package/dist/cjs/action/server/AttributeReadResponse.js +1 -1
  27. package/dist/cjs/action/server/AttributeReadResponse.js.map +1 -1
  28. package/dist/cjs/action/server/AttributeWriteResponse.d.ts.map +1 -1
  29. package/dist/cjs/action/server/AttributeWriteResponse.js +4 -2
  30. package/dist/cjs/action/server/AttributeWriteResponse.js.map +1 -1
  31. package/dist/cjs/action/server/EventReadResponse.d.ts.map +1 -1
  32. package/dist/cjs/action/server/EventReadResponse.js +1 -0
  33. package/dist/cjs/action/server/EventReadResponse.js.map +1 -1
  34. package/dist/cjs/advertisement/mdns/MdnsAdvertisement.d.ts +1 -1
  35. package/dist/cjs/advertisement/mdns/MdnsAdvertisement.d.ts.map +1 -1
  36. package/dist/cjs/advertisement/mdns/MdnsAdvertisement.js +7 -7
  37. package/dist/cjs/advertisement/mdns/MdnsAdvertisement.js.map +1 -1
  38. package/dist/cjs/ble/Ble.d.ts +2 -0
  39. package/dist/cjs/ble/Ble.d.ts.map +1 -1
  40. package/dist/cjs/ble/Ble.js +4 -0
  41. package/dist/cjs/ble/Ble.js.map +1 -1
  42. package/dist/cjs/certificate/CdSigners.d.ts +52 -0
  43. package/dist/cjs/certificate/CdSigners.d.ts.map +1 -0
  44. package/dist/cjs/certificate/CdSigners.js +111 -0
  45. package/dist/cjs/certificate/CdSigners.js.map +6 -0
  46. package/dist/cjs/certificate/CertificateAuthority.d.ts +1 -1
  47. package/dist/cjs/certificate/CertificateAuthority.d.ts.map +1 -1
  48. package/dist/cjs/certificate/DeviceAttestationValidator.d.ts +53 -7
  49. package/dist/cjs/certificate/DeviceAttestationValidator.d.ts.map +1 -1
  50. package/dist/cjs/certificate/DeviceAttestationValidator.js +114 -42
  51. package/dist/cjs/certificate/DeviceAttestationValidator.js.map +1 -1
  52. package/dist/cjs/certificate/DeviceCertification.d.ts.map +1 -1
  53. package/dist/cjs/certificate/DeviceCertification.js +5 -2
  54. package/dist/cjs/certificate/DeviceCertification.js.map +1 -1
  55. package/dist/cjs/certificate/index.d.ts +1 -0
  56. package/dist/cjs/certificate/index.d.ts.map +1 -1
  57. package/dist/cjs/certificate/index.js +1 -0
  58. package/dist/cjs/certificate/index.js.map +1 -1
  59. package/dist/cjs/certificate/kinds/AttestationCertificates.d.ts +42 -6
  60. package/dist/cjs/certificate/kinds/AttestationCertificates.d.ts.map +1 -1
  61. package/dist/cjs/certificate/kinds/AttestationCertificates.js +110 -13
  62. package/dist/cjs/certificate/kinds/AttestationCertificates.js.map +1 -1
  63. package/dist/cjs/certificate/kinds/Certificate.d.ts +13 -7
  64. package/dist/cjs/certificate/kinds/Certificate.d.ts.map +1 -1
  65. package/dist/cjs/certificate/kinds/Certificate.js +146 -240
  66. package/dist/cjs/certificate/kinds/Certificate.js.map +2 -2
  67. package/dist/cjs/certificate/kinds/CertificationDeclaration.d.ts +21 -3
  68. package/dist/cjs/certificate/kinds/CertificationDeclaration.d.ts.map +1 -1
  69. package/dist/cjs/certificate/kinds/CertificationDeclaration.js +76 -20
  70. package/dist/cjs/certificate/kinds/CertificationDeclaration.js.map +1 -1
  71. package/dist/cjs/certificate/kinds/DistinguishedName.d.ts +190 -0
  72. package/dist/cjs/certificate/kinds/DistinguishedName.d.ts.map +1 -0
  73. package/dist/cjs/certificate/kinds/DistinguishedName.js +417 -0
  74. package/dist/cjs/certificate/kinds/DistinguishedName.js.map +6 -0
  75. package/dist/cjs/certificate/kinds/Icac.d.ts.map +1 -1
  76. package/dist/cjs/certificate/kinds/Icac.js +5 -10
  77. package/dist/cjs/certificate/kinds/Icac.js.map +1 -1
  78. package/dist/cjs/certificate/kinds/Noc.d.ts.map +1 -1
  79. package/dist/cjs/certificate/kinds/Noc.js +5 -4
  80. package/dist/cjs/certificate/kinds/Noc.js.map +1 -1
  81. package/dist/cjs/certificate/kinds/OperationalBase.d.ts.map +1 -1
  82. package/dist/cjs/certificate/kinds/OperationalBase.js +4 -2
  83. package/dist/cjs/certificate/kinds/OperationalBase.js.map +1 -1
  84. package/dist/cjs/certificate/kinds/Rcac.d.ts.map +1 -1
  85. package/dist/cjs/certificate/kinds/Rcac.js +5 -10
  86. package/dist/cjs/certificate/kinds/Rcac.js.map +1 -1
  87. package/dist/cjs/certificate/kinds/Vvsc.d.ts +3 -3
  88. package/dist/cjs/certificate/kinds/Vvsc.d.ts.map +1 -1
  89. package/dist/cjs/certificate/kinds/Vvsc.js +19 -14
  90. package/dist/cjs/certificate/kinds/Vvsc.js.map +1 -1
  91. package/dist/cjs/certificate/kinds/definitions/asn.d.ts +1 -1
  92. package/dist/cjs/certificate/kinds/definitions/asn.d.ts.map +1 -1
  93. package/dist/cjs/certificate/kinds/definitions/asn.js.map +1 -1
  94. package/dist/cjs/certificate/kinds/definitions/attestation.d.ts +15 -15
  95. package/dist/cjs/certificate/kinds/definitions/attestation.d.ts.map +1 -1
  96. package/dist/cjs/certificate/kinds/definitions/base.d.ts +33 -0
  97. package/dist/cjs/certificate/kinds/definitions/base.d.ts.map +1 -1
  98. package/dist/cjs/certificate/kinds/definitions/base.js +8 -1
  99. package/dist/cjs/certificate/kinds/definitions/base.js.map +1 -1
  100. package/dist/cjs/certificate/kinds/definitions/operational.d.ts +24 -20
  101. package/dist/cjs/certificate/kinds/definitions/operational.d.ts.map +1 -1
  102. package/dist/cjs/certificate/kinds/definitions/operational.js +5 -3
  103. package/dist/cjs/certificate/kinds/definitions/operational.js.map +1 -1
  104. package/dist/cjs/codec/MessageCodec.d.ts +27 -2
  105. package/dist/cjs/codec/MessageCodec.d.ts.map +1 -1
  106. package/dist/cjs/codec/MessageCodec.js +81 -74
  107. package/dist/cjs/codec/MessageCodec.js.map +1 -1
  108. package/dist/cjs/dcl/DclCertificateService.d.ts +28 -7
  109. package/dist/cjs/dcl/DclCertificateService.d.ts.map +1 -1
  110. package/dist/cjs/dcl/DclCertificateService.js +103 -30
  111. package/dist/cjs/dcl/DclCertificateService.js.map +1 -1
  112. package/dist/cjs/fabric/Fabric.d.ts +10 -5
  113. package/dist/cjs/fabric/Fabric.d.ts.map +1 -1
  114. package/dist/cjs/fabric/Fabric.js +12 -5
  115. package/dist/cjs/fabric/Fabric.js.map +1 -1
  116. package/dist/cjs/fabric/FabricManager.d.ts +2 -2
  117. package/dist/cjs/fabric/FabricManager.js +2 -2
  118. package/dist/cjs/groups/FabricGroups.d.ts +2 -0
  119. package/dist/cjs/groups/FabricGroups.d.ts.map +1 -1
  120. package/dist/cjs/groups/FabricGroups.js +4 -0
  121. package/dist/cjs/groups/FabricGroups.js.map +1 -1
  122. package/dist/cjs/groups/Groups.d.ts +7 -0
  123. package/dist/cjs/groups/Groups.d.ts.map +1 -1
  124. package/dist/cjs/groups/Groups.js +11 -2
  125. package/dist/cjs/groups/Groups.js.map +1 -1
  126. package/dist/cjs/groups/KeySets.d.ts +3 -3
  127. package/dist/cjs/groups/KeySets.js +3 -3
  128. package/dist/cjs/mdns/InterfaceResponder.d.ts +137 -0
  129. package/dist/cjs/mdns/InterfaceResponder.d.ts.map +1 -0
  130. package/dist/cjs/mdns/InterfaceResponder.js +799 -0
  131. package/dist/cjs/mdns/InterfaceResponder.js.map +6 -0
  132. package/dist/cjs/mdns/MdnsServer.d.ts +82 -9
  133. package/dist/cjs/mdns/MdnsServer.d.ts.map +1 -1
  134. package/dist/cjs/mdns/MdnsServer.js +337 -267
  135. package/dist/cjs/mdns/MdnsServer.js.map +2 -2
  136. package/dist/cjs/peer/CommissioningConnection.d.ts.map +1 -1
  137. package/dist/cjs/peer/CommissioningConnection.js +4 -2
  138. package/dist/cjs/peer/CommissioningConnection.js.map +1 -1
  139. package/dist/cjs/peer/ControllerCommissioner.d.ts.map +1 -1
  140. package/dist/cjs/peer/ControllerCommissioner.js +48 -13
  141. package/dist/cjs/peer/ControllerCommissioner.js.map +1 -1
  142. package/dist/cjs/peer/ControllerCommissioningFlow.d.ts +7 -7
  143. package/dist/cjs/peer/ControllerCommissioningFlow.d.ts.map +1 -1
  144. package/dist/cjs/peer/ControllerCommissioningFlow.js +109 -32
  145. package/dist/cjs/peer/ControllerCommissioningFlow.js.map +1 -1
  146. package/dist/cjs/peer/Peer.d.ts +5 -0
  147. package/dist/cjs/peer/Peer.d.ts.map +1 -1
  148. package/dist/cjs/peer/Peer.js +29 -1
  149. package/dist/cjs/peer/Peer.js.map +1 -1
  150. package/dist/cjs/peer/PeerAddressStore.d.ts +37 -0
  151. package/dist/cjs/peer/PeerAddressStore.d.ts.map +1 -0
  152. package/dist/cjs/peer/PeerAddressStore.js +114 -0
  153. package/dist/cjs/peer/PeerAddressStore.js.map +6 -0
  154. package/dist/cjs/peer/PeerConnection.d.ts.map +1 -1
  155. package/dist/cjs/peer/PeerConnection.js +0 -1
  156. package/dist/cjs/peer/PeerConnection.js.map +1 -1
  157. package/dist/cjs/peer/PeerDescriptor.d.ts +3 -4
  158. package/dist/cjs/peer/PeerDescriptor.d.ts.map +1 -1
  159. package/dist/cjs/peer/PeerDescriptor.js.map +1 -1
  160. package/dist/cjs/peer/PeerExchangeProvider.d.ts.map +1 -1
  161. package/dist/cjs/peer/PeerExchangeProvider.js +2 -1
  162. package/dist/cjs/peer/PeerExchangeProvider.js.map +1 -1
  163. package/dist/cjs/peer/PeerLossContext.d.ts +10 -2
  164. package/dist/cjs/peer/PeerLossContext.d.ts.map +1 -1
  165. package/dist/cjs/peer/PhysicalDeviceProperties.d.ts +13 -0
  166. package/dist/cjs/peer/PhysicalDeviceProperties.d.ts.map +1 -1
  167. package/dist/cjs/peer/PhysicalDeviceProperties.js +3 -2
  168. package/dist/cjs/peer/PhysicalDeviceProperties.js.map +1 -1
  169. package/dist/cjs/peer/RebootResubscribeArmer.d.ts +3 -3
  170. package/dist/cjs/peer/RebootResubscribeArmer.d.ts.map +1 -1
  171. package/dist/cjs/peer/RebootResubscribeArmer.js +21 -9
  172. package/dist/cjs/peer/RebootResubscribeArmer.js.map +1 -1
  173. package/dist/cjs/peer/index.d.ts +1 -0
  174. package/dist/cjs/peer/index.d.ts.map +1 -1
  175. package/dist/cjs/peer/index.js +1 -0
  176. package/dist/cjs/peer/index.js.map +1 -1
  177. package/dist/cjs/protocol/DeviceAdvertiser.d.ts.map +1 -1
  178. package/dist/cjs/protocol/DeviceAdvertiser.js +1 -1
  179. package/dist/cjs/protocol/DeviceAdvertiser.js.map +1 -1
  180. package/dist/cjs/protocol/ExchangeManager.d.ts +0 -1
  181. package/dist/cjs/protocol/ExchangeManager.d.ts.map +1 -1
  182. package/dist/cjs/protocol/ExchangeManager.js +136 -64
  183. package/dist/cjs/protocol/ExchangeManager.js.map +1 -1
  184. package/dist/cjs/protocol/ExchangeProvider.d.ts +3 -2
  185. package/dist/cjs/protocol/ExchangeProvider.d.ts.map +1 -1
  186. package/dist/cjs/protocol/ExchangeProvider.js.map +1 -1
  187. package/dist/cjs/protocol/MessageExchange.d.ts +13 -0
  188. package/dist/cjs/protocol/MessageExchange.d.ts.map +1 -1
  189. package/dist/cjs/protocol/MessageExchange.js +16 -6
  190. package/dist/cjs/protocol/MessageExchange.js.map +1 -1
  191. package/dist/cjs/protocol/MessageReceptionState.d.ts +1 -1
  192. package/dist/cjs/protocol/errors.d.ts +7 -1
  193. package/dist/cjs/protocol/errors.d.ts.map +1 -1
  194. package/dist/cjs/protocol/errors.js +3 -0
  195. package/dist/cjs/protocol/errors.js.map +1 -1
  196. package/dist/cjs/securechannel/SecureChannelMessenger.d.ts +6 -1
  197. package/dist/cjs/securechannel/SecureChannelMessenger.d.ts.map +1 -1
  198. package/dist/cjs/securechannel/SecureChannelMessenger.js +27 -12
  199. package/dist/cjs/securechannel/SecureChannelMessenger.js.map +1 -1
  200. package/dist/cjs/session/GroupSession.d.ts +58 -15
  201. package/dist/cjs/session/GroupSession.d.ts.map +1 -1
  202. package/dist/cjs/session/GroupSession.js +97 -102
  203. package/dist/cjs/session/GroupSession.js.map +2 -2
  204. package/dist/cjs/session/NodeSession.d.ts +50 -1
  205. package/dist/cjs/session/NodeSession.d.ts.map +1 -1
  206. package/dist/cjs/session/NodeSession.js +80 -4
  207. package/dist/cjs/session/NodeSession.js.map +1 -1
  208. package/dist/cjs/session/SecureSession.d.ts +9 -0
  209. package/dist/cjs/session/SecureSession.d.ts.map +1 -1
  210. package/dist/cjs/session/SecureSession.js +12 -0
  211. package/dist/cjs/session/SecureSession.js.map +1 -1
  212. package/dist/cjs/session/Session.d.ts +2 -2
  213. package/dist/cjs/session/Session.d.ts.map +1 -1
  214. package/dist/cjs/session/Session.js +1 -1
  215. package/dist/cjs/session/SessionManager.d.ts +76 -28
  216. package/dist/cjs/session/SessionManager.d.ts.map +1 -1
  217. package/dist/cjs/session/SessionManager.js +316 -153
  218. package/dist/cjs/session/SessionManager.js.map +2 -2
  219. package/dist/cjs/session/UnsecuredSession.d.ts +0 -1
  220. package/dist/cjs/session/UnsecuredSession.d.ts.map +1 -1
  221. package/dist/cjs/session/UnsecuredSession.js +2 -4
  222. package/dist/cjs/session/UnsecuredSession.js.map +1 -1
  223. package/dist/cjs/session/case/CaseClient.d.ts +5 -0
  224. package/dist/cjs/session/case/CaseClient.d.ts.map +1 -1
  225. package/dist/cjs/session/case/CaseClient.js +12 -11
  226. package/dist/cjs/session/case/CaseClient.js.map +2 -2
  227. package/dist/cjs/session/case/CaseServer.d.ts.map +1 -1
  228. package/dist/cjs/session/case/CaseServer.js +31 -11
  229. package/dist/cjs/session/case/CaseServer.js.map +1 -1
  230. package/dist/esm/action/Val.d.ts +8 -0
  231. package/dist/esm/action/Val.d.ts.map +1 -1
  232. package/dist/esm/action/client/ClientInteraction.d.ts.map +1 -1
  233. package/dist/esm/action/client/ClientInteraction.js +19 -20
  234. package/dist/esm/action/client/ClientInteraction.js.map +1 -1
  235. package/dist/esm/action/client/ClientRequest.d.ts +14 -0
  236. package/dist/esm/action/client/ClientRequest.d.ts.map +1 -1
  237. package/dist/esm/action/client/InputChunk.js +39 -2
  238. package/dist/esm/action/client/InputChunk.js.map +1 -1
  239. package/dist/esm/action/errors.d.ts +3 -1
  240. package/dist/esm/action/errors.d.ts.map +1 -1
  241. package/dist/esm/action/errors.js +7 -2
  242. package/dist/esm/action/errors.js.map +1 -1
  243. package/dist/esm/action/protocols.d.ts +6 -1
  244. package/dist/esm/action/protocols.d.ts.map +1 -1
  245. package/dist/esm/action/request/Invoke.d.ts +24 -1
  246. package/dist/esm/action/request/Invoke.d.ts.map +1 -1
  247. package/dist/esm/action/request/Invoke.js +41 -13
  248. package/dist/esm/action/request/Invoke.js.map +1 -1
  249. package/dist/esm/action/request/Write.d.ts.map +1 -1
  250. package/dist/esm/action/request/Write.js +7 -6
  251. package/dist/esm/action/request/Write.js.map +1 -1
  252. package/dist/esm/action/response/ReadResult.d.ts +14 -5
  253. package/dist/esm/action/response/ReadResult.d.ts.map +1 -1
  254. package/dist/esm/action/server/AttributeReadResponse.d.ts.map +1 -1
  255. package/dist/esm/action/server/AttributeReadResponse.js +2 -2
  256. package/dist/esm/action/server/AttributeReadResponse.js.map +1 -1
  257. package/dist/esm/action/server/AttributeWriteResponse.d.ts.map +1 -1
  258. package/dist/esm/action/server/AttributeWriteResponse.js +11 -3
  259. package/dist/esm/action/server/AttributeWriteResponse.js.map +1 -1
  260. package/dist/esm/action/server/EventReadResponse.d.ts.map +1 -1
  261. package/dist/esm/action/server/EventReadResponse.js +1 -0
  262. package/dist/esm/action/server/EventReadResponse.js.map +1 -1
  263. package/dist/esm/advertisement/mdns/MdnsAdvertisement.d.ts +1 -1
  264. package/dist/esm/advertisement/mdns/MdnsAdvertisement.d.ts.map +1 -1
  265. package/dist/esm/advertisement/mdns/MdnsAdvertisement.js +7 -7
  266. package/dist/esm/advertisement/mdns/MdnsAdvertisement.js.map +1 -1
  267. package/dist/esm/ble/Ble.d.ts +2 -0
  268. package/dist/esm/ble/Ble.d.ts.map +1 -1
  269. package/dist/esm/ble/Ble.js +4 -0
  270. package/dist/esm/ble/Ble.js.map +1 -1
  271. package/dist/esm/certificate/CdSigners.d.ts +52 -0
  272. package/dist/esm/certificate/CdSigners.d.ts.map +1 -0
  273. package/dist/esm/certificate/CdSigners.js +91 -0
  274. package/dist/esm/certificate/CdSigners.js.map +6 -0
  275. package/dist/esm/certificate/CertificateAuthority.d.ts +1 -1
  276. package/dist/esm/certificate/CertificateAuthority.d.ts.map +1 -1
  277. package/dist/esm/certificate/DeviceAttestationValidator.d.ts +53 -7
  278. package/dist/esm/certificate/DeviceAttestationValidator.d.ts.map +1 -1
  279. package/dist/esm/certificate/DeviceAttestationValidator.js +115 -43
  280. package/dist/esm/certificate/DeviceAttestationValidator.js.map +1 -1
  281. package/dist/esm/certificate/DeviceCertification.d.ts.map +1 -1
  282. package/dist/esm/certificate/DeviceCertification.js +5 -2
  283. package/dist/esm/certificate/DeviceCertification.js.map +1 -1
  284. package/dist/esm/certificate/index.d.ts +1 -0
  285. package/dist/esm/certificate/index.d.ts.map +1 -1
  286. package/dist/esm/certificate/index.js +1 -0
  287. package/dist/esm/certificate/index.js.map +1 -1
  288. package/dist/esm/certificate/kinds/AttestationCertificates.d.ts +42 -6
  289. package/dist/esm/certificate/kinds/AttestationCertificates.d.ts.map +1 -1
  290. package/dist/esm/certificate/kinds/AttestationCertificates.js +112 -15
  291. package/dist/esm/certificate/kinds/AttestationCertificates.js.map +1 -1
  292. package/dist/esm/certificate/kinds/Certificate.d.ts +13 -7
  293. package/dist/esm/certificate/kinds/Certificate.d.ts.map +1 -1
  294. package/dist/esm/certificate/kinds/Certificate.js +153 -256
  295. package/dist/esm/certificate/kinds/Certificate.js.map +2 -2
  296. package/dist/esm/certificate/kinds/CertificationDeclaration.d.ts +21 -3
  297. package/dist/esm/certificate/kinds/CertificationDeclaration.d.ts.map +1 -1
  298. package/dist/esm/certificate/kinds/CertificationDeclaration.js +79 -20
  299. package/dist/esm/certificate/kinds/CertificationDeclaration.js.map +1 -1
  300. package/dist/esm/certificate/kinds/DistinguishedName.d.ts +190 -0
  301. package/dist/esm/certificate/kinds/DistinguishedName.d.ts.map +1 -0
  302. package/dist/esm/certificate/kinds/DistinguishedName.js +422 -0
  303. package/dist/esm/certificate/kinds/DistinguishedName.js.map +6 -0
  304. package/dist/esm/certificate/kinds/Icac.d.ts.map +1 -1
  305. package/dist/esm/certificate/kinds/Icac.js +6 -11
  306. package/dist/esm/certificate/kinds/Icac.js.map +1 -1
  307. package/dist/esm/certificate/kinds/Noc.d.ts.map +1 -1
  308. package/dist/esm/certificate/kinds/Noc.js +5 -4
  309. package/dist/esm/certificate/kinds/Noc.js.map +1 -1
  310. package/dist/esm/certificate/kinds/OperationalBase.d.ts.map +1 -1
  311. package/dist/esm/certificate/kinds/OperationalBase.js +4 -2
  312. package/dist/esm/certificate/kinds/OperationalBase.js.map +1 -1
  313. package/dist/esm/certificate/kinds/Rcac.d.ts.map +1 -1
  314. package/dist/esm/certificate/kinds/Rcac.js +6 -11
  315. package/dist/esm/certificate/kinds/Rcac.js.map +1 -1
  316. package/dist/esm/certificate/kinds/Vvsc.d.ts +3 -3
  317. package/dist/esm/certificate/kinds/Vvsc.d.ts.map +1 -1
  318. package/dist/esm/certificate/kinds/Vvsc.js +20 -15
  319. package/dist/esm/certificate/kinds/Vvsc.js.map +1 -1
  320. package/dist/esm/certificate/kinds/definitions/asn.d.ts +1 -1
  321. package/dist/esm/certificate/kinds/definitions/asn.d.ts.map +1 -1
  322. package/dist/esm/certificate/kinds/definitions/asn.js.map +1 -1
  323. package/dist/esm/certificate/kinds/definitions/attestation.d.ts +15 -15
  324. package/dist/esm/certificate/kinds/definitions/attestation.d.ts.map +1 -1
  325. package/dist/esm/certificate/kinds/definitions/base.d.ts +33 -0
  326. package/dist/esm/certificate/kinds/definitions/base.d.ts.map +1 -1
  327. package/dist/esm/certificate/kinds/definitions/base.js +9 -2
  328. package/dist/esm/certificate/kinds/definitions/base.js.map +1 -1
  329. package/dist/esm/certificate/kinds/definitions/operational.d.ts +24 -20
  330. package/dist/esm/certificate/kinds/definitions/operational.d.ts.map +1 -1
  331. package/dist/esm/certificate/kinds/definitions/operational.js +5 -3
  332. package/dist/esm/certificate/kinds/definitions/operational.js.map +1 -1
  333. package/dist/esm/codec/MessageCodec.d.ts +27 -2
  334. package/dist/esm/codec/MessageCodec.d.ts.map +1 -1
  335. package/dist/esm/codec/MessageCodec.js +82 -75
  336. package/dist/esm/codec/MessageCodec.js.map +1 -1
  337. package/dist/esm/dcl/DclCertificateService.d.ts +28 -7
  338. package/dist/esm/dcl/DclCertificateService.d.ts.map +1 -1
  339. package/dist/esm/dcl/DclCertificateService.js +108 -31
  340. package/dist/esm/dcl/DclCertificateService.js.map +1 -1
  341. package/dist/esm/fabric/Fabric.d.ts +10 -5
  342. package/dist/esm/fabric/Fabric.d.ts.map +1 -1
  343. package/dist/esm/fabric/Fabric.js +12 -5
  344. package/dist/esm/fabric/Fabric.js.map +1 -1
  345. package/dist/esm/fabric/FabricManager.d.ts +2 -2
  346. package/dist/esm/fabric/FabricManager.js +2 -2
  347. package/dist/esm/groups/FabricGroups.d.ts +2 -0
  348. package/dist/esm/groups/FabricGroups.d.ts.map +1 -1
  349. package/dist/esm/groups/FabricGroups.js +4 -0
  350. package/dist/esm/groups/FabricGroups.js.map +1 -1
  351. package/dist/esm/groups/Groups.d.ts +7 -0
  352. package/dist/esm/groups/Groups.d.ts.map +1 -1
  353. package/dist/esm/groups/Groups.js +11 -2
  354. package/dist/esm/groups/Groups.js.map +1 -1
  355. package/dist/esm/groups/KeySets.d.ts +3 -3
  356. package/dist/esm/groups/KeySets.js +3 -3
  357. package/dist/esm/mdns/InterfaceResponder.d.ts +137 -0
  358. package/dist/esm/mdns/InterfaceResponder.d.ts.map +1 -0
  359. package/dist/esm/mdns/InterfaceResponder.js +794 -0
  360. package/dist/esm/mdns/InterfaceResponder.js.map +6 -0
  361. package/dist/esm/mdns/MdnsServer.d.ts +82 -9
  362. package/dist/esm/mdns/MdnsServer.d.ts.map +1 -1
  363. package/dist/esm/mdns/MdnsServer.js +341 -273
  364. package/dist/esm/mdns/MdnsServer.js.map +2 -2
  365. package/dist/esm/peer/CommissioningConnection.d.ts.map +1 -1
  366. package/dist/esm/peer/CommissioningConnection.js +4 -2
  367. package/dist/esm/peer/CommissioningConnection.js.map +1 -1
  368. package/dist/esm/peer/ControllerCommissioner.d.ts.map +1 -1
  369. package/dist/esm/peer/ControllerCommissioner.js +48 -13
  370. package/dist/esm/peer/ControllerCommissioner.js.map +1 -1
  371. package/dist/esm/peer/ControllerCommissioningFlow.d.ts +7 -7
  372. package/dist/esm/peer/ControllerCommissioningFlow.d.ts.map +1 -1
  373. package/dist/esm/peer/ControllerCommissioningFlow.js +109 -32
  374. package/dist/esm/peer/ControllerCommissioningFlow.js.map +1 -1
  375. package/dist/esm/peer/Peer.d.ts +5 -0
  376. package/dist/esm/peer/Peer.d.ts.map +1 -1
  377. package/dist/esm/peer/Peer.js +29 -1
  378. package/dist/esm/peer/Peer.js.map +1 -1
  379. package/dist/esm/peer/PeerAddressStore.d.ts +37 -0
  380. package/dist/esm/peer/PeerAddressStore.d.ts.map +1 -0
  381. package/dist/esm/peer/PeerAddressStore.js +94 -0
  382. package/dist/esm/peer/PeerAddressStore.js.map +6 -0
  383. package/dist/esm/peer/PeerConnection.d.ts.map +1 -1
  384. package/dist/esm/peer/PeerConnection.js +0 -1
  385. package/dist/esm/peer/PeerConnection.js.map +1 -1
  386. package/dist/esm/peer/PeerDescriptor.d.ts +3 -4
  387. package/dist/esm/peer/PeerDescriptor.d.ts.map +1 -1
  388. package/dist/esm/peer/PeerDescriptor.js.map +1 -1
  389. package/dist/esm/peer/PeerExchangeProvider.d.ts.map +1 -1
  390. package/dist/esm/peer/PeerExchangeProvider.js +3 -2
  391. package/dist/esm/peer/PeerExchangeProvider.js.map +1 -1
  392. package/dist/esm/peer/PeerLossContext.d.ts +10 -2
  393. package/dist/esm/peer/PeerLossContext.d.ts.map +1 -1
  394. package/dist/esm/peer/PhysicalDeviceProperties.d.ts +13 -0
  395. package/dist/esm/peer/PhysicalDeviceProperties.d.ts.map +1 -1
  396. package/dist/esm/peer/PhysicalDeviceProperties.js +3 -2
  397. package/dist/esm/peer/PhysicalDeviceProperties.js.map +1 -1
  398. package/dist/esm/peer/RebootResubscribeArmer.d.ts +3 -3
  399. package/dist/esm/peer/RebootResubscribeArmer.d.ts.map +1 -1
  400. package/dist/esm/peer/RebootResubscribeArmer.js +21 -9
  401. package/dist/esm/peer/RebootResubscribeArmer.js.map +1 -1
  402. package/dist/esm/peer/index.d.ts +1 -0
  403. package/dist/esm/peer/index.d.ts.map +1 -1
  404. package/dist/esm/peer/index.js +1 -0
  405. package/dist/esm/peer/index.js.map +1 -1
  406. package/dist/esm/protocol/DeviceAdvertiser.d.ts.map +1 -1
  407. package/dist/esm/protocol/DeviceAdvertiser.js +1 -1
  408. package/dist/esm/protocol/DeviceAdvertiser.js.map +1 -1
  409. package/dist/esm/protocol/ExchangeManager.d.ts +0 -1
  410. package/dist/esm/protocol/ExchangeManager.d.ts.map +1 -1
  411. package/dist/esm/protocol/ExchangeManager.js +145 -67
  412. package/dist/esm/protocol/ExchangeManager.js.map +1 -1
  413. package/dist/esm/protocol/ExchangeProvider.d.ts +3 -2
  414. package/dist/esm/protocol/ExchangeProvider.d.ts.map +1 -1
  415. package/dist/esm/protocol/ExchangeProvider.js.map +1 -1
  416. package/dist/esm/protocol/MessageExchange.d.ts +13 -0
  417. package/dist/esm/protocol/MessageExchange.d.ts.map +1 -1
  418. package/dist/esm/protocol/MessageExchange.js +16 -6
  419. package/dist/esm/protocol/MessageExchange.js.map +1 -1
  420. package/dist/esm/protocol/MessageReceptionState.d.ts +1 -1
  421. package/dist/esm/protocol/errors.d.ts +7 -1
  422. package/dist/esm/protocol/errors.d.ts.map +1 -1
  423. package/dist/esm/protocol/errors.js +4 -1
  424. package/dist/esm/protocol/errors.js.map +1 -1
  425. package/dist/esm/securechannel/SecureChannelMessenger.d.ts +6 -1
  426. package/dist/esm/securechannel/SecureChannelMessenger.d.ts.map +1 -1
  427. package/dist/esm/securechannel/SecureChannelMessenger.js +27 -12
  428. package/dist/esm/securechannel/SecureChannelMessenger.js.map +1 -1
  429. package/dist/esm/session/GroupSession.d.ts +58 -15
  430. package/dist/esm/session/GroupSession.d.ts.map +1 -1
  431. package/dist/esm/session/GroupSession.js +97 -102
  432. package/dist/esm/session/GroupSession.js.map +2 -2
  433. package/dist/esm/session/NodeSession.d.ts +50 -1
  434. package/dist/esm/session/NodeSession.d.ts.map +1 -1
  435. package/dist/esm/session/NodeSession.js +83 -5
  436. package/dist/esm/session/NodeSession.js.map +1 -1
  437. package/dist/esm/session/SecureSession.d.ts +9 -0
  438. package/dist/esm/session/SecureSession.d.ts.map +1 -1
  439. package/dist/esm/session/SecureSession.js +18 -1
  440. package/dist/esm/session/SecureSession.js.map +1 -1
  441. package/dist/esm/session/Session.d.ts +2 -2
  442. package/dist/esm/session/Session.d.ts.map +1 -1
  443. package/dist/esm/session/Session.js +1 -1
  444. package/dist/esm/session/SessionManager.d.ts +76 -28
  445. package/dist/esm/session/SessionManager.d.ts.map +1 -1
  446. package/dist/esm/session/SessionManager.js +319 -156
  447. package/dist/esm/session/SessionManager.js.map +2 -2
  448. package/dist/esm/session/UnsecuredSession.d.ts +0 -1
  449. package/dist/esm/session/UnsecuredSession.d.ts.map +1 -1
  450. package/dist/esm/session/UnsecuredSession.js +5 -3
  451. package/dist/esm/session/UnsecuredSession.js.map +1 -1
  452. package/dist/esm/session/case/CaseClient.d.ts +5 -0
  453. package/dist/esm/session/case/CaseClient.d.ts.map +1 -1
  454. package/dist/esm/session/case/CaseClient.js +12 -11
  455. package/dist/esm/session/case/CaseClient.js.map +2 -2
  456. package/dist/esm/session/case/CaseServer.d.ts.map +1 -1
  457. package/dist/esm/session/case/CaseServer.js +31 -11
  458. package/dist/esm/session/case/CaseServer.js.map +1 -1
  459. package/package.json +5 -5
  460. package/src/action/Val.ts +8 -0
  461. package/src/action/client/ClientInteraction.ts +19 -21
  462. package/src/action/client/ClientRequest.ts +15 -0
  463. package/src/action/client/InputChunk.ts +57 -2
  464. package/src/action/errors.ts +10 -3
  465. package/src/action/protocols.ts +7 -1
  466. package/src/action/request/Invoke.ts +60 -15
  467. package/src/action/request/Write.ts +7 -6
  468. package/src/action/response/ReadResult.ts +15 -5
  469. package/src/action/server/AttributeReadResponse.ts +3 -2
  470. package/src/action/server/AttributeWriteResponse.ts +14 -3
  471. package/src/action/server/EventReadResponse.ts +1 -0
  472. package/src/advertisement/mdns/MdnsAdvertisement.ts +9 -9
  473. package/src/ble/Ble.ts +5 -0
  474. package/src/certificate/CdSigners.ts +137 -0
  475. package/src/certificate/CertificateAuthority.ts +1 -1
  476. package/src/certificate/DeviceAttestationValidator.ts +202 -54
  477. package/src/certificate/DeviceCertification.ts +6 -2
  478. package/src/certificate/index.ts +1 -0
  479. package/src/certificate/kinds/AttestationCertificates.ts +183 -15
  480. package/src/certificate/kinds/Certificate.ts +203 -308
  481. package/src/certificate/kinds/CertificationDeclaration.ts +100 -46
  482. package/src/certificate/kinds/DistinguishedName.ts +677 -0
  483. package/src/certificate/kinds/Icac.ts +7 -12
  484. package/src/certificate/kinds/Noc.ts +12 -8
  485. package/src/certificate/kinds/OperationalBase.ts +5 -2
  486. package/src/certificate/kinds/Rcac.ts +7 -12
  487. package/src/certificate/kinds/Vvsc.ts +24 -15
  488. package/src/certificate/kinds/definitions/asn.ts +1 -1
  489. package/src/certificate/kinds/definitions/attestation.ts +15 -15
  490. package/src/certificate/kinds/definitions/base.ts +43 -1
  491. package/src/certificate/kinds/definitions/operational.ts +4 -3
  492. package/src/codec/MessageCodec.ts +92 -81
  493. package/src/dcl/DclCertificateService.ts +135 -36
  494. package/src/fabric/Fabric.ts +13 -6
  495. package/src/fabric/FabricManager.ts +2 -2
  496. package/src/groups/FabricGroups.ts +5 -0
  497. package/src/groups/Groups.ts +12 -3
  498. package/src/groups/KeySets.ts +3 -3
  499. package/src/mdns/InterfaceResponder.ts +1031 -0
  500. package/src/mdns/MdnsServer.ts +400 -360
  501. package/src/peer/CommissioningConnection.ts +5 -1
  502. package/src/peer/ControllerCommissioner.ts +57 -19
  503. package/src/peer/ControllerCommissioningFlow.ts +132 -56
  504. package/src/peer/Peer.ts +31 -16
  505. package/src/peer/PeerAddressStore.ts +119 -0
  506. package/src/peer/PeerConnection.ts +0 -1
  507. package/src/peer/PeerDescriptor.ts +3 -4
  508. package/src/peer/PeerExchangeProvider.ts +4 -6
  509. package/src/peer/PeerLossContext.ts +11 -2
  510. package/src/peer/PhysicalDeviceProperties.ts +25 -12
  511. package/src/peer/RebootResubscribeArmer.ts +37 -16
  512. package/src/peer/index.ts +1 -0
  513. package/src/protocol/DeviceAdvertiser.ts +5 -1
  514. package/src/protocol/ExchangeManager.ts +162 -88
  515. package/src/protocol/ExchangeProvider.ts +3 -2
  516. package/src/protocol/MessageExchange.ts +22 -6
  517. package/src/protocol/MessageReceptionState.ts +2 -2
  518. package/src/protocol/errors.ts +7 -1
  519. package/src/securechannel/SecureChannelMessenger.ts +26 -13
  520. package/src/session/GroupSession.ts +147 -111
  521. package/src/session/NodeSession.ts +89 -4
  522. package/src/session/SecureSession.ts +27 -1
  523. package/src/session/Session.ts +2 -2
  524. package/src/session/SessionManager.ts +429 -189
  525. package/src/session/UnsecuredSession.ts +9 -3
  526. package/src/session/case/CaseClient.ts +15 -10
  527. package/src/session/case/CaseServer.ts +41 -17
@@ -19,11 +19,16 @@ import { MATTER_EPOCH_OFFSET_S, VendorId } from "@matter/types";
19
19
  import { TlvAttestation } from "../common/OperationalCredentialsTypes.js";
20
20
  import { DclCertificateService } from "../dcl/DclCertificateService.js";
21
21
  import { CommissioningError } from "../peer/CommissioningError.js";
22
+ import { CdSigners } from "./CdSigners.js";
22
23
  import { Dac, Paa, Pai } from "./kinds/AttestationCertificates.js";
24
+ import { CertificateProfileError } from "./kinds/Certificate.js";
23
25
  import { mayIssue } from "./kinds/CertificateSignature.js";
24
- import { CertificationDeclaration } from "./kinds/CertificationDeclaration.js";
26
+ import { CertificationDeclaration, CertificationDeclarationFormatError } from "./kinds/CertificationDeclaration.js";
25
27
  import { CertificationType } from "./kinds/definitions/certification-declaration.js";
26
28
 
29
+ /** @see {@link MatterSpecification.v161.Core} § 6.3.1 */
30
+ const CD_FORMAT_VERSION = 1;
31
+
27
32
  /** Reasons a device attestation validation can fail or produce warnings. */
28
33
  export enum DeviceAttestationCheck {
29
34
  PaaNotTrusted = "PaaNotTrusted",
@@ -33,6 +38,13 @@ export enum DeviceAttestationCheck {
33
38
  AttestationSignatureInvalid = "AttestationSignatureInvalid",
34
39
  AttestationNonceMismatch = "AttestationNonceMismatch",
35
40
  CertificationDeclarationSignatureInvalid = "CertificationDeclarationSignatureInvalid",
41
+ /**
42
+ * A Certification Declaration field does not match the device. Collected as a recoverable error for the
43
+ * BasicInformation VendorID and ProductID, which the device reports about itself, also when it did not report them;
44
+ * thrown for a mismatch with the DAC or PAI.
45
+ *
46
+ * @see {@link MatterSpecification.v161.Core} § 6.2.3.1
47
+ */
36
48
  CertificationDeclarationFieldMismatch = "CertificationDeclarationFieldMismatch",
37
49
  CertificateRevoked = "CertificateRevoked",
38
50
  FirmwareInfoMismatch = "FirmwareInfoMismatch",
@@ -40,11 +52,47 @@ export enum DeviceAttestationCheck {
40
52
  CertificationTypeTest = "CertificationTypeTest",
41
53
  CertificateIdNotVerified = "CertificateIdNotVerified",
42
54
  CertificateUnparseable = "CertificateUnparseable",
55
+
56
+ /**
57
+ * The DAC parses but violates the DAC certificate profile.
58
+ *
59
+ * @see {@link MatterSpecification.v161.Core} § 6.2.2.3
60
+ */
61
+ DacFormatInvalid = "DacFormatInvalid",
62
+
63
+ /**
64
+ * The PAI parses but violates the PAI certificate profile.
65
+ *
66
+ * @see {@link MatterSpecification.v161.Core} § 6.2.2.4
67
+ */
68
+ PaiFormatInvalid = "PaiFormatInvalid",
69
+
43
70
  AttestationElementsUnparseable = "AttestationElementsUnparseable",
44
71
  CertificationDeclarationUnparseable = "CertificationDeclarationUnparseable",
72
+
73
+ /**
74
+ * The CD breaks an encoding rule of § 6.3.1, such as its CMS envelope or `format_version`, or has a reserved
75
+ * `certification_type`, which CHIP refuses.
76
+ */
77
+ CertificationDeclarationFormatInvalid = "CertificationDeclarationFormatInvalid",
78
+
79
+ /**
80
+ * The CD's signer is not known to be a CD signer: neither a built-in CSA key, the Matter test CD signer, nor a
81
+ * CSA-issued certificate from the DCL, the store or a seed. See {@link DclCertificateService.lookupCdSigner}.
82
+ */
83
+ CdSignerUnknown = "CdSignerUnknown",
84
+
85
+ /** A CD of certification_type official is signed by the Matter test CD signer. */
86
+ OfficialCdSignedByTestSigner = "OfficialCdSignedByTestSigner",
87
+
88
+ /** @deprecated The CD signature is always verified; a CD from an unknown signer fails with {@link CdSignerUnknown}. */
45
89
  CdSignerVerificationSkipped = "CdSignerVerificationSkipped",
46
90
  PaaTrustStoreTimeMismatch = "PaaTrustStoreTimeMismatch",
47
91
  DclServiceUnavailable = "DclServiceUnavailable",
92
+ /**
93
+ * A test PAA or the Matter test CD signer while the trust policy does not accept test certificates. Collected as a
94
+ * recoverable error so the policy decides.
95
+ */
48
96
  TrustedAsTestCertificate = "TrustedAsTestCertificate",
49
97
 
50
98
  /** An unexpected error during validation (e.g. an unrecoverably corrupt trust-store certificate). */
@@ -65,6 +113,12 @@ export interface AttestationFinding {
65
113
 
66
114
  /** Error thrown when device attestation validation encounters a hard failure. */
67
115
  export class DeviceAttestationError extends CommissioningError {
116
+ /**
117
+ * Findings {@link DeviceAttestationValidator.validate} collected before this failure stopped validation, so a
118
+ * policy can see them next to the failure.
119
+ */
120
+ readonly precedingFindings = new Array<AttestationFinding>();
121
+
68
122
  constructor(
69
123
  readonly failure: DeviceAttestationCheck,
70
124
  message: string,
@@ -82,16 +136,48 @@ function parsePeerValue<T>(check: DeviceAttestationCheck, description: string, p
82
136
  try {
83
137
  return parse();
84
138
  } catch (cause) {
85
- // A defect of ours is not the peer's malformed data and must not be reported as such
86
- if (cause instanceof InternalError || cause instanceof ImplementationError) {
139
+ // A defect of ours is not the peer's malformed data, and a classified failure keeps its check
140
+ if (
141
+ cause instanceof InternalError ||
142
+ cause instanceof ImplementationError ||
143
+ cause instanceof DeviceAttestationError
144
+ ) {
87
145
  throw cause;
88
146
  }
89
147
  throw new DeviceAttestationError(check, `${description}: ${asError(cause).message}`, { cause });
90
148
  }
91
149
  }
92
150
 
93
- /** Parse an attestation certificate the peer supplied, rejecting a missing certificate before the decoder sees it. */
94
- function parsePeerCertificate<T>(kind: string, der: Bytes, parse: (der: Bytes) => T): T {
151
+ /** Parse the CD the peer supplied, reporting a broken encoding rule apart from a CD that cannot be decoded. */
152
+ function parsePeerCertificationDeclaration(declaration: Bytes) {
153
+ return parsePeerValue(
154
+ DeviceAttestationCheck.CertificationDeclarationUnparseable,
155
+ "Device returned a Certification Declaration that cannot be parsed",
156
+ () => {
157
+ try {
158
+ return CertificationDeclaration.parse(declaration);
159
+ } catch (cause) {
160
+ if (cause instanceof CertificationDeclarationFormatError) {
161
+ throw new DeviceAttestationError(
162
+ DeviceAttestationCheck.CertificationDeclarationFormatInvalid,
163
+ `Certification Declaration breaks an encoding rule: ${cause.message}`,
164
+ { cause },
165
+ );
166
+ }
167
+ throw cause;
168
+ }
169
+ },
170
+ );
171
+ }
172
+
173
+ /**
174
+ * Parse an attestation certificate the peer supplied, rejecting a missing certificate before the decoder sees it.
175
+ *
176
+ * A certificate that parses but violates its profile is reported as {@link DeviceAttestationCheck.DacFormatInvalid} or
177
+ * {@link DeviceAttestationCheck.PaiFormatInvalid}, anything else that fails as
178
+ * {@link DeviceAttestationCheck.CertificateUnparseable}.
179
+ */
180
+ function parsePeerCertificate<T>(kind: "DAC" | "PAI", der: Bytes, parse: (der: Bytes) => T): T {
95
181
  if (Bytes.of(der).byteLength === 0) {
96
182
  throw new DeviceAttestationError(
97
183
  DeviceAttestationCheck.CertificateUnparseable,
@@ -101,7 +187,22 @@ function parsePeerCertificate<T>(kind: string, der: Bytes, parse: (der: Bytes) =
101
187
  return parsePeerValue(
102
188
  DeviceAttestationCheck.CertificateUnparseable,
103
189
  `Device returned a ${kind} certificate that cannot be parsed`,
104
- () => parse(der),
190
+ () => {
191
+ try {
192
+ return parse(der);
193
+ } catch (cause) {
194
+ if (cause instanceof CertificateProfileError) {
195
+ throw new DeviceAttestationError(
196
+ kind === "DAC"
197
+ ? DeviceAttestationCheck.DacFormatInvalid
198
+ : DeviceAttestationCheck.PaiFormatInvalid,
199
+ `Device returned a ${kind} certificate that violates the ${kind} profile: ${cause.message}`,
200
+ { cause },
201
+ );
202
+ }
203
+ throw cause;
204
+ }
205
+ },
105
206
  );
106
207
  }
107
208
 
@@ -109,6 +210,10 @@ function idHex(id?: number) {
109
210
  return id === undefined ? "undefined" : `0x${Diagnostic.hex(id, 4).toUpperCase()}`;
110
211
  }
111
212
 
213
+ function basicInformationValue(id?: number) {
214
+ return id === undefined ? "(not reported by the device)" : idHex(id);
215
+ }
216
+
112
217
  export namespace DeviceAttestationValidator {
113
218
  export interface Context {
114
219
  crypto: Crypto;
@@ -117,8 +222,8 @@ export namespace DeviceAttestationValidator {
117
222
  /**
118
223
  * DclCertificateService for PAA trust store, chain validation, revocation checks, and
119
224
  * CD signer lookup. When absent, DCL-dependent checks are skipped (PAA lookup, chain
120
- * verification, revocation, CD signature) but local checks still run (nonce, signature,
121
- * VendorID, CD fields).
225
+ * verification, revocation) but local checks still run (nonce, signature, VendorID, CD fields),
226
+ * and the CD signature is verified with the built-in CSA keys and the Matter test CD signer only.
122
227
  */
123
228
  dclCertificateService?: DclCertificateService;
124
229
  }
@@ -129,8 +234,11 @@ export namespace DeviceAttestationValidator {
129
234
  attestationElements: Bytes;
130
235
  attestationSignature: Bytes;
131
236
  attestationNonce: Bytes;
132
- vendorId: VendorId;
133
- productId: number;
237
+ /** BasicInformation VendorID; undefined when the device did not report it. */
238
+ vendorId?: VendorId;
239
+
240
+ /** BasicInformation ProductID; undefined when the device did not report it. */
241
+ productId?: number;
134
242
  }
135
243
 
136
244
  /** Result of a successful validation, including any non-fatal findings. */
@@ -163,17 +271,35 @@ export namespace DeviceAttestationValidator {
163
271
  * is provided.
164
272
  *
165
273
  * Most error-level failures throw immediately via {@link DeviceAttestationError}. A small
166
- * set of recoverable error cases (currently {@link DeviceAttestationCheck.TrustedAsTestCertificate})
167
- * are collected in `findings` so the caller can decide via `onFailure` whether to proceed.
168
- * Warning and info findings are always collected.
274
+ * set of recoverable error cases are collected in `findings` so the caller can decide via
275
+ * `onFailure` whether to proceed: {@link DeviceAttestationCheck.TrustedAsTestCertificate}, and
276
+ * {@link DeviceAttestationCheck.CertificationDeclarationFieldMismatch} when the CD does not match the
277
+ * BasicInformation VendorID or ProductID the device reported, or the device did not report them.
278
+ * Warning and info findings are always collected. When a hard failure stops validation, the findings collected
279
+ * until then are in {@link DeviceAttestationError.precedingFindings}.
169
280
  */
170
281
  export async function validate(context: Context, data: DeviceAttestationData): Promise<ValidationResult> {
171
- const { crypto, dclCertificateService } = context;
172
282
  const findings = new Array<AttestationFinding>();
283
+ try {
284
+ return { dacPublicKey: await validateCollecting(context, data, findings), findings };
285
+ } catch (error) {
286
+ if (error instanceof DeviceAttestationError) {
287
+ error.precedingFindings.push(...findings);
288
+ }
289
+ throw error;
290
+ }
291
+ }
173
292
 
174
- // Step 1: Parse DAC and PAI from DER
175
- const dac = parsePeerCertificate("DAC", data.dac, der => Dac.fromAsn1(der));
293
+ async function validateCollecting(
294
+ context: Context,
295
+ data: DeviceAttestationData,
296
+ findings: AttestationFinding[],
297
+ ): Promise<ReturnType<typeof PublicKey>> {
298
+ const { crypto, dclCertificateService } = context;
299
+
300
+ // Step 1: Parse PAI and DAC from DER; the PAI goes first, as the CHIP SDK checks the PAI format first
176
301
  const pai = parsePeerCertificate("PAI", data.pai, der => Pai.fromAsn1(der));
302
+ const dac = parsePeerCertificate("DAC", data.dac, der => Dac.fromAsn1(der));
177
303
 
178
304
  // === Local checks (always run, no DCL needed) ===
179
305
 
@@ -366,44 +492,64 @@ export namespace DeviceAttestationValidator {
366
492
  // === Remaining local checks (CD validation) ===
367
493
 
368
494
  // Step 8: Certification Declaration signature verification
369
- const cd = parsePeerValue(
370
- DeviceAttestationCheck.CertificationDeclarationUnparseable,
371
- "Device returned a Certification Declaration that cannot be parsed",
372
- () => CertificationDeclaration.parse(attestationInfo.declaration),
373
- );
495
+ const cd = parsePeerCertificationDeclaration(attestationInfo.declaration);
374
496
  const cdSignerSkidHex = Bytes.toHex(cd.signerSubjectKeyId);
375
497
 
376
- if (dclCertificateService !== undefined) {
377
- const cdSigner = await dclCertificateService.getOrFetchCdSigner(cd.signerSubjectKeyId);
378
- if (cdSigner !== undefined) {
379
- try {
380
- await crypto.verifyEcdsa(PublicKey(cdSigner.publicKey), cd.signedData, cd.signature);
381
- } catch {
382
- throw new DeviceAttestationError(
383
- DeviceAttestationCheck.CertificationDeclarationSignatureInvalid,
384
- "Certification Declaration signature verification failed",
385
- );
386
- }
387
- } else {
388
- findings.push({
389
- level: "warning",
390
- type: DeviceAttestationCheck.CdSignerVerificationSkipped,
391
- message: `CD signer SKID ${cdSignerSkidHex} not found in trust store or DCL; skipping CD signature verification`,
392
- });
393
- }
394
- } else {
498
+ const cdSigner =
499
+ dclCertificateService === undefined
500
+ ? CdSigners.known(cd.signerSubjectKeyId)
501
+ : await dclCertificateService.lookupCdSigner(cd.signerSubjectKeyId);
502
+ if (cdSigner === undefined) {
503
+ throw new DeviceAttestationError(
504
+ DeviceAttestationCheck.CdSignerUnknown,
505
+ `CD signer SKID ${cdSignerSkidHex} is not known to be a CD signer`,
506
+ );
507
+ }
508
+ try {
509
+ await crypto.verifyEcdsa(PublicKey(cdSigner.publicKey), cd.signedData, cd.signature);
510
+ } catch {
511
+ throw new DeviceAttestationError(
512
+ DeviceAttestationCheck.CertificationDeclarationSignatureInvalid,
513
+ "Certification Declaration signature verification failed",
514
+ );
515
+ }
516
+ if (cdSigner.isTestSigner && dclCertificateService?.acceptsTestCertificates === false) {
395
517
  findings.push({
396
- level: "warning",
397
- type: DeviceAttestationCheck.CdSignerVerificationSkipped,
398
- message: "No DclCertificateService provided; skipping CD signature verification",
518
+ level: "error",
519
+ type: DeviceAttestationCheck.TrustedAsTestCertificate,
520
+ message:
521
+ `CD is signed by the Matter test CD signer ${cdSignerSkidHex}; ` +
522
+ "the device presented a valid test attestation but production trust policy is in effect",
399
523
  });
400
524
  }
401
525
 
402
526
  // Step 9: Certification Declaration field validation (Matter spec Section 6.2.3.1)
403
527
  const cdContent = cd.content;
404
528
 
405
- // certification_type check (Matter 1.5.1): log and surface provisional/test CDs
529
+ if (cdContent.formatVersion !== CD_FORMAT_VERSION) {
530
+ throw new DeviceAttestationError(
531
+ DeviceAttestationCheck.CertificationDeclarationFormatInvalid,
532
+ `CD format_version ${cdContent.formatVersion} is not ${CD_FORMAT_VERSION}`,
533
+ );
534
+ }
535
+
536
+ // Reserved certification_type values are refused like CHIP does; the specification only marks them reserved
406
537
  const certType = cdContent.certificationType;
538
+ if (certType > CertificationType.Official) {
539
+ throw new DeviceAttestationError(
540
+ DeviceAttestationCheck.CertificationDeclarationFormatInvalid,
541
+ `CD certification_type ${certType} is a reserved value`,
542
+ );
543
+ }
544
+
545
+ // § 6.3.1 allows a test-signed CD with certification_type 0; CHIP also accepts provisional, so only official fails
546
+ if (certType === CertificationType.Official && cdSigner.isTestSigner) {
547
+ throw new DeviceAttestationError(
548
+ DeviceAttestationCheck.OfficialCdSignedByTestSigner,
549
+ "CD with certification_type=2 (official) is signed by the Matter test CD signer",
550
+ );
551
+ }
552
+
407
553
  if (certType === CertificationType.Provisional) {
408
554
  findings.push({
409
555
  level: "warning",
@@ -423,18 +569,20 @@ export namespace DeviceAttestationValidator {
423
569
 
424
570
  // vendor_id SHALL match BasicInformation VendorID
425
571
  if (cdContent.vendorId !== data.vendorId) {
426
- throw new DeviceAttestationError(
427
- DeviceAttestationCheck.CertificationDeclarationFieldMismatch,
428
- `CD vendor_id ${idHex(cdContent.vendorId)} does not match BasicInformation VendorID ${idHex(data.vendorId)}`,
429
- );
572
+ findings.push({
573
+ level: "error",
574
+ type: DeviceAttestationCheck.CertificationDeclarationFieldMismatch,
575
+ message: `CD vendor_id ${idHex(cdContent.vendorId)} does not match BasicInformation VendorID ${basicInformationValue(data.vendorId)}`,
576
+ });
430
577
  }
431
578
 
432
579
  // product_id_array SHALL contain BasicInformation ProductID
433
- if (!cdContent.produceIdArray.includes(data.productId)) {
434
- throw new DeviceAttestationError(
435
- DeviceAttestationCheck.CertificationDeclarationFieldMismatch,
436
- `CD product_id_array [${cdContent.produceIdArray.map(idHex).join(", ")}] does not contain BasicInformation ProductID ${idHex(data.productId)}`,
437
- );
580
+ if (cdContent.produceIdArray.every(id => id !== data.productId)) {
581
+ findings.push({
582
+ level: "error",
583
+ type: DeviceAttestationCheck.CertificationDeclarationFieldMismatch,
584
+ message: `CD product_id_array [${cdContent.produceIdArray.map(idHex).join(", ")}] does not contain BasicInformation ProductID ${basicInformationValue(data.productId)}`,
585
+ });
438
586
  }
439
587
 
440
588
  // CD SHALL contain both or neither of dac_origin_vendor_id and dac_origin_product_id
@@ -533,6 +681,6 @@ export namespace DeviceAttestationValidator {
533
681
  // compare attestationInfo.firmwareInfo bytes against expected value and emit a
534
682
  // FirmwareInfoMismatch warning finding on mismatch. Validation is MAY per spec.
535
683
 
536
- return { dacPublicKey, findings };
684
+ return dacPublicKey;
537
685
  }
538
686
  }
@@ -112,8 +112,12 @@ export class DeviceCertification {
112
112
  }
113
113
 
114
114
  // Parse DAC and PAI
115
- const dac = Dac.fromAsn1(certificate);
116
- const pai = Pai.fromAsn1(intermediateCertificate);
115
+ // The commissioner judges the profile; a device only needs VendorID and ProductID to match its product
116
+ const dac = Dac.fromAsn1(certificate, { acceptProfileViolation: true, acceptMalformedVidPid: true });
117
+ const pai = Pai.fromAsn1(intermediateCertificate, {
118
+ acceptProfileViolation: true,
119
+ acceptMalformedVidPid: true,
120
+ });
117
121
 
118
122
  // Validate vendorId from DAC matches product
119
123
  const dacVendorId = dac.cert.subject.vendorId;
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  export * from "./AttestationCertificateManager.js";
8
+ export * from "./CdSigners.js";
8
9
  export * from "./CertificateAuthority.js";
9
10
  export * from "./ChipPAAuthorities.js";
10
11
  export * from "./DeviceAttestationValidator.js";
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
- import { Bytes, CertificateError } from "@matter/general";
7
+ import { Bytes, CertificateError, InternalError } from "@matter/general";
8
8
  import { Specification } from "@matter/model";
9
- import { Certificate } from "./Certificate.js";
9
+ import { Certificate, CertificateProfileError } from "./Certificate.js";
10
10
  import { Unsigned } from "./common.js";
11
11
  import { AttestationCertificate } from "./definitions/attestation.js";
12
12
  import { MatterCertificate } from "./definitions/base.js";
@@ -26,9 +26,33 @@ export abstract class AttestationBaseCertificate<CT extends MatterCertificate> e
26
26
  */
27
27
  export class MlDsaAttestationDisabledError extends CertificateError {}
28
28
 
29
+ export interface AttestationParseOptions {
30
+ /**
31
+ * Accept a certificate that violates the X.509 profile of its kind, and read an absent basic constraints extension
32
+ * as not a CA. Only for a caller that does not judge the profile: a commissioner that already decided to proceed
33
+ * despite a failed device attestation, a device reading its own certificates, or a parser of a certificate in
34
+ * another role, such as a CRL signer.
35
+ *
36
+ * The PAA profile is not checked either way; for a PAA this option lets the basic constraints extension be
37
+ * absent. A malformed or repeated VendorID or ProductID is not covered; see {@link acceptMalformedVidPid}.
38
+ */
39
+ acceptProfileViolation?: boolean;
40
+
41
+ /**
42
+ * Read a VendorID or ProductID that is malformed or repeated as absent instead of throwing
43
+ * {@link CertificateProfileError}. Only for a caller that needs no more than the VendorID and ProductID the
44
+ * certificate states, such as a device reading its own certificates. A caller that matches the VendorID against
45
+ * another source must not set it: an unreadable VendorID would read as "none stated".
46
+ */
47
+ acceptMalformedVidPid?: boolean;
48
+ }
49
+
29
50
  /** @throws MlDsaAttestationDisabledError for an ML-DSA certificate while PQC Phase 1 is not enabled */
30
- function parseAttestationCertificate(asn1: Bytes, requiredExtensions: string[]) {
31
- const cert = Certificate.parseAsn1Certificate(asn1, requiredExtensions, { postQuantum: true });
51
+ function parseAttestationCertificate(asn1: Bytes, requiredExtensions: string[], options: AttestationParseOptions) {
52
+ const cert = Certificate.parseAsn1Certificate(asn1, requiredExtensions, {
53
+ postQuantum: true,
54
+ acceptMalformedVidPid: options.acceptMalformedVidPid,
55
+ });
32
56
  const mlDsa = cert.mlDsaSignature ?? cert.mlDsaPublicKey?.parameterSet;
33
57
  if (mlDsa !== undefined && !Specification.isForwardFeatureEnabled("pqc-phase-1")) {
34
58
  throw new MlDsaAttestationDisabledError(
@@ -38,30 +62,174 @@ function parseAttestationCertificate(asn1: Bytes, requiredExtensions: string[])
38
62
  return cert;
39
63
  }
40
64
 
65
+ /**
66
+ * Leave out basic constraints, whose absence is a profile violation. A certificate without key usage or a key
67
+ * identifier is unusable, so those stay required even for a caller that accepts a profile violation.
68
+ */
69
+ function withoutBasicConstraints(required: string[]) {
70
+ return required.filter(name => name !== "basicConstraints");
71
+ }
72
+
73
+ const DAC_PAI_REQUIRED_EXTENSIONS = withoutBasicConstraints(Certificate.REQUIRED_EXTENSIONS);
74
+
41
75
  /** PAA (Product Attestation Authority) Certificate. */
42
76
  export class Paa extends AttestationBaseCertificate<AttestationCertificate.Paa> {
43
- /** Construct the class from an ASN.1/DER encoded certificate */
44
- static fromAsn1(asn1: Bytes): Paa {
45
- const cert = parseAttestationCertificate(asn1, Certificate.REQUIRED_PAA_EXTENSIONS);
77
+ /**
78
+ * Construct the class from an ASN.1/DER encoded certificate.
79
+ *
80
+ * @throws CertificateError if the certificate cannot be parsed
81
+ * @throws MlDsaAttestationDisabledError for an ML-DSA certificate while PQC Phase 1 is not enabled
82
+ */
83
+ static fromAsn1(asn1: Bytes, options: AttestationParseOptions = {}): Paa {
84
+ const required = options.acceptProfileViolation
85
+ ? withoutBasicConstraints(Certificate.REQUIRED_PAA_EXTENSIONS)
86
+ : Certificate.REQUIRED_PAA_EXTENSIONS;
87
+ const cert = parseAttestationCertificate(asn1, required, options);
46
88
  return new Paa(cert as AttestationCertificate.Paa);
47
89
  }
48
90
  }
49
91
 
92
+ /** The extensions a DAC or PAI must carry at most once, as the CHIP SDK checks. */
93
+ const DAC_PAI_SINGLE_EXTENSIONS: MatterCertificate.ExtensionName[] = [
94
+ "basicConstraints",
95
+ "keyUsage",
96
+ "subjectKeyIdentifier",
97
+ "authorityKeyIdentifier",
98
+ ];
99
+
100
+ function encodingOf(cert: MatterCertificate) {
101
+ if (cert.encoding === undefined) {
102
+ throw new InternalError("A certificate parsed from DER lacks its encoding details");
103
+ }
104
+ return cert.encoding;
105
+ }
106
+
107
+ /**
108
+ * DAC and PAI share these rules:
109
+ *
110
+ * - "The `version` field SHALL be set to `2` to indicate v3 certificate."
111
+ * - "The certificate SHALL carry the following Extensions", among them basic constraints
112
+ * - "Basic Constraint extension SHALL be marked `critical`"
113
+ * - "Key Usage extension SHALL be marked `critical`"
114
+ * - RFC 5280 § 4.2: "A certificate MUST NOT include more than one instance of a particular extension."
115
+ *
116
+ * @see {@link MatterSpecification.v161.Core} § 6.2.2.3
117
+ * @see {@link MatterSpecification.v161.Core} § 6.2.2.4
118
+ * @throws CertificateProfileError naming the violated rule
119
+ */
120
+ function assertCommonProfile(kind: "DAC" | "PAI", cert: MatterCertificate) {
121
+ const { version, extensions } = encodingOf(cert);
122
+ if (version !== 2) {
123
+ throw new CertificateProfileError(`${kind} version field must be 2 (v3), not ${version}`);
124
+ }
125
+ for (const name of DAC_PAI_SINGLE_EXTENSIONS) {
126
+ if (extensions.filter(extension => extension.name === name).length > 1) {
127
+ throw new CertificateProfileError(`${kind} carries more than one ${name} extension`);
128
+ }
129
+ }
130
+ const basicConstraints = extensions.find(({ name }) => name === "basicConstraints");
131
+ if (basicConstraints === undefined) {
132
+ throw new CertificateProfileError(`${kind} must carry the basic constraints extension`);
133
+ }
134
+ if (!basicConstraints.critical) {
135
+ throw new CertificateProfileError(`${kind} basic constraints extension must be marked critical`);
136
+ }
137
+ if (!extensions.find(({ name }) => name === "keyUsage")?.critical) {
138
+ throw new CertificateProfileError(`${kind} key usage extension must be marked critical`);
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Enforce the PAI profile:
144
+ *
145
+ * - "Basic Constraint extension SHALL be marked `critical` and have the `cA` field set to TRUE and `pathLen` field set
146
+ * to 0."
147
+ * - "Both the `keyCertSign` and `cRLSign` bits SHALL be set in the `KeyUsage` bitstring", "The `digitalSignature` bit
148
+ * MAY be set", "Other bits SHALL NOT be set"
149
+ *
150
+ * @see {@link MatterSpecification.v161.Core} § 6.2.2.4
151
+ * @throws CertificateProfileError naming the violated rule
152
+ */
153
+ function assertPaiProfile(cert: MatterCertificate) {
154
+ assertCommonProfile("PAI", cert);
155
+ const { basicConstraints } = cert.extensions;
156
+ if (!basicConstraints.isCa) {
157
+ throw new CertificateProfileError("PAI basic constraints must have cA set to TRUE");
158
+ }
159
+ if (basicConstraints.pathLen !== 0) {
160
+ throw new CertificateProfileError(`PAI basic constraints must have pathLen 0, not ${basicConstraints.pathLen}`);
161
+ }
162
+ const { keyUsage } = encodingOf(cert);
163
+ if (keyUsage !== 0x0060 && keyUsage !== 0x0061) {
164
+ throw new CertificateProfileError(
165
+ "PAI key usage must have keyCertSign and cRLSign set, may have digitalSignature set, and no other bit",
166
+ );
167
+ }
168
+ }
169
+
170
+ /**
171
+ * Enforce the DAC profile:
172
+ *
173
+ * - "Basic Constraint extension SHALL be marked `critical` and have the `cA` field set to FALSE."
174
+ * - "The `KeyUsage` bitstring SHALL only have the `digitalSignature` bit set."
175
+ *
176
+ * RFC 5280 § 4.2.1.9 does not allow `pathLenConstraint` without `cA`; like the CHIP SDK, a DAC with a pathLen is
177
+ * refused.
178
+ *
179
+ * @see {@link MatterSpecification.v161.Core} § 6.2.2.3
180
+ * @throws CertificateProfileError naming the violated rule
181
+ */
182
+ function assertDacProfile(cert: MatterCertificate) {
183
+ assertCommonProfile("DAC", cert);
184
+ const { basicConstraints } = cert.extensions;
185
+ if (basicConstraints.isCa) {
186
+ throw new CertificateProfileError("DAC basic constraints must have cA set to FALSE");
187
+ }
188
+ if (basicConstraints.pathLen !== undefined) {
189
+ throw new CertificateProfileError(
190
+ `DAC basic constraints must not have a pathLen, found ${basicConstraints.pathLen}`,
191
+ );
192
+ }
193
+ if (encodingOf(cert).keyUsage !== 0x0001) {
194
+ throw new CertificateProfileError("DAC key usage must have only digitalSignature set");
195
+ }
196
+ }
197
+
50
198
  /** PAI (Product Attestation Intermediate) Certificate. */
51
199
  export class Pai extends AttestationBaseCertificate<AttestationCertificate.Pai> {
52
- /** Construct the class from an ASN.1/DER encoded certificate */
53
- static fromAsn1(asn1: Bytes): Pai {
54
- const cert = parseAttestationCertificate(asn1, Certificate.REQUIRED_EXTENSIONS);
55
- return new Pai(cert as AttestationCertificate.Pai);
200
+ /**
201
+ * Construct the class from an ASN.1/DER encoded certificate.
202
+ *
203
+ * @throws CertificateProfileError if the certificate violates the PAI profile
204
+ * @throws CertificateError if the certificate cannot be parsed
205
+ * @throws MlDsaAttestationDisabledError for an ML-DSA certificate while PQC Phase 1 is not enabled
206
+ */
207
+ static fromAsn1(asn1: Bytes, options: AttestationParseOptions = {}): Pai {
208
+ const cert = parseAttestationCertificate(asn1, DAC_PAI_REQUIRED_EXTENSIONS, options);
209
+ const pai = new Pai(cert as AttestationCertificate.Pai);
210
+ if (!options.acceptProfileViolation) {
211
+ assertPaiProfile(cert);
212
+ }
213
+ return pai;
56
214
  }
57
215
  }
58
216
 
59
217
  /** DAC (Device Attestation Certificate) Certificate. */
60
218
  export class Dac extends AttestationBaseCertificate<AttestationCertificate.Dac> {
61
- /** Construct the class from an ASN.1/DER encoded certificate */
62
- static fromAsn1(asn1: Bytes): Dac {
63
- const cert = parseAttestationCertificate(asn1, Certificate.REQUIRED_EXTENSIONS);
64
- return new Dac(cert as AttestationCertificate.Dac);
219
+ /**
220
+ * Construct the class from an ASN.1/DER encoded certificate.
221
+ *
222
+ * @throws CertificateProfileError if the certificate violates the DAC profile
223
+ * @throws CertificateError if the certificate cannot be parsed or has no EC P-256 key
224
+ * @throws MlDsaAttestationDisabledError for an ML-DSA certificate while PQC Phase 1 is not enabled
225
+ */
226
+ static fromAsn1(asn1: Bytes, options: AttestationParseOptions = {}): Dac {
227
+ const cert = parseAttestationCertificate(asn1, DAC_PAI_REQUIRED_EXTENSIONS, options);
228
+ const dac = new Dac(cert as AttestationCertificate.Dac);
229
+ if (!options.acceptProfileViolation) {
230
+ assertDacProfile(cert);
231
+ }
232
+ return dac;
65
233
  }
66
234
 
67
235
  /**