From f773695c316f7e6a941b134f003a58b02c70afbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Fri, 20 Sep 2019 18:32:43 +0200 Subject: [PATCH] auth/gensec: fix non-AES schannel seal BUG: https://bugzilla.samba.org/show_bug.cgi?id=14134 Guenther Signed-off-by: Guenther Deschner --- auth/gensec/schannel.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/auth/gensec/schannel.c b/auth/gensec/schannel.c index 18ed92b703b..b5e6289ef3f 100644 --- a/auth/gensec/schannel.c +++ b/auth/gensec/schannel.c @@ -419,6 +419,15 @@ static NTSTATUS netsec_do_seal(struct schannel_state *state, ZERO_ARRAY(_sealing_key); return gnutls_error_to_ntstatus(rc, NT_STATUS_CRYPTO_SYSTEM_INVALID); } + gnutls_cipher_deinit(cipher_hnd); + rc = gnutls_cipher_init(&cipher_hnd, + GNUTLS_CIPHER_ARCFOUR_128, + &sealing_key, + NULL); + if (rc < 0) { + ZERO_ARRAY(_sealing_key); + return gnutls_error_to_ntstatus(rc, NT_STATUS_CRYPTO_SYSTEM_INVALID); + } rc = gnutls_cipher_encrypt(cipher_hnd, data, length); -- 2.21.0