Task #3260
closed
Add GenericSignature for unrecognized signature type
Added by Anonymous about 9 years ago.
Updated over 8 years ago.
Description
When decoding a SignatureInfo, the library creates a subclass of Signature, such as Sha256WithRsaSignature. Right now, if the type of SignatureInfo is not recognized, the library throws a decoding exception. Instead, the library should create a GenericSignature (a new Signature subclass) which holds the encoding bytes so that the application can process it if possible. Likewise, the application can use GenericSignature to supply the encoding of a SignatureInfo unknown to the library.
- Status changed from New to In Progress
My apologies for losing track of this one. I reviewed and think this will work exactly like we need; if I understand the signature-info concept correctly, we encode all the bytes ourselves. Is the type code only for decoding then? Because your documentation makes it seem like only the signature-info blob matters.
Hi Andrew. Thanks for reviewing this. Yes, the type code is set when decoding the signature info. The setSignatureInfoEncoding method takes a typeCode parameter which is returned by getTypeCode(), but this is only "informational" for the application. The typeCode is not used when encoding the SignatureInfo (since the signature info encoding blob already has the type code). Is there something we could change to make this clearer?
No, it makes sense; I just wanted to confirm.
- Status changed from In Progress to Closed
GenericSignature support is merged to master in all libraries.
Also available in: Atom
PDF