summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/auth/gensec.c4
-rw-r--r--source4/libcli/auth/spnego.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index b6c4f91610..d9849276a6 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -314,6 +314,10 @@ NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security,
if (!gensec_security->ops->unseal_packet) {
return NT_STATUS_NOT_IMPLEMENTED;
}
+ if (!(gensec_security->want_features & GENSEC_WANT_SEAL)) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
return gensec_security->ops->unseal_packet(gensec_security, mem_ctx,
data, length,
whole_pdu, pdu_length,
diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c
index efe9ad675b..4409f5ea9d 100644
--- a/source4/libcli/auth/spnego.c
+++ b/source4/libcli/auth/spnego.c
@@ -108,7 +108,6 @@ static NTSTATUS gensec_spnego_check_packet(struct gensec_security *gensec_securi
{
struct spnego_state *spnego_state = gensec_security->private_data;
- return NT_STATUS_NOT_IMPLEMENTED;
if (spnego_state->state_position != SPNEGO_DONE
&& spnego_state->state_position != SPNEGO_FALLBACK) {
return NT_STATUS_INVALID_PARAMETER;
@@ -129,7 +128,6 @@ static NTSTATUS gensec_spnego_seal_packet(struct gensec_security *gensec_securit
{
struct spnego_state *spnego_state = gensec_security->private_data;
- return NT_STATUS_NOT_IMPLEMENTED;
if (spnego_state->state_position != SPNEGO_DONE
&& spnego_state->state_position != SPNEGO_FALLBACK) {
return NT_STATUS_INVALID_PARAMETER;