You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a SignedData object from CMS and I decode bytes and validate all the fields one by one like in the tests. I also need to get the bytes of the certificate from the certificates and give it to boring for signature validation. I would not like to encode the parsed certificate again because I can't be sure if the encoded certificate will be the same as the parsed certificate.
It is possible to get into the bytes and parse it with some helper functions and get the certificate myself, but I would prefer to use rasn, is it possible to get the underlying bytes, just like the Content inside ContentInfo, i.e. using a function similar to as_bytes(), or what is the recommended way to get the bytes of a parsed object?
The text was updated successfully, but these errors were encountered:
To answer this, yes you can be sure that the encoding will match the input. DER is canonical meaning there is only one representation for it, if it was different then it would be a bug.
I have a SignedData object from CMS and I decode bytes and validate all the fields one by one like in the tests. I also need to get the bytes of the certificate from the certificates and give it to boring for signature validation. I would not like to encode the parsed certificate again because I can't be sure if the encoded certificate will be the same as the parsed certificate.
It is possible to get into the bytes and parse it with some helper functions and get the certificate myself, but I would prefer to use rasn, is it possible to get the underlying bytes, just like the Content inside ContentInfo, i.e. using a function similar to
as_bytes()
, or what is the recommended way to get the bytes of a parsed object?The text was updated successfully, but these errors were encountered: