Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7299

Unit tests require PKCS#11 "slot 1" to exist and do not work with SoftHSM

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.4.0
    • Component/s: None
    • Labels:
    • Issue discovered during:
      Testing
    • Sprint:
      EJBCA Team Bob -2020 w10, EJBCA Team Bob - 2020 w13

      Description

      The unit tests Pkcs11SlotLabelTest and Pkcs11WrapperTest assume that the following slots/tokens exist:

      • Slot number 1
      • Slot index 1
      • Slot with label "ejbca"

      The purpose of the tests is to check that you can use different types of slot/token references, so they should still do that.

      To do as part of this issue:

      • Add properties in systemtests.properties for these things (currently you can only reference the HSM slot in one of these ways in this file). If absent, the affected tests should be skipped with an explanatory message instead of failing.
      • Add the properties in jenkins-files and in on the trunk job on old Jenkins.

      Currently, this limitation means that the tests cannot be run on SoftHSM2 since it uses random slot numbers, and no "slot 1" exists.

        Attachments

          Activity

            People

            Assignee:
            samuel Samuel Lidén Borell
            Reporter:
            samuel Samuel Lidén Borell
            Verified by:
            Ulf Undmark
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5 hours
                5h
                Remaining:
                Time Spent - 4 hours Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - 4 hours Remaining Estimate - 1 hour
                4h