Class TrustStore
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.installer.plugin.impl.TrustStore
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent
@Deprecated(forRemoval=true,
since="5.2")
@NotThreadSafe
public final class TrustStore
extends AbstractInitializableComponent
Deprecated, for removal: This API element is subject to removal in a future version.
Code to handle (load, update, check) the trust store for an individual plugin.
a thin shim on BC.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDeprecated, for removal: This API element is subject to removal in a future version.An opaque handle around aPGPSignature. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PathDeprecated, for removal: This API element is subject to removal in a future version.The key store backup.private StringDeprecated, for removal: This API element is subject to removal in a future version.Explicit path to trust store.private PathDeprecated, for removal: This API element is subject to removal in a future version.Where the IdP is installed.private org.bouncycastle.openpgp.PGPPublicKeyRingCollectionDeprecated, for removal: This API element is subject to removal in a future version.KeyRing.private final org.slf4j.LoggerDeprecated, for removal: This API element is subject to removal in a future version.logger.private StringDeprecated, for removal: This API element is subject to removal in a future version.The plugin this is the trust store for.private PathDeprecated, for removal: This API element is subject to removal in a future version.The key store. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckSignature(InputStream input, TrustStore.Signature signature) Deprecated, for removal: This API element is subject to removal in a future version.Run a signature check over the streams.booleancontains(TrustStore.Signature signature) Deprecated, for removal: This API element is subject to removal in a future version.Does the key that made this signature exist in our keyrings?protected voidDeprecated, for removal: This API element is subject to removal in a future version.Create an empty store and save to new location.protected voidDeprecated, for removal: This API element is subject to removal in a future version.voidimportKeyFromStream(TrustStore.Signature sigForKey, InputStream keyStream, Predicate<String> accept) Deprecated, for removal: This API element is subject to removal in a future version.Load up the provided store and if the key is found and the Predicate allows it add it to the store which we will then save.protected voidDeprecated, for removal: This API element is subject to removal in a future version.Load the store from its designated location.private static org.bouncycastle.openpgp.PGPPublicKeyRingCollectionDeprecated, for removal: This API element is subject to removal in a future version.Return a store loaded from the supplied stream.voidDeprecated, for removal: This API element is subject to removal in a future version.Save the store to its designated location.voidDeprecated, for removal: This API element is subject to removal in a future version.Save the store to its designated location.voidsetIdpHome(Path what) Deprecated, for removal: This API element is subject to removal in a future version.Set IdPHome.voidsetPluginId(String what) Deprecated, for removal: This API element is subject to removal in a future version.Set the pluginId.voidsetTrustStore(String what) Deprecated, for removal: This API element is subject to removal in a future version.Set explicitTrustStore.static TrustStore.SignaturesignatureOf(InputStream stream) Deprecated, for removal: This API element is subject to removal in a future version.Provide an opaque signature object from an input stream.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logDeprecated, for removal: This API element is subject to removal in a future version.logger. -
idpHome
Deprecated, for removal: This API element is subject to removal in a future version.Where the IdP is installed. -
explicitTrustStore
Deprecated, for removal: This API element is subject to removal in a future version.Explicit path to trust store. -
pluginId
Deprecated, for removal: This API element is subject to removal in a future version.The plugin this is the trust store for. NULL of this is general purpose usage. -
store
Deprecated, for removal: This API element is subject to removal in a future version.The key store. -
backup
Deprecated, for removal: This API element is subject to removal in a future version.The key store backup. -
keyRings
Deprecated, for removal: This API element is subject to removal in a future version.KeyRing.
-
-
Constructor Details
-
TrustStore
public TrustStore()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setPluginId
Deprecated, for removal: This API element is subject to removal in a future version.Set the pluginId.- Parameters:
what- to set.
-
setIdpHome
Deprecated, for removal: This API element is subject to removal in a future version.Set IdPHome.- Parameters:
what- The idpHome to set.
-
setTrustStore
Deprecated, for removal: This API element is subject to removal in a future version.Set explicitTrustStore.- Parameters:
what- The value to set.
-
loadStoreFrom
private static org.bouncycastle.openpgp.PGPPublicKeyRingCollection loadStoreFrom(@Nonnull InputStream in) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Return a store loaded from the supplied stream.- Parameters:
in- the stream- Returns:
- a suitable store
- Throws:
IOException- fromFiles.newInputStream(Path, java.nio.file.OpenOption...)and fromPGPPublicKeyRingCollection(InputStream, org.bouncycastle.openpgp.operator.KeyFingerPrintCalculator)
-
loadStore
Deprecated, for removal: This API element is subject to removal in a future version.Load the store from its designated location.- Throws:
IOException- fromFiles.newInputStream(Path, java.nio.file.OpenOption...)and fromPGPPublicKeyRingCollection(InputStream, org.bouncycastle.openpgp.operator.KeyFingerPrintCalculator)
-
createNewStore
Deprecated, for removal: This API element is subject to removal in a future version.Create an empty store and save to new location.- Throws:
IOException- fromsaveStore()and in the unlikely event thatPGPPublicKeyRingCollection(java.util.Collection)has problems.
-
saveStore
Deprecated, for removal: This API element is subject to removal in a future version.Save the store to its designated location.- Throws:
IOException- fromFiles.newOutputStream(Path, java.nio.file.OpenOption...)and fromPGPPublicKeyRingCollection.encode(OutputStream)
-
saveStoreInternal
Deprecated, for removal: This API element is subject to removal in a future version.Save the store to its designated location.- Throws:
IOException- fromFiles.newOutputStream(Path, java.nio.file.OpenOption...)and fromPGPPublicKeyRingCollection.encode(OutputStream)
-
importKeyFromStream
public void importKeyFromStream(TrustStore.Signature sigForKey, @Nonnull InputStream keyStream, @Nonnull Predicate<String> accept) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Load up the provided store and if the key is found and the Predicate allows it add it to the store which we will then save.- Parameters:
sigForKey- the signature we are looking for a key for.keyStream- where to load the key fromaccept- whether we actually want to install this key- Throws:
IOException- if the load or save fails
-
signatureOf
@Nonnull public static TrustStore.Signature signatureOf(@Nonnull InputStream stream) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Provide an opaque signature object from an input stream.- Parameters:
stream- what to read.- Returns:
- the Signature.
- Throws:
IOException- if there is a problem reading the file of it it doesn't represent a signature
-
contains
Deprecated, for removal: This API element is subject to removal in a future version.Does the key that made this signature exist in our keyrings?- Parameters:
signature- what to ask about- Returns:
- whether it is there
-
checkSignature
public boolean checkSignature(@Nonnull InputStream input, @Nonnull TrustStore.Signature signature) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Run a signature check over the streams.- Parameters:
input- what to checksignature- what to check with- Returns:
- whether it passed or not
- Throws:
IOException- if we get an error reading the stream
-
doInitialize
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-