Sha256: 9410494f07da56dc700ccd46b5b32ff26b18e8f3fdb6790da6754f0da7c1a048

Contents?: true

Size: 1.22 KB

Versions: 36

Compression:

Stored size: 1.22 KB

Contents

/* Copyright (c) 2023, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */

#include <openssl/rand.h>

#include "../fipsmodule/rand/internal.h"

#if defined(OPENSSL_RAND_TRUSTY)
#include <stdint.h>
#include <stdlib.h>

#include <sys/types.h>
#include <uapi/err.h>

#include <lib/rng/trusty_rng.h>

void CRYPTO_sysrand(uint8_t *out, size_t requested) {
  if (trusty_rng_hw_rand(out, requested) != NO_ERROR) {
    abort();
  }
}

void CRYPTO_sysrand_for_seed(uint8_t *out, size_t requested) {
  CRYPTO_sysrand(out, requested);
}

#endif  // OPENSSL_RAND_TRUSTY

Version data entries

36 entries across 36 versions & 3 rubygems

Version Path
aws-crt-0.4.0 aws-crt-ffi/crt/aws-lc/crypto/rand_extra/trusty.c
couchbase-3.5.4 ext/cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/crypto/rand_extra/trusty.c
aws-crt-0.3.0 aws-crt-ffi/crt/aws-lc/crypto/rand_extra/trusty.c
couchbase-3.5.3 ext/cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/crypto/rand_extra/trusty.c
grpc-1.66.0 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.66.0.pre5 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.66.0.pre3 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.58.3 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.59.5 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.60.2 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.61.3 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.62.3 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.63.2 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.64.3 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.65.2 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
couchbase-3.5.2 ext/cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/crypto/rand_extra/trusty.c
grpc-1.65.1 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.65.0 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.65.0.pre2 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c
grpc-1.65.0.pre1 third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c