Class KeyStorePublicKeySource

  • All Implemented Interfaces:
    PublicKeySource

    public class KeyStorePublicKeySource
    extends java.lang.Object
    implements PublicKeySource
    A public key store that reads keys from a key store.
    Author:
    Alex Kalderimis
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyStorePublicKeySource​(java.security.KeyStore store)
      Build a key source that reads them from a key store.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.PublicKey get​(java.lang.String name)
      Get a specific key by name.
      java.util.Collection<java.security.PublicKey> getAll()  
      java.util.Collection<java.security.PublicKey> getSome​(java.lang.String... names)
      Get multiple keys given a set of names.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyStorePublicKeySource

        public KeyStorePublicKeySource​(java.security.KeyStore store)
        Build a key source that reads them from a key store.
        Parameters:
        store - The key store.
    • Method Detail

      • getSome

        public java.util.Collection<java.security.PublicKey> getSome​(java.lang.String... names)
                                                              throws KeySourceException
        Description copied from interface: PublicKeySource
        Get multiple keys given a set of names.
        Specified by:
        getSome in interface PublicKeySource
        Parameters:
        names - The names of the keys we want.
        Returns:
        The matching keys.
        Throws:
        KeySourceException - If we can't get any of the keys.