Class SunJCESecurityProviderRegistrar
- All Implemented Interfaces:
NamedResource,OptionalFeature,PropertyResolver,SecurityProviderChoice,SecurityProviderRegistrar
The problem is that if the Bouncy Castle registrar is present and enabled, we'll end up using the Bouncy Castle implementations for just about anything. But not all Bouncy Castle versions have native implementations of the algorithms. If BC AES is used and is implemented in Java, performance will be very poor. SunJCE's AES uses native code and is much faster.
If no Bouncy Castle is registered, this extra registrar will not have an effect. Like all registrars, this one can be
disabled via a system property org.apache.sshd.security.provider.SunJCEWrapper.enabled=false. Note that this
does not disable the fallback to the platform provider; it only disables this wrapper which can be used to
force the use of the "SunJCE" standard Java provider even if some other registrar also supports an algorithm (and
would thus normally be preferred).
The registrar can be configured as usual. By default it has only the AES cipher and the SHA macs enabled, everything else is disabled.
- Author:
- Apache MINA SSHD Project
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.security.AbstractSecurityProviderRegistrar
props, providerHolder, supportedEntitiesFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTORFields inherited from interface org.apache.sshd.common.OptionalFeature
FALSE, TRUEFields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTYFields inherited from interface org.apache.sshd.common.util.security.SecurityProviderChoice
EMPTYFields inherited from interface org.apache.sshd.common.util.security.SecurityProviderRegistrar
ALL_OPTIONS_VALUE, ALL_OPTIONS_WILDCARD, CONFIG_PROP_BASE, ENABLED_PROPERTY, NAMED_PROVIDER_PROPERTY, NO_OPTIONS_VALUE, SECURITY_ENTITIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultSecurityEntitySupportValue(Class<?> entityType) Retrieves the underlyingProvider's name.booleanbooleanbooleanMethods inherited from class org.apache.sshd.common.util.security.AbstractSecurityProviderRegistrar
createProviderInstance, getName, getOrCreateProvider, getProperties, isSecurityEntitySupported, toStringMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getStringProperty, isEmptyMethods inherited from interface org.apache.sshd.common.util.security.SecurityProviderRegistrar
getBasePropertyName, getConfigurationPropertyName, getEdDSASupport, getParentPropertyResolver, isCertificateFactorySupported, isCipherSupported, isKeyAgreementSupported, isKeyFactorySupported, isKeyPairGeneratorSupported, isMacSupported, isMessageDigestSupported, isSignatureSupported
-
Constructor Details
-
SunJCESecurityProviderRegistrar
public SunJCESecurityProviderRegistrar()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Returns:
trueif the provider is enabled regardless of whether it is supported - default=true. Note: checks if the provider has been programmatically disabled viaSecurityUtils.setAPrioriDisabledProvider(String, boolean)- See Also:
-
getProviderName
Description copied from interface:SecurityProviderChoiceRetrieves the underlyingProvider's name.- Returns:
- the
Provider's name
-
getDefaultSecurityEntitySupportValue
- Parameters:
entityType- The requested entity type - its simple name serves to build the configuration property name.- Returns:
- Configuration value to use if no specific configuration provided - default=empty
- See Also:
-
getString
-
isNamedProviderUsed
public boolean isNamedProviderUsed()- Returns:
trueif to use the provider's name rather than itsProviderinstance - default=true- See Also:
-
getSecurityProvider
- Returns:
- The security
Providerto use in caseSecurityProviderChoice.isNamedProviderUsed()isfalse. Can benullifSecurityProviderChoice.isNamedProviderUsed()istrue, but not recommended.
-
isSupported
public boolean isSupported()
-