There is something wrong with either your
KeyStore or Password.
Do this.
In Java, create this class and execute it.
It uses only core Java classes, no Jetty involved.
Lets verify that your KeyStore can be loaded by the same
version of Java as you are running Jetty with.
package security;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.util.Enumeration;
public class LoadKeyStore
{
public static void main(String[] args) throws
KeyStoreException, IOException, CertificateException,
NoSuchAlgorithmException
{
KeyStore keyStore = KeyStore.getInstance("PKCS12");
char[] password = "changeit".toCharArray();
Path keyStorePath =
Paths.get("/opt/shibboleth-idp/jetty.p12");
try (InputStream input =
Files.newInputStream(keyStorePath))
{
keyStore.load(input, password);
}
System.out.println("KeyStore.size = " +
keyStore.size());
Enumeration<String> aliases =
keyStore.aliases();
while(aliases.hasMoreElements())
{
String alias = aliases.nextElement();
Certificate cert =
keyStore.getCertificate(alias);
System.out.println("Certificate: " + cert);
}
}
}
Obviously change the password and keystorePath to suit
your needs.
If it works, then you likely have a proper KeyStore and
password combination.
If it doesn't work, then you have something wrong and
have to address it with the KeyStore file itself.
Also, pay attention to file permissions.