Skip to content

Commit 4660118

Browse files
address build fails
1 parent 169886b commit 4660118

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

nvml-wrapper/src/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,8 @@ impl<'nvml> Device<'nvml> {
770770
Ok(ConfidentialComputeGpuCertificate {
771771
cert_chain_size: certificate_chain.certChainSize,
772772
attestation_cert_chain_size: certificate_chain.attestationCertChainSize,
773-
cert_chain: certificate_chain.certChain,
774-
attestation_cert_chain: certificate_chain.attestationCertChain,
773+
cert_chain: certificate_chain.certChain.to_vec(),
774+
attestation_cert_chain: certificate_chain.attestationCertChain.to_vec(),
775775
})
776776
}
777777
}

nvml-wrapper/src/structs/device.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#[cfg(target_os = "windows")]
22
use crate::enum_wrappers::device::DriverModel;
33
use crate::enum_wrappers::device::OperationMode;
4-
use ffi::bindings::{NVML_GPU_ATTESTATION_CERT_CHAIN_SIZE, NVML_GPU_CERT_CHAIN_SIZE};
54
#[cfg(feature = "serde")]
65
use serde_derive::{Deserialize, Serialize};
76

@@ -53,10 +52,12 @@ pub struct ConfidentialComputeGpuCertificate {
5352
pub cert_chain_size: u32,
5453
/// The size of the attestation certificate chain.
5554
pub attestation_cert_chain_size: u32,
56-
/// The certificate chain.
57-
pub cert_chain: [u8; NVML_GPU_CERT_CHAIN_SIZE],
58-
/// The attestation certificate chain.
59-
pub attestation_cert_chain: [u8; NVML_GPU_ATTESTATION_CERT_CHAIN_SIZE],
55+
/// The certificate chain, of size
56+
/// `ffi::bindings::NVML_GPU_CERT_CHAIN_SIZE` == 4096 bytes.
57+
pub cert_chain: Vec<u8>,
58+
/// The attestation certificate chain, of size
59+
/// `ffi::bindings::NVML_GPU_ATTESTATION_CERT_CHAIN_SIZE` == 5120 bytes.
60+
pub attestation_cert_chain: Vec<u8>,
6061
}
6162

6263
/// Returned from `Device.gpu_operation_mode()`

0 commit comments

Comments
 (0)