WSO2 身份服务器 ciphertool.bat 脚本抛出 InvalidPathException
WSO2 Identity Server ciphertool.bat script throwing an InvalidPathException
我正在尝试 运行 ciphertool.bat
脚本来加密我的 WSO2 服务器中的字符串。我正在 运行 使用 -Dconfigure 标志设置脚本并收到 InvalidPathException
我没有编辑 ciphertool.bat
脚本、cipher-text.properties
或 ciper-tool.properties
文件。
我在 Windows 机器上 运行 正在安装 WSO2 Identity Server 5.7.0 版。
命令我是运行ning 控制台输出
C:\Program Files\WSO2\Identity Server.7.0\bin>ciphertool.bat -Dconfigure
BUILD SUCCESSFUL
Total time: 7 seconds
Using CARBON_HOME: C:\Program Files\WSO2\Identity Server.7.0
Using JAVA_HOME: C:\Program Files\Java\jdk1.8.0_181
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char
<:> at index 45: C:\Program Files\WSO2\Identity Server.7.0\C:\Program
Files\WSO2\Identity Server.7.0\/repository/resources/security/wso2carbon.jks
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at org.wso2.ciphertool.utils.Utils.getConfigFilePath(Utils.java:98)
at org.wso2.ciphertool.utils.Utils.setSystemProperties(Utils.java:289)
at org.wso2.ciphertool.CipherTool.initialize(CipherTool.java:93)
at org.wso2.ciphertool.CipherTool.main(CipherTool.java:52)
我希望该脚本 运行 没有错误,尤其是在我没有编辑任何内容的情况下,但它抛出了这个异常。有什么想法吗?
您可以在 <PRODUCT_HOME>/repository/conf/carbon.xml
文件
中给出密钥库文件的位置,如下所示
<Location>${carbon.home}\repository\resources\security\wso2carbon.jks</Location>
(请注意反斜杠)
<KeyStore>
<!-- Keystore file location-->
<Location>${carbon.home}\repository\resources\security\wso2carbon.jks</Location>
<!-- Keystore type (JKS/PKCS12 etc.)-->
<Type>JKS</Type>
<!-- Keystore password-->
<Password svns:secretAlias="Carbon.Security.KeyStore.Password">password</Password>
<!-- Private Key alias-->
<KeyAlias>wso2carbon</KeyAlias>
<!-- Private Key password-->
<KeyPassword svns:secretAlias="Carbon.Security.KeyStore.KeyPassword">password</KeyPassword>
</KeyStore>
这个issue has been identified and a PR has been sent here。不幸的是,它还没有合并。
作为快速修复,您可以按照以下步骤操作。
我正在尝试 运行 ciphertool.bat
脚本来加密我的 WSO2 服务器中的字符串。我正在 运行 使用 -Dconfigure 标志设置脚本并收到 InvalidPathException
我没有编辑 ciphertool.bat
脚本、cipher-text.properties
或 ciper-tool.properties
文件。
我在 Windows 机器上 运行 正在安装 WSO2 Identity Server 5.7.0 版。
命令我是运行ning 控制台输出
C:\Program Files\WSO2\Identity Server.7.0\bin>ciphertool.bat -Dconfigure
BUILD SUCCESSFUL
Total time: 7 seconds
Using CARBON_HOME: C:\Program Files\WSO2\Identity Server.7.0
Using JAVA_HOME: C:\Program Files\Java\jdk1.8.0_181
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char
<:> at index 45: C:\Program Files\WSO2\Identity Server.7.0\C:\Program
Files\WSO2\Identity Server.7.0\/repository/resources/security/wso2carbon.jks
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at org.wso2.ciphertool.utils.Utils.getConfigFilePath(Utils.java:98)
at org.wso2.ciphertool.utils.Utils.setSystemProperties(Utils.java:289)
at org.wso2.ciphertool.CipherTool.initialize(CipherTool.java:93)
at org.wso2.ciphertool.CipherTool.main(CipherTool.java:52)
我希望该脚本 运行 没有错误,尤其是在我没有编辑任何内容的情况下,但它抛出了这个异常。有什么想法吗?
您可以在 <PRODUCT_HOME>/repository/conf/carbon.xml
文件
<Location>${carbon.home}\repository\resources\security\wso2carbon.jks</Location>
(请注意反斜杠)
<KeyStore>
<!-- Keystore file location-->
<Location>${carbon.home}\repository\resources\security\wso2carbon.jks</Location>
<!-- Keystore type (JKS/PKCS12 etc.)-->
<Type>JKS</Type>
<!-- Keystore password-->
<Password svns:secretAlias="Carbon.Security.KeyStore.Password">password</Password>
<!-- Private Key alias-->
<KeyAlias>wso2carbon</KeyAlias>
<!-- Private Key password-->
<KeyPassword svns:secretAlias="Carbon.Security.KeyStore.KeyPassword">password</KeyPassword>
</KeyStore>
这个issue has been identified and a PR has been sent here。不幸的是,它还没有合并。
作为快速修复,您可以按照以下步骤操作。