public class EntrustProofOfRA extends java.lang.Object implements ASN1Type
EntrustProofOfRA,
as defined by Entrust.
-- EntrustProofOfRASyntax ::= SIGNED {EntrustProofOfRAInfo}
EntrustProofOfRASyntax ::= SEQUENCE {
entrustProofOfRAInfo EntrustProofOfRAInfo,
algorithm AlgorithmIdentifier,
signature BIT STRING -- signature is on
-- entrustProofOfRAInfo encoding
}
entrustProofOfRA OBJECT-TYPE
SYNTAX EntrustProofOfRASyntax
ACCESS read-write
STATUS mandatory
::= { 2 16 840 1 114027 50 15 }
| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
oid
The object identifier for a
EntrustProofOfRA. |
| Constructor and Description |
|---|
EntrustProofOfRA(ASN1Object obj)
A constructor; create a new
EntrustProofOfRA by decoding the
provided ASN1Object. |
EntrustProofOfRA(EntrustProofOfRAInfo proofOfRAInfo,
AlgorithmID algorithm,
byte[] signature)
A constructor; creates a new
EntrustProofOfRA by
constructing it from the provided components. |
EntrustProofOfRA(EntrustProofOfRAInfo proofOfRAInfo,
java.security.PrivateKey raSigningKey,
AlgorithmID signatureAlg)
A constructor; creates a new
EntrustProofOfRA by generating
a signature over the provided EntrustProofOfRAInfo structure
the RA signing key and the indicated signature algorithm. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes an
EntrustProofOfRA from an ASN1Object. |
AlgorithmID |
getAlgorithm()
Returns the signature algorithm.
|
EntrustProofOfRAInfo |
getProofOfRAInfo()
Returns the proof of RA information that was signed.
|
byte[] |
getSignature()
Returns the signature.
|
ASN1Object |
toASN1Object()
Encodes this
EntrustProofOfRA object as an
ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
EntrustProofOfRA object. |
boolean |
verify(java.security.cert.X509Certificate raVerificationCert)
Verifies the signature using the indicated certificate.
|
public static final ObjectID oid
EntrustProofOfRA.public EntrustProofOfRA(EntrustProofOfRAInfo proofOfRAInfo, java.security.PrivateKey raSigningKey, AlgorithmID signatureAlg) throws java.security.InvalidKeyException, java.security.SignatureException, java.security.NoSuchAlgorithmException
EntrustProofOfRA by generating
a signature over the provided EntrustProofOfRAInfo structure
the RA signing key and the indicated signature algorithm.proofOfRAInfo - the proof of RA information to be signedraSigningKey - the RA signing key used to create the signaturesignatureAlg - the signature algorithm to be usedjava.security.NoSuchAlgorithmException - if an implementation of the specified signature algorithm
is not available through the JCAjava.security.InvalidKeyException - if the RA signing key is inappropriate for the signature
algorithm that was selectedjava.security.SignatureException - if an error occurs while generating the signaturejava.lang.IllegalArgumentException - if any of the parameters are nullpublic EntrustProofOfRA(EntrustProofOfRAInfo proofOfRAInfo, AlgorithmID algorithm, byte[] signature)
EntrustProofOfRA by
constructing it from the provided components.proofOfRAInfo - the EntrustProofOfRASyntax.entrustProofOfRAInfo
componentalgorithm - the EntrustProofOfRASyntax.algorithm componentsignature - the EntrustProofOfRASyntax.signature componentpublic EntrustProofOfRA(ASN1Object obj) throws CodingException
EntrustProofOfRA by decoding the
provided ASN1Object.
The ASN1Object must be an
EntrustProofOfRASyntax structure.
obj - the ASN.1 representation of an
EntrustProofOfRASyntax structureCodingException - thrown if an errors occurs while decoding the
ANS1Objectpublic EntrustProofOfRAInfo getProofOfRAInfo()
public AlgorithmID getAlgorithm()
public byte[] getSignature()
public boolean verify(java.security.cert.X509Certificate raVerificationCert)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException,
java.security.SignatureException
raVerificationCert - the RA verification certificatetrue if the signature verifies successfully,
false otherwise (data may have been tampered)java.security.NoSuchAlgorithmException - if an implementation of the signature algorithm is not available
through the JCAjava.security.InvalidKeyException - if the RA verification certificate contains a public key that is
inappropriate for the signature algorithmjava.security.SignatureException - if an error occurs while verifying the signature (signature may have
been tampered)java.lang.IllegalArgumentException - if the RA verification certificate is nullpublic void decode(ASN1Object obj) throws CodingException
EntrustProofOfRA from an ASN1Object.
The ASN1Object must an EntrustProofOfRASyntax
structure.
decode in interface ASN1Typeobj - an ASN.1 representation of an EntrustProofOfRASyntax
structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic ASN1Object toASN1Object()
EntrustProofOfRA object as an
ASN1Object.
toASN1Object in interface ASN1TypeEntrustProofOfRASyntax
structurepublic java.lang.String toString()
EntrustProofOfRA object.
toString in class java.lang.Object