@@ -50,7 +50,7 @@ CHIP_ERROR TestDACRevocationDelegateImpl::SetDeviceAttestationRevocationSetPath(
50
50
void TestDACRevocationDelegateImpl::ClearDeviceAttestationRevocationSetPath ()
51
51
{
52
52
// clear the string_view
53
- mDeviceAttestationRevocationSetPath = mDeviceAttestationRevocationSetPath . substr ( 0 , 0 );
53
+ mDeviceAttestationRevocationSetPath . clear ( );
54
54
}
55
55
56
56
// This method parses the below JSON Scheme
@@ -69,10 +69,10 @@ void TestDACRevocationDelegateImpl::ClearDeviceAttestationRevocationSetPath()
69
69
bool TestDACRevocationDelegateImpl::IsEntryInRevocationSet (const CharSpan & akidHexStr, const CharSpan & issuerNameBase64Str,
70
70
const CharSpan & serialNumberHexStr)
71
71
{
72
- std::ifstream file (mDeviceAttestationRevocationSetPath .data ());
72
+ std::ifstream file (mDeviceAttestationRevocationSetPath .c_str ());
73
73
if (!file.is_open ())
74
74
{
75
- ChipLogError (NotSpecified, " Failed to open file: %s" , mDeviceAttestationRevocationSetPath .data ());
75
+ ChipLogError (NotSpecified, " Failed to open file: %s" , mDeviceAttestationRevocationSetPath .c_str ());
76
76
return false ;
77
77
}
78
78
@@ -188,19 +188,19 @@ void TestDACRevocationDelegateImpl::CheckForRevokedDACChain(
188
188
onCompletion->mCall (onCompletion->mContext , info, attestationError);
189
189
}
190
190
191
- ChipLogDetail (NotSpecified, " Checking for revoked DAC in %s" , mDeviceAttestationRevocationSetPath .data ());
191
+ ChipLogDetail (NotSpecified, " Checking for revoked DAC in %s" , mDeviceAttestationRevocationSetPath .c_str ());
192
192
193
193
if (IsCertificateRevoked (info.dacDerBuffer ))
194
194
{
195
- ChipLogProgress (NotSpecified, " Found revoked DAC in %s" , mDeviceAttestationRevocationSetPath .data ());
195
+ ChipLogProgress (NotSpecified, " Found revoked DAC in %s" , mDeviceAttestationRevocationSetPath .c_str ());
196
196
attestationError = AttestationVerificationResult::kDacRevoked ;
197
197
}
198
198
199
- ChipLogDetail (NotSpecified, " Checking for revoked PAI in %s" , mDeviceAttestationRevocationSetPath .data ());
199
+ ChipLogDetail (NotSpecified, " Checking for revoked PAI in %s" , mDeviceAttestationRevocationSetPath .c_str ());
200
200
201
201
if (IsCertificateRevoked (info.paiDerBuffer ))
202
202
{
203
- ChipLogProgress (NotSpecified, " Found revoked PAI in %s" , mDeviceAttestationRevocationSetPath .data ());
203
+ ChipLogProgress (NotSpecified, " Found revoked PAI in %s" , mDeviceAttestationRevocationSetPath .c_str ());
204
204
205
205
if (attestationError == AttestationVerificationResult::kDacRevoked )
206
206
{
0 commit comments