Fix compilation error since the introduction of UtcCalendar

This commit is contained in:
ivmarkov 2023-04-24 09:44:44 +00:00
parent 117c36ee61
commit c594cf1c55
2 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
matter-iot= { path = "../../matter" }
matter-iot = { path = "../../matter" }
log = {version = "0.4.14", features = ["max_level_trace", "release_max_level_warn"]}
simple_logger = "1.16.0"
clap = "2.34"

View file

@ -15,13 +15,12 @@
* limitations under the License.
*/
extern crate clap;
use clap::{App, Arg};
use matter::cert;
use matter::tlv;
use matter::utils::epoch::sys_utc_calendar;
use simple_logger::SimpleLogger;
use std::process;
use std::u8;
fn main() {
SimpleLogger::new()
@ -96,7 +95,7 @@ fn main() {
} else if m.is_present("as-asn1") {
let mut asn1_cert = [0_u8; 1024];
let cert = cert::Cert::new(&tlv_list[..index]).unwrap();
let len = cert.as_asn1(&mut asn1_cert).unwrap();
let len = cert.as_asn1(&mut asn1_cert, sys_utc_calendar).unwrap();
println!("{:02x?}", &asn1_cert[..len]);
} else {
tlv::print_tlv_list(&tlv_list[..index]);