]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_grasshopper_cipher.c
Replace RAND_bytes with RAND_priv_bytes
[openssl-gost/engine.git] / gost_grasshopper_cipher.c
index 70c9f17a354d4e4150fa2bca29b11135a7eb6d3d..2955534cb58fca1bad3b417ec106507a87785b62 100644 (file)
@@ -729,7 +729,7 @@ int gost_grasshopper_cipher_ctl(EVP_CIPHER_CTX *ctx, int type, int arg,
 {
     switch (type) {
     case EVP_CTRL_RAND_KEY:{
-            if (RAND_bytes
+            if (RAND_priv_bytes
                 ((unsigned char *)ptr, EVP_CIPHER_CTX_key_length(ctx)) <= 0) {
                 GOSTerr(GOST_F_GOST_GRASSHOPPER_CIPHER_CTL, GOST_R_RNG_ERROR);
                 return -1;