Package org.opensaml.xmlsec.keyinfo.impl
Class X509KeyInfoGeneratorFactory
java.lang.Object
org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory
- All Implemented Interfaces:
KeyInfoGeneratorFactory
A factory implementation which produces instances of
KeyInfoGenerator capable of
handling the information contained within an X509Credential.
All boolean options default to false. The default implementation of X500DNHandler used is
InternalX500DNHandler. The default output format for subject and issuer DN's is RFC2253.
The default set of subject alternative names to process is empty.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAn implementation ofKeyInfoGeneratorcapable of handling the information contained within aX509Credential.protected classOptions to be used in the production of aKeyInfofrom anX509Credential.Nested classes/interfaces inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator, BasicKeyInfoGeneratorFactory.BasicOptions -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final X509KeyInfoGeneratorFactory.X509OptionsThe set of options configured for the factory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanemitCRLs()Get the option to emit the CRL list as sequence of X509CRL elements within X509Data.booleanGet the option to emit the entity certificate as an X509Certificate element within X509Data.booleanGet the option to emit the entity certificate chain as sequence of X509Certificate elements within X509Data.booleanGet the option to emit the entity certificate subject alternative name extension values as KeyName elements.booleanGet the option to emit the entity certificate subject DN common name (CN) fields as KeyName elements.booleanGet the option to emit the entity certificate subject DN as a KeyName element.booleanGet the option to emit the entity certificate digest as an X509Digest element within X509Data.booleanGet the option to emit the entity certificate issuer name and serial number as an X509IssuerSerial element within X509Data.booleanGet the option to emit the entity certificate subject key identifier as an X509SKI element within X509Data.booleanGet the option to emit the entity certificate subject DN as an X509SubjectName element within X509Data.Class<? extends Credential>protected X509KeyInfoGeneratorFactory.X509OptionsGet the options of this instance.The set of types of subject alternative names to process.Get the handler which process X.500 distinguished names.Get the output format specifier for X.500 issuer names.Get the output format specifier for X.500 subject names.Get the algorithm URI for X509Digest digests.booleanhandles(Credential credential) newInstance(Class<? extends KeyInfo> type) protected X509KeyInfoGeneratorFactory.X509OptionsGet a new instance to hold options.voidsetEmitCRLs(boolean newValue) Set the option to emit the CRL list as sequence of X509CRL elements within X509Data.voidsetEmitEntityCertificate(boolean newValue) Set the option to emit the entity certificate as an X509Certificate element within X509Data.voidsetEmitEntityCertificateChain(boolean newValue) Set the option to emit the entity certificate chain as sequence of X509Certificate elements within X509Data.voidsetEmitSubjectAltNamesAsKeyNames(boolean newValue) Set the option to emit the entity certificate subject alternative name extension values as KeyName elements.voidsetEmitSubjectCNAsKeyName(boolean newValue) Set the option to emit the entity certificate subject DN common name (CN) fields as KeyName elements.voidsetEmitSubjectDNAsKeyName(boolean newValue) Set the option to emit the entity certificate subject DN as a KeyName element.voidsetEmitX509Digest(boolean newValue) Set the option to emit the entity certificate digest as an X509Digest element within X509Data.voidsetEmitX509IssuerSerial(boolean newValue) Set the option to emit the entity certificate issuer name and serial number as an X509IssuerSerial element within X509Data.voidsetEmitX509SKI(boolean newValue) Set the option to emit the entity certificate subject key identifier as an X509SKI element within X509Data.voidsetEmitX509SubjectName(boolean newValue) Set the option to emit the entity certificate subject DN as an X509SubjectName element within X509Data.voidsetX500DNHandler(X500DNHandler handler) Set the handler which process X.500 distinguished names.voidsetX500IssuerDNFormat(String format) Set the output format specifier for X.500 issuer names.voidsetX500SubjectDNFormat(String format) Set the output format specifier for X.500 subject names.voidSet the algorithm URI for X509Digest digests.Methods inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
emitEntityIDAsKeyName, emitKeyNames, emitPublicDEREncodedKeyValue, emitPublicKeyValue, setEmitEntityIDAsKeyName, setEmitKeyNames, setEmitPublicDEREncodedKeyValue, setEmitPublicKeyValue
-
Field Details
-
options
The set of options configured for the factory.
-
-
Constructor Details
-
X509KeyInfoGeneratorFactory
public X509KeyInfoGeneratorFactory()Constructor.
-
-
Method Details
-
getCredentialType
- Specified by:
getCredentialTypein interfaceKeyInfoGeneratorFactory- Overrides:
getCredentialTypein classBasicKeyInfoGeneratorFactory
-
handles
- Specified by:
handlesin interfaceKeyInfoGeneratorFactory- Overrides:
handlesin classBasicKeyInfoGeneratorFactory
-
newInstance
- Specified by:
newInstancein interfaceKeyInfoGeneratorFactory- Overrides:
newInstancein classBasicKeyInfoGeneratorFactory
-
newInstance
- Specified by:
newInstancein interfaceKeyInfoGeneratorFactory- Overrides:
newInstancein classBasicKeyInfoGeneratorFactory
-
emitCRLs
public boolean emitCRLs()Get the option to emit the CRL list as sequence of X509CRL elements within X509Data.- Returns:
- the option value
-
setEmitCRLs
public void setEmitCRLs(boolean newValue) Set the option to emit the CRL list as sequence of X509CRL elements within X509Data.- Parameters:
newValue- the new option value
-
emitEntityCertificate
public boolean emitEntityCertificate()Get the option to emit the entity certificate as an X509Certificate element within X509Data.- Returns:
- the option value
-
setEmitEntityCertificate
public void setEmitEntityCertificate(boolean newValue) Set the option to emit the entity certificate as an X509Certificate element within X509Data.- Parameters:
newValue- the new option value
-
emitEntityCertificateChain
public boolean emitEntityCertificateChain()Get the option to emit the entity certificate chain as sequence of X509Certificate elements within X509Data.- Returns:
- the option value
-
setEmitEntityCertificateChain
public void setEmitEntityCertificateChain(boolean newValue) Set the option to emit the entity certificate chain as sequence of X509Certificate elements within X509Data.- Parameters:
newValue- the new option value
-
emitSubjectAltNamesAsKeyNames
public boolean emitSubjectAltNamesAsKeyNames()Get the option to emit the entity certificate subject alternative name extension values as KeyName elements.- Returns:
- the option value
-
setEmitSubjectAltNamesAsKeyNames
public void setEmitSubjectAltNamesAsKeyNames(boolean newValue) Set the option to emit the entity certificate subject alternative name extension values as KeyName elements.- Parameters:
newValue- the new option value
-
emitSubjectCNAsKeyName
public boolean emitSubjectCNAsKeyName()Get the option to emit the entity certificate subject DN common name (CN) fields as KeyName elements.- Returns:
- the option value
-
setEmitSubjectCNAsKeyName
public void setEmitSubjectCNAsKeyName(boolean newValue) Set the option to emit the entity certificate subject DN common name (CN) fields as KeyName elements.- Parameters:
newValue- the new option value
-
emitSubjectDNAsKeyName
public boolean emitSubjectDNAsKeyName()Get the option to emit the entity certificate subject DN as a KeyName element.- Returns:
- the option value
-
setEmitSubjectDNAsKeyName
public void setEmitSubjectDNAsKeyName(boolean newValue) Set the option to emit the entity certificate subject DN as a KeyName element.- Parameters:
newValue- the new option value
-
emitX509IssuerSerial
public boolean emitX509IssuerSerial()Get the option to emit the entity certificate issuer name and serial number as an X509IssuerSerial element within X509Data.- Returns:
- the option value
-
setEmitX509IssuerSerial
public void setEmitX509IssuerSerial(boolean newValue) Set the option to emit the entity certificate issuer name and serial number as an X509IssuerSerial element within X509Data.- Parameters:
newValue- the new option value
-
emitX509SKI
public boolean emitX509SKI()Get the option to emit the entity certificate subject key identifier as an X509SKI element within X509Data.- Returns:
- the option value
-
setEmitX509SKI
public void setEmitX509SKI(boolean newValue) Set the option to emit the entity certificate subject key identifier as an X509SKI element within X509Data.- Parameters:
newValue- the new option value
-
emitX509Digest
public boolean emitX509Digest()Get the option to emit the entity certificate digest as an X509Digest element within X509Data.- Returns:
- the option value
-
setEmitX509Digest
public void setEmitX509Digest(boolean newValue) Set the option to emit the entity certificate digest as an X509Digest element within X509Data.- Parameters:
newValue- the new option value
-
getX509DigestAlgorithmURI
Get the algorithm URI for X509Digest digests. Defaults to SHA-256.- Returns:
- returns the digest algorithm URI
-
setX509DigestAlgorithmURI
Set the algorithm URI for X509Digest digests. Defaults to SHA-256.- Parameters:
alg- the new digest algorithmURI
-
emitX509SubjectName
public boolean emitX509SubjectName()Get the option to emit the entity certificate subject DN as an X509SubjectName element within X509Data.- Returns:
- the option value
-
setEmitX509SubjectName
public void setEmitX509SubjectName(boolean newValue) Set the option to emit the entity certificate subject DN as an X509SubjectName element within X509Data.- Parameters:
newValue- the new option value
-
getSubjectAltNames
The set of types of subject alternative names to process. Name types are represented using the constant OID tag name values defined inX509Support.- Returns:
- the modifiable set of alt name identifiers
-
getX500DNHandler
Get the handler which process X.500 distinguished names. Defaults toInternalX500DNHandler.- Returns:
- returns the X500DNHandler instance
-
setX500DNHandler
Set the handler which process X.500 distinguished names. Defaults toInternalX500DNHandler.- Parameters:
handler- the new X500DNHandler instance
-
getX500SubjectDNFormat
Get the output format specifier for X.500 subject names. Defaults to RFC2253 format. The meaning of this format specifier value is dependent upon the implementation ofX500DNHandlerwhich is used.- Returns:
- returns the format specifier
-
setX500SubjectDNFormat
Set the output format specifier for X.500 subject names. Defaults to RFC2253 format. The meaning of this format specifier value is dependent upon the implementation ofX500DNHandlerwhich is used.- Parameters:
format- the new X500DNHandler instance
-
getX500IssuerDNFormat
Get the output format specifier for X.500 issuer names. Defaults to RFC2253 format. The meaning of this format specifier value is dependent upon the implementation ofX500DNHandlerwhich is used.- Returns:
- returns the format specifier
-
setX500IssuerDNFormat
Set the output format specifier for X.500 issuer names. Defaults to RFC2253 format. The meaning of this format specifier value is dependent upon the implementation ofX500DNHandlerwhich is used.- Parameters:
format- the new X500DNHandler instance
-
getOptions
Get the options of this instance. Used by subclass constructors to get the options built by the top-level class constructor withBasicKeyInfoGeneratorFactory.newOptions().- Overrides:
getOptionsin classBasicKeyInfoGeneratorFactory- Returns:
- the options instance
-
newOptions
Get a new instance to hold options. Used by the top-level superclass constructor. Subclasses MUST override to produce an instance of the appropriate subclass ofBasicKeyInfoGeneratorFactory.BasicOptions.- Overrides:
newOptionsin classBasicKeyInfoGeneratorFactory- Returns:
- a new instance of factory/generator options
-