Lines Matching refs:ctxt
757 static void decode_preauth_context(struct smb2_preauth_neg_context *ctxt)
759 unsigned int len = le16_to_cpu(ctxt->DataLength);
768 } else if (len < MIN_PREAUTH_CTXT_DATA_LEN + le16_to_cpu(ctxt->SaltLength)) {
772 if (le16_to_cpu(ctxt->HashAlgorithmCount) != 1)
774 if (ctxt->HashAlgorithms != SMB2_PREAUTH_INTEGRITY_SHA512)
779 struct smb2_compression_capabilities_context *ctxt)
781 unsigned int len = le16_to_cpu(ctxt->DataLength);
792 if (le16_to_cpu(ctxt->CompressionAlgorithmCount) != 1) {
796 if (le16_to_cpu(ctxt->CompressionAlgorithms[0]) > 3) {
800 server->compress_algorithm = ctxt->CompressionAlgorithms[0];
804 struct smb2_encryption_neg_context *ctxt)
806 unsigned int len = le16_to_cpu(ctxt->DataLength);
815 pr_warn_once("server sent bad crypto ctxt len\n");
819 if (le16_to_cpu(ctxt->CipherCount) != 1) {
823 cifs_dbg(FYI, "SMB311 cipher type:%d\n", le16_to_cpu(ctxt->Ciphers[0]));
825 if (ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES256_GCM) {
829 } else if (ctxt->Ciphers[0] == 0) {
843 } else if ((ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES128_CCM) &&
844 (ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES128_GCM) &&
845 (ctxt->Ciphers[0] != SMB2_ENCRYPTION_AES256_GCM)) {
850 server->cipher_type = ctxt->Ciphers[0];