View | Details | Raw Unified | Return to bug 61557
Collapse All | Expand All

(-)java/org/apache/tomcat/util/net/jsse/JSSEUtil.java (-1 / +7 lines)
Lines 241-247 Link Here
241
            Key k = ks.getKey(keyAlias, keyPassArray);
241
            Key k = ks.getKey(keyAlias, keyPassArray);
242
            if (k != null && "PKCS#8".equalsIgnoreCase(k.getFormat())) {
242
            if (k != null && "PKCS#8".equalsIgnoreCase(k.getFormat())) {
243
                // Switch to in-memory key store
243
                // Switch to in-memory key store
244
                ksUsed = KeyStore.getInstance("JKS");
244
                String provider = certificate.getCertificateKeystoreProvider();
245
                if (provider == null) {
246
                    ksUsed = KeyStore.getInstance(certificate.getCertificateKeystoreType());
247
                } else {
248
                    ksUsed = KeyStore.getInstance(certificate.getCertificateKeystoreType(),
249
                            provider);
250
                }
245
                ksUsed.load(null,  null);
251
                ksUsed.load(null,  null);
246
                ksUsed.setKeyEntry(keyAlias, k, keyPassArray, ks.getCertificateChain(keyAlias));
252
                ksUsed.setKeyEntry(keyAlias, k, keyPassArray, ks.getCertificateChain(keyAlias));
247
            }
253
            }

Return to bug 61557