summaryrefslogtreecommitdiff
path: root/test/tpm_test/testlib/common.c
blob: 46d0e203a79f6d53d0716d854c1dcc47559d0b89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Copyright 2016 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "common.h"

#include <assert.h>
#include <stdlib.h>
#include <string.h>

#include <openssl/rand.h>

void rand_bytes(void *buf, size_t num)
{
	assert(RAND_bytes(buf, num) == 1);
}