Class KeyStoreUtil.KeyStoreEntry

java.lang.Object
org.elasticsearch.common.ssl.KeyStoreUtil.KeyStoreEntry
Enclosing class:
KeyStoreUtil

public static class KeyStoreUtil.KeyStoreEntry extends Object
  • Method Details

    • getAlias

      public String getAlias()
    • getX509Certificate

      public X509Certificate getX509Certificate()
      If this entry is a private key entry (see isKeyEntry()), and the entry includes a certificate chain, and the leaf (first) element of that chain is an X.509 certificate, then that leaf certificate is returned. If this entry is a trusted certificate entry and the trusted certificate is an X.509 certificate, then the trusted certificate is returned. In all other cases, returns null.
      See Also:
    • isKeyEntry

      public boolean isKeyEntry()
      See Also:
    • getKey

      public PrivateKey getKey(char[] password)
      If the current entry stores a private key, returns that key. Otherwise returns null.
      See Also:
    • getX509CertificateChain

      public List<? extends X509Certificate> getX509CertificateChain()
      If this entry is a private key entry (see isKeyEntry()), returns the certificate chain that is stored in the entry. If the entry contains any certificates that are not X.509 certificates, they are ignored. If the entry is not a private key entry, or it does not contain any X.509 certificates, then an empty list is returned.
    • delete

      public void delete()
      Remove this entry from the underlying keystore