Update - OpenSSL 1.1.1-pre7-dev
This commit is contained in:
+2
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-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
|
||||
@@ -15,8 +15,6 @@
|
||||
# include "internal/evp_int.h"
|
||||
# include <openssl/des.h>
|
||||
# include <openssl/rand.h>
|
||||
# include <internal/rand.h>
|
||||
# include "evp_locl.h"
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
@@ -231,12 +229,8 @@ static int des_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
|
||||
|
||||
switch (type) {
|
||||
case EVP_CTRL_RAND_KEY:
|
||||
if (c->drbg != NULL) {
|
||||
if (RAND_DRBG_bytes(c->drbg, ptr, 8) == 0)
|
||||
return 0;
|
||||
} else if (RAND_bytes(ptr, 8) <= 0) {
|
||||
if (RAND_priv_bytes(ptr, 8) <= 0)
|
||||
return 0;
|
||||
}
|
||||
DES_set_odd_parity((DES_cblock *)ptr);
|
||||
return 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user