All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][SMB3.1.1] Add defines for new signing context
@ 2020-10-11  1:25 Steve French
  2020-10-12  8:55 ` Stefan Metzmacher
  0 siblings, 1 reply; 9+ messages in thread
From: Steve French @ 2020-10-11  1:25 UTC (permalink / raw)
  To: CIFS; +Cc: samba-technical

[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]

Add defines for the three supported signing algorithms

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/smb2pdu.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 4dfb51dd7065..5932fc0dc62c 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -323,6 +323,7 @@ struct smb2_negotiate_req {
 #define SMB2_NETNAME_NEGOTIATE_CONTEXT_ID cpu_to_le16(5)
 #define SMB2_TRANSPORT_CAPABILITIES cpu_to_le16(6)
 #define SMB2_RDMA_TRANSFORM_CAPABILITIES cpu_to_le16(7)
+#define SMB2_SIGNING_CAPABILITIES cpu_to_le16(8)
 #define SMB2_POSIX_EXTENSIONS_AVAILABLE cpu_to_le16(0x100)

 struct smb2_neg_context {
@@ -416,6 +417,19 @@ struct smb2_rdma_transform_capabilities_context {
  __le16 RDMATransformIds[1];
 } __packed;

+/* Signing algorithms */
+#define SIGNING_ALG_HMAC_SHA256 0
+#define SIGNING_ALG_AES_CMAC 1
+#define SIGNING_ALG_AES_GMAC 2
+
+struct smb2_signing_capabilities {
+ __le16 ContextType; /* 8 */
+ __le16 DataLength;
+ __u32 Reserved;
+ __le16 SigningAlgorithmCount;
+ __le16 SigningAlgorithms[];
+} __packed;
+
 #define POSIX_CTXT_DATA_LEN 16
 struct smb2_posix_neg_context {
  __le16 ContextType; /* 0x100 */
-- 
Thanks,

Steve

[-- Attachment #2: 0001-SMB3.1.1-add-defines-for-new-signing-negotiate-conte.patch --]
[-- Type: text/x-patch, Size: 1446 bytes --]

From e913b52c8903ff4488ab587ca2e475608e405b24 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Sat, 10 Oct 2020 20:11:47 -0500
Subject: [PATCH] SMB3.1.1: add defines for new signing negotiate context

Currently there are three supported signing algorithms

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/smb2pdu.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 4dfb51dd7065..5932fc0dc62c 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -323,6 +323,7 @@ struct smb2_negotiate_req {
 #define SMB2_NETNAME_NEGOTIATE_CONTEXT_ID	cpu_to_le16(5)
 #define SMB2_TRANSPORT_CAPABILITIES		cpu_to_le16(6)
 #define SMB2_RDMA_TRANSFORM_CAPABILITIES	cpu_to_le16(7)
+#define SMB2_SIGNING_CAPABILITIES		cpu_to_le16(8)
 #define SMB2_POSIX_EXTENSIONS_AVAILABLE		cpu_to_le16(0x100)
 
 struct smb2_neg_context {
@@ -416,6 +417,19 @@ struct smb2_rdma_transform_capabilities_context {
 	__le16	RDMATransformIds[1];
 } __packed;
 
+/* Signing algorithms */
+#define SIGNING_ALG_HMAC_SHA256	0
+#define SIGNING_ALG_AES_CMAC	1
+#define SIGNING_ALG_AES_GMAC	2
+
+struct smb2_signing_capabilities {
+	__le16	ContextType; /* 8 */
+	__le16	DataLength;
+	__u32	Reserved;
+	__le16	SigningAlgorithmCount;
+	__le16	SigningAlgorithms[];
+} __packed;
+
 #define POSIX_CTXT_DATA_LEN	16
 struct smb2_posix_neg_context {
 	__le16	ContextType; /* 0x100 */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-10  8:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11  1:25 [PATCH][SMB3.1.1] Add defines for new signing context Steve French
2020-10-12  8:55 ` Stefan Metzmacher
2020-10-12  9:50   ` Aurélien Aptel
2020-10-15 18:15     ` Tom Talpey
2020-10-16  4:50       ` Steve French
2020-10-16  5:49         ` Steve French
2020-10-16  6:11           ` ronnie sahlberg
2020-10-16 14:27             ` Tom Talpey
2020-11-10  8:42       ` Stefan Metzmacher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.