|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.cms.SigningCertificateVerifier
Checks of the ESS signing-certificate attributes (RFC 2634 sec. 5.4, RFC 5035 sec. 3), which bind the certificate a signature is verified with into the signed attributes. CAdES requires one of them (RFC 5126 sec. 5.7.3); plain CMS does not.
A signature value on its own does not commit to the key that verifies it, so anything covering only the value, such
as a CAdES signature time-stamp or a CMS countersignature, covers the signer's certificate and the content only
when the signed attributes carry the certificate's hash and that hash is checked against the certificate the
signature verified under. verifySigningCertificate(SignerInformation, X509CertificateHolder,
DigestCalculatorProvider) is that check.
| Method Summary | |
static org.bouncycastle.asn1.ess.ESSCertIDv2[] |
getSigningCertificateIDs(SignerInformation signer)
Return the certificate identifiers the signer's signed attributes carry: the first ESSCertID of a signing-certificate attribute, as an ESSCertIDv2 naming SHA-1, and the first ESSCertIDv2 of a signing-certificate-v2 attribute. |
static void |
verifySigningCertificate(SignerInformation signer,
X509CertificateHolder cert,
DigestCalculatorProvider digCalcProv)
Check that the signer's signed attributes identify the given certificate: a signing-certificate or signing-certificate-v2 attribute must be present, each identifier's hash must be the digest of the certificate's encoding under the algorithm it names, and an issuerSerial, when present, must match the certificate's issuer and serial number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static org.bouncycastle.asn1.ess.ESSCertIDv2[] getSigningCertificateIDs(SignerInformation signer)
throws CMSException
signer - the signer to inspect.
CMSException - if an attribute is present but malformed or empty, or appears only among the unsigned
attributes, where RFC 5035 sec. 3 forbids it.
public static void verifySigningCertificate(SignerInformation signer,
X509CertificateHolder cert,
DigestCalculatorProvider digCalcProv)
throws CMSException
signer - the signer to check.cert - the certificate the signature verifies under.digCalcProv - source of digest calculators for the certificate hash.
CMSException - if the attribute is absent, malformed or in the wrong place, names a digest that is not
acceptable or cannot be calculated, or does not identify the certificate.
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||