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

Do cleanup in a proper order in sunmscapi code

XMLWordPrintable

    • b72
    • windows

        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.

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

                Created:
                Updated:
                Resolved: