OID as bytes #11

Closed
opened 2019-12-12 05:24:13 -08:00 by drahnr · 2 comments
drahnr commented 2019-12-12 05:24:13 -08:00 (Migrated from github.com)

I am currently looking into parsing some ASN1 strcuts with varyin OCTET STRING sub parts.

It would be super awesome if one could compare against byte slices directly for equality or get a to_vec() method to yield just OID part of the particular ASN1 block to be able to compare them.

If either of them would be a desired addition, I am happy to extend OID a little bit :)

I am currently looking into parsing some ASN1 strcuts with varyin OCTET STRING sub parts. It would be super awesome if one could compare against byte slices directly for equality or get a `to_vec()` method to yield just OID part of the particular ASN1 block to be able to compare them. If either of them would be a desired addition, I am happy to extend `OID` a little bit :)
acw commented 2019-12-12 09:23:52 -08:00 (Migrated from github.com)

Sounds very reasonable to me. I probably can't get to it in a little bit (maybe sometime late next week?), so if you want to send in a merge request with something like what you're looking for, I'm happy to take it.

Sounds very reasonable to me. I probably can't get to it in a little bit (maybe sometime late next week?), so if you want to send in a merge request with something like what you're looking for, I'm happy to take it.
drahnr commented 2019-12-13 12:32:19 -08:00 (Migrated from github.com)

So I realized that the blocks used by the rsa crate are actually the fully encoded der OIDs - not just the OID as bytes (see https://docs.rs/rsa/0.2.0/src/rsa/hash.rs.html#46-70 )
I went forward and implemented the as_raw() anyways in #12 , closing this to continue discussion there as needed :)

Thanks for creating this library!

So I realized that the blocks used by the `rsa` crate are actually the fully encoded der OIDs - not just the OID as bytes (see https://docs.rs/rsa/0.2.0/src/rsa/hash.rs.html#46-70 ) I went forward and implemented the `as_raw()` anyways in #12 , closing this to continue discussion there as needed :) Thanks for creating this library!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: acw/simple_asn1#11