|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.verisign.epp.codec.signedMark.EPPSignedMark
public class EPPSignedMark
Class for the signed mark, which contains the mark (EPPMark
), and
additional elements associated with the signing of the mark like the serial
number of the signed mark, the expiration of the signed mark, and the
XMLSignature
itself.
Field Summary | |
---|---|
static java.lang.String |
ELM_ENCODED_SIGNED_MARK_LOCALNAME
Constant for the mark local name for signedMark element |
static java.lang.String |
ELM_ENCODED_SIGNED_MARK_NAME
Constant for the mark tag for signedMark element |
static java.lang.String |
ELM_SIGNED_MARK_LOCALNAME
Constant for the mark local name for signedMark element |
static java.lang.String |
ELM_SIGNED_MARK_NAME
Constant for the mark tag for signedMark element |
static java.lang.String |
NS
Namespace URI associated with EPPLaunchExtFactory. |
static java.lang.String |
NS_PREFIX
Namespace prefix associated with EPPLaunchExtFactory. |
static java.lang.String |
NS_SCHEMA
XML Schema definition for EPPLaunchExtFactory |
Constructor Summary | |
---|---|
EPPSignedMark()
Create an EPPSignedMark instance. |
|
EPPSignedMark(java.lang.String aId,
EPPIssuer aIssuer,
java.util.Date aNotBefore,
java.util.Date aNotAfter,
EPPMark aMark)
Create an EPPSignedMark with the id, issuer, not before
date, not after date, and the mark attributes of the signed mark. |
|
EPPSignedMark(java.lang.String aId,
EPPIssuer aIssuer,
java.util.Date aNotBefore,
java.util.Date aNotAfter,
EPPMark aMark,
boolean aBase64Encoded)
Create an EPPSignedMark will all of the attributes except
for the signature that must be generated by calling
sign(PrivateKey) . |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone EPPSignedMark . |
void |
decode(byte[] aSignedMarkArray)
Decode the EPPSignedMark attributes from the input
byte[] . |
void |
decode(org.w3c.dom.Element aElement)
Decode the EPPSignedMark component |
byte[] |
encode()
Encode the signed mark to a byte[] . |
org.w3c.dom.Element |
encode(org.w3c.dom.Document aDocument)
Sets all this instance's data in the given XML document |
boolean |
equals(java.lang.Object aObject)
implements a deep EPPSignedMark compare. |
java.lang.String |
getId()
Gets the identifier of the signed mark. |
EPPIssuer |
getIssuer()
Gets issuer of the signed mark. |
java.lang.String |
getLocalName()
Gets the XML local name for the signed mark. |
EPPMark |
getMark()
Gets the mark associated with the signed mark. |
java.util.Date |
getNotAfter()
Gets the date of expiration of the signed mark. |
java.util.Date |
getNotBefore()
Gets the date of creation of the signed mark. |
javax.xml.crypto.dsig.XMLSignature |
getSignature()
Gets the XMLSignature associated with the signed mark. |
org.w3c.dom.Element |
getSignatureElement()
The DOM Element of the XMLSignature . |
boolean |
isBase64Encode()
Gets if the signed mark should be encoded in Base64 with the <encodedSignedMark> root element. |
void |
setBase64Encode(boolean aBase64Encode)
Sets if the signed mark should be encoded in Base64 with the <encodedSignedMark> root element. |
void |
setId(java.lang.String aId)
Sets the identifier of the signed mark. |
void |
setIssuer(EPPIssuer aIssuer)
Sets the issuer of the signed mark. |
void |
setLocalName(java.lang.String aLocalName)
Sets the XML local name for the signed mark. |
void |
setMark(EPPMark aMark)
Sets the mark associated with the signed mark. |
void |
setNotAfter(java.util.Date aNotAfter)
Sets the date of expiration of the signed mark. |
void |
setNotBefore(java.util.Date aNotBefore)
Sets the date of creation of the signed mark. |
void |
sign(java.security.PrivateKey aPrivateKey)
Digitally sign the signed mark using the passed private key. |
void |
sign(java.security.PrivateKey aPrivateKey,
java.security.cert.Certificate[] aCertChain)
Digitally sign the signed mark using the passed private key and a chain of certificates. |
boolean |
validate(java.security.cert.PKIXParameters aPKIXParameters)
Validate the signature attribute against the signed mark attributes by using the public key of the certificate or the top certificate in the certificate chain contained in the XMLSignature with using
the passed PKIX parameters to the PKIX CertPathValidator
algorithm. |
boolean |
validate(java.security.cert.PKIXParameters aPKIXParameters,
boolean aSynchronizePKIXParameters)
Validate the signature attribute against the signed mark attributes by using the public key of the certificate or the top certificate in the certificate chain contained in the XMLSignature with using
the passed PKIX parameters to the PKIX CertPathValidator
algorithm. |
boolean |
validate(java.security.PublicKey aPublicKey)
Validate the signature attribute against the signed mark attributes. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NS
public static final java.lang.String NS_PREFIX
public static final java.lang.String NS_SCHEMA
public static final java.lang.String ELM_SIGNED_MARK_LOCALNAME
public static final java.lang.String ELM_SIGNED_MARK_NAME
public static final java.lang.String ELM_ENCODED_SIGNED_MARK_LOCALNAME
public static final java.lang.String ELM_ENCODED_SIGNED_MARK_NAME
Constructor Detail |
---|
public EPPSignedMark()
EPPSignedMark
instance. Use the setter methods to
set the attributes of the instance.
public EPPSignedMark(java.lang.String aId, EPPIssuer aIssuer, java.util.Date aNotBefore, java.util.Date aNotAfter, EPPMark aMark)
EPPSignedMark
with the id, issuer, not before
date, not after date, and the mark attributes of the signed mark. The
default encoding is XML and the signature must be generated by calling
sign(PrivateKey)
.
aId
- Identifier of signed markaIssuer
- Signed mark issuer informationaNotBefore
- Date and time that the signed mark was created.aNotAfter
- Date and time that the signed mark expires.aMark
- Mark informationpublic EPPSignedMark(java.lang.String aId, EPPIssuer aIssuer, java.util.Date aNotBefore, java.util.Date aNotAfter, EPPMark aMark, boolean aBase64Encoded)
EPPSignedMark
will all of the attributes except
for the signature that must be generated by calling
sign(PrivateKey)
.
aId
- Identifier of signed markaIssuer
- Signed mark issuer informationaNotBefore
- Date and time that the signed mark was created.aNotAfter
- OPTIONAL date and time that the mark expires. If set to
null
there is no expiration.aMark
- Mark informationaBase64Encoded
- Base64 encode the signed mark by enclosing in the
<encodedSignedMark> elementMethod Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPSignedMark
.
clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPSignedMark
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic void sign(java.security.PrivateKey aPrivateKey) throws EPPException
getSignature()
method. No certificates will
be added using this method. If certificates need to be added use
sign(PrivateKey, Certificate[])
.
aPrivateKey
- Private key used to sign the signed mark
EPPException
- Error creating the digital signaturepublic void sign(java.security.PrivateKey aPrivateKey, java.security.cert.Certificate[] aCertChain) throws EPPException
getSignature()
method.
aPrivateKey
- Private key used to sign the signed markaCertChain
- Certificate chain to include in the XMLSignature associated
with the private key. Pass null
to not include
the certificate chain in the XMLSignature.
EPPException
- Error creating the digital signaturepublic boolean validate(java.security.cert.PKIXParameters aPKIXParameters)
XMLSignature
with using
the passed PKIX parameters to the PKIX CertPathValidator
algorithm. The trust store can be loaded and used to create an instance
of PKIXParameters
to verify the certificate chain included
in the XMLSignature
with the trust anchors included in the
trust store. This method will automatically synchronize the
aPKIXParameters
parameter when used, since it is not
thread-safe. Use validate(PKIXParameters, boolean)
to explicitly
set the aPKIXParameters
synchronization setting.
aPKIXParameters
- Parameters used as input for the PKIX
CertPathValidator
algorithm.
true
if valid; false
otherwise.public boolean validate(java.security.cert.PKIXParameters aPKIXParameters, boolean aSynchronizePKIXParameters)
XMLSignature
with using
the passed PKIX parameters to the PKIX CertPathValidator
algorithm. The trust store can be loaded and used to create an instance
of PKIXParameters
to verify the certificate chain included
in the XMLSignature
with the trust anchors included in the
trust store.
aPKIXParameters
- Parameters used as input for the PKIX
CertPathValidator
algorithm.aSynchronizePKIXParameters
- Should the aPKIXParameters
be synchronized inside
the method? If there is no reason to synchronize, then
false
can be passed to increase performance.
true
if valid; false
otherwise.public boolean validate(java.security.PublicKey aPublicKey)
aPublicKey
- Public used to validate the signature
true
if valid; false
otherwise.public byte[] encode() throws EPPEncodeException
byte[]
.
EPPEncodeException
- Error encoding the signed markpublic org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encode
in interface EPPCodecComponent
aDocument
- a DOM Document to attach data to.
EPPEncodeException
- Thrown if any errors prevent encoding.public void decode(byte[] aSignedMarkArray) throws EPPDecodeException
EPPSignedMark
attributes from the input
byte[]
.
aSignedMarkArray
- byte[]
to decode the attribute values
EPPDecodeException
- Error decoding the byte[]
.public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
EPPSignedMark
component
decode
in interface EPPCodecComponent
aElement
- Root element of the EPPSignedMark
EPPDecodeException
- Error decoding the EPPSignedMark
public boolean equals(java.lang.Object aObject)
EPPSignedMark
compare.
equals
in class java.lang.Object
aObject
- EPPSignedMark
instance to compare with
public java.lang.String getLocalName()
ELM_SIGNED_MARK_LOCALNAME
or
ELM_ENCODED_SIGNED_MARK_LOCALNAME
public void setLocalName(java.lang.String aLocalName)
aLocalName
- Either ELM_SIGNED_MARK_LOCALNAME
or
ELM_ENCODED_SIGNED_MARK_LOCALNAME
public java.lang.String getId()
null
otherwise.public void setId(java.lang.String aId)
aId
- Identifier of the signed mark.public EPPIssuer getIssuer()
null
otherwise.public void setIssuer(EPPIssuer aIssuer)
aIssuer
- Issuer of the signed mark.public java.util.Date getNotBefore()
null
otherwise.public void setNotBefore(java.util.Date aNotBefore)
aNotBefore
- The date of creation of the signed markpublic java.util.Date getNotAfter()
null
otherwise.public void setNotAfter(java.util.Date aNotAfter)
aNotAfter
- The date of expiration of the signed markpublic EPPMark getMark()
null
otherwise.public void setMark(EPPMark aMark)
aMark
- Mark associated with the signed mark.public javax.xml.crypto.dsig.XMLSignature getSignature()
XMLSignature
associated with the signed mark.
XMLSignature
instance if set; null
otherwise.public org.w3c.dom.Element getSignatureElement()
Element
of the XMLSignature
.
Element
of the XMLSignature
if
set; null
otherwise.public boolean isBase64Encode()
false
.
true
if Base64 encode; false
otherwise.public void setBase64Encode(boolean aBase64Encode)
aBase64Encode
- true
to Base64 encode; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |