Package gov.usgs.earthquake.distribution
Class ProductKeyChain
- java.lang.Object
-
- gov.usgs.earthquake.distribution.ProductKeyChain
-
public class ProductKeyChain extends java.lang.Object
A group of keys that can be used to verify product signatures.
-
-
Constructor Summary
Constructors Constructor Description ProductKeyChain()
Empty constructorProductKeyChain(java.lang.String keys, Config config)
Constructor for a string of keysProductKeyChain(java.util.List<java.lang.String> keys, Config config)
Constructor for list of keys
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ProductKey>
getKeychain()
java.security.PublicKey[]
getProductKeys(ProductId id)
Find public keys based on configured Keys.
-
-
-
Constructor Detail
-
ProductKeyChain
public ProductKeyChain()
Empty constructor
-
ProductKeyChain
public ProductKeyChain(java.lang.String keys, Config config) throws java.lang.Exception
Constructor for a string of keys- Parameters:
keys
- String of keys, separated by commasconfig
- Config file- Throws:
java.lang.Exception
- if error occurs
-
ProductKeyChain
public ProductKeyChain(java.util.List<java.lang.String> keys, Config config) throws java.lang.Exception
Constructor for list of keys- Parameters:
keys
- String list of keysconfig
- Config file- Throws:
java.lang.Exception
- if error occurs
-
-
Method Detail
-
getKeychain
public java.util.List<ProductKey> getKeychain()
- Returns:
- the keys
-
getProductKeys
public java.security.PublicKey[] getProductKeys(ProductId id)
Find public keys based on configured Keys.- Parameters:
id
- ID of product- Returns:
- an array of candidate keys used to verify a signature.
-
-