Package org.opensaml.xmlsec.config.impl

# Class JavaCryptoValidationInitializer

java.lang.Object
org.opensaml.xmlsec.config.impl.JavaCryptoValidationInitializer

All Implemented Interfaces:
  `Initializer`

public class JavaCryptoValidationInitializer extends Object implements Initializer
An initializer which validates the Java Cryptographic Architecture environment is usable.

Validates that the set of security providers configured in the JVM supports required cryptographic capabilities, for example for the XML Encryption and XML Signature specifications.

Depending on the requirements of the calling code, failure to fully support encryption and signature requirements may or may not be significant. A configuration property `opensaml.config.xmlsec.cryptoValidationIsFatal` is supplied to allow the environment to determine whether an invalid result is fatal or not. The default value of this flag is `false`. If any case, a warning is logged.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CONFIG_PROPERTY_FAIL_IS_FATAL`
Configuration property determining whether invalid result is fatal or not.
`private org.slf4j.Logger`
`log`
Logger.

## Constructor Summary

Constructors
Constructor
Description
`JavaCryptoValidationInitializer()`

## Method Summary

Modifier and Type
Method
Description
`void`
`init()`
Perform the initialization process encompassed by the implementation.

### Methods inherited from class java.lang.Object

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

## Field Details

### CONFIG_PROPERTY_FAIL_IS_FATAL

@Nonnull @NotEmpty public static final String CONFIG_PROPERTY_FAIL_IS_FATAL
Configuration property determining whether invalid result is fatal or not.

See Also:
  - Constant Field Values

### log

@Nonnull private org.slf4j.Logger log
Logger.

## Constructor Details

### JavaCryptoValidationInitializer

public JavaCryptoValidationInitializer()

## Method Details

### init

public void init() throws InitializationException
Perform the initialization process encompassed by the implementation.

Specified by:
  `init` in interface `Initializer`
Throws:
  `InitializationException` - if initialization could not be completed successfully