Lines Matching refs:ctxt
569 static void decode_preauth_context(struct smb2_preauth_neg_context *ctxt)
571 unsigned int len = le16_to_cpu(ctxt->DataLength);
577 } else if (len < MIN_PREAUTH_CTXT_DATA_LEN + le16_to_cpu(ctxt->SaltLength)) {
581 if (le16_to_cpu(ctxt->HashAlgorithmCount) != 1)
583 if (ctxt->HashAlgorithms != SMB2_PREAUTH_INTEGRITY_SHA512)
588 struct smb2_compression_capabilities_context *ctxt)
590 unsigned int len = le16_to_cpu(ctxt->DataLength);
597 if (le16_to_cpu(ctxt->CompressionAlgorithmCount) != 1) {
601 if (le16_to_cpu(ctxt->CompressionAlgorithms[0]) > 3) {
605 server->compress_algorithm = ctxt->CompressionAlgorithms[0];
609 struct smb2_encryption_neg_context *ctxt)
611 unsigned int len = le16_to_cpu(ctxt->DataLength);
615 pr_warn_once("server sent bad crypto ctxt len\n");
619 if (le16_to_cpu(ctxt->CipherCount) != 1) {
623 cifs_dbg(FYI, "SMB311 cipher type:%d\n", le16_to_cpu(ctxt->Ciphers[0]));
625 if (ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES256_GCM) {
629 } else if (ctxt->Ciphers[0] == 0) {
643 } else if ((ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES128_CCM) &&
644 (ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES128_GCM) &&
645 (ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES256_GCM)) {
650 server->cipher_type = ctxt->Ciphers[0];