Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose CSR Nonce to Android/iOS layer #7987

Merged
merged 2 commits into from
Jun 29, 2021

Conversation

austinh0
Copy link
Contributor

Problem

Change overview

  • Add csrNonce parameter in CHIPDeviceController.mm#pairDevice() and ChipDeviceController.java#pairDevice().

Testing

  • On Android and iOS, called PairDevice with an empty 32-byte CSR nonce and verified that commissioning completes successfully.

@todo
Copy link

todo bot commented Jun 29, 2021

(#7985): Annotate csrNonce as Nullable.

* <p>TODO(#7985): Annotate csrNonce as Nullable.
*
* @param csrNonce the 32-byte CSR nonce to use, or null if we want to use an internally randomly
* generated CSR nonce.
*/
public void pairDevice(
BluetoothGatt bleServer, long deviceId, long setupPincode, byte[] csrNonce) {
if (connectionId == 0) {
bleGatt = bleServer;


This comment was generated by todo based on a TODO comment in b73703d in #7987. cc @austinh0.

@woody-apple woody-apple merged commit aadc214 into project-chip:master Jun 29, 2021
if (csrNonce != nullptr)
{
JniByteArray jniCsrNonce(env, csrNonce);
params = params.SetCSRNonce(jniCsrNonce.byteSpan());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this assignment need to be here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't, I missed this. Will clean this up next time I touch this file...

@austinh0 austinh0 deleted the csrnonce branch July 7, 2021 21:37
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Expose csrNonce param to pairDevice() in Android

* Expose csrNonce param to pairDevice() in Darwin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants