PROV: Add DERlib support for DSA
[openssl.git] / providers / implementations / ciphers / cipher_tdes.c
index e6dab582ca57a1b4fa7b30f6f05385e04020ce8e..ea0c987a8042d92405e509ab69c6c0536bb2c214 100644 (file)
@@ -7,9 +7,15 @@
  * https://www.openssl.org/source/license.html
  */
 
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
 #include "prov/ciphercommon.h"
 #include "cipher_tdes.h"
-#include "crypto/rand.h"
+#include <openssl/rand.h>
 #include "prov/implementations.h"
 #include "prov/providercommonerr.h"
 
@@ -71,7 +77,7 @@ static int tdes_generatekey(PROV_CIPHER_CTX *ctx, void *ptr)
     DES_cblock *deskey = ptr;
     size_t kl = ctx->keylen;
 
-    if (kl == 0 || rand_priv_bytes_ex(ctx->libctx, ptr, kl) <= 0)
+    if (kl == 0 || RAND_priv_bytes_ex(ctx->libctx, ptr, kl) <= 0)
         return 0;
     DES_set_odd_parity(deskey);
     if (kl >= 16)