The PrivateKeyEntry class

The KeyStore.PrivateKeyEntry class definition is as follows:

    public static final class KeyStore.PrivateKeyEntry extends     Object implements KeyStore.Entry

This creates an entry to hold a PrivateKey and the corresponding Certificate chain. This class has the following methods:

  • public Certificate getCertificate():
    • Returns the end entity Certificate from the Certificate chain
  • public Certificate[] getCertificateChain():
    • Returns the Certificate chain as an array of Certificates
  • public PrivateKey getPrivateKey():
    • Returns the PrivateKey from the current entry
  • public String toString():
    • Returns the PrivateKeyEntry as a String

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.