|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.xml.security.KeyContent
Class represents content of the KeyInfo
element and together
with KeyContentFactory
allows creating/verifying XML signature
with application defined KeyInfo
element.
The implemented KeyContent
s are :
Example of creating and using application defined KeyContent
:
// create KeyContent class that extends KeyContent public class MyKeyContent extends KeyContent{ public static final QName DUMMY_KEYCONTENT = new QName( "http://www.w3.org/2000/09/xmldsig#", "DummyKeyContent"); public RSAKeyContent() { qname = DUMMY_KEYCONTENT; } ... } // register it to the KeyContentFactory KeyContentFactory.registerKeyContent(new MyKeyContent()); ... // use KeyContent to create Signature: SignatureCreator creator = SignatureFactory.getInstance().getSignatureCreator(); creator.setKeyContentData(DUMMY_KEYCONTENT, null); // needn't any additional data Tokenizer sign = creator.createSignature(...);
Field Summary | |
static QName |
ALL_KEYCONTENTS
When the properties are set for this QName, the propeties are valid for all KeyContent in the Signature. |
protected java.util.Map |
contentData
This map holds all additional neccessary information to construct KeyContent object. |
static QName |
DSA_KEYCONTENT
name of the DSAKeyContent |
static java.lang.String |
LICENSE_LOCATION_DEFFAULT_DOCUMENT
When constructing a LicenseLocation KeyContent for verifying Signature, this property must be set to a Tokenizer object in the contentData map. |
static QName |
LICENSE_LOCATION_KEYCONTENT
name of the LicenseLocation KeyContent |
static java.lang.String |
LICENSE_LOCATION_URI
When constructing a LicenseLocation KeyContent for creating Signature, this property must be set to some URI in the contentData map. |
static java.lang.String |
NO_CHECK_TRUSTED_CERTIFICATE
When this property is set to true , verifier doesn't check
whether the certificates in the signatures are trusted or not. |
protected QName |
qname
qualified name of this object |
static QName |
RSA_KEYCONTENT
name of the RSAKeyContent |
static QName |
X509CERTIFICATE_KEYCONTENT
name of the CertificateKeyContent |
Constructor Summary | |
KeyContent()
|
Method Summary | |
abstract void |
construct(java.lang.Object keyData)
Constructs KeyContent object from a given keyData that might be for example instance of java.security.PublicKey or java.security.cert.X509Certificate. |
abstract void |
construct(Tokenizer tokenizedKeyContent)
Constructs KeyContentObject from a given tokenizer. |
java.util.Map |
getContentData()
Returns the contentData member of this object. |
QName |
getName()
Returns a qualified name of this object. |
abstract java.security.PublicKey |
getPublicKey()
Returns a public key associated with this object. |
abstract KeyContent |
newInstance()
Returns a new instance of the KeyContent. |
void |
setContentData(java.util.Map contentData)
Sets a contentData member of this object to the given map. |
abstract java.lang.String |
toCanonicalXMLString(java.lang.String signaturePrefix)
Returns the canonical xml representation of this KeyContent object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final QName RSA_KEYCONTENT
public static final QName DSA_KEYCONTENT
public static final QName X509CERTIFICATE_KEYCONTENT
public static final QName LICENSE_LOCATION_KEYCONTENT
public static final QName ALL_KEYCONTENTS
public static final java.lang.String LICENSE_LOCATION_URI
public static final java.lang.String NO_CHECK_TRUSTED_CERTIFICATE
true
, verifier doesn't check
whether the certificates in the signatures are trusted or not.
Trusted certificate is a certificate that is stored WSO2 SOA Enablement Server server PStore
as trusted.
public static final java.lang.String LICENSE_LOCATION_DEFFAULT_DOCUMENT
protected java.util.Map contentData
setContentData
for further
information.
protected QName qname
Constructor Detail |
public KeyContent()
Method Detail |
public abstract void construct(java.lang.Object keyData) throws SignatureException
keyData
- an object that provides information about
PublicKey.
SignatureException
- Exceptionpublic abstract void construct(Tokenizer tokenizedKeyContent) throws SignatureException
tokenizedKeyContent
- a given tokenized KeyContent object.
SignatureException
- Exceptionpublic abstract java.lang.String toCanonicalXMLString(java.lang.String signaturePrefix) throws SignatureException
signaturePrefix
- prefix of the being created signature
SignatureException
- thrown when any error occurs.public abstract java.security.PublicKey getPublicKey() throws SignatureException
SignatureException
- Exceptionpublic abstract KeyContent newInstance()
public QName getName()
public void setContentData(java.util.Map contentData)
contentData
- a given map with additional datapublic java.util.Map getContentData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |