Discussion:
getEncodedSignedAttributes() in org.bouncycastle.cms.SignerInformation class
Satoru Otsubo
2014-09-13 05:35:47 UTC
Permalink
Hi, all
I have a question about the method getEncodedSignedAttributes() in SignerInformation class.

API describes the following:
/**
* return the DER encoding of the signed attributes.
* @throws IOException if an encoding error occurs.
*/

But SignerInformation.java code is the following:
public byte[] getEncodedSignedAttributes()
throws IOException
{
if (signedAttributeSet != null)
{
return signedAttributesSet.getEncoded();
}
}

In case of DER encoding, for example,
return signedAttributesSet.getEncoded("DER"); ?

Thanks,
Satoru
David Hook
2014-09-13 08:15:28 UTC
Permalink
Yes, it should be getEncoded(ASN1Encoding.DER)

Thanks,

David
Post by Satoru Otsubo
Hi, all
I have a question about the method getEncodedSignedAttributes() in SignerInformation class.
/**
* return the DER encoding of the signed attributes.
*/
public byte[] getEncodedSignedAttributes()
throws IOException
{
if (signedAttributeSet != null)
{
return signedAttributesSet.getEncoded();
}
}
In case of DER encoding, for example,
return signedAttributesSet.getEncoded("DER"); ?
Thanks,
Satoru
Loading...