MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / add_ext

Function add_ext

ra-tls/src/cert.rs:407–414  ·  view source on GitHub ↗
(params: &mut CertificateParams, oid: &[u64], content: impl AsRef<[u8]>)

Source from the content-addressed store, hash-verified

405}
406
407fn 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
416fn unix_time_to_system_time(secs: u64) -> SystemTime {
417 UNIX_EPOCH + Duration::from_secs(secs)

Callers 1

into_cert_paramsMethod · 0.85

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected