Sha256: 6689f4de9db942f6dd861c0dac4e8b6f98de8606907a64fda896f27d398d5d7e

Contents?: true

Size: 1.78 KB

Versions: 43

Compression:

Stored size: 1.78 KB

Contents

/* Copyright (c) 2020, 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. */

#ifndef OPENSSL_HEADER_CRYPTO_RAND_GETRANDOM_FILLIN_H
#define OPENSSL_HEADER_CRYPTO_RAND_GETRANDOM_FILLIN_H

#include <openssl/base.h>


#if defined(OPENSSL_LINUX)

#include <sys/syscall.h>

#if defined(OPENSSL_X86_64)
#define EXPECTED_NR_getrandom 318
#elif defined(OPENSSL_X86)
#define EXPECTED_NR_getrandom 355
#elif defined(OPENSSL_AARCH64)
#define EXPECTED_NR_getrandom 278
#elif defined(OPENSSL_ARM)
#define EXPECTED_NR_getrandom 384
#elif defined(OPENSSL_RISCV64)
#define EXPECTED_NR_getrandom 278
#endif

#if defined(EXPECTED_NR_getrandom)
#define USE_NR_getrandom

#if defined(__NR_getrandom)

#if __NR_getrandom != EXPECTED_NR_getrandom
#error "system call number for getrandom is not the expected value"
#endif

#else  // __NR_getrandom

#define __NR_getrandom EXPECTED_NR_getrandom

#endif  // __NR_getrandom

#endif  // EXPECTED_NR_getrandom

#if !defined(GRND_NONBLOCK)
#define GRND_NONBLOCK 1
#endif
#if !defined(GRND_RANDOM)
#define GRND_RANDOM 2
#endif

#endif  // OPENSSL_LINUX


#endif  // OPENSSL_HEADER_CRYPTO_RAND_GETRANDOM_FILLIN_H

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
couchbase-3.5.4 ext/cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.67.0 third_party/boringssl-with-bazel/src/crypto/rand_extra/getrandom_fillin.h
grpc-1.67.0.pre1 third_party/boringssl-with-bazel/src/crypto/rand_extra/getrandom_fillin.h
couchbase-3.5.3 ext/cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.66.0 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.66.0.pre5 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.66.0.pre3 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.58.3 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.59.5 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.60.2 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.61.3 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.62.3 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.63.2 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.64.3 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.65.2 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
couchbase-3.5.2 ext/cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.65.1 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.65.0 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.65.0.pre2 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h
grpc-1.65.0.pre1 third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h