1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00

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 18367c4235)
This commit is contained in:
Andrew Bartlett 2004-10-08 10:16:34 +00:00 committed by Gerald (Jerry) Carter
parent f210b98804
commit 59ef8de129

View File

@ -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;
}