uint16_t security_mode;
struct GUID guid;
struct smb311_capabilities smb3_capabilities;
+ bool requested_transport_level_security;
} client;
struct {
}
}
+ if (conn->smb2.server.transport_trusted) {
+ /*
+ * We as a client agreed with the server that quic
+ * encryption is enough
+ */
+ state->smb2.should_encrypt = false;
+ }
+
if (state->smb2.should_encrypt) {
state->smb2.should_sign = false;
}
verify_peer = conn->transport->verify_peer;
- if (tstream_tls_verify_peer_trusted(verify_peer)) {
+ if (tstream_tls_verify_peer_trusted(verify_peer) &&
+ !conn->smb2.client.smb3_capabilities
+ .smb_encryption_over_quic)
+ {
uint8_t cap_buf[sizeof(uint32_t)];
PUSH_LE_U32(cap_buf,
if (!NT_STATUS_IS_OK(status)) {
return NULL;
}
+ conn->smb2.client
+ .requested_transport_level_security = true;
}
ok = convert_string_talloc(state,
conn->smb2.server.cipher = cipher_selected;
}
- transport_caps = smb2_negotiate_context_find(
- state->out_ctx, SMB2_TRANSPORT_CAPABILITIES);
+ if (conn->smb2.client.requested_transport_level_security) {
+ transport_caps = smb2_negotiate_context_find(
+ state->out_ctx, SMB2_TRANSPORT_CAPABILITIES);
+ }
if (transport_caps != NULL) {
uint32_t caps;