(params: &mut CertificateParams, oid: &[u64], content: impl AsRef<[u8]>)
| 405 | } |
| 406 | |
| 407 | fn add_ext(params: &mut CertificateParams, oid: &[u64], content: impl AsRef<[u8]>) { |
| 408 | let content = yasna::construct_der(|writer| { |
| 409 | writer.write_bytes(content.as_ref()); |
| 410 | }); |
| 411 | params |
| 412 | .custom_extensions |
| 413 | .push(CustomExtension::from_oid_content(oid, content)); |
| 414 | } |
| 415 | |
| 416 | fn unix_time_to_system_time(secs: u64) -> SystemTime { |
| 417 | UNIX_EPOCH + Duration::from_secs(secs) |
no test coverage detected