Bug 1757308 - JDK-8231598 : keytool does not export sun.security.mscapi
Summary: JDK-8231598 : keytool does not export sun.security.mscapi
Keywords:
Status: NEW
Alias: None
Product: OpenJDK on Windows
Classification: Red Hat
Component: OpenJDK 11
Version: 11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Deepak Bhole
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-01 07:30 UTC by Hisanobu Okuda
Modified: 2025-09-04 12:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Hisanobu Okuda 2019-10-01 07:30:48 UTC
Description of problem:
This is a clone of https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8231598

the keytool command does not work with SunMSCAPI as follows:

>keytool -list -keystore NONE -storetype Windows-MY -providerClass sun.security.mscapi.SunMSCAPI -v
keytool error: java.lang.Exception: Provider "sun.security.mscapi.SunMSCAPI" not found
java.lang.Exception: Provider "sun.security.mscapi.SunMSCAPI" not found
        at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:815)
        at java.base/sun.security.tools.keytool.Main.run(Main.java:397)
        at java.base/sun.security.tools.keytool.Main.main(Main.java:390)
Caused by: java.lang.IllegalAccessException: class sun.security.tools.KeyStoreUtil (in module java.base) cannot access class sun.security.mscapi.SunMSCAPI (in module jdk.crypto.mscapi) because module jdk.crypto.mscapi does not export sun.security.mscapi to module java.base
        at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
        at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at java.base/sun.security.tools.KeyStoreUtil.loadProviderByClass(KeyStoreUtil.java:320)
        at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:805)
        ... 2 more
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Zvezdelin Todorov 2025-07-22 09:28:56 UTC
I notice similar problem with my security tools checking these websites: https://pipeliner.bg/ and https://festazyrtare.al/ and https://szabadnapok.hu/ and https://calendario-feriados.com/. I don't know why there is keytool error hapening?

Comment 2 Zvezdelin Todorov 2025-07-22 09:31:02 UTC
And again I have checked today on new websites like: https://calendariofestivo.it/ and https://nigeriaholidays.com.ng/ and again the same error appears to happen.

Comment 3 Zvezdelin Todorov 2025-09-04 12:33:11 UTC
And again I have checked today on new websites like: https://zimbabweholidays.co.zw/ and https://sikukuu.co.tz/ and https://calendario-feriados.com/ and https://kpindex.de/ with the same error appears to happen. I am very frustrated now what to do?


Note You need to log in before you can comment on or make changes to this bug.