如何以编程方式使用 keytool?
在我看来,几乎没有任何好的工具可以帮助 web 应用程序部署者保护他们的环境。我觉得很多部署问题都是因为管理员没有得到适当的工具来忽略 TLS/SSL 的复杂性。我曾经有幸看到一个非常好的 UI 管理,对于任何级别的管理员来说都是直观的,无论是 websphere 还是 weblogic(我忘记了),但今天在开源社区中还没有类似的东西。我想有一天为 tomcat 组合一些东西,所以我正在试验并试图弄清楚如何“不重新发明”轮子,但似乎我无法获得 keytool 的源代码。 ..我认为课程本身是最终的......所以延长它是不可能的。有谁知道为什么 SUN 使得做好良好且直观的安全性变得如此困难?
真正的问题:您是否知道有人可以通过编程方式充分利用 keytool 的方法?
It seems to me that there are hardly any good tools out there that help webapp deployers secure their environment. I feel like a lot of deployment grief comes in because the admin hasn't been properly tooled to ignore the intricacies and of TLS/SSL. I once had the good luck of seeing a really good UI management that was intuitive, for an admin of any level, in either websphere or weblogic (i forget) but nothing like that is available today out in the open source community. I would like to put together something for tomcat one day so I'm experimenting and trying to figure out how "not to re-invent" the wheel but it just seems like I can't get my hands on the source code for keytool ... and the class itself is final I think ... so extending it would be out of the question. Does anyone know why SUN made it so hard to do good and intutive security?
Real Question: Are there ways that you know of where someone can programmatically utilize keytool to its fullest?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 java 的
KeyStore
api 以编程方式执行keytool
的操作。多年来,KeyStore
API 和keytool
命令行工具都在不断发展。您可以在此处参考KeyStore
api 文档:Java 7 KeyStore
Java 8 密钥库
Java 9 密钥库
如果您对 keytool 是如何做到的感到好奇,快速谷歌搜索会得到这个链接,其中包含其代码。
You can use java's
KeyStore
api to do whatkeytool
does, programmatically. Over the years both theKeyStore
api andkeytool
command line tool have evolved. You can refer to theKeyStore
api docs here:Java 7 KeyStore
Java 8 KeyStore
Java 9 KeyStore
If you are curious on how
keytool
does it, a quick google search yielded this link, which contains its code.