Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8236593

Handle NSS initialization failures in TestNssDbSqlite

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P5
    • None
    • 8, 11
    • security-libs

    Description

      In TestNssDbSqlite, the NSS library initialization may fail due to the test execution environment. This has been reported, for example, when backporting the [JDK-8165996] fix to 8u [1]. When an initialization failure happens, the call to SecmodTest::initSecmod method returns 'false' [2]. Many SecmodTest-derived tests handle these failures in a way that execution is skipped (i.e.: FipsModeTLS12 [3] [4]). The reason is to avoid false positives: test pre-requisites cannot be met and the failure is not because of what the test is exercising. It worths noting that these tests are run on multiple environments and NSS initialization failures are likely to occur on some of them.

      The goal of this fix request is to make TestNssDbSqlite handle initialization failures and skip execution.

      --
      [1] - https://mail.openjdk.java.net/pipermail/security-dev/2018-March/016897.html
      [2] - http://hg.openjdk.java.net/jdk/jdk/file/7c2236ea739e/test/jdk/sun/security/pkcs11/SecmodTest.java#l43
      [3] - http://hg.openjdk.java.net/jdk/jdk/file/7c2236ea739e/test/jdk/sun/security/pkcs11/tls/tls12/FipsModeTLS12.java#l452
      [4] - http://hg.openjdk.java.net/jdk/jdk/file/7c2236ea739e/test/jdk/sun/security/pkcs11/tls/tls12/FipsModeTLS12.java#l109

      Attachments

        Issue Links

          Activity

            People

              mbalao Martin Balao
              mbalao Martin Balao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: