summaryrefslogtreecommitdiff
path: root/lib/gnutls_pk.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2005-08-30 09:03:44 +0000
committerSimon Josefsson <simon@josefsson.org>2005-08-30 09:03:44 +0000
commit199a152697c2d4fdaf3e68842f9d77d0350c0e9c (patch)
treef372bf4d78c83d79f9f116dafecb18deb9fba066 /lib/gnutls_pk.c
parentfd878a3aa2872ab0cfeb2993cf5a71e0dacd3c40 (diff)
downloadgnutls-199a152697c2d4fdaf3e68842f9d77d0350c0e9c.tar.gz
Call gc directly instead of _gnutls_get_random.
Diffstat (limited to 'lib/gnutls_pk.c')
-rw-r--r--lib/gnutls_pk.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c
index 9f2183cefd..785bb9e84c 100644
--- a/lib/gnutls_pk.c
+++ b/lib/gnutls_pk.c
@@ -37,6 +37,7 @@
#include "debug.h"
#include <x509/mpi.h>
#include <x509/common.h>
+#include <gc.h>
static int _gnutls_pk_encrypt(int algo, mpi_t * resarr, mpi_t data,
mpi_t * pkey, int pkey_len);
@@ -96,17 +97,14 @@ int _gnutls_pkcs1_rsa_encrypt(gnutls_datum_t * ciphertext,
return GNUTLS_E_INTERNAL_ERROR;
}
- if ((ret =
- _gnutls_get_random(ps, psize, GNUTLS_STRONG_RANDOM)) < 0) {
+ if ((ret = gc_pseudo_random (ps, psize)) != GC_OK) {
gnutls_assert();
gnutls_afree(edata);
return ret;
}
for (i = 0; i < psize; i++)
while (ps[i] == 0) {
- if ((ret =
- _gnutls_get_random(&ps[i], 1,
- GNUTLS_STRONG_RANDOM)) < 0) {
+ if ((ret = gc_pseudo_random (&ps[i], 1)) != GC_OK) {
gnutls_assert();
gnutls_afree(edata);
return ret;