public class DefaultMessageSignatureImpl extends Object implements MessageSignature
| Constructor and Description |
|---|
DefaultMessageSignatureImpl(org.bouncycastle.cms.SignerInformation signer,
boolean useOrgCert,
X509Certificate cert)
Constructs a message signature from the singer info and the certificate used to sign the message.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkSignature()
Verifies if the signature is valid using the signature certificate.
|
boolean |
checkThumbprint(NHINDAddress messageSender)
Validates if the senders certificate matches the signature certificate using certificate thumb printing.
|
org.bouncycastle.cms.SignerInformation |
getSigner()
Gets the signer information for this specific signature.
|
X509Certificate |
getSignerCert()
Get the certificate used to sign the message for this specific signer.
|
boolean |
isSignatureValid()
Indicate if the signature has been validated for authenticity and consistency.
|
boolean |
isThumbprintVerified()
Indicates if the signature certificate has been verified against a senders certificate.
|
boolean |
isUseOrgCertificate()
Indicate if the certificate used to sign the message for this signer is an org level or individual level cert.
|
public DefaultMessageSignatureImpl(org.bouncycastle.cms.SignerInformation signer,
boolean useOrgCert,
X509Certificate cert)
signer - Information about the individual signature such as the signers id and algorithms used to sign.useOrgCert - Indicates if the certificate used is a org level or individual level certificatecert - The public certificate used to sign the message for this signer.public X509Certificate getSignerCert()
public boolean isSignatureValid()
public org.bouncycastle.cms.SignerInformation getSigner()
public boolean isUseOrgCertificate()
public boolean isThumbprintVerified()
public boolean checkSignature()
checkSignature in interface MessageSignaturepublic boolean checkThumbprint(NHINDAddress messageSender)
checkThumbprint in interface MessageSignaturemessageSender - The senders address. The address should contain the senders public certificate.Copyright © 2010-2016 NHIN Direct. All Rights Reserved.