Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

PKCS #11 MISRA / unit tests / Warnings Fix #2388

Merged
merged 5 commits into from
Aug 21, 2020

Conversation

lundinc2
Copy link
Contributor

Description

Fixes regressions caused by logging update regarding

  • MISRA violations.
  • Logging statements raising the GNU complexity of functions.
  • Warnings generated by improper integer types in log statements.
  • Broken unit test build
  • Updated unit tests to use test protect to prevent cascading failures.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fixes regressions caused by logging update regarding
* MISRA violations.
* Logging statements raising the GNU complexity of functions.
* Warnings generated by improper integer types in log statements.
"but expected <= %lu.", xLabelLength, pkcs11configMAX_LABEL_LENGTH ) );
xResult = CKR_DATA_LEN_RANGE;
}
else if( pdTRUE == xSemaphoreTake( xP11Context.xObjectList.xMutex, portMAX_DELAY ) )
Copy link
Member

@n9wxu n9wxu Aug 21, 2020

Choose a reason for hiding this comment

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

I am concerned about putting infinite delay's in a library without giving the user a choice in the matter.

It looks like this code will correctly handle the possibility of a timeout. Perhaps we should make the delay a long time in terms of PKCS11 behavior.

@lundinc2 lundinc2 merged commit 8a1d8f4 into aws:master Aug 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants