Lines Matching defs:pneg_ctxt

777 static void build_preauth_ctxt(struct smb2_preauth_neg_context *pneg_ctxt,
780 pneg_ctxt->ContextType = SMB2_PREAUTH_INTEGRITY_CAPABILITIES;
781 pneg_ctxt->DataLength = cpu_to_le16(38);
782 pneg_ctxt->HashAlgorithmCount = cpu_to_le16(1);
783 pneg_ctxt->Reserved = cpu_to_le32(0);
784 pneg_ctxt->SaltLength = cpu_to_le16(SMB311_SALT_SIZE);
785 get_random_bytes(pneg_ctxt->Salt, SMB311_SALT_SIZE);
786 pneg_ctxt->HashAlgorithms = hash_id;
789 static void build_encrypt_ctxt(struct smb2_encryption_neg_context *pneg_ctxt,
792 pneg_ctxt->ContextType = SMB2_ENCRYPTION_CAPABILITIES;
793 pneg_ctxt->DataLength = cpu_to_le16(4);
794 pneg_ctxt->Reserved = cpu_to_le32(0);
795 pneg_ctxt->CipherCount = cpu_to_le16(1);
796 pneg_ctxt->Ciphers[0] = cipher_type;
799 static void build_sign_cap_ctxt(struct smb2_signing_capabilities *pneg_ctxt,
802 pneg_ctxt->ContextType = SMB2_SIGNING_CAPABILITIES;
803 pneg_ctxt->DataLength =
806 pneg_ctxt->Reserved = cpu_to_le32(0);
807 pneg_ctxt->SigningAlgorithmCount = cpu_to_le16(1);
808 pneg_ctxt->SigningAlgorithms[0] = sign_algo;
811 static void build_posix_ctxt(struct smb2_posix_neg_context *pneg_ctxt)
813 pneg_ctxt->ContextType = SMB2_POSIX_EXTENSIONS_AVAILABLE;
814 pneg_ctxt->DataLength = cpu_to_le16(POSIX_CTXT_DATA_LEN);
816 pneg_ctxt->Name[0] = 0x93;
817 pneg_ctxt->Name[1] = 0xAD;
818 pneg_ctxt->Name[2] = 0x25;
819 pneg_ctxt->Name[3] = 0x50;
820 pneg_ctxt->Name[4] = 0x9C;
821 pneg_ctxt->Name[5] = 0xB4;
822 pneg_ctxt->Name[6] = 0x11;
823 pneg_ctxt->Name[7] = 0xE7;
824 pneg_ctxt->Name[8] = 0xB4;
825 pneg_ctxt->Name[9] = 0x23;
826 pneg_ctxt->Name[10] = 0x83;
827 pneg_ctxt->Name[11] = 0xDE;
828 pneg_ctxt->Name[12] = 0x96;
829 pneg_ctxt->Name[13] = 0x8B;
830 pneg_ctxt->Name[14] = 0xCD;
831 pneg_ctxt->Name[15] = 0x7C;
837 char * const pneg_ctxt = (char *)rsp +
844 build_preauth_ctxt((struct smb2_preauth_neg_context *)pneg_ctxt,
854 (pneg_ctxt + ctxt_size),
868 (pneg_ctxt + ctxt_size));
878 (pneg_ctxt + ctxt_size),
889 struct smb2_preauth_neg_context *pneg_ctxt,
900 if (pneg_ctxt->HashAlgorithms != SMB2_PREAUTH_INTEGRITY_SHA512)
908 struct smb2_encryption_neg_context *pneg_ctxt,
921 cph_cnt = le16_to_cpu(pneg_ctxt->CipherCount);
934 if (pneg_ctxt->Ciphers[i] == SMB2_ENCRYPTION_AES128_GCM ||
935 pneg_ctxt->Ciphers[i] == SMB2_ENCRYPTION_AES128_CCM ||
936 pneg_ctxt->Ciphers[i] == SMB2_ENCRYPTION_AES256_CCM ||
937 pneg_ctxt->Ciphers[i] == SMB2_ENCRYPTION_AES256_GCM) {
939 pneg_ctxt->Ciphers[i]);
940 conn->cipher_type = pneg_ctxt->Ciphers[i];
966 struct smb2_compression_capabilities_context *pneg_ctxt)
972 struct smb2_signing_capabilities *pneg_ctxt,
984 sign_algo_cnt = le16_to_cpu(pneg_ctxt->SigningAlgorithmCount);
994 if (pneg_ctxt->SigningAlgorithms[i] == SIGNING_ALG_HMAC_SHA256_LE ||
995 pneg_ctxt->SigningAlgorithms[i] == SIGNING_ALG_AES_CMAC_LE) {
997 pneg_ctxt->SigningAlgorithms[i]);
1000 pneg_ctxt->SigningAlgorithms[i];