`
chenhua_1984
  • 浏览: 1235128 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论
阅读更多
package org.example.crypto;

import java.security.KeyStore;
import java.security.KeyStoreException;

public class LoadKeystore
{
    public static void main(String[] args) throws KeyStoreException
    {
        KeyStore keystore = KeyStore.getInstance("Windows-MY");
        System.out.println(keystore.aliases());
    }
}

 

exception 写道
Exception in thread "main" java.security.KeyStoreException: Windows-MY not found
at java.security.KeyStore.getInstance(KeyStore.java:587)
at org.example.crypto.LoadKeystore.main(LoadKeystore.java:10)
Caused by: java.security.NoSuchAlgorithmException: Windows-MY KeyStore not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:142)
at java.security.Security.getImpl(Security.java:659)
at java.security.KeyStore.getInstance(KeyStore.java:584)

 

sun 异常描述 写道
Bug ID: 6931562
Votes 0
Synopsis Support SunMSCAPI Security Provider in Windows 64-bit releases of JVM
Category jce:sunmscapi
Reported Against
Release Fixed 7(b142)
State 11-Closed, Unverified, bug
Priority: 3-Medium
Related Bugs 7035058
Submit Date 03-MAR-2010
Description A DESCRIPTION OF THE REQUEST :
JRE 1.6.0_u18, for 64-bit Windows Vista does not appear to contain the sun.security.mscapi.SunMSCAPI security provider. The classes, supporting DLL, and security provider mapping in the java.security policy file are absent.
At runtime, the security API reports that it cannot locate the Windows-MY keystore. Documentation for the SunMSCAPI Provider does not indicate that support is only available on certain Windows platforms.
http://java.sun.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunMSCAPI

The 32-bit distribution for the same version and operating system includes this feature.

If implementation is impossible, due to limitations of the host platform, treat this as a bug, for which the end product would be updated documentation to warn future engineers of the missing feature.

JUSTIFICATION :
Provide feature consistency between JVM implementations runnable on the same host platform. Provide upgrade-path for code written against 32-bit JVM features.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The 64-bit Windows JVM implementations should provide access to the Windows-MY and Windows-ROOT keystores.
ACTUAL -
JVM indicates that it cannot locate the Windows-MY keystore.

 
跟帖 写道
Submitted On 10-MAR-2011
tomasgarciameras It's very easy to compile sunmscapi.dll as a x64 Windows DLL with Microsoft Visual Studio. It works without problems.


Submitted On 10-MAR-2011
tomasgarciameras It's very easy to compile sunmscapi.dll as a x64 Windows DLL with Microsoft Visual Studio. It works without problems.


Submitted On 10-MAR-2011
tomasgarciameras It's very easy to compile sunmscapi.dll as a x64 Windows DLL with Microsoft Visual Studio. It works without problems.

 

 

    但采用JAVA7,oracle解决了这个BUG

 

 

分享到:
评论

相关推荐

    win7系统下java相差8小时解决(经典小问题)

    搜索一下,到SUN论坛,发现SUN提到了这个bug,(http://java.sun.com/javase/tzupdater_README.html)而且发布了一个tzupdater。 按照使用说明下载、运行,再试,还是不行。 虽然用updater没有成功,但通过他的使用...

    leetcode第五十四python题-ZS9527.github.io:日常累计博客,记录一下一个菜鸡每周的日常

    leetcode第五十四python题 日常累计博客 记录一下平时碰到的业务上的问题,业余时间的学习,以及技术的积累。 PS:偶尔也是会记录一下自己与编程有关的日常生活,就当做是一个朋友圈吧。 PS:用云服务器搭建的网站,...

    Windows环境变量设置工具,Java、Golang、python,2021.1.11修订版

    功能 读取用户、系统环境变量:涵盖增、删、改、存 导出读取的变量到配置文件 导入配置文件到环境变量 根据设置名,保存环境变量分类 ...2021.1.11 修订Bug,增加path变量多条记录显示,方便修改与增加

    易语言程序免安装版下载

    修改高级表格支持库,在双击单元格进入编辑状态后,不能收到第一个“字符输入”事件的BUG。 2. OpenGL支持库中的部分英文名称常量已改为中文,并统一在所有常量名称之前加前缀“GL_”,以减少与其它库的冲突机率。...

    新版Android开发教程.rar

    的 Android SDK 提供了在 Android 平台上使用 JaVa 语言进行 Android 应用开发必须的工具和 API 接口。 特性 • 应用程序框架 支持组件的重用与替换 • Dalvik Dalvik Dalvik Dalvik 虚拟机 专为移动设备优化 • ...

    测试培训教材

    在“Mercury Tours 1.0.1”中新建一个测试集: 把“Sign-On/Sign-Off”中的测试用例“Sign-On Page”添加到测试集中: 切换到“执行流”界面,添加“Sign-On Password”和“Sign-On User Name”两个测试用例: ...

    net学习笔记及其他代码应用

    43.try {}里有一个return语句,那么紧跟在这个try后的finally {}里的code会不会被执行,什么时候被执行,在return前还是后? 答:会执行,在return前执行。 44.两个对象值相同(x.equals(y) == true),但却可有不同...

    EditPlus 3.31 Build 860 简体中文版

    * 修正:在 64 位系统下,无法设置系统右键快捷菜单关联 [0501] * 修正: 当 "另存为"、并在文件名称输入框点击鼠标右键时, 弹出英文菜单的问题 (详见下) [0427] * 修正: 参数设置素材目录一处翻译错误 [0315] * ...

    EditPlus 3.31 Build 1129

    * 修正:在 64 位系统下,无法设置系统右键快捷菜单关联 [0501] * 修正: 当 "另存为"、并在文件名称输入框点击鼠标右键时, 弹出英文菜单的问题 (详见下) [0427] * 修正: 参数设置素材目录一处翻译错误 [0315] * ...

    Charles替换文件.jar

    Charles可能很多人不熟悉,但是另外一个windows下的Fiddler很多人应该不陌生的;它们都是同性质的代{过}{滤}理抓包工具;正常情况下,Chrome DevTool已经满足了日常web开发的需求,但是有的特性:编辑request的参数...

    iuhyiuhkjh908u0980

    最近在部署应用时,遇到一个问题,就是ant脚本登录到linux机器上执行部署命令时,不知如何去写脚本。不知有没有哪位同学做过?以下是我的ant脚本: <project name="taxs_Admin" default="usage"> ...

    asp.net知识库

    .NET关于string转换的一个小Bug Regular Expressions 完整的在.net后台执行javascript脚本集合 ASP.NET 中的正则表达式 常用的匹配正则表达式和实例 经典正则表达式 delegate vs. event 我是谁?[C#] 表达式计算引擎...

    EditPlus 2整理信箱的工具

    星号表示,其前面的括号“[]”内的空格符或制表符,在一行中出现0个或多个。 (6)选择“换行符”,插入“\n”,表示回车符。 ④、“替换为”组合框保持空,表示删除查找到的内容。单击“替换”按钮逐个行删除空行,...

    Editplus 3[1].0

    星号表示,其前面的括号“[]”内的空格符或制表符,在一行中出现0个或多个。 (6)选择“换行符”,插入“\n”,表示回车符。 ④、“替换为”组合框保持空,表示删除查找到的内容。单击“替换”按钮逐个行删除空行,...

    源码统计器1.1版(源码+软件)

    为此,我自建了一个测试用的cpp文件(test.cpp),在其中我设计了多个遵循c++的注释方式,但又很容易导致统计错误的"陷阱"。虽然有些注释语句看起来有点奇怪,但的确合理并且真实存在。统计该测试文件时即使出现1行的...

    Visual C++ 编程资源大全(英文源码 其它)

    20.zip Jump to Next/Previous Function Definition 跳转到下一个/上一个功能定义(4KB)<END><br>21,21.zip Inverting Assignment Operations 转化操作任务(5KB)<END><br>22,22.zip VC4.2 style ...

    源码统计器v1.1

    为此,我自建了一个测试用的cpp文件(test.cpp),在其中我设计了多个遵循c++的注释方式,但又很容易导致统计错误的";;;;;;;陷阱";;;;;;;。虽然有些注释语句看起来有点奇怪,但的确合理并且真实存在。统计该...

    飞鸽传书(IPMessenger) 源码

     这里需要特别注意的就是关于文件夹的传输,这个FreeEIM(飞鸽传书)一个难点,应为对与文件夹的内容是没有显示的,需要我们逐次的判断,在飞鸽传书中是这么处理的,如果是一个文件夹,就发送文件属性为IPMSG_FILE_...

    editplus 代码编辑器html c++ jsp css

    星号表示,其前面的括号“[]”内的空格符或制表符,在一行中出现0个或多个。 (6)选择“换行符”,插入“\n”,表示回车符。 ④、“替换为”组合框保持空,表示删除查找到的内容。单击“替换”按钮逐个行删除空行,...

Global site tag (gtag.js) - Google Analytics