Skip to content

Commit 30a3c94

Browse files
committed
Check that client auth is on when client is in CVM
1 parent 32ee1f4 commit 30a3c94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ impl<L: AttestationPlatform, R: AttestationPlatform> ProxyClient<L, R> {
216216
local_attestation_platform: L,
217217
remote_attestation_platform: R,
218218
) -> Self {
219+
if local_attestation_platform.is_cvm() && cert_and_key.is_none() {
220+
panic!("Client auth is required when the client is running in a CVM");
221+
}
222+
219223
let root_store = RootCertStore::from_iter(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
220224

221225
let client_config = if let Some(ref cert_and_key) = cert_and_key {

0 commit comments

Comments
 (0)