Skip to content

Commit

Permalink
chore: add comment on TLV length
Browse files Browse the repository at this point in the history
  • Loading branch information
bkioshn committed May 2, 2024
1 parent de1366a commit 3bad134
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions catalyst-gateway/crates/c509-certificate/src/der.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ fn bytes_to_u64(bytes: &[u8]) -> u64 {
mod tests {

use super::*;

// Long form length
// 0x30 indicates tag for SEQUENCE
// 0x82 indicates long form length with N = 2
// 0x01, 0x38 indicates length of 312
const CERT: [u8; 316] = [
0x30, 0x82, 0x01, 0x38, 0x30, 0x81, 0xde, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x03, 0x01,
0xf5, 0x0d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30,
Expand Down

0 comments on commit 3bad134

Please sign in to comment.