summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-10-08 10:16:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:39 -0500
commit59ef8de1293e171e740e4aa9b9d16271859191d2 (patch)
tree5792e480386f9468456ca2d58182dd79ed14f6c1 /source4
parentf210b988049615f3f0caf6344b575e2b8f064edd (diff)
downloadsamba-59ef8de1293e171e740e4aa9b9d16271859191d2.tar.gz
samba-59ef8de1293e171e740e4aa9b9d16271859191d2.tar.bz2
samba-59ef8de1293e171e740e4aa9b9d16271859191d2.zip
r2859: It seems useful to allow the seal/unseal functions in gensec to pass
though to the sign/check_sig functions. Andrew Bartlett (This used to be commit 18367c4235cf16f3c2fee003153ec9b19b02aa9b)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/auth/gensec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index d9849276a6..5d8e3bbca4 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -315,6 +315,12 @@ NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security,
return NT_STATUS_NOT_IMPLEMENTED;
}
if (!(gensec_security->want_features & GENSEC_WANT_SEAL)) {
+ if (gensec_security->want_features & GENSEC_WANT_SIGN) {
+ return gensec_check_packet(gensec_security, mem_ctx,
+ data, length,
+ whole_pdu, pdu_length,
+ sig);
+ }
return NT_STATUS_INVALID_PARAMETER;
}
@@ -350,6 +356,12 @@ NTSTATUS gensec_seal_packet(struct gensec_security *gensec_security,
return NT_STATUS_NOT_IMPLEMENTED;
}
if (!(gensec_security->want_features & GENSEC_WANT_SEAL)) {
+ if (gensec_security->want_features & GENSEC_WANT_SIGN) {
+ return gensec_sign_packet(gensec_security, mem_ctx,
+ data, length,
+ whole_pdu, pdu_length,
+ sig);
+ }
return NT_STATUS_INVALID_PARAMETER;
}