Keytool:可以为 storetype 使用哪些值

问题描述

使用 Java 11 时,storetypekeytool 参数可以使用哪些值? https://api.dart.dev/stable/2.10.5/dart-async/Stream/forEach.html 给出了一些示例,但没有说明所有有效值是什么。

有没有办法让 keytool 列出支持的商店类型?

解决方法

它直接传输到 KeyStore.getInstance(storetype) 参数中(如您可以 see here)。

基本上在 JDK11 中它是基于 the Javadoc 的 oracle 实现

  • jceks
  • jks
  • dks
  • pkcs11
  • pkcs12

在 Windows 系统上运行的 KeyTool 中还有两个实现:Windows-MY 和 Windows-ROOT。