Fix compilation error since the introduction of UtcCalendar
This commit is contained in:
parent
688d7ea8d5
commit
d934912007
2 changed files with 3 additions and 4 deletions
|
@ -15,13 +15,12 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern crate clap;
|
|
||||||
use clap::{App, Arg};
|
use clap::{App, Arg};
|
||||||
use matter::cert;
|
use matter::cert;
|
||||||
use matter::tlv;
|
use matter::tlv;
|
||||||
|
use matter::utils::epoch::sys_utc_calendar;
|
||||||
use simple_logger::SimpleLogger;
|
use simple_logger::SimpleLogger;
|
||||||
use std::process;
|
use std::process;
|
||||||
use std::u8;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
SimpleLogger::new()
|
SimpleLogger::new()
|
||||||
|
@ -96,7 +95,7 @@ fn main() {
|
||||||
} else if m.is_present("as-asn1") {
|
} else if m.is_present("as-asn1") {
|
||||||
let mut asn1_cert = [0_u8; 1024];
|
let mut asn1_cert = [0_u8; 1024];
|
||||||
let cert = cert::Cert::new(&tlv_list[..index]).unwrap();
|
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]);
|
println!("{:02x?}", &asn1_cert[..len]);
|
||||||
} else {
|
} else {
|
||||||
tlv::print_tlv_list(&tlv_list[..index]);
|
tlv::print_tlv_list(&tlv_list[..index]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue