Bug fix. Don't add certificates to virtual cacerts file that aren't currently valid, because the Java key store apparently can't contain multiple certificates with the same Subject.

This commit is contained in:
jfrijters 2012-04-28 07:55:50 +00:00
Родитель 0d0d18d309
Коммит a6179fea09
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -668,7 +668,7 @@ namespace IKVM.Internal
store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
foreach (X509Certificate2 cert in store.Certificates)
{
if (!cert.HasPrivateKey)
if (!cert.HasPrivateKey && cert.NotBefore < DateTime.Now && DateTime.Now <= cert.NotAfter)
{
jstore.setCertificateEntry(cert.Subject, cf.generateCertificate(new global::java.io.ByteArrayInputStream(cert.RawData)));
}