Commit 0aeba4ff authored by Aleksey's avatar Aleksey

Subjectuuid wildcard fix

subjectuuid field of credential entry is changing in case of it has
'*' or zeroid value and credential type is 'SIGNED_ASYMMETRIC_KEY'.

For the trustca credusage this cause a verification error.

Change-Id: I889d9e982b5be5fea1d872eebb83734288cde3e6
Signed-off-by: Aleksey's avatarAleksey Volkov <a.volkov@samsung.com>
parent ac8502f0
......@@ -150,7 +150,8 @@ static bool CheckSubjectOfCertificate(OicSecCred_t* cred, OicUuid_t deviceID)
#if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
const OicUuid_t emptyUuid = { .id = { 0 } };
if ( SIGNED_ASYMMETRIC_KEY == cred->credType)
if ( SIGNED_ASYMMETRIC_KEY == cred->credType
&& 0 != strcmp(cred->credUsage, TRUST_CA) )
{
if((0 == memcmp(cred->subject.id, emptyUuid.id, sizeof(cred->subject.id))) ||
(0 == memcmp(cred->subject.id, &WILDCARD_SUBJECT_ID, sizeof(cred->subject.id))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment