RAND_pseudo_bytes is deprecated in OpenSSL 1.1.0

This commit is contained in:
Jakub Jelen
2017-10-20 11:16:18 +02:00
parent ad4e93a462
commit d2ffc41a6c
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -645,7 +645,7 @@ static bool set_dataobject(ykpiv_state *state, int verbose, int type) {
id = YKPIV_OBJ_CAPABILITY;
}
memcpy(obj, tmpl, len);
if(RAND_pseudo_bytes(obj + offs, rand_len) == -1) {
if(RAND_bytes(obj + offs, rand_len) == -1) {
fprintf(stderr, "error: no randomness.\n");
return false;
}
@@ -1457,7 +1457,7 @@ static bool test_signature(ykpiv_state *state, enum enum_slot slot,
{
unsigned char rand[128];
EVP_MD_CTX *mdctx;
if(RAND_pseudo_bytes(rand, 128) == -1) {
if(RAND_bytes(rand, 128) == -1) {
fprintf(stderr, "error: no randomness.\n");
return false;
}
@@ -1604,7 +1604,7 @@ static bool test_decipher(ykpiv_state *state, enum enum_slot slot,
size_t len2 = sizeof(data);
RSA *rsa = EVP_PKEY_get1_RSA(pubkey);
if(RAND_pseudo_bytes(secret, sizeof(secret)) == -1) {
if(RAND_bytes(secret, sizeof(secret)) == -1) {
fprintf(stderr, "error: no randomness.\n");
ret = false;
goto decipher_out;