X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_crypt.c;fp=gost_crypt.c;h=a649e72ded26c111cb5d92154b01dd3a525439e0;hb=dd6e77bbda3347148139111b9433ab4f6bd1f46c;hp=7e733df7e581168ef2fd57cc9d78a0d2f333b509;hpb=f3e7c24d4733bb1c096e43345602d3258e994e3c;p=openssl-gost%2Fengine.git diff --git a/gost_crypt.c b/gost_crypt.c index 7e733df..a649e72 100644 --- a/gost_crypt.c +++ b/gost_crypt.c @@ -876,7 +876,7 @@ int gost_cipher_ctl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) #endif 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_CIPHER_CTL, GOST_R_RNG_ERROR); return -1;