Class AbstractX509Validator

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.validate.BaseValidator
net.shibboleth.metadata.validate.x509.AbstractX509Validator
All Implemented Interfaces:
Validator<X509Certificate>, net.shibboleth.shared.component.Component, net.shibboleth.shared.component.DestructableComponent, net.shibboleth.shared.component.IdentifiableComponent, net.shibboleth.shared.component.IdentifiedComponent, net.shibboleth.shared.component.InitializableComponent
Direct Known Subclasses:
X509ROCAValidator, X509RSAExponentValidator, X509RSAKeyLengthValidator, X509RSAOpenSSLKeylistValidator

@ThreadSafe public abstract class AbstractX509Validator extends BaseValidator implements Validator<X509Certificate>
Abstract class implementing validation on X509Certificate objects. X.509 certificate issues are almost always independent, so simplify the validator interface by delegation.
Since:
0.9.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.shibboleth.metadata.validate.Validator

    Validator.Action
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    doValidate(X509Certificate cert, Item<?> item, String callerId)
    Apply the validator to the object in the given Item context.
    validate(X509Certificate cert, Item<?> item, String callerId)
    Apply the validator to a value in the context of the given Item.

    Methods inherited from class net.shibboleth.metadata.validate.BaseValidator

    addError, addErrorMessage, addErrorMessage, addErrorMessage, addStatus, addWarning, getMessage, makeComponentId, setMessage

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

    setId

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

    doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.shibboleth.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.IdentifiableComponent

    setId

    Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

    getId

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized

    Methods inherited from interface net.shibboleth.metadata.validate.Validator

    validate
  • Constructor Details

    • AbstractX509Validator

      public AbstractX509Validator()
  • Method Details

    • doValidate

      protected abstract void doValidate(@Nonnull X509Certificate cert, @Nonnull Item<?> item, @Nonnull String callerId) throws StageProcessingException
      Apply the validator to the object in the given Item context. The validator influences future processing by adding item metadata to the Item.
      Parameters:
      cert - the certificate to be validated
      item - the Item context for the validation
      callerId - a String identifying the caller
      Throws:
      StageProcessingException - if an error occurs during validation
    • validate

      @Nonnull public Validator.Action validate(@Nonnull X509Certificate cert, @Nonnull Item<?> item, @Nonnull String callerId) throws StageProcessingException
      Description copied from interface: Validator
      Apply the validator to a value in the context of the given Item.

      The validator influences future processing by adding item metadata to the Item.

      A common case is that the validator will add a StatusMetadata to the Item, for example a ErrorStatus. In this case, the convention is that the componentId of the ErrorStatus would be created by combining the callerId with a / and the validator's own identifier. For example, a validator val called by a stage stage would normally use a componentId of stage/val.

      Specified by:
      validate in interface Validator<X509Certificate>
      Parameters:
      cert - the value to be validated
      item - the Item context for the validation
      callerId - a String identifying the caller
      Returns:
      an indication of whether to process additional validators
      Throws:
      StageProcessingException - if an error occurs during validation