Version bump

This commit is contained in:
Hakase
2018-04-27 20:47:40 +09:00
parent 6aa2bc2941
commit a08448ab40
304 changed files with 7574 additions and 2162 deletions
+5 -18
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -20,28 +20,15 @@
defined(__x86_64) || defined(__x86_64__) || \
defined(_M_AMD64) || defined (_M_X64)) && defined(OPENSSL_CPUID_OBJ)
size_t OPENSSL_ia32_rdrand(void);
size_t OPENSSL_ia32_rdrand_bytes(unsigned char *buf, size_t len);
static int get_random_bytes(unsigned char *buf, int num)
{
size_t rnd;
while (num >= (int)sizeof(size_t)) {
if ((rnd = OPENSSL_ia32_rdrand()) == 0)
return 0;
*((size_t *)buf) = rnd;
buf += sizeof(size_t);
num -= sizeof(size_t);
}
if (num) {
if ((rnd = OPENSSL_ia32_rdrand()) == 0)
return 0;
memcpy(buf, &rnd, num);
if (num < 0) {
return 0;
}
return 1;
return (size_t)num == OPENSSL_ia32_rdrand_bytes(buf, (size_t)num);
}
static int random_status(void)