Package org.opensaml.xmlsec.keyinfo.impl
Class KeyAgreementKeyInfoGeneratorFactory.KeyAgreementKeyInfoGenerator
java.lang.Object
org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
org.opensaml.xmlsec.keyinfo.impl.KeyAgreementKeyInfoGeneratorFactory.KeyAgreementKeyInfoGenerator
- All Implemented Interfaces:
KeyInfoGenerator
- Enclosing class:
- KeyAgreementKeyInfoGeneratorFactory
public class KeyAgreementKeyInfoGeneratorFactory.KeyAgreementKeyInfoGenerator
extends BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
An implementation of
KeyInfoGenerator capable of handling the information
contained within a KeyAgreementCredential.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final XMLObjectBuilder<AgreementMethod>Builder for AgreementMethod objects.private final org.slf4j.LoggerClass logger.private final KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptionsThe set of options to be used by the generator. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedKeyAgreementKeyInfoGenerator(KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions newOptions, Class<? extends KeyInfo> type) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongenerate(Credential credential) Generate a new KeyInfo object based on keying material and other information within a credential.private voidprocessAgreementParameters(KeyInfo keyInfo, AgreementMethod agreementMethod, KeyAgreementCredential credential) private voidprocessOriginatorKeyInfo(KeyInfo keyInfo, AgreementMethod agreementMethod, KeyAgreementCredential credential) Process theKeyAgreementCredential.getOriginatorCredential().private voidprocessRecipientKeyInfo(KeyInfo keyInfo, AgreementMethod agreementMethod, KeyAgreementCredential credential) Methods inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator
buildKeyInfo, classToElementName, processEntityID, processKeyNames, processPublicKey
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
options
The set of options to be used by the generator. -
agreementMethodBuilder
Builder for AgreementMethod objects.
-
-
Constructor Details
-
KeyAgreementKeyInfoGenerator
protected KeyAgreementKeyInfoGenerator(@Nonnull KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions newOptions, Class<? extends KeyInfo> type) Constructor.- Parameters:
newOptions- the options to be used by the generatortype- the KeyInfo element type
-
-
Method Details
-
generate
Generate a new KeyInfo object based on keying material and other information within a credential.- Specified by:
generatein interfaceKeyInfoGenerator- Overrides:
generatein classBasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator- Parameters:
credential- the credential containing keying material and possibly other information- Returns:
- a new KeyInfo object or null if nothing was generated
- Throws:
SecurityException- thrown if there is any error generating the new KeyInfo from the credential
-
processAgreementParameters
private void processAgreementParameters(@Nonnull KeyInfo keyInfo, @Nonnull AgreementMethod agreementMethod, @Nonnull KeyAgreementCredential credential) throws SecurityException - Parameters:
keyInfo- the KeyInfo that is being builtagreementMethod- the AgreementMethod that is being builtcredential- the Credential that is being processed- Throws:
SecurityException- if there is a fatal error processing any agreement parameters
-
processOriginatorKeyInfo
private void processOriginatorKeyInfo(@Nonnull KeyInfo keyInfo, @Nonnull AgreementMethod agreementMethod, @Nonnull KeyAgreementCredential credential) throws SecurityException Process theKeyAgreementCredential.getOriginatorCredential().- Parameters:
keyInfo- the KeyInfo that is being builtagreementMethod- the AgreementMethod that is being builtcredential- the Credential that is being processed- Throws:
SecurityException- if there is a fatal error processing the originator KeyInfo
-
processRecipientKeyInfo
private void processRecipientKeyInfo(@Nonnull KeyInfo keyInfo, @Nonnull AgreementMethod agreementMethod, @Nonnull KeyAgreementCredential credential) throws SecurityException - Parameters:
keyInfo- the KeyInfo that is being builtagreementMethod- the AgreementMethod that is being builtcredential- the Credential that is being processed- Throws:
SecurityException- if there is a fatal error processing the recipient KeyInfo
-