public class CVCertificate extends AbstractSequence implements Signable
CVC_VERSION, NEWLINE| Constructor and Description |
|---|
CVCertificate(CVCertificateBody body)
Creates an instance from a CVCertificateBody
|
| Modifier and Type | Method and Description |
|---|---|
protected CVCTagEnum[] |
getAllowedFields()
Returns tags for all allowed subfields, in the same order as they
appear when DER-encoded
|
CVCertificateBody |
getCertificateBody()
Returns the embedded CertificateBody
|
byte[] |
getSignature()
Returns the signature
|
byte[] |
getTBS()
Returns the data To Be Signed
|
void |
setSignature(byte[] signatureData)
Adds signature data
|
String |
toString()
Returns the certificate in text format
|
void |
verify(PublicKey key,
String provider)
Verifies the signature
|
encode, getAsText, getAsText, getDEREncoded, getEncodableFields, getOrderedSubfields, getSubfieldsdecodeLength, encodeLength, getAsText, getAsText, getParent, getTag, setParent, toByteArray, toByteArray, trimByteArraypublic CVCertificate(CVCertificateBody body) throws ConstructionException
body - IllegalArgumentException - if the argument is nullConstructionExceptionprotected CVCTagEnum[] getAllowedFields()
AbstractSequencegetAllowedFields in class AbstractSequencepublic void setSignature(byte[] signatureData)
throws ConstructionException
signatureData - ConstructionExceptionpublic CVCertificateBody getCertificateBody() throws NoSuchFieldException
NoSuchFieldExceptionpublic byte[] getSignature()
throws NoSuchFieldException
NoSuchFieldExceptionpublic byte[] getTBS()
throws ConstructionException
getTBS in interface SignableConstructionExceptionpublic String toString()
public void verify(PublicKey key, String provider) throws CertificateException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException
Copyright © 2021. All rights reserved.