s3:smbd: Use generate_nonce_buffer() for AES-CCM and AES-GCM nonce
authorAndreas Schneider <asn@samba.org>
Wed, 31 Jul 2019 13:28:34 +0000 (15:28 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 12 Aug 2019 09:23:40 +0000 (09:23 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/smbd/smb2_sesssetup.c

index 770c22b00f13273e360e8e8d68c33c63021d7885..591d5c37160fb49d125ba18bc8e2c5f02066cf37 100644 (file)
@@ -419,8 +419,8 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session,
                 *
                 * NOTE: We assume nonces greater than 8 bytes.
                 */
-               generate_random_buffer((uint8_t *)&x->nonce_high_random,
-                                      sizeof(x->nonce_high_random));
+               generate_nonce_buffer((uint8_t *)&x->nonce_high_random,
+                                     sizeof(x->nonce_high_random));
                switch (xconn->smb2.server.cipher) {
                case SMB2_ENCRYPTION_AES128_CCM:
                        nonce_size = AES_CCM_128_NONCE_SIZE;