RE: Signature Validation on Expired certificate?
What would be the proper way to add a SigningTime attribute? I couldn’t find a class like that in the
BouncyCastle API.
I (naively) tried the following, but that does not seem to work…
Any hints anyone?
...
ASN1EncodableVector signedAttrs = new ASN1EncodableVector();
signedAttrs.add(new SigningTime(new Date()));
SMIMESignedGenerator gen = new SMIMESignedGenerator();
gen.addSigner(signingKey, signingCertificate,
SMIMESignedGenerator.DIGEST_SHA1,
new AttributeTable(signedAttrs), null);
...
private static class SigningTime
extends Attribute
{
public SigningTime(Date date) {
super(new DERObjectIdentifier("1.2.840.113549.1.9.5"),
new DERSet(
new DERTaggedObject(false, 1, new DERGeneralizedTime(date))));
}
}
Cheers,
Hes.
________________________________________
From: Jmanuel.Zaera@...
[mailto:Jmanuel.Zaera@...]
Sent: woensdag 14 juli 2004 9:24
To: dev-crypto@...
Subject: Re: [dev-crypto] Signature Validation on Expired certificate?
If you use authenticated attributes with SigningTime attribute then the signature verification should
not fail because the certificate was valid in the moment of signature.