From 9357cffc09a85465dc7bc0de95608cf5a6f50245 Mon Sep 17 00:00:00 2001 From: Michael Sandstedt Date: Fri, 7 Jan 2022 08:46:29 -0600 Subject: [PATCH] Revise for compatibility with #13330 --- src/app/OperationalDeviceProxy.cpp | 2 +- src/commissioner/States.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/OperationalDeviceProxy.cpp b/src/app/OperationalDeviceProxy.cpp index bc8ab9e1ab6a3f..6fce1a64781938 100644 --- a/src/app/OperationalDeviceProxy.cpp +++ b/src/app/OperationalDeviceProxy.cpp @@ -96,7 +96,7 @@ CHIP_ERROR OperationalDeviceProxy::Emplace(const Transport::PeerAddress & addr, { mPeerId = peerId; mState = State::Initialized; - if (session && mInitParams.sessionManager->GetSecureSession(session.Get())) + if (session && session.Get()->AsSecureSession()) { mSecureSession.Grab(session.Get()); mState = State::SecureConnected; diff --git a/src/commissioner/States.h b/src/commissioner/States.h index 758cee96c15347..32af5e7e2e6bd4 100644 --- a/src/commissioner/States.h +++ b/src/commissioner/States.h @@ -390,10 +390,8 @@ struct CapturingAttestationChallenge : Base {} void Enter() { - const ByteSpan challenge = this->mCommissionee.mSystemState->SessionMgr() - ->GetSecureSession(this->mCommissionee.mPaseSession.Get()) - ->GetCryptoContext() - .GetAttestationChallenge(); + ByteSpan challenge = + this->mCommissionee.mPaseSession.Get()->AsSecureSession()->GetCryptoContext().GetAttestationChallenge(); if (mAttestationInformation.Challenge()->Set(challenge) == CHIP_NO_ERROR) { this->mCtx.Dispatch(TContext::Event::template Create(mAttestationInformation));