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
Hello, I'm currently trying to implement parsing of a certificate blob that Panda3D uses, and it's proving rather difficult with RustCrypto's implementation.
Basically, the format doesn't store the length so I have no way of determining how long each certificate in the blob is without actually parsing it, and the default way that from_der works is it calls SliceReader::finish which returns an error about TrailingData instead of the finished certificate and all leftover data, which means I can't make a nice loop to parse through like I could with d2i_X509 (which is what the original implementation uses).
For now, I've implemented it by creating my own Certificate that just keeps the remaining length as part of the struct:
The text was updated successfully, but these errors were encountered:
tarcieri
changed the title
der/x509-cert: Provide from_der that doesn't error on trailing data
der: Provide from_der that doesn't error on trailing data
Aug 18, 2024
Hello, I'm currently trying to implement parsing of a certificate blob that Panda3D uses, and it's proving rather difficult with RustCrypto's implementation.
Basically, the format doesn't store the length so I have no way of determining how long each certificate in the blob is without actually parsing it, and the default way that from_der works is it calls SliceReader::finish which returns an error about TrailingData instead of the finished certificate and all leftover data, which means I can't make a nice loop to parse through like I could with d2i_X509 (which is what the original implementation uses).
For now, I've implemented it by creating my own Certificate that just keeps the remaining length as part of the struct:
The text was updated successfully, but these errors were encountered: