Fix OpenSSL 1.1 compat layer

- Changes for latest ykpiv_util refactor
 - Passes hw tests with openssl 1.0 and 1.1
 - Passes valgrind
This commit is contained in:
Trevor Bentley
2017-11-21 17:08:38 +01:00
parent 4785e23bd1
commit 7ca0267ddf
9 changed files with 60 additions and 40 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
#ifdef _WINDOWS
#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
struct des_key {
HCRYPTPROV hProv;
@@ -399,7 +399,7 @@ prng_rc _ykpiv_prng_generate(unsigned char *buffer, const size_t cb_req) {
}
#else
if (-1 == RAND_pseudo_bytes(buffer, cb_req)) {
if (-1 == RAND_bytes(buffer, cb_req)) {
rc = PRNG_GENERAL_ERROR;
}