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importcert -trustcacerts -alias vs -file vs.cer -keystore vs.jks -storepass changeit -storetype JKS
我已经验证了keytool可以从新创建的密钥库中读回证书详细信息。
final KeyStore trustStore = KeyStore.getInstance("JKS");
trustStream = getClass().getClassLoader().getResourceAsStream("vs.jks");
trustStore.load(trustStream, "changeit".toCharArray());
java.security.cert.CertificateParsingException: java.io.IOException: X500 RDN
at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:171)
at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1788)
at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:202)
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:97)
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:747)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
at java.security.KeyStore.load(KeyStore.java:1214)
...
Caused by: java.io.IOException: X500 RDN
at sun.security.x509.RDN.<init>(RDN.java:242)
at sun.security.x509.X500Name.parseDER(X500Name.java:804)
at sun.security.x509.X500Name.<init>(X500Name.java:307)
at sun.security.x509.CertificateIssuerName.<init>(CertificateIssuerName.java:82)
at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:685)
at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:169)
... 37 more
我能做些什么来解决这个问题吗?
我已经弄清楚原因了。证书文件或密钥库没有问题!
我正在使用Maven编译我的项目,它会自动将jks文件复制到目标构建目录。
事实证明,在复制过程中,Maven假设文件是文本文件,并“有益地”将任何扩展的ASCII字符(>=0x80)转换为“?”(0x3F)!
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
我可以从flutter应用程序的assets/Images目录加载图像,但当从flutter包的assets/Images目录加载相同的图像时,我会得到以下错误:
问题内容: 我似乎无法弄清楚。我当时用我的Windows pc来开发并部署到Linux机器上就很好了,突然之间,我无法再编译任何东西了,甚至连一个简单的hello world程序都没有。可能是Windows更新之后。我所做的所有事情都会出现这种错误: 像往常一样正确设置了GOROOT和GOPATH,但是找不到任何包。这在我拥有的每个包装上均失败。上面的程序是软件包“ main”的一部分 我已经将G
我有两个套餐和课程第一个套餐 D:\User\java\java\u programs\mypackage\A.java C中还有一个B类:\Package1\B. java 我编辑 C+++包 它为A.java和B.java创建了类文件 但我不能运行我的代码 我试过了 但是错误 错误:无法找到或加载主类包1。B
我正在尝试在一个相当旧的ubuntu xenial版本上将R从3.4.4升级到3.6.0。 我遵循了这些指示:这里 以下是我采取的步骤: sudo apt-get删除r-base-dev echo'debhttps://cloud.r-project.org/bin/linux/ubuntutruy-cran35/'|sudo ted-a /etc/apt/sources.list sudo ap
这是密码。没有警告,文件正常。