summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
Diffstat (limited to 'auth')
-rw-r--r--auth/gensec/schannel.c9
1 files changed, 9 insertions, 0 deletions
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);