1b819ceaGordon Ross/*
2b819ceaGordon Ross * This file and its contents are supplied under the terms of the
3b819ceaGordon Ross * Common Development and Distribution License ("CDDL"), version 1.0.
4b819ceaGordon Ross * You may only use this file in accordance with the terms of version
5b819ceaGordon Ross * 1.0 of the CDDL.
6b819ceaGordon Ross *
7b819ceaGordon Ross * A full copy of the text of the CDDL should have accompanied this
8b819ceaGordon Ross * source.  A copy of the CDDL is also available via the Internet at
9b819ceaGordon Ross * http://www.illumos.org/license/CDDL.
10b819ceaGordon Ross */
11b819ceaGordon Ross
12b819ceaGordon Ross/*
13b819ceaGordon Ross * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
14b819ceaGordon Ross */
15b819ceaGordon Ross
16b819ceaGordon Ross#include <cryptoutil.h>
17b819ceaGordon Ross
18b819ceaGordon Rossint
19b819ceaGordon Rossrandom_get_bytes(uint8_t *ptr, size_t len)
20b819ceaGordon Ross{
21b819ceaGordon Ross	return (pkcs11_get_random(ptr, len));
22b819ceaGordon Ross}
23b819ceaGordon Ross
24b819ceaGordon Rossint
25b819ceaGordon Rossrandom_get_pseudo_bytes(uint8_t *ptr, size_t len)
26b819ceaGordon Ross{
27b819ceaGordon Ross	return (pkcs11_get_urandom(ptr, len));
28b819ceaGordon Ross}
29