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

Do cleanup in a proper order in sunmscapi code

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b72
    • OS:
      windows

      Backports

        Description

        In security.cpp:

                if (hCryptProvAlt)
                    ::CryptReleaseContext(hCryptProvAlt, 0);
        ...
                if (hHash)
                    ::CryptDestroyHash(hHash);

        However, the doc states:

        https://msdn.microsoft.com/en-us/library/windows/desktop/aa380268(v=vs.85).aspx
         all of these objects should be destroyed with calls to CryptDestroyKey and CryptDestroyHash *before* CryptReleaseContext is called.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                igerasim Ivan Gerasimov
                Reporter:
                igerasim Ivan Gerasimov
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: