s4:samdb: Use generate_nonce_buffer() for AEC GCM nonce
authorAndreas Schneider <asn@samba.org>
Mon, 12 Aug 2019 16:56:35 +0000 (18:56 +0200)
committerAlexander Bokovoy <ab@samba.org>
Wed, 14 Aug 2019 15:07:24 +0000 (15:07 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source4/dsdb/samdb/ldb_modules/encrypted_secrets.c

index b2df15c08f4f2401a83c40dc1e57e55fb34dd864..deaa03cbb35c7e17e261e06419de4cf14f9f4a40 100644 (file)
@@ -447,7 +447,7 @@ static struct ldb_val samba_encrypt_aead(int *err,
                        goto error_exit;
                }
 
-               generate_random_buffer(iv, AES_GCM_128_IV_SIZE);
+               generate_nonce_buffer(iv, AES_GCM_128_IV_SIZE);
 
                es->iv.length = AES_GCM_128_IV_SIZE;
                es->iv.data   = iv;